- ld hl, .ok
- call puts
- ret
-.fail:
- call puts
- ld hl, .testfailed
- call puts
- ret
-.insnteststr:
- db "Testing instructions... ",0
-.pushpopfail:
- db "PUSH/POP",0
-.ff:
- db $FF
-.xorhlfail:
- db "XOR [HL]",0
-.jphlfail:
- db "JP [HL]",0
-.jrfail:
- db "JR",0
-.cpfail:
- db "CP",0
-.cplfail:
- db "CPL",0
-.testfailed:
- db " test failed.",$0D,$0A,0
-.ok:
- db "OK!",$0D,$0A,0
-
-; Serial port manipulation functions.
-putc:
- push af
- ld b, 0
- ld c, $50
-.waitport:
- ld a,[c]
- cp b
- jr nz,.waitport
- pop af
- ld [c],a
- ret
-
-puts:
- ld a, [hli]
- ld b, $00
- cp b
- ret z
- call putc
- jr puts
+ POP HL
+ POP DE
+ POP BC
+ POP AF
+ RETI
+ db $18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE
+ db $18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE
+ db $18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE