Mirror of CollapseOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
326B

  1. jp test
  2. .inc "core.asm"
  3. .inc "str.asm"
  4. .inc "lib/util.asm"
  5. .inc "zasm/util.asm"
  6. testNum: .db 1
  7. sFoo: .db "foo", 0
  8. test:
  9. ld hl, 0xffff
  10. ld sp, hl
  11. ld hl, sFoo
  12. call strlen
  13. cp 3
  14. jp nz, fail
  15. call nexttest
  16. ; success
  17. xor a
  18. halt
  19. nexttest:
  20. ld a, (testNum)
  21. inc a
  22. ld (testNum), a
  23. ret
  24. fail:
  25. ld a, (testNum)
  26. halt