* Editor/Assembler Pseudo DSR for loading internal files * Based on the CS1 DSR, as a sole GPL DSR example * Loads at GROM >8000 (second GROM), data follows * EDIT1 at GROM >A000 (6k) * ASSM1 at GROM >C000 (6k) and >E000 (2k) * ASSM2 at GROM >E800 (4k) * Only supports those three files, and only PROGRAM LOAD * note: only loads EDIT1, abandoned this approach after finding Theirry's E/A disassembly! * see bottom for notes on that. This is still a nice reference for GPL DSR! >8000 00 00 DATA >0000 Next DSR 80 10 DATA >ENTRY Entry point 04 DATA >04 Name length 45 44 TEXT ':EDAS:' 41 53 00 00 DATA >0000,>0000,>0000 00 00 00 00 00 DATA >00 7 bytes of padding ENTRY >8010 BC 5A 73 ST @>835A,@>8373 >835A Substack A5 56 54 DSUB @>8356,@>8354 Compute address length byte (FRAGE) B2 EF FF F7 AND VDP@>FFF7(@>8356),>1F Clear PAB error 56 1F 35 00 0A 4A MOVE >000A TO @>834A FROM VDP@>FFF6(@>8356) PAB on FAC EF FF F6 56 BD 5E 4C DST @>835E,@>834C Buffer address 8A 4A CASE @>834A Test on I/O op code 40 3D BR GROM@>ERROR Open 40 3D BR GROM@>ERROR Close 40 3D BR GROM@>ERROR Read 40 3D BR GROM@>ERROR Write 40 3D BR GROM@>ERROR Restore 40 52 BR GROM@>LOAD Load 40 3D BR GROM@>ERROR Save 40 3D BR GROM@>ERROR Delete 40 3D BR GROM@>ERROR Scratch record 40 4B BR GROM@>STATUS Status ERROR >803D B6 EF FF F7 OR VDP@>FFF7(@>8356),>60 Error illegal operation 56 60 EXIT >8043 86 7F CLR @>837F BC 73 5A ST @>8373,@>835A Old substack 06 00 12 CALL GROM@>0012 Return over GSR return STATUS >804B (not sure this is needed, but it's easy to implement) 86 EF FF FC CLR VDP@>FFFC(@>8356) Status=>00 56 40 43 BR GROM@>EXIT End LOAD >8052 * TODO: Determine which file (if bad, branch to error) (for now assume edit1) * Copy EDIT1 into the buffer 31 18 00 B0 MOVE >1800 TO VDP*>834C FROM GROM@>A000 4C A0 00 83 53 CLR @>8353 40 43 BR GROM@>EXIT ---------------------------------------------------- Lines actually used * EDIT1 at GROM >8000 (6k) * ASSM1 at GROM >A000 (6k) and >C000 (2k) * ASSM2 at GROM >C800 (4k) EDIT1 -- >01F1 31 17 00 8F MOVE >1700 TO @>2000 FROM GROM@>8000 9D 00 80 00 hook for ASSM -- jump at >067F 06 70 30 CALL GROM@>7030 05 66 87 B GROM@>6687 (skip over block) ASSM1 and 2 -- >1030 (low ram line buffer overwrite) 31 18 00 8F MOVE >1800 to @>2000 FROM GROM@>A000 9D 00 a0 00 31 07 FA 8F MOVE >07FA to @>3800 FROM GROM@>C000 B5 00 C0 00 31 0F FC 8F MOVE >0FFC to @>A000 FROM GROM@>C800 1D 00 C8 00 01 RTNC Note that the tag for ASSM1 (first byte) is changed from >AA to >BB so the TI doesn't think it's a GROM header. The test is fixed at offset >0654 in EACOMPLT.BIN.