Mirror of CollapseOS
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

75 lignes
1.7KB

  1. 0x8000 CONSTANT RAMSTART
  2. 0xbf00 CONSTANT RS_ADDR
  3. 0xbffa CONSTANT PS_ADDR
  4. RAMSTART 0x70 + CONSTANT LCD_MEM
  5. RAMSTART 0x72 + CONSTANT KBD_MEM
  6. 0x01 CONSTANT KBD_PORT
  7. 212 LOAD ( z80 assembler )
  8. : ZFILL, ( u ) 0 DO 0 A, LOOP ;
  9. 262 LOAD ( xcomp )
  10. 522 LOAD ( font compiler )
  11. 282 LOAD ( boot.z80.decl )
  12. 270 LOAD ( xcomp overrides )
  13. ( TI-84+ requires specific code at specific offsets which
  14. come in conflict with Collapse OS' stable ABI. We thus
  15. offset the binary by 0x100, which is our minimum possible
  16. increment and fill the TI stuff with the code below. )
  17. 0x5a JPnn, 0x15 ZFILL, ( 0x18 )
  18. 0x5a JPnn, ( reboot ) 0x1d ZFILL, ( 0x38 )
  19. ( handleInterrupt )
  20. DI,
  21. AF PUSHqq,
  22. ( did we push the ON button? )
  23. 0x04 ( PORT_INT_TRIG ) INAn,
  24. 0 ( INT_TRIG_ON ) A BITbr,
  25. IFNZ,
  26. ( yes? acknowledge and boot )
  27. 0x03 ( PORT_INT_MASK ) INAn,
  28. 0x00 ( INT_MASK_ON ) A RESbr, ( ack interrupt )
  29. 0x03 ( PORT_INT_MASK ) OUTnA,
  30. AF POPqq,
  31. EI,
  32. 0x100 JPnn,
  33. THEN,
  34. AF POPqq,
  35. EI,
  36. RETI,
  37. 0x03 ZFILL, ( 0x53 )
  38. 0x5a JPnn, ( 0x56 ) 0xff A, 0xa5 A, 0xff A, ( 0x5a )
  39. ( boot )
  40. DI,
  41. (im1)
  42. ( enable the ON key interrupt )
  43. 0x03 ( PORT_INT_MASK ) INAn,
  44. 0x00 ( INT_MASK_ON ) A SETbr,
  45. 0x03 ( PORT_INT_MASK ) OUTnA,
  46. A 0x80 LDrn,
  47. 0x07 ( PORT_BANKB ) OUTnA,
  48. EI,
  49. ( LCD off )
  50. A 0x02 ( LCD_CMD_DISABLE ) LDrn,
  51. 0x10 ( LCD_PORT_CMD ) OUTnA,
  52. HALT,
  53. 0x95 ZFILL, ( 0x100 )
  54. ( All set, carry on! )
  55. CURRENT @ XCURRENT !
  56. 0x100 BIN( !
  57. 283 335 LOADR ( boot.z80 )
  58. 353 LOAD ( xcomp core low )
  59. CREATE ~FNT CPFNT3x5
  60. 555 560 LOADR ( LCD low )
  61. 566 570 LOADR ( KBD low )
  62. 380 LOAD ( xcomp core high )
  63. (entry) _
  64. ( Update LATEST )
  65. PC ORG @ 8 + !
  66. ," LCD$ KBD$ " EOT,
  67. ORG @ 0x100 - 256 /MOD 2 PC! 2 PC!
  68. H@ 256 /MOD 2 PC! 2 PC!