((1op #x0E) load ez-op-load)
((var #x01) storew ez-op-storew)
((2op #x0F) loadw ez-op-loadw)
+ ((var #x02) storeb ez-op-storeb)
+ ((2op #x10) loadb ez-op-loadb)
((2op #x01) je ez-op-je)
((2op #x08) or ez-op-or)
((2op #x09) and ez-op-and)
((var #x03) put_prop ez-op-put-prop)
((0op #x02) print ez-op-print)
((0op #x0B) new_line ez-op-new-line)
- ((var #x06) print_num ez-op-print-num)))
+ ((var #x06) print_num ez-op-print-num)
+ ((var #x05) print_char ez-op-print-char)))
(defun ez-op-ret (operands &optional operand-types)
(let ((retval (car operands)))
(ez-set-var (ez-read-pc-byte-and-inc) (ez-mem-ref-word (+ baddr (* 2 n)))))
t)
+(defun ez-op-storeb (operands operand-types)
+ (let ((baddr (car operands))
+ (n (cadr operands))
+ (a (caddr operands)))
+ (ez-mem-set-byte (+ baddr n) a))
+ t)
+
+(defun ez-op-loadb (operands operand-types)
+ (let ((baddr (car operands))
+ (n (cadr operands)))
+ (ez-set-var (ez-read-pc-byte-and-inc) (ez-mem-ref-byte (+ baddr n))))
+ t)
+
(defun ez-op-and (operands operand-types)
(let ((a (car operands))
(b (cadr operands)))
(ez-print (number-to-string s)))
t)
+(defun ez-op-print-char (operands operand-types)
+ (let ((c (car operands)))
+ (ez-print (string c)))
+ t)
+
;; Execution loop