Add driver
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*instruction-set* instruction-type instruction-code))
|
||||
|
||||
;;; Data Structures
|
||||
(define *stack-size* 1000)
|
||||
(define *stack-size* 512)
|
||||
(define *memory-size* 2048)
|
||||
|
||||
(define* (make-stack #:optional (stack-size *stack-size*))
|
||||
@@ -79,7 +79,7 @@
|
||||
(let ([bv (read-bytevector 4)])
|
||||
(bytevector-s32-ref bv 0 (native-endianness))))
|
||||
|
||||
;;; Program execution
|
||||
;;; Instructions
|
||||
(define *instruction-set*
|
||||
'((push #x01 i)
|
||||
(pop #x02 o)
|
||||
@@ -126,6 +126,8 @@
|
||||
[(<) <]
|
||||
[(=) =]))
|
||||
|
||||
|
||||
;;; Execution
|
||||
(define (jump addr)
|
||||
(seek (current-input-port) addr SEEK_SET))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user