(ez-print (ez-get-obj-name obj)))
'run)
+(defvar ez--next-read-args nil)
(defun ez-op-read (operands operand-types)
(let ((baddr1 (car operands))
(baddr2 (cadr operands)))
- )
+ (setq ez--next-read-args (list baddr1 baddr2)))
'wait-for-input)
+(defun ez-op-read2 (input-string)
+ (ez-tokenize-string input-string
+ (car ez--next-read-args)
+ (cadr ez--next-read-args))
+ 'run)
+
;; Execution loop
(defun ez-load-and-run (filename)
(defun ez-enter ()
(interactive)
- (with-current-buffer "*ez*"
- (buffer-substring ez-input-marker (point-max))))
+ (if (not (eq ez-machine-state 'wait-for-input))
+ (error "Z-machine not ready for input."))
+ (let ((input-string (with-current-buffer "*ez*"
+ (buffer-substring ez-input-marker (point-max)))))
+ (ez-op-read2 input-string)
+ (ez-run)))
;; Mode