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.

40 lines
1.1KB

  1. 0xff00 CONSTANT RS_ADDR 0xfffa CONSTANT PS_ADDR
  2. RS_ADDR 0x80 - CONSTANT RAMSTART
  3. 212 LOAD ( z80 assembler )
  4. 262 LOAD ( xcomp ) 270 LOAD ( xcomp overrides )
  5. 282 LOAD ( boot.z80 ) 353 LOAD ( xcomp core low )
  6. CODE (emit)
  7. A 1 LDrn, 1 OUTnA, HL POPqq, A L LDrr, 0 OUTnA,
  8. ;CODE
  9. CODE (key)
  10. BEGIN, 1 INAn, A INCr, JRZ, AGAIN,
  11. A DECr, PUSHA,
  12. ;CODE
  13. : _sel ( sec )
  14. ( 32 sectors per track, 512 tracks per disk )
  15. 32 /MOD ( addr sec trk )
  16. 0x0a ( seltrk ) 1 PC! 0 PC! 0 0 PC! ( addr sec )
  17. 0x0b ( selsec ) 1 PC! 0 PC! ( addr ) ;
  18. : _ ( addr )
  19. ( get 512 bytes )
  20. 0x86 ( readsec ) 1 PC!
  21. 512 0 DO 0 PC@ SWAP C!+ LOOP DROP
  22. ;
  23. : FD@ 2 * DUP _sel BLK( _ 1+ _sel BLK( 512 + _ ;
  24. : _ ( addr )
  25. ( write 512 bytes )
  26. 0x0c ( writesec ) 1 PC!
  27. 512 0 DO C@+ 0 PC! LOOP DROP
  28. ;
  29. : FD! 2 * DUP _sel BLK( _ 1+ _sel BLK( 512 + _ ;
  30. : FD$ ( select disk 0 )
  31. 0x09 ( seldisk ) 1 PC! 0 0 PC! ( sel disk 0 )
  32. ;
  33. 380 LOAD ( xcomp core high )
  34. (entry) _
  35. ( Update LATEST )
  36. PC ORG @ 8 + !
  37. ," CURRENT @ HERE ! BLK$ FD$ ' FD@ BLK@* ! ' FD! BLK!* ! " EOT,
  38. ORG @ 256 /MOD 2 PC! 2 PC!
  39. H@ 256 /MOD 2 PC! 2 PC!