mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-27 21:18:05 +11:00
37 lines
320 B
NASM
37 lines
320 B
NASM
|
jp test
|
||
|
|
||
|
#include "core.asm"
|
||
|
#include "parse.asm"
|
||
|
#include "zasm/util.asm"
|
||
|
|
||
|
testNum: .db 1
|
||
|
|
||
|
test:
|
||
|
ld hl, 0xffff
|
||
|
ld sp, hl
|
||
|
|
||
|
ld de, 12
|
||
|
ld bc, 4
|
||
|
call multDEBC
|
||
|
ld a, l
|
||
|
cp 48
|
||
|
jp nz, fail
|
||
|
call nexttest
|
||
|
|
||
|
; success
|
||
|
xor a
|
||
|
halt
|
||
|
|
||
|
nexttest:
|
||
|
ld a, (testNum)
|
||
|
inc a
|
||
|
ld (testNum), a
|
||
|
ret
|
||
|
|
||
|
fail:
|
||
|
ld a, (testNum)
|
||
|
halt
|
||
|
|
||
|
|
||
|
|