Mirror of CollapseOS
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

59 行
763B

  1. v_init:
  2. call 3435 ; ZXS_CLS
  3. ld a, 2
  4. call 5633 ; ZXS_STRM, current stream = 1, main screen
  5. ret
  6. ; the ZX Spectrum BASIC firmware puts the character in A into the current output stream by RST 16
  7. v_putc:
  8. ; save all
  9. push hl
  10. push bc
  11. push de
  12. push af
  13. push ix
  14. push iy
  15. ld iy, IYBAS ; restore IY for BASIC
  16. ; main
  17. push af ; char
  18. push bc ; curflag
  19. push de ; coords
  20. ld a, 22 ; AT_CTRL, screen position, 22x32
  21. rst 16
  22. pop de
  23. ld a, d
  24. push de
  25. rst 16
  26. pop de
  27. ld a, e
  28. rst 16
  29. pop bc
  30. xor a
  31. cp c
  32. jp z, .char
  33. ld a, 18 ; FLASH_CTRL
  34. rst 16
  35. xor a
  36. inc a ; on
  37. rst 16
  38. pop af
  39. rst 16
  40. ld a, 18 ; FLASH_CTRL
  41. rst 16
  42. xor a ; off
  43. rst 16
  44. jp .rest
  45. .char:
  46. pop af
  47. rst 16
  48. ; restore and return
  49. .rest:
  50. pop iy
  51. pop ix
  52. pop af
  53. pop de
  54. pop bc
  55. pop hl
  56. ret