mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-06 06:30:55 +11:00
f4b6c7637d
scas, it's not needed any more.
44 lines
389 B
NASM
44 lines
389 B
NASM
jp test
|
|
|
|
.inc "core.asm"
|
|
.inc "parse.asm"
|
|
.inc "zasm/util.asm"
|
|
|
|
testNum: .db 1
|
|
sFoo: .db "foo", 0
|
|
|
|
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
|
|
|
|
ld hl, sFoo
|
|
call strlen
|
|
cp 3
|
|
jp nz, fail
|
|
call nexttest
|
|
|
|
; success
|
|
xor a
|
|
halt
|
|
|
|
nexttest:
|
|
ld a, (testNum)
|
|
inc a
|
|
ld (testNum), a
|
|
ret
|
|
|
|
fail:
|
|
ld a, (testNum)
|
|
halt
|
|
|
|
|
|
|