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.

43 lines
413B

  1. jp test
  2. .inc "ed/util.asm"
  3. test:
  4. ld sp, 0xffff
  5. ; *** cpHLDE ***
  6. ld hl, 0x42
  7. ld de, 0x42
  8. call cpHLDE
  9. jp nz, fail
  10. jp c, fail
  11. call nexttest
  12. ld de, 0x4242
  13. call cpHLDE
  14. jp z, fail
  15. jp nc, fail
  16. call nexttest
  17. ld hl, 0x4243
  18. call cpHLDE
  19. jp z, fail
  20. jp c, fail
  21. call nexttest
  22. ; success
  23. xor a
  24. halt
  25. testNum: .db 1
  26. nexttest:
  27. ld a, (testNum)
  28. inc a
  29. ld (testNum), a
  30. ret
  31. fail:
  32. ld a, (testNum)
  33. halt