((= var 0)
(ez-routine-stack-pop))
((< var 16)
- (ez-get-local-var (- var 1)))
+ (ez-get-local-var var))
(t
(ez-get-global-var (- var 16)))))
((= var 0)
(ez-routine-stack-push val))
((< var 16)
- (ez-set-local-var (- var 1) val))
+ (ez-set-local-var var val))
(t
(ez-set-global-var (- var 16) val))))
(unless table-row
(error "Unsupported op" optype opcode))
(let ((mnemonic (elt table-row 1)))
- (message "Optype:%s Opcode:%x Operands:%s"
- (symbol-name optype)
- opcode operands))
+ (message "Optype:%s Opcode:%x Mnemonic:%s Operands:%s"
+ optype opcode mnemonic operands))
(apply (elt table-row 2) operands))))
(defun ez-read-var-operands-and-inc ()
(dotimes (i L)
(if (< i n)
(ez-set-local-var (+ i 1) (elt operands i))
- (ez-set-local-var (+ i 1) (ez-mem-ref-byte (+ r 1 (* 2 i)))))))
+ (ez-set-local-var (+ i 1) (ez-mem-ref-word (+ r 1 (* 2 i)))))))
t)
;; Main
(ez-parse-header)
(setq ez-call-stack (list (ez-make-call-stack-frame ez-start-pc)))
(ez-execute-instr)
-
-(binformat #x9b)
-"10 01 10 11"
-
-(* 2 #x2b07)
-
-"10011011"
-
-#b00101111
-(lsh #x2f)
-
ez-call-stack
-(binformat #x2f)
-"10 11 11"
-(* 2 #x2b07)
-
-
-(ez-get-obj 1)
-
(defun binformat (n &optional s)
(unless s
(setq s ""))