Skip to content

Commit 07dc2fa

Browse files
committed
Add the spec for TRAP instruction
1 parent 4301468 commit 07dc2fa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lc3.lisp

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
R9 is the conditional")
66
(defparameter *flags* '(1 0 -1)
77
"Sign of u16 written to the conditional register")
8+
(defparameter *traps* '((getc #x20)
9+
(out #x21)
10+
(puts #x22)
11+
(in #x23)
12+
(putsp #x24)
13+
(halt #x25))
14+
"The traps that get used")
815
(defparameter *operations* '(br add ld st jsr and ldr str
916
rti not ldi sti jmp res lea trap
1017
ret)

0 commit comments

Comments
 (0)