43 .macro load2w reg hi lo
53 .macro check exit reg val
63 .macro check2w2 exit reg hi lo
83 .macro loadacc2 acc guard hi lo
93 .macro checkacc2 exit acc guard hi lo
120 .macro checkpsw2 exit val
132 ;; 4:write
(1, string
, strlen
(string
))
139 1: .string
"Hello World!\n"
145 ;;; Blat our DMAP registers so that they point at on-chip imem
146 .macro point_dmap_at_imem
148 ldi r2
, MAP_INSN |
0xf
149 st r2
, @
(DMAP_REG
,r0
)
151 st r2
, @
(IMAP1_REG
,r0
)
154 ;;; Patch VEC so that it jumps back to code that checks PSW
155 ;;; and then exits with success.
156 .macro check_interrupt vec psw src
157 ;;; Patch the interrupt vector's AE entry with a jmp to success
169 ;;; Code that gets patched into the interrupt vector
173 ;;; Successfull trap jumps back to here
181 ;;; Verify the original addr
183 cmpeqi r2
, #\src@word
187 ;;; continue as normal