Home » CEEFAX disks » telesoftware9.adl » 11-09-88/DUALDFS
11-09-88/DUALDFS
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » CEEFAX disks » telesoftware9.adl |
Filename: | 11-09-88/DUALDFS |
Read OK: | ✔ |
File size: | 1177 bytes |
Load address: | 0800 |
Exec address: | 802B |
File contents
10REM: DUALDFS 20osnewl=&FFE7 30oswrch=&FFEE 40osword=&FFF1 50osbyte=&FFF4 60DIM table &50 70DIM mcode &500 80DIM buffer &1000 90FOR pass=0 TO 2 STEP 2 100P%=mcode 110[OPT pass 120JSR osnewl 130.mainloop 140JSR escape \ check escape flag 150JSR sectorids \ read all sector ids 160JSR read \ read all sectors 170JSR seektwo \ seek source track * 2 180LDA track \ source track number 190JSR register \ write track register 200JSR format \ format 2 * source track 210JSR write \ write all sectors 220LDA track \ load source track 230ASL A \ *2 = physical track number 240JSR register \ write track register 250JSR printbyte \ print track number 260INC track \ increment source track number 270LDA track \ load source track number 280CMP #40 \ all done? 290BNE mainloop \ if not read next track 300JSR osnewl 310RTS \ return to BASIC 320.escape 330LDA &FF \ escape flag 340BMI pressed \ bit 7 set if pressed 350RTS 360.pressed 370LDA #&7E 380JSR osbyte \ acknowledge Escape 390BRK 400BRK 410EQUS "Escape" 420BRK 430.seektwo 440LDA track \ source track number 450ASL A \ *2 460STA seekblock+7 \ physical track number 470LDA #&7F 480LDX #seekblock MOD 256 490LDY #seekblock DIV 256 500JSR osword 510LDA seekblock+8 \ result 520BNE seekerror \ = 0 if OK 530RTS 540.seekerror 550BRK 560BRK 570EQUS "Seek error" 580BRK 590.format 600LDA track \ source track number 610STA formblock+7 \ store physical track 620JSR register \ write track register 630LDA #&7F 640LDX #formblock MOD 256 650LDY #formblock DIV 256 660JSR osword 670LDA formblock+12 \ result 680BNE formerror \ = 0 if OK 690RTS 700.formerror 710BRK 720BRK 730EQUS "Format error" 740BRK 750.register 760STA regblock+8 \ value to put in register 770LDA #&7F 780LDX #regblock MOD 256 790LDY #regblock DIV 256 800JSR osword 810LDA regblock+9 \ result 820BNE regerror \ = 0 if OK 830RTS 840.regerror 850BRK 860BRK 870EQUS "Special register error" 880BRK 890.sectorids 900LDA track \ source track number 910STA idsblock+7 \ store physical track 920LDA #&7F 930LDX #idsblock MOD 256 940LDY #idsblock DIV 256 950JSR osword 960LDA idsblock+10 \ result 970BNE idserror \ = 0 if OK 980RTS 990.idserror 1000BRK 1010BRK 1020EQUS "Sector ID Error" 1030BRK 1040.read 1050LDA track \ source track number 1060STA copyblock+7 \ logical track number 1070LDA #&53 \ read data multi-sector 1080STA copyblock+6 1090LDA #&7F 1100LDX #copyblock MOD 256 1110LDY #copyblock DIV 256 1120JSR osword 1130LDA copyblock+10 1140BNE readerror 1150RTS 1160.readerror 1170BRK 1180BRK 1190EQUS "Read error" 1200BRK 1210.write 1220LDA #&4B \ write data multi-sector 1230STA copyblock+6 1240LDA #&7F 1250LDX #copyblock MOD 256 1260LDY #copyblock DIV 256 1270JSR osword 1280LDA copyblock+10 \ result 1290BNE writeerror \ = 0 if OK 1300RTS 1310.writeerror 1320BRK 1330BRK 1340EQUS "Write error" 1350BRK 1360.printbyte 1370LDA track \ print source track number 1380PHA 1390LSR A 1400LSR A 1410LSR A 1420LSR A 1430JSR nybble \ print MS nybble 1440PLA 1450JSR nybble \ print LS nybble 1460LDA #ASC(" ") 1470JSR oswrch \ print space 1480JMP oswrch \ print space 1490.nybble 1500AND #&0F 1510SED 1520CLC 1530ADC #&90 1540ADC #&40 1550CLD 1560JMP oswrch \ print nybble and return 1570.seekblock 1580EQUB &00 \ drive 0 1590EQUD &00 \ does not matter 1600EQUB &01 \ 1 parameter 1601EQUB &69 \ seek command 1602EQUB &00 \ physical track number 1603EQUB &00 \ result 1610.regblock 1620EQUB &00 \ drive 0 1630EQUD &00 \ does not matter 1640EQUB &02 \ 2 parameters 1641EQUB &7A \ write special register 1642EQUB &12 \ track register, drive 0/2 1643EQUB &00 \ value to be put in register 1650EQUB &00 \ result 1660.idsblock 1670EQUB &00 \ drive 0 1680EQUD table \ address of buffer 1690EQUB &03 \ 3 parameters 1691EQUB &5B \ read sector IDs command 1692EQUB &00 \ physical track number 1693EQUB &00 1700EQUB &0A \ number of IDs 1701EQUB &00 \ result 1710.copyblock 1720EQUB &00 \ drive 0 1730EQUD buffer \ address of buffer 1740EQUB &03 \ 3 parameters 1741EQUB &57 \ read data multi-sector 1742EQUB &00 \ logical track number 1743EQUB &00 \ start logical sector number 1750EQUB &2A \ 10 sectors of 256 bytes 1751EQUB &00 \ result 1760.formblock 1770EQUB &00 \ drive 0 1780EQUD table \ address of sector table 1790EQUB &05 \ 5 parameters 1791EQUB &63 \ format command 1792EQUB &00 \ physical track number 1793EQUB &15 \ gap 3 size 1800EQUB &2A \ 10 sectors of 256 bytes 1801EQUB &00 \ gap 5 size 1802EQUB &10 \ gap 1 size 1803EQUB &00 \ result 1810.track 1820EQUB 20 \ use tracks 20-39 1830] 1840NEXT 1850PRINT'"Place 40 track formatted 80 track disc" 1860PRINT"in drive 0, and press Spacebar" 1870REPEAT 1880UNTIL GET = 32 1890CALL mcode
�: DUALDFS osnewl=&FFE7 oswrch=&FFEE (osword=&FFF1 2osbyte=&FFF4 <� table &50 F� mcode &500 P� buffer &1000 Z� pass=0 � 2 � 2 dP%=mcode n [OPT pass xJSR osnewl � .mainloop �"JSR escape \ check escape flag �'JSR sectorids \ read all sector ids �JSR read \ read all sectors �'JSR seektwo \ seek source track * 2 �#LDA track \ source track number �'JSR register \ write track register �(JSR format \ format 2 * source track �!JSR write \ write all sectors �!LDA track \ load source track �&ASL A \ *2 = physical track number �'JSR register \ write track register �&JSR printbyte \ print track number -INC track \ increment source track number (LDA track \ load source track number CMP #40 \ all done? ")BNE mainloop \ if not read next track ,JSR osnewl 6RTS \ return to BASIC @.escape JLDA &FF \ escape flag T&BMI pressed \ bit 7 set if pressed ^RTS h.pressed rLDA #&7E |#JSR osbyte \ acknowledge Escape �BRK �BRK �EQUS "Escape" �BRK �.seektwo �#LDA track \ source track number �ASL A \ *2 �+STA seekblock+7 \ physical track number �LDA #&7F �LDX #seekblock � 256 �LDY #seekblock � 256 �JSR osword �LDA seekblock+8 \ result BNE seekerror \ = 0 if OK RTS .seekerror &BRK 0BRK :EQUS "Seek error" DBRK N.format X#LDA track \ source track number b*STA formblock+7 \ store physical track l'JSR register \ write track register vLDA #&7F �LDX #formblock � 256 �LDY #formblock � 256 �JSR osword �LDA formblock+12 \ result �BNE formerror \ = 0 if OK �RTS �.formerror �BRK �BRK �EQUS "Format error" �BRK � .register �-STA regblock+8 \ value to put in register LDA #&7F LDX #regblock � 256 LDY #regblock � 256 JSR osword *LDA regblock+9 \ result 4BNE regerror \ = 0 if OK >RTS H .regerror RBRK \BRK f!EQUS "Special register error" pBRK z.sectorids �#LDA track \ source track number �)STA idsblock+7 \ store physical track �LDA #&7F �LDX #idsblock � 256 �LDY #idsblock � 256 �JSR osword �LDA idsblock+10 \ result �BNE idserror \ = 0 if OK �RTS � .idserror �BRK �BRK �EQUS "Sector ID Error" BRK .read #LDA track \ source track number $*STA copyblock+7 \ logical track number .%LDA #&53 \ read data multi-sector 8STA copyblock+6 BLDA #&7F LLDX #copyblock � 256 VLDY #copyblock � 256 `JSR osword jLDA copyblock+10 tBNE readerror ~RTS �.readerror �BRK �BRK �EQUS "Read error" �BRK � .write �&LDA #&4B \ write data multi-sector �STA copyblock+6 �LDA #&7F �LDX #copyblock � 256 �LDY #copyblock � 256 �JSR osword LDA copyblock+10 \ result BNE writeerror \ = 0 if OK RTS .writeerror (BRK 2BRK <EQUS "Write error" FBRK P.printbyte Z)LDA track \ print source track number dPHA n LSR A x LSR A � LSR A � LSR A � JSR nybble \ print MS nybble �PLA � JSR nybble \ print LS nybble �LDA #�(" ") �JSR oswrch \ print space �JMP oswrch \ print space �.nybble � � #&0F �SED �CLC �ADC #&90 ADC #&40 CLD (JMP oswrch \ print nybble and return ".seekblock ,EQUB &00 \ drive 0 6EQUD &00 \ does not matter @EQUB &01 \ 1 parameter AEQUB &69 \ seek command B$EQUB &00 \ physical track number CEQUB &00 \ result J .regblock TEQUB &00 \ drive 0 ^EQUD &00 \ does not matter hEQUB &02 \ 2 parameters i%EQUB &7A \ write special register j(EQUB &12 \ track register, drive 0/2 k*EQUB &00 \ value to be put in register rEQUB &00 \ result | .idsblock �EQUB &00 \ drive 0 �"EQUD table \ address of buffer �EQUB &03 \ 3 parameters �&EQUB &5B \ read sector IDs command �$EQUB &00 \ physical track number �EQUB &00 �EQUB &0A \ number of IDs �EQUB &00 \ result �.copyblock �EQUB &00 \ drive 0 �#EQUD buffer \ address of buffer �EQUB &03 \ 3 parameters �%EQUB &57 \ read data multi-sector �#EQUB &00 \ logical track number �*EQUB &00 \ start logical sector number �&EQUB &2A \ 10 sectors of 256 bytes �EQUB &00 \ result �.formblock �EQUB &00 \ drive 0 �(EQUD table \ address of sector table �EQUB &05 \ 5 parameters �EQUB &63 \ format command $EQUB &00 \ physical track number EQUB &15 \ gap 3 size &EQUB &2A \ 10 sectors of 256 bytes EQUB &00 \ gap 5 size EQUB &10 \ gap 1 size EQUB &00 \ result .track EQUB 20 \ use tracks 20-39 &] 0� :.�'"Place 40 track formatted 80 track disc" D%�"in drive 0, and press Spacebar" N� X� � = 32 b� mcode �
00000000 0d 00 0a 0e f4 3a 20 44 55 41 4c 44 46 53 0d 00 |.....: DUALDFS..| 00000010 14 10 6f 73 6e 65 77 6c 3d 26 46 46 45 37 0d 00 |..osnewl=&FFE7..| 00000020 1e 10 6f 73 77 72 63 68 3d 26 46 46 45 45 0d 00 |..oswrch=&FFEE..| 00000030 28 10 6f 73 77 6f 72 64 3d 26 46 46 46 31 0d 00 |(.osword=&FFF1..| 00000040 32 10 6f 73 62 79 74 65 3d 26 46 46 46 34 0d 00 |2.osbyte=&FFF4..| 00000050 3c 0f de 20 74 61 62 6c 65 20 26 35 30 0d 00 46 |<.. table &50..F| 00000060 10 de 20 6d 63 6f 64 65 20 26 35 30 30 0d 00 50 |.. mcode &500..P| 00000070 12 de 20 62 75 66 66 65 72 20 26 31 30 30 30 0d |.. buffer &1000.| 00000080 00 5a 14 e3 20 70 61 73 73 3d 30 20 b8 20 32 20 |.Z.. pass=0 . 2 | 00000090 88 20 32 0d 00 64 0c 50 25 3d 6d 63 6f 64 65 0d |. 2..d.P%=mcode.| 000000a0 00 6e 0d 5b 4f 50 54 20 70 61 73 73 0d 00 78 0e |.n.[OPT pass..x.| 000000b0 4a 53 52 20 6f 73 6e 65 77 6c 0d 00 82 0d 2e 6d |JSR osnewl.....m| 000000c0 61 69 6e 6c 6f 6f 70 0d 00 8c 22 4a 53 52 20 65 |ainloop..."JSR e| 000000d0 73 63 61 70 65 20 5c 20 63 68 65 63 6b 20 65 73 |scape \ check es| 000000e0 63 61 70 65 20 66 6c 61 67 0d 00 96 27 4a 53 52 |cape flag...'JSR| 000000f0 20 73 65 63 74 6f 72 69 64 73 20 5c 20 72 65 61 | sectorids \ rea| 00000100 64 20 61 6c 6c 20 73 65 63 74 6f 72 20 69 64 73 |d all sector ids| 00000110 0d 00 a0 1f 4a 53 52 20 72 65 61 64 20 5c 20 72 |....JSR read \ r| 00000120 65 61 64 20 61 6c 6c 20 73 65 63 74 6f 72 73 0d |ead all sectors.| 00000130 00 aa 27 4a 53 52 20 73 65 65 6b 74 77 6f 20 5c |..'JSR seektwo \| 00000140 20 73 65 65 6b 20 73 6f 75 72 63 65 20 74 72 61 | seek source tra| 00000150 63 6b 20 2a 20 32 0d 00 b4 23 4c 44 41 20 74 72 |ck * 2...#LDA tr| 00000160 61 63 6b 20 5c 20 73 6f 75 72 63 65 20 74 72 61 |ack \ source tra| 00000170 63 6b 20 6e 75 6d 62 65 72 0d 00 be 27 4a 53 52 |ck number...'JSR| 00000180 20 72 65 67 69 73 74 65 72 20 5c 20 77 72 69 74 | register \ writ| 00000190 65 20 74 72 61 63 6b 20 72 65 67 69 73 74 65 72 |e track register| 000001a0 0d 00 c8 28 4a 53 52 20 66 6f 72 6d 61 74 20 5c |...(JSR format \| 000001b0 20 66 6f 72 6d 61 74 20 32 20 2a 20 73 6f 75 72 | format 2 * sour| 000001c0 63 65 20 74 72 61 63 6b 0d 00 d2 21 4a 53 52 20 |ce track...!JSR | 000001d0 77 72 69 74 65 20 5c 20 77 72 69 74 65 20 61 6c |write \ write al| 000001e0 6c 20 73 65 63 74 6f 72 73 0d 00 dc 21 4c 44 41 |l sectors...!LDA| 000001f0 20 74 72 61 63 6b 20 5c 20 6c 6f 61 64 20 73 6f | track \ load so| 00000200 75 72 63 65 20 74 72 61 63 6b 0d 00 e6 26 41 53 |urce track...&AS| 00000210 4c 20 41 20 5c 20 2a 32 20 3d 20 70 68 79 73 69 |L A \ *2 = physi| 00000220 63 61 6c 20 74 72 61 63 6b 20 6e 75 6d 62 65 72 |cal track number| 00000230 0d 00 f0 27 4a 53 52 20 72 65 67 69 73 74 65 72 |...'JSR register| 00000240 20 5c 20 77 72 69 74 65 20 74 72 61 63 6b 20 72 | \ write track r| 00000250 65 67 69 73 74 65 72 0d 00 fa 26 4a 53 52 20 70 |egister...&JSR p| 00000260 72 69 6e 74 62 79 74 65 20 5c 20 70 72 69 6e 74 |rintbyte \ print| 00000270 20 74 72 61 63 6b 20 6e 75 6d 62 65 72 0d 01 04 | track number...| 00000280 2d 49 4e 43 20 74 72 61 63 6b 20 5c 20 69 6e 63 |-INC track \ inc| 00000290 72 65 6d 65 6e 74 20 73 6f 75 72 63 65 20 74 72 |rement source tr| 000002a0 61 63 6b 20 6e 75 6d 62 65 72 0d 01 0e 28 4c 44 |ack number...(LD| 000002b0 41 20 74 72 61 63 6b 20 5c 20 6c 6f 61 64 20 73 |A track \ load s| 000002c0 6f 75 72 63 65 20 74 72 61 63 6b 20 6e 75 6d 62 |ource track numb| 000002d0 65 72 0d 01 18 17 43 4d 50 20 23 34 30 20 5c 20 |er....CMP #40 \ | 000002e0 61 6c 6c 20 64 6f 6e 65 3f 0d 01 22 29 42 4e 45 |all done?..")BNE| 000002f0 20 6d 61 69 6e 6c 6f 6f 70 20 5c 20 69 66 20 6e | mainloop \ if n| 00000300 6f 74 20 72 65 61 64 20 6e 65 78 74 20 74 72 61 |ot read next tra| 00000310 63 6b 0d 01 2c 0e 4a 53 52 20 6f 73 6e 65 77 6c |ck..,.JSR osnewl| 00000320 0d 01 36 19 52 54 53 20 5c 20 72 65 74 75 72 6e |..6.RTS \ return| 00000330 20 74 6f 20 42 41 53 49 43 0d 01 40 0b 2e 65 73 | to BASIC..@..es| 00000340 63 61 70 65 0d 01 4a 19 4c 44 41 20 26 46 46 20 |cape..J.LDA &FF | 00000350 5c 20 65 73 63 61 70 65 20 66 6c 61 67 0d 01 54 |\ escape flag..T| 00000360 26 42 4d 49 20 70 72 65 73 73 65 64 20 5c 20 62 |&BMI pressed \ b| 00000370 69 74 20 37 20 73 65 74 20 69 66 20 70 72 65 73 |it 7 set if pres| 00000380 73 65 64 0d 01 5e 07 52 54 53 0d 01 68 0c 2e 70 |sed..^.RTS..h..p| 00000390 72 65 73 73 65 64 0d 01 72 0c 4c 44 41 20 23 26 |ressed..r.LDA #&| 000003a0 37 45 0d 01 7c 23 4a 53 52 20 6f 73 62 79 74 65 |7E..|#JSR osbyte| 000003b0 20 5c 20 61 63 6b 6e 6f 77 6c 65 64 67 65 20 45 | \ acknowledge E| 000003c0 73 63 61 70 65 0d 01 86 07 42 52 4b 0d 01 90 07 |scape....BRK....| 000003d0 42 52 4b 0d 01 9a 11 45 51 55 53 20 22 45 73 63 |BRK....EQUS "Esc| 000003e0 61 70 65 22 0d 01 a4 07 42 52 4b 0d 01 ae 0c 2e |ape"....BRK.....| 000003f0 73 65 65 6b 74 77 6f 0d 01 b8 23 4c 44 41 20 74 |seektwo...#LDA t| 00000400 72 61 63 6b 20 5c 20 73 6f 75 72 63 65 20 74 72 |rack \ source tr| 00000410 61 63 6b 20 6e 75 6d 62 65 72 0d 01 c2 0e 41 53 |ack number....AS| 00000420 4c 20 41 20 5c 20 2a 32 0d 01 cc 2b 53 54 41 20 |L A \ *2...+STA | 00000430 73 65 65 6b 62 6c 6f 63 6b 2b 37 20 5c 20 70 68 |seekblock+7 \ ph| 00000440 79 73 69 63 61 6c 20 74 72 61 63 6b 20 6e 75 6d |ysical track num| 00000450 62 65 72 0d 01 d6 0c 4c 44 41 20 23 26 37 46 0d |ber....LDA #&7F.| 00000460 01 e0 18 4c 44 58 20 23 73 65 65 6b 62 6c 6f 63 |...LDX #seekbloc| 00000470 6b 20 83 20 32 35 36 0d 01 ea 18 4c 44 59 20 23 |k . 256....LDY #| 00000480 73 65 65 6b 62 6c 6f 63 6b 20 81 20 32 35 36 0d |seekblock . 256.| 00000490 01 f4 0e 4a 53 52 20 6f 73 77 6f 72 64 0d 01 fe |...JSR osword...| 000004a0 1c 4c 44 41 20 73 65 65 6b 62 6c 6f 63 6b 2b 38 |.LDA seekblock+8| 000004b0 20 5c 20 72 65 73 75 6c 74 0d 02 08 1d 42 4e 45 | \ result....BNE| 000004c0 20 73 65 65 6b 65 72 72 6f 72 20 5c 20 3d 20 30 | seekerror \ = 0| 000004d0 20 69 66 20 4f 4b 0d 02 12 07 52 54 53 0d 02 1c | if OK....RTS...| 000004e0 0e 2e 73 65 65 6b 65 72 72 6f 72 0d 02 26 07 42 |..seekerror..&.B| 000004f0 52 4b 0d 02 30 07 42 52 4b 0d 02 3a 15 45 51 55 |RK..0.BRK..:.EQU| 00000500 53 20 22 53 65 65 6b 20 65 72 72 6f 72 22 0d 02 |S "Seek error"..| 00000510 44 07 42 52 4b 0d 02 4e 0b 2e 66 6f 72 6d 61 74 |D.BRK..N..format| 00000520 0d 02 58 23 4c 44 41 20 74 72 61 63 6b 20 5c 20 |..X#LDA track \ | 00000530 73 6f 75 72 63 65 20 74 72 61 63 6b 20 6e 75 6d |source track num| 00000540 62 65 72 0d 02 62 2a 53 54 41 20 66 6f 72 6d 62 |ber..b*STA formb| 00000550 6c 6f 63 6b 2b 37 20 5c 20 73 74 6f 72 65 20 70 |lock+7 \ store p| 00000560 68 79 73 69 63 61 6c 20 74 72 61 63 6b 0d 02 6c |hysical track..l| 00000570 27 4a 53 52 20 72 65 67 69 73 74 65 72 20 5c 20 |'JSR register \ | 00000580 77 72 69 74 65 20 74 72 61 63 6b 20 72 65 67 69 |write track regi| 00000590 73 74 65 72 0d 02 76 0c 4c 44 41 20 23 26 37 46 |ster..v.LDA #&7F| 000005a0 0d 02 80 18 4c 44 58 20 23 66 6f 72 6d 62 6c 6f |....LDX #formblo| 000005b0 63 6b 20 83 20 32 35 36 0d 02 8a 18 4c 44 59 20 |ck . 256....LDY | 000005c0 23 66 6f 72 6d 62 6c 6f 63 6b 20 81 20 32 35 36 |#formblock . 256| 000005d0 0d 02 94 0e 4a 53 52 20 6f 73 77 6f 72 64 0d 02 |....JSR osword..| 000005e0 9e 1d 4c 44 41 20 66 6f 72 6d 62 6c 6f 63 6b 2b |..LDA formblock+| 000005f0 31 32 20 5c 20 72 65 73 75 6c 74 0d 02 a8 1d 42 |12 \ result....B| 00000600 4e 45 20 66 6f 72 6d 65 72 72 6f 72 20 5c 20 3d |NE formerror \ =| 00000610 20 30 20 69 66 20 4f 4b 0d 02 b2 07 52 54 53 0d | 0 if OK....RTS.| 00000620 02 bc 0e 2e 66 6f 72 6d 65 72 72 6f 72 0d 02 c6 |....formerror...| 00000630 07 42 52 4b 0d 02 d0 07 42 52 4b 0d 02 da 17 45 |.BRK....BRK....E| 00000640 51 55 53 20 22 46 6f 72 6d 61 74 20 65 72 72 6f |QUS "Format erro| 00000650 72 22 0d 02 e4 07 42 52 4b 0d 02 ee 0d 2e 72 65 |r"....BRK.....re| 00000660 67 69 73 74 65 72 0d 02 f8 2d 53 54 41 20 72 65 |gister...-STA re| 00000670 67 62 6c 6f 63 6b 2b 38 20 5c 20 76 61 6c 75 65 |gblock+8 \ value| 00000680 20 74 6f 20 70 75 74 20 69 6e 20 72 65 67 69 73 | to put in regis| 00000690 74 65 72 0d 03 02 0c 4c 44 41 20 23 26 37 46 0d |ter....LDA #&7F.| 000006a0 03 0c 17 4c 44 58 20 23 72 65 67 62 6c 6f 63 6b |...LDX #regblock| 000006b0 20 83 20 32 35 36 0d 03 16 17 4c 44 59 20 23 72 | . 256....LDY #r| 000006c0 65 67 62 6c 6f 63 6b 20 81 20 32 35 36 0d 03 20 |egblock . 256.. | 000006d0 0e 4a 53 52 20 6f 73 77 6f 72 64 0d 03 2a 1b 4c |.JSR osword..*.L| 000006e0 44 41 20 72 65 67 62 6c 6f 63 6b 2b 39 20 5c 20 |DA regblock+9 \ | 000006f0 72 65 73 75 6c 74 0d 03 34 1c 42 4e 45 20 72 65 |result..4.BNE re| 00000700 67 65 72 72 6f 72 20 5c 20 3d 20 30 20 69 66 20 |gerror \ = 0 if | 00000710 4f 4b 0d 03 3e 07 52 54 53 0d 03 48 0d 2e 72 65 |OK..>.RTS..H..re| 00000720 67 65 72 72 6f 72 0d 03 52 07 42 52 4b 0d 03 5c |gerror..R.BRK..\| 00000730 07 42 52 4b 0d 03 66 21 45 51 55 53 20 22 53 70 |.BRK..f!EQUS "Sp| 00000740 65 63 69 61 6c 20 72 65 67 69 73 74 65 72 20 65 |ecial register e| 00000750 72 72 6f 72 22 0d 03 70 07 42 52 4b 0d 03 7a 0e |rror"..p.BRK..z.| 00000760 2e 73 65 63 74 6f 72 69 64 73 0d 03 84 23 4c 44 |.sectorids...#LD| 00000770 41 20 74 72 61 63 6b 20 5c 20 73 6f 75 72 63 65 |A track \ source| 00000780 20 74 72 61 63 6b 20 6e 75 6d 62 65 72 0d 03 8e | track number...| 00000790 29 53 54 41 20 69 64 73 62 6c 6f 63 6b 2b 37 20 |)STA idsblock+7 | 000007a0 5c 20 73 74 6f 72 65 20 70 68 79 73 69 63 61 6c |\ store physical| 000007b0 20 74 72 61 63 6b 0d 03 98 0c 4c 44 41 20 23 26 | track....LDA #&| 000007c0 37 46 0d 03 a2 17 4c 44 58 20 23 69 64 73 62 6c |7F....LDX #idsbl| 000007d0 6f 63 6b 20 83 20 32 35 36 0d 03 ac 17 4c 44 59 |ock . 256....LDY| 000007e0 20 23 69 64 73 62 6c 6f 63 6b 20 81 20 32 35 36 | #idsblock . 256| 000007f0 0d 03 b6 0e 4a 53 52 20 6f 73 77 6f 72 64 0d 03 |....JSR osword..| 00000800 c0 1c 4c 44 41 20 69 64 73 62 6c 6f 63 6b 2b 31 |..LDA idsblock+1| 00000810 30 20 5c 20 72 65 73 75 6c 74 0d 03 ca 1c 42 4e |0 \ result....BN| 00000820 45 20 69 64 73 65 72 72 6f 72 20 5c 20 3d 20 30 |E idserror \ = 0| 00000830 20 69 66 20 4f 4b 0d 03 d4 07 52 54 53 0d 03 de | if OK....RTS...| 00000840 0d 2e 69 64 73 65 72 72 6f 72 0d 03 e8 07 42 52 |..idserror....BR| 00000850 4b 0d 03 f2 07 42 52 4b 0d 03 fc 1a 45 51 55 53 |K....BRK....EQUS| 00000860 20 22 53 65 63 74 6f 72 20 49 44 20 45 72 72 6f | "Sector ID Erro| 00000870 72 22 0d 04 06 07 42 52 4b 0d 04 10 09 2e 72 65 |r"....BRK.....re| 00000880 61 64 0d 04 1a 23 4c 44 41 20 74 72 61 63 6b 20 |ad...#LDA track | 00000890 5c 20 73 6f 75 72 63 65 20 74 72 61 63 6b 20 6e |\ source track n| 000008a0 75 6d 62 65 72 0d 04 24 2a 53 54 41 20 63 6f 70 |umber..$*STA cop| 000008b0 79 62 6c 6f 63 6b 2b 37 20 5c 20 6c 6f 67 69 63 |yblock+7 \ logic| 000008c0 61 6c 20 74 72 61 63 6b 20 6e 75 6d 62 65 72 0d |al track number.| 000008d0 04 2e 25 4c 44 41 20 23 26 35 33 20 5c 20 72 65 |..%LDA #&53 \ re| 000008e0 61 64 20 64 61 74 61 20 6d 75 6c 74 69 2d 73 65 |ad data multi-se| 000008f0 63 74 6f 72 0d 04 38 13 53 54 41 20 63 6f 70 79 |ctor..8.STA copy| 00000900 62 6c 6f 63 6b 2b 36 0d 04 42 0c 4c 44 41 20 23 |block+6..B.LDA #| 00000910 26 37 46 0d 04 4c 18 4c 44 58 20 23 63 6f 70 79 |&7F..L.LDX #copy| 00000920 62 6c 6f 63 6b 20 83 20 32 35 36 0d 04 56 18 4c |block . 256..V.L| 00000930 44 59 20 23 63 6f 70 79 62 6c 6f 63 6b 20 81 20 |DY #copyblock . | 00000940 32 35 36 0d 04 60 0e 4a 53 52 20 6f 73 77 6f 72 |256..`.JSR oswor| 00000950 64 0d 04 6a 14 4c 44 41 20 63 6f 70 79 62 6c 6f |d..j.LDA copyblo| 00000960 63 6b 2b 31 30 0d 04 74 11 42 4e 45 20 72 65 61 |ck+10..t.BNE rea| 00000970 64 65 72 72 6f 72 0d 04 7e 07 52 54 53 0d 04 88 |derror..~.RTS...| 00000980 0e 2e 72 65 61 64 65 72 72 6f 72 0d 04 92 07 42 |..readerror....B| 00000990 52 4b 0d 04 9c 07 42 52 4b 0d 04 a6 15 45 51 55 |RK....BRK....EQU| 000009a0 53 20 22 52 65 61 64 20 65 72 72 6f 72 22 0d 04 |S "Read error"..| 000009b0 b0 07 42 52 4b 0d 04 ba 0a 2e 77 72 69 74 65 0d |..BRK.....write.| 000009c0 04 c4 26 4c 44 41 20 23 26 34 42 20 5c 20 77 72 |..&LDA #&4B \ wr| 000009d0 69 74 65 20 64 61 74 61 20 6d 75 6c 74 69 2d 73 |ite data multi-s| 000009e0 65 63 74 6f 72 0d 04 ce 13 53 54 41 20 63 6f 70 |ector....STA cop| 000009f0 79 62 6c 6f 63 6b 2b 36 0d 04 d8 0c 4c 44 41 20 |yblock+6....LDA | 00000a00 23 26 37 46 0d 04 e2 18 4c 44 58 20 23 63 6f 70 |#&7F....LDX #cop| 00000a10 79 62 6c 6f 63 6b 20 83 20 32 35 36 0d 04 ec 18 |yblock . 256....| 00000a20 4c 44 59 20 23 63 6f 70 79 62 6c 6f 63 6b 20 81 |LDY #copyblock .| 00000a30 20 32 35 36 0d 04 f6 0e 4a 53 52 20 6f 73 77 6f | 256....JSR oswo| 00000a40 72 64 0d 05 00 1d 4c 44 41 20 63 6f 70 79 62 6c |rd....LDA copybl| 00000a50 6f 63 6b 2b 31 30 20 5c 20 72 65 73 75 6c 74 0d |ock+10 \ result.| 00000a60 05 0a 1e 42 4e 45 20 77 72 69 74 65 65 72 72 6f |...BNE writeerro| 00000a70 72 20 5c 20 3d 20 30 20 69 66 20 4f 4b 0d 05 14 |r \ = 0 if OK...| 00000a80 07 52 54 53 0d 05 1e 0f 2e 77 72 69 74 65 65 72 |.RTS.....writeer| 00000a90 72 6f 72 0d 05 28 07 42 52 4b 0d 05 32 07 42 52 |ror..(.BRK..2.BR| 00000aa0 4b 0d 05 3c 16 45 51 55 53 20 22 57 72 69 74 65 |K..<.EQUS "Write| 00000ab0 20 65 72 72 6f 72 22 0d 05 46 07 42 52 4b 0d 05 | error"..F.BRK..| 00000ac0 50 0e 2e 70 72 69 6e 74 62 79 74 65 0d 05 5a 29 |P..printbyte..Z)| 00000ad0 4c 44 41 20 74 72 61 63 6b 20 5c 20 70 72 69 6e |LDA track \ prin| 00000ae0 74 20 73 6f 75 72 63 65 20 74 72 61 63 6b 20 6e |t source track n| 00000af0 75 6d 62 65 72 0d 05 64 07 50 48 41 0d 05 6e 09 |umber..d.PHA..n.| 00000b00 4c 53 52 20 41 0d 05 78 09 4c 53 52 20 41 0d 05 |LSR A..x.LSR A..| 00000b10 82 09 4c 53 52 20 41 0d 05 8c 09 4c 53 52 20 41 |..LSR A....LSR A| 00000b20 0d 05 96 20 4a 53 52 20 6e 79 62 62 6c 65 20 5c |... JSR nybble \| 00000b30 20 70 72 69 6e 74 20 4d 53 20 6e 79 62 62 6c 65 | print MS nybble| 00000b40 0d 05 a0 07 50 4c 41 0d 05 aa 20 4a 53 52 20 6e |....PLA... JSR n| 00000b50 79 62 62 6c 65 20 5c 20 70 72 69 6e 74 20 4c 53 |ybble \ print LS| 00000b60 20 6e 79 62 62 6c 65 0d 05 b4 0f 4c 44 41 20 23 | nybble....LDA #| 00000b70 97 28 22 20 22 29 0d 05 be 1c 4a 53 52 20 6f 73 |.(" ")....JSR os| 00000b80 77 72 63 68 20 5c 20 70 72 69 6e 74 20 73 70 61 |wrch \ print spa| 00000b90 63 65 0d 05 c8 1c 4a 4d 50 20 6f 73 77 72 63 68 |ce....JMP oswrch| 00000ba0 20 5c 20 70 72 69 6e 74 20 73 70 61 63 65 0d 05 | \ print space..| 00000bb0 d2 0b 2e 6e 79 62 62 6c 65 0d 05 dc 0a 80 20 23 |...nybble..... #| 00000bc0 26 30 46 0d 05 e6 07 53 45 44 0d 05 f0 07 43 4c |&0F....SED....CL| 00000bd0 43 0d 05 fa 0c 41 44 43 20 23 26 39 30 0d 06 04 |C....ADC #&90...| 00000be0 0c 41 44 43 20 23 26 34 30 0d 06 0e 07 43 4c 44 |.ADC #&40....CLD| 00000bf0 0d 06 18 28 4a 4d 50 20 6f 73 77 72 63 68 20 5c |...(JMP oswrch \| 00000c00 20 70 72 69 6e 74 20 6e 79 62 62 6c 65 20 61 6e | print nybble an| 00000c10 64 20 72 65 74 75 72 6e 0d 06 22 0e 2e 73 65 65 |d return.."..see| 00000c20 6b 62 6c 6f 63 6b 0d 06 2c 16 45 51 55 42 20 26 |kblock..,.EQUB &| 00000c30 30 30 20 5c 20 64 72 69 76 65 20 30 0d 06 36 1e |00 \ drive 0..6.| 00000c40 45 51 55 44 20 26 30 30 20 5c 20 64 6f 65 73 20 |EQUD &00 \ does | 00000c50 6e 6f 74 20 6d 61 74 74 65 72 0d 06 40 1a 45 51 |not matter..@.EQ| 00000c60 55 42 20 26 30 31 20 5c 20 31 20 70 61 72 61 6d |UB &01 \ 1 param| 00000c70 65 74 65 72 0d 06 41 1b 45 51 55 42 20 26 36 39 |eter..A.EQUB &69| 00000c80 20 5c 20 73 65 65 6b 20 63 6f 6d 6d 61 6e 64 0d | \ seek command.| 00000c90 06 42 24 45 51 55 42 20 26 30 30 20 5c 20 70 68 |.B$EQUB &00 \ ph| 00000ca0 79 73 69 63 61 6c 20 74 72 61 63 6b 20 6e 75 6d |ysical track num| 00000cb0 62 65 72 0d 06 43 15 45 51 55 42 20 26 30 30 20 |ber..C.EQUB &00 | 00000cc0 5c 20 72 65 73 75 6c 74 0d 06 4a 0d 2e 72 65 67 |\ result..J..reg| 00000cd0 62 6c 6f 63 6b 0d 06 54 16 45 51 55 42 20 26 30 |block..T.EQUB &0| 00000ce0 30 20 5c 20 64 72 69 76 65 20 30 0d 06 5e 1e 45 |0 \ drive 0..^.E| 00000cf0 51 55 44 20 26 30 30 20 5c 20 64 6f 65 73 20 6e |QUD &00 \ does n| 00000d00 6f 74 20 6d 61 74 74 65 72 0d 06 68 1b 45 51 55 |ot matter..h.EQU| 00000d10 42 20 26 30 32 20 5c 20 32 20 70 61 72 61 6d 65 |B &02 \ 2 parame| 00000d20 74 65 72 73 0d 06 69 25 45 51 55 42 20 26 37 41 |ters..i%EQUB &7A| 00000d30 20 5c 20 77 72 69 74 65 20 73 70 65 63 69 61 6c | \ write special| 00000d40 20 72 65 67 69 73 74 65 72 0d 06 6a 28 45 51 55 | register..j(EQU| 00000d50 42 20 26 31 32 20 5c 20 74 72 61 63 6b 20 72 65 |B &12 \ track re| 00000d60 67 69 73 74 65 72 2c 20 64 72 69 76 65 20 30 2f |gister, drive 0/| 00000d70 32 0d 06 6b 2a 45 51 55 42 20 26 30 30 20 5c 20 |2..k*EQUB &00 \ | 00000d80 76 61 6c 75 65 20 74 6f 20 62 65 20 70 75 74 20 |value to be put | 00000d90 69 6e 20 72 65 67 69 73 74 65 72 0d 06 72 15 45 |in register..r.E| 00000da0 51 55 42 20 26 30 30 20 5c 20 72 65 73 75 6c 74 |QUB &00 \ result| 00000db0 0d 06 7c 0d 2e 69 64 73 62 6c 6f 63 6b 0d 06 86 |..|..idsblock...| 00000dc0 16 45 51 55 42 20 26 30 30 20 5c 20 64 72 69 76 |.EQUB &00 \ driv| 00000dd0 65 20 30 0d 06 90 22 45 51 55 44 20 74 61 62 6c |e 0..."EQUD tabl| 00000de0 65 20 5c 20 61 64 64 72 65 73 73 20 6f 66 20 62 |e \ address of b| 00000df0 75 66 66 65 72 0d 06 9a 1b 45 51 55 42 20 26 30 |uffer....EQUB &0| 00000e00 33 20 5c 20 33 20 70 61 72 61 6d 65 74 65 72 73 |3 \ 3 parameters| 00000e10 0d 06 9b 26 45 51 55 42 20 26 35 42 20 5c 20 72 |...&EQUB &5B \ r| 00000e20 65 61 64 20 73 65 63 74 6f 72 20 49 44 73 20 63 |ead sector IDs c| 00000e30 6f 6d 6d 61 6e 64 0d 06 9c 24 45 51 55 42 20 26 |ommand...$EQUB &| 00000e40 30 30 20 5c 20 70 68 79 73 69 63 61 6c 20 74 72 |00 \ physical tr| 00000e50 61 63 6b 20 6e 75 6d 62 65 72 0d 06 9d 0c 45 51 |ack number....EQ| 00000e60 55 42 20 26 30 30 0d 06 a4 1c 45 51 55 42 20 26 |UB &00....EQUB &| 00000e70 30 41 20 5c 20 6e 75 6d 62 65 72 20 6f 66 20 49 |0A \ number of I| 00000e80 44 73 0d 06 a5 15 45 51 55 42 20 26 30 30 20 5c |Ds....EQUB &00 \| 00000e90 20 72 65 73 75 6c 74 0d 06 ae 0e 2e 63 6f 70 79 | result.....copy| 00000ea0 62 6c 6f 63 6b 0d 06 b8 16 45 51 55 42 20 26 30 |block....EQUB &0| 00000eb0 30 20 5c 20 64 72 69 76 65 20 30 0d 06 c2 23 45 |0 \ drive 0...#E| 00000ec0 51 55 44 20 62 75 66 66 65 72 20 5c 20 61 64 64 |QUD buffer \ add| 00000ed0 72 65 73 73 20 6f 66 20 62 75 66 66 65 72 0d 06 |ress of buffer..| 00000ee0 cc 1b 45 51 55 42 20 26 30 33 20 5c 20 33 20 70 |..EQUB &03 \ 3 p| 00000ef0 61 72 61 6d 65 74 65 72 73 0d 06 cd 25 45 51 55 |arameters...%EQU| 00000f00 42 20 26 35 37 20 5c 20 72 65 61 64 20 64 61 74 |B &57 \ read dat| 00000f10 61 20 6d 75 6c 74 69 2d 73 65 63 74 6f 72 0d 06 |a multi-sector..| 00000f20 ce 23 45 51 55 42 20 26 30 30 20 5c 20 6c 6f 67 |.#EQUB &00 \ log| 00000f30 69 63 61 6c 20 74 72 61 63 6b 20 6e 75 6d 62 65 |ical track numbe| 00000f40 72 0d 06 cf 2a 45 51 55 42 20 26 30 30 20 5c 20 |r...*EQUB &00 \ | 00000f50 73 74 61 72 74 20 6c 6f 67 69 63 61 6c 20 73 65 |start logical se| 00000f60 63 74 6f 72 20 6e 75 6d 62 65 72 0d 06 d6 26 45 |ctor number...&E| 00000f70 51 55 42 20 26 32 41 20 5c 20 31 30 20 73 65 63 |QUB &2A \ 10 sec| 00000f80 74 6f 72 73 20 6f 66 20 32 35 36 20 62 79 74 65 |tors of 256 byte| 00000f90 73 0d 06 d7 15 45 51 55 42 20 26 30 30 20 5c 20 |s....EQUB &00 \ | 00000fa0 72 65 73 75 6c 74 0d 06 e0 0e 2e 66 6f 72 6d 62 |result.....formb| 00000fb0 6c 6f 63 6b 0d 06 ea 16 45 51 55 42 20 26 30 30 |lock....EQUB &00| 00000fc0 20 5c 20 64 72 69 76 65 20 30 0d 06 f4 28 45 51 | \ drive 0...(EQ| 00000fd0 55 44 20 74 61 62 6c 65 20 5c 20 61 64 64 72 65 |UD table \ addre| 00000fe0 73 73 20 6f 66 20 73 65 63 74 6f 72 20 74 61 62 |ss of sector tab| 00000ff0 6c 65 0d 06 fe 1b 45 51 55 42 20 26 30 35 20 5c |le....EQUB &05 \| 00001000 20 35 20 70 61 72 61 6d 65 74 65 72 73 0d 06 ff | 5 parameters...| 00001010 1d 45 51 55 42 20 26 36 33 20 5c 20 66 6f 72 6d |.EQUB &63 \ form| 00001020 61 74 20 63 6f 6d 6d 61 6e 64 0d 07 00 24 45 51 |at command...$EQ| 00001030 55 42 20 26 30 30 20 5c 20 70 68 79 73 69 63 61 |UB &00 \ physica| 00001040 6c 20 74 72 61 63 6b 20 6e 75 6d 62 65 72 0d 07 |l track number..| 00001050 01 19 45 51 55 42 20 26 31 35 20 5c 20 67 61 70 |..EQUB &15 \ gap| 00001060 20 33 20 73 69 7a 65 0d 07 08 26 45 51 55 42 20 | 3 size...&EQUB | 00001070 26 32 41 20 5c 20 31 30 20 73 65 63 74 6f 72 73 |&2A \ 10 sectors| 00001080 20 6f 66 20 32 35 36 20 62 79 74 65 73 0d 07 09 | of 256 bytes...| 00001090 19 45 51 55 42 20 26 30 30 20 5c 20 67 61 70 20 |.EQUB &00 \ gap | 000010a0 35 20 73 69 7a 65 0d 07 0a 19 45 51 55 42 20 26 |5 size....EQUB &| 000010b0 31 30 20 5c 20 67 61 70 20 31 20 73 69 7a 65 0d |10 \ gap 1 size.| 000010c0 07 0b 15 45 51 55 42 20 26 30 30 20 5c 20 72 65 |...EQUB &00 \ re| 000010d0 73 75 6c 74 0d 07 12 0a 2e 74 72 61 63 6b 0d 07 |sult.....track..| 000010e0 1c 1e 45 51 55 42 20 32 30 20 5c 20 75 73 65 20 |..EQUB 20 \ use | 000010f0 74 72 61 63 6b 73 20 32 30 2d 33 39 0d 07 26 05 |tracks 20-39..&.| 00001100 5d 0d 07 30 05 ed 0d 07 3a 2e f1 27 22 50 6c 61 |]..0....:..'"Pla| 00001110 63 65 20 34 30 20 74 72 61 63 6b 20 66 6f 72 6d |ce 40 track form| 00001120 61 74 74 65 64 20 38 30 20 74 72 61 63 6b 20 64 |atted 80 track d| 00001130 69 73 63 22 0d 07 44 25 f1 22 69 6e 20 64 72 69 |isc"..D%."in dri| 00001140 76 65 20 30 2c 20 61 6e 64 20 70 72 65 73 73 20 |ve 0, and press | 00001150 53 70 61 63 65 62 61 72 22 0d 07 4e 05 f5 0d 07 |Spacebar"..N....| 00001160 58 0c fd 20 a5 20 3d 20 33 32 0d 07 62 0b d6 20 |X.. . = 32..b.. | 00001170 6d 63 6f 64 65 0d ff |mcode..| 00001177