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.

44 lines
389B

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