Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape29a_acorn_eu_1991_november.wav » MakePrt
MakePrt
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 » Personal collection » Acorn tapes » Electron_User » Electron_User_tape29a_acorn_eu_1991_november.wav |
Filename: | MakePrt |
Read OK: | ✔ |
File size: | 1862 bytes |
Load address: | FFFF1A00 |
Exec address: | FFFF8023 |
Duplicates
There are 2 duplicate copies of this file in the archive:
- AEW website » mu » mu_5_25_discs_Micro_User_09_09_D-MU09_09.ssd » MakePrt
- Personal collection » Acorn tapes » Electron_User » Electron_User_tape29a_acorn_eu_1991_november.wav » MakePrt
- Personal collection » Acorn tapes » Electron_User » Electron_User_tape29b_acorn_eu_1991_november.wav » MakePrt
File contents
10 REM Disc Partitioning 20 REM by Richard Hindle 30 REM For B/B+/M/C with DFS 40 REM 50 : 60 MODE 7 70 DIM part_name$(66),part_size%(66) 80 PROCget_info 90 PROCassemble 100 PROCcreate_disc 110 END 120 : 130 DEF PROCget_info 140 PRINT SPC9;CHR$141;CHR$134;"Disc Partitioner" 150 PRINT SPC9;CHR$141;CHR$134;"Disc Partitioner"' 160 drive%=FNget_number("Please enter drive number",0,3) 170 PROCoscli("DRIVE "+STR$(drive%)) 180 PRINT'"Please insert a formatted disc"'"and press any key...":IF GET 190 X%=&70:Y%=0:A%=&7E:CALL &FFF1:sectors%=!&70/256:tracks%=sectors%/10 200 IF sectors%<>400 AND sectors%<>800 THEN PRINT '"Disc is dodgy, please re-format to"'"single-density 40- or 80-track disc.":END 210 PRINT '" Disc in drive ";drive%;" is ";tracks%;" track." 220 PRINT '"Enter the number of partitions you"'"require:"' 230 parts%=FNget_number("Number of partitions",2,INT(sectors%/12)) 240 cat_size%=(parts%*2+15) DIV 10 250 PRINT'"Now enter the names of your partitions:"' 260 FOR num%=0 TO parts%-1 270 part_name$(num%)=FNget_string(STR$(num%+1)+" of "+STR$(parts%),12) 280 IF num%<>0 THEN FOR A%=0 TO num%-1:IF part_name$(A%)=part_name$(num%) THEN PRINT"That name already exists!":A%=99:num%=num%-1:NEXT:NEXT:ELSE NEXT 290 NEXT 300 REPEAT 310 PRINT ''"Now enter the sizes, in tracks, of"'"your partitions:"' 320 total%=0:FOR num%=0 TO parts%-2 330 part_size%(num%)=FNget_number(part_name$(num%),1,tracks%-cat_size%-total%-parts%+num%+1) 340 total%=total%+part_size%(num%):NEXT 350 part_size%(num%)=tracks%-cat_size%-total% 360 PRINT " Leaving";CHR$131;part_size%(num%);CHR$135;"for ";part_name$(num%) 370 PRINT''"You have defined the following sizes:"' 380 FOR num%=0 TO parts%-1:PRINT part_size%(num%);:NEXT 390 PRINT''"Are these OK (Y/N) ? ";:REPEAT A$=GET$:UNTIL A$="Y" OR A$="N" 400 UNTIL A$="Y" 410 PRINT''CHR$129;" Creating disc...";:ENDPROC 420 : 430 DEF PROCassemble 440 cat_ptr=&80:name_ptr=&82:count=&84:build_flag=&85:char=&86 450 load=&53:save=&4B 460 FOR opt%=0 TO 2 STEP 2:P%=&900 470 [ OPT opt% 480 JSR find_args:CMP #13:BEQ list_parts:JMP decode_args 490 \ 500 .list_parts 510 LDA #&E:STA page:LDA #10:JSR &FFEE 520 LDA #parts%:STA count:LDA #0:STA sec_num 530 .read_loop 540 LDA #load:JSR move_bytes:JSR build_name:JSR print_name 550 DEC count:BEQ list_done:JSR next_part:JMP read_loop 560 .list_done LDA #10:JSR &FFEE:RTS 570 \ 580 .next_part 590 LDA track_num:BNE ok_inc:LDA sec_num:BNE ok_inc:LDA #6:STA sec_num:RTS 600 .ok_inc LDA sec_num:SEC:ADC #1:STA sec_num:CMP #10:BEQ inc_track:RTS 610 .inc_track LDA #0:STA sec_num:INC track_num:RTS 620 \ 630 .find_args 640 LDY #1: .args_loop 650 LDA (&F2),Y:CMP #32:BEQ found_32:CMP #13:BEQ end_find 660 INY:JMP args_loop 670 .found_32 INY:LDA (&F2),Y:CMP #32:BEQ found_32 680 .end_find RTS 690 \ 700 .build_name 710 LDA #13:STA &7C:LDA #0:STA cat_ptr:STA name_ptr+1:STA build_flag 720 LDA #&F:STA cat_ptr+1:LDA #&78:STA name_ptr:LDY #4:JSR do_build 730 LDA #&E:STA cat_ptr+1:LDA #&70:STA name_ptr:LDY #8:JSR do_build:RTS 740 \ 750 .do_build 760 DEY:LDA (cat_ptr),Y:BEQ db_blank:CMP #32:BEQ db_blank 770 LDX #1:STA build_flag:JMP db_write 780 .db_blank LDA #32:LDX build_flag:BNE db_write:LDA #13 790 .db_write STA (name_ptr),Y 800 CPY #0:BNE do_build:RTS 810 \ 820 .print_name 830 LDA #32:JSR &FFEE:JSR &FFEE:LDY #0: .print_loop 840 LDA (name_ptr),Y:JSR &FFEE:CMP #13:BEQ print_done 850 INY:JMP print_loop 860 .print_done LDA #10:JSR &FFEE:RTS 870 \ 880 .move_bytes 890 STA command:LDX #par_block MOD 256:LDY #par_block DIV 256 900 LDA #&7F:JSR &FFF1:LDA error:BNE disc_error:RTS 910 .disc_error STA disc_error+5:BRK:BRK:OPT FNequs("Disc Error"):BRK 920 \ 930 .decode_args \ (&F2),Y points to partition name 940 TYA:CLC:ADC &F2:STA &F2:LDA &F3:ADC #0:STA &F3:LDY #0 950 LDA (&F2),Y:CMP #ASC"D":BNE select_part 960 INY:LDA (&F2),Y:CMP #48:BCC select_part:CMP #52:BCS select_part 970 TAX:INY:LDA (&F2),Y:CMP #13:BNE select_part 980 TXA:SEC:SBC #48:STA drive:LDA #9:STA page:LDA #2:STA sec_num 990 LDA #save:JSR move_bytes:RTS 1000 \ 1010 .select_part 1020 LDA #0:STA sec_num:LDA #&E:STA page:LDA #parts%:STA count 1030 .select_loop 1040 LDA #load:JSR move_bytes:JSR compare_names:BCS part_found 1050 DEC count:BEQ no_such_part:JSR next_part:JMP select_loop 1060 .no_such_part BRK:OPT FNequb(50):OPT FNequs("No such partition"):BRK 1070 \ 1080 .part_found 1090 LDA track_num:PHA:LDA sec_num:PHA 1100 LDA #0:STA track_num:LDA #4:STA sec_num:LDA #save:JSR move_bytes 1110 LDA #0:STA sec_num:LDA #load:JSR move_bytes 1120 PLA:STA sec_num:PLA:STA track_num:LDA #save:JSR move_bytes 1130 LDA #0:STA track_num:LDA #4:STA sec_num:LDA #load:JSR move_bytes 1140 LDA #0:STA sec_num:LDA #save:JSR move_bytes 1150 RTS 1160 \ 1170 .compare_names 1180 JSR build_name:LDY #0 1190 .compare_loop LDA (name_ptr),Y:ORA #&20:STA char 1200 LDA (&F2),Y:ORA #&20:CMP char:BNE no_match 1210 LDA (&F2),Y:CMP #13:BEQ match_found:INY:JMP compare_loop 1220 .no_match CLC:RTS 1230 .match_found SEC:RTS 1240 \ 1250 .par_block 1260 .drive OPT FNequb(drive%):BRK 1270 .page BRK:BRK:BRK:OPT FNequb(3) 1280 .command BRK 1290 .track_num BRK 1300 .sec_num BRK:OPT FNequb(&22) 1310 .error BRK 1320 ]:NEXT 1330 ENDPROC 1340 : 1350 DEF PROCcreate_disc 1360 DIM cat &200 1370 FOR A%=cat TO cat+&1FF:?A%=0:NEXT 1380 tracks_so_far%=cat_size% 1390 ?&70=drive%:!&71=cat:?&75=3:?&76=&4B:?&79=&22 1400 FOR num%=0 TO parts%-1 1410 $cat=LEFT$(part_name$(num%),8):$(cat+256)=RIGHT$(part_name$(num%),4) 1420 cat?260=8:cat?261=16 1430 cat?262=((tracks_so_far%+part_size%(num%))*10) DIV &100 1440 cat?263=((tracks_so_far%+part_size%(num%))*10) MOD &100 1450 $(cat+8)="!dummy!":cat?15=164:$(cat+16)="PART ":cat?23=164 1460 cat!264=&80008000 1470 cat?268=0:cat?269=(tracks_so_far%*10-4) MOD &100 1480 cat?270=16*((tracks_so_far%*10-4) DIV &100):cat?271=4 1490 cat!272=&09000900:cat?276=0:cat?277=2:cat?278=0:cat?279=2 1500 IF num%=0 THEN ?&77=0:?&78=0:ELSE ?&77=(num%+2)DIV5:?&78=2*((num%+2)MOD5) 1510 X%=&70:Y%=0:A%=&7F:CALL &FFF1 1520 tracks_so_far%=tracks_so_far%+part_size%(num%) 1530 NEXT 1540 ?&71=0:?&72=9:?&77=0:?&78=2 1550 X%=&70:Y%=0:A%=&7F:CALL &FFF1 1560 PRINT':ENDPROC 1570 : 1580 DEF FNget_number(s$,low%,high%) 1590 REPEAT 1600 PRINT CHR$130;s$;" (";low%;"-";high%;"):";CHR$131;:INPUT""i% 1610 UNTIL i%>=low% AND i%<=high% 1620 =i% 1630 : 1640 DEF FNget_string(s$,length%) 1650 REPEAT 1660 PRINT CHR$130;s$;" (max length ";length%;"):";CHR$131;:INPUT""i$ 1670 UNTIL LEN i$>0 AND LEN i$<=length% 1680 =i$+LEFT$(STRING$(12," "),length%-LEN i$) 1690 : 1700 DEF PROCoscli(c$) 1710 DIM mem 40 1720 $mem=c$:X%=mem MOD 256:Y%=mem DIV 256 1730 CALL &FFF7:ENDPROC 1740 : 1750 DEF FNequs(s$) 1760 $P%=s$:P%=P%+LENs$ 1770 =opt% 1780 : 1790 DEF FNequb(b) 1800 ?P%=b:P%=P%+1 1810 =opt%
� Disc Partitioning � by Richard Hindle � For B/B+/M/C with DFS ( � 2 : < � 7 F$ � part_name$(66),part_size%(66) P �get_info Z �assemble d �create_disc n � x : � � �get_info �& � �9;�141;�134;"Disc Partitioner" �' � �9;�141;�134;"Disc Partitioner"' �8 drive%=�get_number("Please enter drive number",0,3) � �oscli("DRIVE "+�(drive%)) �B �'"Please insert a formatted disc"'"and press any key...":� � �E X%=&70:Y%=0:A%=&7E:� &FFF1:sectors%=!&70/256:tracks%=sectors%/10 �w � sectors%<>400 � sectors%<>800 � � '"Disc is dodgy, please re-format to"'"single-density 40- or 80-track disc.":� �9 � '" Disc in drive ";drive%;" is ";tracks%;" track." �8 � '"Enter the number of partitions you"'"require:"' �@ parts%=�get_number("Number of partitions",2,�(sectors%/12)) �! cat_size%=(parts%*2+15) � 10 �1 �'"Now enter the names of your partitions:"' � num%=0 � parts%-1 @ part_name$(num%)=�get_string(�(num%+1)+" of "+�(parts%),12) { � num%<>0 � � A%=0 � num%-1:� part_name$(A%)=part_name$(num%) � �"That name already exists!":A%=99:num%=num%-1:�:�:� � " � , � 6A � ''"Now enter the sizes, in tracks, of"'"your partitions:"' @! total%=0:� num%=0 � parts%-2 J\ part_size%(num%)=�get_number(part_name$(num%),1,tracks%-cat_size%-total%-parts%+num%+1) T% total%=total%+part_size%(num%):� ^. part_size%(num%)=tracks%-cat_size%-total% hD � " Leaving";�131;part_size%(num%);�135;"for ";part_name$(num%) r0 �''"You have defined the following sizes:"' |. � num%=0 � parts%-1:� part_size%(num%);:� �9 �''"Are these OK (Y/N) ? ";:� A$=�:� A$="Y" � A$="N" � � A$="Y" �# �''�129;" Creating disc...";:� � : � � �assemble �? cat_ptr=&80:name_ptr=&82:count=&84:build_flag=&85:char=&86 � load=&53:save=&4B � � opt%=0 � 2 � 2:P%=&900 � [ OPT opt% �9 JSR find_args:CMP #13:BEQ list_parts:JMP decode_args � \ � .list_parts �' LDA #&E:STA page:LDA #10:JSR &FFEE - LDA #parts%:STA count:LDA #0:STA sec_num .read_loop ; LDA #load:JSR move_bytes:JSR build_name:JSR print_name &8 DEC count:BEQ list_done:JSR next_part:JMP read_loop 0% .list_done LDA #10:JSR &FFEE:RTS : \ D .next_part NK LDA track_num:BNE ok_inc:LDA sec_num:BNE ok_inc:LDA #6:STA sec_num:RTS XI .ok_inc LDA sec_num:SEC:ADC #1:STA sec_num:CMP #10:BEQ inc_track:RTS b4 .inc_track LDA #0:STA sec_num:INC track_num:RTS l \ v .find_args � LDY #1: .args_loop �: LDA (&F2),Y:CMP #32:BEQ found_32:CMP #13:BEQ end_find � INY:JMP args_loop �3 .found_32 INY:LDA (&F2),Y:CMP #32:BEQ found_32 � .end_find RTS � \ � .build_name �E LDA #13:STA &7C:LDA #0:STA cat_ptr:STA name_ptr+1:STA build_flag �D LDA #&F:STA cat_ptr+1:LDA #&78:STA name_ptr:LDY #4:JSR do_build �H LDA #&E:STA cat_ptr+1:LDA #&70:STA name_ptr:LDY #8:JSR do_build:RTS � \ � .do_build �: DEY:LDA (cat_ptr),Y:BEQ db_blank:CMP #32:BEQ db_blank ' LDX #1:STA build_flag:JMP db_write : .db_blank LDA #32:LDX build_flag:BNE db_write:LDA #13 .db_write STA (name_ptr),Y CPY #0:BNE do_build:RTS * \ 4 .print_name >4 LDA #32:JSR &FFEE:JSR &FFEE:LDY #0: .print_loop H6 LDA (name_ptr),Y:JSR &FFEE:CMP #13:BEQ print_done R INY:JMP print_loop \& .print_done LDA #10:JSR &FFEE:RTS f \ p .move_bytes z: STA command:LDX #par_block � 256:LDY #par_block � 256 �4 LDA #&7F:JSR &FFF1:LDA error:BNE disc_error:RTS �E .disc_error STA disc_error+5:BRK:BRK:OPT �equs("Disc Error"):BRK � \ �= .decode_args \ (&F2),Y points to partition name �: TYA:CLC:ADC &F2:STA &F2:LDA &F3:ADC #0:STA &F3:LDY #0 �* LDA (&F2),Y:CMP #�"D":BNE select_part �D INY:LDA (&F2),Y:CMP #48:BCC select_part:CMP #52:BCS select_part �0 TAX:INY:LDA (&F2),Y:CMP #13:BNE select_part �A TXA:SEC:SBC #48:STA drive:LDA #9:STA page:LDA #2:STA sec_num �! LDA #save:JSR move_bytes:RTS � \ � .select_part �> LDA #0:STA sec_num:LDA #&E:STA page:LDA #parts%:STA count .select_loop > LDA #load:JSR move_bytes:JSR compare_names:BCS part_found = DEC count:BEQ no_such_part:JSR next_part:JMP select_loop $G .no_such_part BRK:OPT �equb(50):OPT �equs("No such partition"):BRK . \ 8 .part_found B& LDA track_num:PHA:LDA sec_num:PHA LE LDA #0:STA track_num:LDA #4:STA sec_num:LDA #save:JSR move_bytes V0 LDA #0:STA sec_num:LDA #load:JSR move_bytes `? PLA:STA sec_num:PLA:STA track_num:LDA #save:JSR move_bytes jE LDA #0:STA track_num:LDA #4:STA sec_num:LDA #load:JSR move_bytes t0 LDA #0:STA sec_num:LDA #save:JSR move_bytes ~ RTS � \ � .compare_names � JSR build_name:LDY #0 �4 .compare_loop LDA (name_ptr),Y:�A #&20:STA char �. LDA (&F2),Y:�A #&20:CMP char:BNE no_match �= LDA (&F2),Y:CMP #13:BEQ match_found:INY:JMP compare_loop � .no_match CLC:RTS � .match_found SEC:RTS � \ � .par_block �% .drive OPT �equb(drive%):BRK �( .page BRK:BRK:BRK:OPT �equb(3) .command BRK .track_num BRK " .sec_num BRK:OPT �equb(&22) .error BRK ( ]:� 2 � < : F � �create_disc P � cat &200 Z � A%=cat � cat+&1FF:?A%=0:� d tracks_so_far%=cat_size% n2 ?&70=drive%:!&71=cat:?&75=3:?&76=&4B:?&79=&22 x � num%=0 � parts%-1 �> $cat=�part_name$(num%),8):$(cat+256)=�part_name$(num%),4) � cat?260=8:cat?261=16 �: cat?262=((tracks_so_far%+part_size%(num%))*10) � &100 �: cat?263=((tracks_so_far%+part_size%(num%))*10) � &100 �A $(cat+8)="!dummy!":cat?15=164:$(cat+16)="PART ":cat?23=164 � cat!264=&80008000 �3 cat?268=0:cat?269=(tracks_so_far%*10-4) � &100 �8 cat?270=16*((tracks_so_far%*10-4) � &100):cat?271=4 �> cat!272=&09000900:cat?276=0:cat?277=2:cat?278=0:cat?279=2 �C � num%=0 � ?&77=0:?&78=0:� ?&77=(num%+2)�5:?&78=2*((num%+2)�5) � X%=&70:Y%=0:A%=&7F:� &FFF1 �3 tracks_so_far%=tracks_so_far%+part_size%(num%) � � ?&71=0:?&72=9:?&77=0:?&78=2 X%=&70:Y%=0:A%=&7F:� &FFF1 �':� " : ,! � �get_number(s$,low%,high%) 6 � @3 � �130;s$;" (";low%;"-";high%;"):";�131;:�""i% J � i%>=low% � i%<=high% T =i% ^ : h � �get_string(s$,length%) r � |7 � �130;s$;" (max length ";length%;"):";�131;:�""i$ � � � i$>0 � � i$<=length% � =i$+��12," "),length%-� i$) � : � � �oscli(c$) � � mem 40 �& $mem=c$:X%=mem � 256:Y%=mem � 256 � � &FFF7:� � : � � �equs(s$) � $P%=s$:P%=P%+�s$ � =opt% � : � � �equb(b) ?P%=b:P%=P%+1 =opt% �
00000000 0d 00 0a 18 20 f4 20 44 69 73 63 20 50 61 72 74 |.... . Disc Part| 00000010 69 74 69 6f 6e 69 6e 67 0d 00 14 18 20 f4 20 62 |itioning.... . b| 00000020 79 20 52 69 63 68 61 72 64 20 48 69 6e 64 6c 65 |y Richard Hindle| 00000030 0d 00 1e 1c 20 f4 20 46 6f 72 20 42 2f 42 2b 2f |.... . For B/B+/| 00000040 4d 2f 43 20 77 69 74 68 20 44 46 53 0d 00 28 06 |M/C with DFS..(.| 00000050 20 f4 0d 00 32 06 20 3a 0d 00 3c 08 20 eb 20 37 | ...2. :..<. . 7| 00000060 0d 00 46 24 20 de 20 70 61 72 74 5f 6e 61 6d 65 |..F$ . part_name| 00000070 24 28 36 36 29 2c 70 61 72 74 5f 73 69 7a 65 25 |$(66),part_size%| 00000080 28 36 36 29 0d 00 50 0e 20 f2 67 65 74 5f 69 6e |(66)..P. .get_in| 00000090 66 6f 0d 00 5a 0e 20 f2 61 73 73 65 6d 62 6c 65 |fo..Z. .assemble| 000000a0 0d 00 64 11 20 f2 63 72 65 61 74 65 5f 64 69 73 |..d. .create_dis| 000000b0 63 0d 00 6e 06 20 e0 0d 00 78 06 20 3a 0d 00 82 |c..n. ...x. :...| 000000c0 10 20 dd 20 f2 67 65 74 5f 69 6e 66 6f 0d 00 8c |. . .get_info...| 000000d0 26 20 f1 20 89 39 3b bd 31 34 31 3b bd 31 33 34 |& . .9;.141;.134| 000000e0 3b 22 44 69 73 63 20 50 61 72 74 69 74 69 6f 6e |;"Disc Partition| 000000f0 65 72 22 0d 00 96 27 20 f1 20 89 39 3b bd 31 34 |er"...' . .9;.14| 00000100 31 3b bd 31 33 34 3b 22 44 69 73 63 20 50 61 72 |1;.134;"Disc Par| 00000110 74 69 74 69 6f 6e 65 72 22 27 0d 00 a0 38 20 64 |titioner"'...8 d| 00000120 72 69 76 65 25 3d a4 67 65 74 5f 6e 75 6d 62 65 |rive%=.get_numbe| 00000130 72 28 22 50 6c 65 61 73 65 20 65 6e 74 65 72 20 |r("Please enter | 00000140 64 72 69 76 65 20 6e 75 6d 62 65 72 22 2c 30 2c |drive number",0,| 00000150 33 29 0d 00 aa 1f 20 f2 6f 73 63 6c 69 28 22 44 |3).... .oscli("D| 00000160 52 49 56 45 20 22 2b c3 28 64 72 69 76 65 25 29 |RIVE "+.(drive%)| 00000170 29 0d 00 b4 42 20 f1 27 22 50 6c 65 61 73 65 20 |)...B .'"Please | 00000180 69 6e 73 65 72 74 20 61 20 66 6f 72 6d 61 74 74 |insert a formatt| 00000190 65 64 20 64 69 73 63 22 27 22 61 6e 64 20 70 72 |ed disc"'"and pr| 000001a0 65 73 73 20 61 6e 79 20 6b 65 79 2e 2e 2e 22 3a |ess any key...":| 000001b0 e7 20 a5 0d 00 be 45 20 58 25 3d 26 37 30 3a 59 |. ....E X%=&70:Y| 000001c0 25 3d 30 3a 41 25 3d 26 37 45 3a d6 20 26 46 46 |%=0:A%=&7E:. &FF| 000001d0 46 31 3a 73 65 63 74 6f 72 73 25 3d 21 26 37 30 |F1:sectors%=!&70| 000001e0 2f 32 35 36 3a 74 72 61 63 6b 73 25 3d 73 65 63 |/256:tracks%=sec| 000001f0 74 6f 72 73 25 2f 31 30 0d 00 c8 77 20 e7 20 73 |tors%/10...w . s| 00000200 65 63 74 6f 72 73 25 3c 3e 34 30 30 20 80 20 73 |ectors%<>400 . s| 00000210 65 63 74 6f 72 73 25 3c 3e 38 30 30 20 8c 20 f1 |ectors%<>800 . .| 00000220 20 27 22 44 69 73 63 20 69 73 20 64 6f 64 67 79 | '"Disc is dodgy| 00000230 2c 20 70 6c 65 61 73 65 20 72 65 2d 66 6f 72 6d |, please re-form| 00000240 61 74 20 74 6f 22 27 22 73 69 6e 67 6c 65 2d 64 |at to"'"single-d| 00000250 65 6e 73 69 74 79 20 34 30 2d 20 6f 72 20 38 30 |ensity 40- or 80| 00000260 2d 74 72 61 63 6b 20 64 69 73 63 2e 22 3a e0 0d |-track disc.":..| 00000270 00 d2 39 20 f1 20 27 22 20 44 69 73 63 20 69 6e |..9 . '" Disc in| 00000280 20 64 72 69 76 65 20 22 3b 64 72 69 76 65 25 3b | drive ";drive%;| 00000290 22 20 69 73 20 22 3b 74 72 61 63 6b 73 25 3b 22 |" is ";tracks%;"| 000002a0 20 74 72 61 63 6b 2e 22 0d 00 dc 38 20 f1 20 27 | track."...8 . '| 000002b0 22 45 6e 74 65 72 20 74 68 65 20 6e 75 6d 62 65 |"Enter the numbe| 000002c0 72 20 6f 66 20 70 61 72 74 69 74 69 6f 6e 73 20 |r of partitions | 000002d0 79 6f 75 22 27 22 72 65 71 75 69 72 65 3a 22 27 |you"'"require:"'| 000002e0 0d 00 e6 40 20 70 61 72 74 73 25 3d a4 67 65 74 |...@ parts%=.get| 000002f0 5f 6e 75 6d 62 65 72 28 22 4e 75 6d 62 65 72 20 |_number("Number | 00000300 6f 66 20 70 61 72 74 69 74 69 6f 6e 73 22 2c 32 |of partitions",2| 00000310 2c a8 28 73 65 63 74 6f 72 73 25 2f 31 32 29 29 |,.(sectors%/12))| 00000320 0d 00 f0 21 20 63 61 74 5f 73 69 7a 65 25 3d 28 |...! cat_size%=(| 00000330 70 61 72 74 73 25 2a 32 2b 31 35 29 20 81 20 31 |parts%*2+15) . 1| 00000340 30 0d 00 fa 31 20 f1 27 22 4e 6f 77 20 65 6e 74 |0...1 .'"Now ent| 00000350 65 72 20 74 68 65 20 6e 61 6d 65 73 20 6f 66 20 |er the names of | 00000360 79 6f 75 72 20 70 61 72 74 69 74 69 6f 6e 73 3a |your partitions:| 00000370 22 27 0d 01 04 18 20 e3 20 6e 75 6d 25 3d 30 20 |"'.... . num%=0 | 00000380 b8 20 70 61 72 74 73 25 2d 31 0d 01 0e 40 20 70 |. parts%-1...@ p| 00000390 61 72 74 5f 6e 61 6d 65 24 28 6e 75 6d 25 29 3d |art_name$(num%)=| 000003a0 a4 67 65 74 5f 73 74 72 69 6e 67 28 c3 28 6e 75 |.get_string(.(nu| 000003b0 6d 25 2b 31 29 2b 22 20 6f 66 20 22 2b c3 28 70 |m%+1)+" of "+.(p| 000003c0 61 72 74 73 25 29 2c 31 32 29 0d 01 18 7b 20 e7 |arts%),12)...{ .| 000003d0 20 6e 75 6d 25 3c 3e 30 20 8c 20 e3 20 41 25 3d | num%<>0 . . A%=| 000003e0 30 20 b8 20 6e 75 6d 25 2d 31 3a e7 20 70 61 72 |0 . num%-1:. par| 000003f0 74 5f 6e 61 6d 65 24 28 41 25 29 3d 70 61 72 74 |t_name$(A%)=part| 00000400 5f 6e 61 6d 65 24 28 6e 75 6d 25 29 20 8c 20 f1 |_name$(num%) . .| 00000410 22 54 68 61 74 20 6e 61 6d 65 20 61 6c 72 65 61 |"That name alrea| 00000420 64 79 20 65 78 69 73 74 73 21 22 3a 41 25 3d 39 |dy exists!":A%=9| 00000430 39 3a 6e 75 6d 25 3d 6e 75 6d 25 2d 31 3a ed 3a |9:num%=num%-1:.:| 00000440 ed 3a 8b 20 ed 0d 01 22 06 20 ed 0d 01 2c 06 20 |.:. ...". ...,. | 00000450 f5 0d 01 36 41 20 f1 20 27 27 22 4e 6f 77 20 65 |...6A . ''"Now e| 00000460 6e 74 65 72 20 74 68 65 20 73 69 7a 65 73 2c 20 |nter the sizes, | 00000470 69 6e 20 74 72 61 63 6b 73 2c 20 6f 66 22 27 22 |in tracks, of"'"| 00000480 79 6f 75 72 20 70 61 72 74 69 74 69 6f 6e 73 3a |your partitions:| 00000490 22 27 0d 01 40 21 20 74 6f 74 61 6c 25 3d 30 3a |"'..@! total%=0:| 000004a0 e3 20 6e 75 6d 25 3d 30 20 b8 20 70 61 72 74 73 |. num%=0 . parts| 000004b0 25 2d 32 0d 01 4a 5c 20 70 61 72 74 5f 73 69 7a |%-2..J\ part_siz| 000004c0 65 25 28 6e 75 6d 25 29 3d a4 67 65 74 5f 6e 75 |e%(num%)=.get_nu| 000004d0 6d 62 65 72 28 70 61 72 74 5f 6e 61 6d 65 24 28 |mber(part_name$(| 000004e0 6e 75 6d 25 29 2c 31 2c 74 72 61 63 6b 73 25 2d |num%),1,tracks%-| 000004f0 63 61 74 5f 73 69 7a 65 25 2d 74 6f 74 61 6c 25 |cat_size%-total%| 00000500 2d 70 61 72 74 73 25 2b 6e 75 6d 25 2b 31 29 0d |-parts%+num%+1).| 00000510 01 54 25 20 74 6f 74 61 6c 25 3d 74 6f 74 61 6c |.T% total%=total| 00000520 25 2b 70 61 72 74 5f 73 69 7a 65 25 28 6e 75 6d |%+part_size%(num| 00000530 25 29 3a ed 0d 01 5e 2e 20 70 61 72 74 5f 73 69 |%):...^. part_si| 00000540 7a 65 25 28 6e 75 6d 25 29 3d 74 72 61 63 6b 73 |ze%(num%)=tracks| 00000550 25 2d 63 61 74 5f 73 69 7a 65 25 2d 74 6f 74 61 |%-cat_size%-tota| 00000560 6c 25 0d 01 68 44 20 f1 20 22 20 4c 65 61 76 69 |l%..hD . " Leavi| 00000570 6e 67 22 3b bd 31 33 31 3b 70 61 72 74 5f 73 69 |ng";.131;part_si| 00000580 7a 65 25 28 6e 75 6d 25 29 3b bd 31 33 35 3b 22 |ze%(num%);.135;"| 00000590 66 6f 72 20 22 3b 70 61 72 74 5f 6e 61 6d 65 24 |for ";part_name$| 000005a0 28 6e 75 6d 25 29 0d 01 72 30 20 f1 27 27 22 59 |(num%)..r0 .''"Y| 000005b0 6f 75 20 68 61 76 65 20 64 65 66 69 6e 65 64 20 |ou have defined | 000005c0 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 73 69 |the following si| 000005d0 7a 65 73 3a 22 27 0d 01 7c 2e 20 e3 20 6e 75 6d |zes:"'..|. . num| 000005e0 25 3d 30 20 b8 20 70 61 72 74 73 25 2d 31 3a f1 |%=0 . parts%-1:.| 000005f0 20 70 61 72 74 5f 73 69 7a 65 25 28 6e 75 6d 25 | part_size%(num%| 00000600 29 3b 3a ed 0d 01 86 39 20 f1 27 27 22 41 72 65 |);:....9 .''"Are| 00000610 20 74 68 65 73 65 20 4f 4b 20 28 59 2f 4e 29 20 | these OK (Y/N) | 00000620 3f 20 22 3b 3a f5 20 41 24 3d be 3a fd 20 41 24 |? ";:. A$=.:. A$| 00000630 3d 22 59 22 20 84 20 41 24 3d 22 4e 22 0d 01 90 |="Y" . A$="N"...| 00000640 0d 20 fd 20 41 24 3d 22 59 22 0d 01 9a 23 20 f1 |. . A$="Y"...# .| 00000650 27 27 bd 31 32 39 3b 22 20 43 72 65 61 74 69 6e |''.129;" Creatin| 00000660 67 20 64 69 73 63 2e 2e 2e 22 3b 3a e1 0d 01 a4 |g disc...";:....| 00000670 06 20 3a 0d 01 ae 10 20 dd 20 f2 61 73 73 65 6d |. :.... . .assem| 00000680 62 6c 65 0d 01 b8 3f 20 63 61 74 5f 70 74 72 3d |ble...? cat_ptr=| 00000690 26 38 30 3a 6e 61 6d 65 5f 70 74 72 3d 26 38 32 |&80:name_ptr=&82| 000006a0 3a 63 6f 75 6e 74 3d 26 38 34 3a 62 75 69 6c 64 |:count=&84:build| 000006b0 5f 66 6c 61 67 3d 26 38 35 3a 63 68 61 72 3d 26 |_flag=&85:char=&| 000006c0 38 36 0d 01 c2 16 20 6c 6f 61 64 3d 26 35 33 3a |86.... load=&53:| 000006d0 73 61 76 65 3d 26 34 42 0d 01 cc 1d 20 e3 20 6f |save=&4B.... . o| 000006e0 70 74 25 3d 30 20 b8 20 32 20 88 20 32 3a 50 25 |pt%=0 . 2 . 2:P%| 000006f0 3d 26 39 30 30 0d 01 d6 0f 20 5b 20 4f 50 54 20 |=&900.... [ OPT | 00000700 6f 70 74 25 0d 01 e0 39 20 4a 53 52 20 66 69 6e |opt%...9 JSR fin| 00000710 64 5f 61 72 67 73 3a 43 4d 50 20 23 31 33 3a 42 |d_args:CMP #13:B| 00000720 45 51 20 6c 69 73 74 5f 70 61 72 74 73 3a 4a 4d |EQ list_parts:JM| 00000730 50 20 64 65 63 6f 64 65 5f 61 72 67 73 0d 01 ea |P decode_args...| 00000740 06 20 5c 0d 01 f4 10 20 2e 6c 69 73 74 5f 70 61 |. \.... .list_pa| 00000750 72 74 73 0d 01 fe 27 20 4c 44 41 20 23 26 45 3a |rts...' LDA #&E:| 00000760 53 54 41 20 70 61 67 65 3a 4c 44 41 20 23 31 30 |STA page:LDA #10| 00000770 3a 4a 53 52 20 26 46 46 45 45 0d 02 08 2d 20 4c |:JSR &FFEE...- L| 00000780 44 41 20 23 70 61 72 74 73 25 3a 53 54 41 20 63 |DA #parts%:STA c| 00000790 6f 75 6e 74 3a 4c 44 41 20 23 30 3a 53 54 41 20 |ount:LDA #0:STA | 000007a0 73 65 63 5f 6e 75 6d 0d 02 12 0f 20 2e 72 65 61 |sec_num.... .rea| 000007b0 64 5f 6c 6f 6f 70 0d 02 1c 3b 20 4c 44 41 20 23 |d_loop...; LDA #| 000007c0 6c 6f 61 64 3a 4a 53 52 20 6d 6f 76 65 5f 62 79 |load:JSR move_by| 000007d0 74 65 73 3a 4a 53 52 20 62 75 69 6c 64 5f 6e 61 |tes:JSR build_na| 000007e0 6d 65 3a 4a 53 52 20 70 72 69 6e 74 5f 6e 61 6d |me:JSR print_nam| 000007f0 65 0d 02 26 38 20 44 45 43 20 63 6f 75 6e 74 3a |e..&8 DEC count:| 00000800 42 45 51 20 6c 69 73 74 5f 64 6f 6e 65 3a 4a 53 |BEQ list_done:JS| 00000810 52 20 6e 65 78 74 5f 70 61 72 74 3a 4a 4d 50 20 |R next_part:JMP | 00000820 72 65 61 64 5f 6c 6f 6f 70 0d 02 30 25 20 2e 6c |read_loop..0% .l| 00000830 69 73 74 5f 64 6f 6e 65 20 4c 44 41 20 23 31 30 |ist_done LDA #10| 00000840 3a 4a 53 52 20 26 46 46 45 45 3a 52 54 53 0d 02 |:JSR &FFEE:RTS..| 00000850 3a 06 20 5c 0d 02 44 0f 20 2e 6e 65 78 74 5f 70 |:. \..D. .next_p| 00000860 61 72 74 0d 02 4e 4b 20 4c 44 41 20 74 72 61 63 |art..NK LDA trac| 00000870 6b 5f 6e 75 6d 3a 42 4e 45 20 6f 6b 5f 69 6e 63 |k_num:BNE ok_inc| 00000880 3a 4c 44 41 20 73 65 63 5f 6e 75 6d 3a 42 4e 45 |:LDA sec_num:BNE| 00000890 20 6f 6b 5f 69 6e 63 3a 4c 44 41 20 23 36 3a 53 | ok_inc:LDA #6:S| 000008a0 54 41 20 73 65 63 5f 6e 75 6d 3a 52 54 53 0d 02 |TA sec_num:RTS..| 000008b0 58 49 20 2e 6f 6b 5f 69 6e 63 20 4c 44 41 20 73 |XI .ok_inc LDA s| 000008c0 65 63 5f 6e 75 6d 3a 53 45 43 3a 41 44 43 20 23 |ec_num:SEC:ADC #| 000008d0 31 3a 53 54 41 20 73 65 63 5f 6e 75 6d 3a 43 4d |1:STA sec_num:CM| 000008e0 50 20 23 31 30 3a 42 45 51 20 69 6e 63 5f 74 72 |P #10:BEQ inc_tr| 000008f0 61 63 6b 3a 52 54 53 0d 02 62 34 20 2e 69 6e 63 |ack:RTS..b4 .inc| 00000900 5f 74 72 61 63 6b 20 4c 44 41 20 23 30 3a 53 54 |_track LDA #0:ST| 00000910 41 20 73 65 63 5f 6e 75 6d 3a 49 4e 43 20 74 72 |A sec_num:INC tr| 00000920 61 63 6b 5f 6e 75 6d 3a 52 54 53 0d 02 6c 06 20 |ack_num:RTS..l. | 00000930 5c 0d 02 76 0f 20 2e 66 69 6e 64 5f 61 72 67 73 |\..v. .find_args| 00000940 0d 02 80 17 20 4c 44 59 20 23 31 3a 20 2e 61 72 |.... LDY #1: .ar| 00000950 67 73 5f 6c 6f 6f 70 0d 02 8a 3a 20 4c 44 41 20 |gs_loop...: LDA | 00000960 28 26 46 32 29 2c 59 3a 43 4d 50 20 23 33 32 3a |(&F2),Y:CMP #32:| 00000970 42 45 51 20 66 6f 75 6e 64 5f 33 32 3a 43 4d 50 |BEQ found_32:CMP| 00000980 20 23 31 33 3a 42 45 51 20 65 6e 64 5f 66 69 6e | #13:BEQ end_fin| 00000990 64 0d 02 94 16 20 49 4e 59 3a 4a 4d 50 20 61 72 |d.... INY:JMP ar| 000009a0 67 73 5f 6c 6f 6f 70 0d 02 9e 33 20 2e 66 6f 75 |gs_loop...3 .fou| 000009b0 6e 64 5f 33 32 20 49 4e 59 3a 4c 44 41 20 28 26 |nd_32 INY:LDA (&| 000009c0 46 32 29 2c 59 3a 43 4d 50 20 23 33 32 3a 42 45 |F2),Y:CMP #32:BE| 000009d0 51 20 66 6f 75 6e 64 5f 33 32 0d 02 a8 12 20 2e |Q found_32.... .| 000009e0 65 6e 64 5f 66 69 6e 64 20 52 54 53 0d 02 b2 06 |end_find RTS....| 000009f0 20 5c 0d 02 bc 10 20 2e 62 75 69 6c 64 5f 6e 61 | \.... .build_na| 00000a00 6d 65 0d 02 c6 45 20 4c 44 41 20 23 31 33 3a 53 |me...E LDA #13:S| 00000a10 54 41 20 26 37 43 3a 4c 44 41 20 23 30 3a 53 54 |TA &7C:LDA #0:ST| 00000a20 41 20 63 61 74 5f 70 74 72 3a 53 54 41 20 6e 61 |A cat_ptr:STA na| 00000a30 6d 65 5f 70 74 72 2b 31 3a 53 54 41 20 62 75 69 |me_ptr+1:STA bui| 00000a40 6c 64 5f 66 6c 61 67 0d 02 d0 44 20 4c 44 41 20 |ld_flag...D LDA | 00000a50 23 26 46 3a 53 54 41 20 63 61 74 5f 70 74 72 2b |#&F:STA cat_ptr+| 00000a60 31 3a 4c 44 41 20 23 26 37 38 3a 53 54 41 20 6e |1:LDA #&78:STA n| 00000a70 61 6d 65 5f 70 74 72 3a 4c 44 59 20 23 34 3a 4a |ame_ptr:LDY #4:J| 00000a80 53 52 20 64 6f 5f 62 75 69 6c 64 0d 02 da 48 20 |SR do_build...H | 00000a90 4c 44 41 20 23 26 45 3a 53 54 41 20 63 61 74 5f |LDA #&E:STA cat_| 00000aa0 70 74 72 2b 31 3a 4c 44 41 20 23 26 37 30 3a 53 |ptr+1:LDA #&70:S| 00000ab0 54 41 20 6e 61 6d 65 5f 70 74 72 3a 4c 44 59 20 |TA name_ptr:LDY | 00000ac0 23 38 3a 4a 53 52 20 64 6f 5f 62 75 69 6c 64 3a |#8:JSR do_build:| 00000ad0 52 54 53 0d 02 e4 06 20 5c 0d 02 ee 0e 20 2e 64 |RTS.... \.... .d| 00000ae0 6f 5f 62 75 69 6c 64 0d 02 f8 3a 20 44 45 59 3a |o_build...: DEY:| 00000af0 4c 44 41 20 28 63 61 74 5f 70 74 72 29 2c 59 3a |LDA (cat_ptr),Y:| 00000b00 42 45 51 20 64 62 5f 62 6c 61 6e 6b 3a 43 4d 50 |BEQ db_blank:CMP| 00000b10 20 23 33 32 3a 42 45 51 20 64 62 5f 62 6c 61 6e | #32:BEQ db_blan| 00000b20 6b 0d 03 02 27 20 4c 44 58 20 23 31 3a 53 54 41 |k...' LDX #1:STA| 00000b30 20 62 75 69 6c 64 5f 66 6c 61 67 3a 4a 4d 50 20 | build_flag:JMP | 00000b40 64 62 5f 77 72 69 74 65 0d 03 0c 3a 20 2e 64 62 |db_write...: .db| 00000b50 5f 62 6c 61 6e 6b 20 4c 44 41 20 23 33 32 3a 4c |_blank LDA #32:L| 00000b60 44 58 20 62 75 69 6c 64 5f 66 6c 61 67 3a 42 4e |DX build_flag:BN| 00000b70 45 20 64 62 5f 77 72 69 74 65 3a 4c 44 41 20 23 |E db_write:LDA #| 00000b80 31 33 0d 03 16 1f 20 2e 64 62 5f 77 72 69 74 65 |13.... .db_write| 00000b90 20 53 54 41 20 28 6e 61 6d 65 5f 70 74 72 29 2c | STA (name_ptr),| 00000ba0 59 0d 03 20 1c 20 43 50 59 20 23 30 3a 42 4e 45 |Y.. . CPY #0:BNE| 00000bb0 20 64 6f 5f 62 75 69 6c 64 3a 52 54 53 0d 03 2a | do_build:RTS..*| 00000bc0 06 20 5c 0d 03 34 10 20 2e 70 72 69 6e 74 5f 6e |. \..4. .print_n| 00000bd0 61 6d 65 0d 03 3e 34 20 4c 44 41 20 23 33 32 3a |ame..>4 LDA #32:| 00000be0 4a 53 52 20 26 46 46 45 45 3a 4a 53 52 20 26 46 |JSR &FFEE:JSR &F| 00000bf0 46 45 45 3a 4c 44 59 20 23 30 3a 20 2e 70 72 69 |FEE:LDY #0: .pri| 00000c00 6e 74 5f 6c 6f 6f 70 0d 03 48 36 20 4c 44 41 20 |nt_loop..H6 LDA | 00000c10 28 6e 61 6d 65 5f 70 74 72 29 2c 59 3a 4a 53 52 |(name_ptr),Y:JSR| 00000c20 20 26 46 46 45 45 3a 43 4d 50 20 23 31 33 3a 42 | &FFEE:CMP #13:B| 00000c30 45 51 20 70 72 69 6e 74 5f 64 6f 6e 65 0d 03 52 |EQ print_done..R| 00000c40 17 20 49 4e 59 3a 4a 4d 50 20 70 72 69 6e 74 5f |. INY:JMP print_| 00000c50 6c 6f 6f 70 0d 03 5c 26 20 2e 70 72 69 6e 74 5f |loop..\& .print_| 00000c60 64 6f 6e 65 20 4c 44 41 20 23 31 30 3a 4a 53 52 |done LDA #10:JSR| 00000c70 20 26 46 46 45 45 3a 52 54 53 0d 03 66 06 20 5c | &FFEE:RTS..f. \| 00000c80 0d 03 70 10 20 2e 6d 6f 76 65 5f 62 79 74 65 73 |..p. .move_bytes| 00000c90 0d 03 7a 3a 20 53 54 41 20 63 6f 6d 6d 61 6e 64 |..z: STA command| 00000ca0 3a 4c 44 58 20 23 70 61 72 5f 62 6c 6f 63 6b 20 |:LDX #par_block | 00000cb0 83 20 32 35 36 3a 4c 44 59 20 23 70 61 72 5f 62 |. 256:LDY #par_b| 00000cc0 6c 6f 63 6b 20 81 20 32 35 36 0d 03 84 34 20 4c |lock . 256...4 L| 00000cd0 44 41 20 23 26 37 46 3a 4a 53 52 20 26 46 46 46 |DA #&7F:JSR &FFF| 00000ce0 31 3a 4c 44 41 20 65 72 72 6f 72 3a 42 4e 45 20 |1:LDA error:BNE | 00000cf0 64 69 73 63 5f 65 72 72 6f 72 3a 52 54 53 0d 03 |disc_error:RTS..| 00000d00 8e 45 20 2e 64 69 73 63 5f 65 72 72 6f 72 20 53 |.E .disc_error S| 00000d10 54 41 20 64 69 73 63 5f 65 72 72 6f 72 2b 35 3a |TA disc_error+5:| 00000d20 42 52 4b 3a 42 52 4b 3a 4f 50 54 20 a4 65 71 75 |BRK:BRK:OPT .equ| 00000d30 73 28 22 44 69 73 63 20 45 72 72 6f 72 22 29 3a |s("Disc Error"):| 00000d40 42 52 4b 0d 03 98 06 20 5c 0d 03 a2 3d 20 2e 64 |BRK.... \...= .d| 00000d50 65 63 6f 64 65 5f 61 72 67 73 20 20 20 20 20 20 |ecode_args | 00000d60 20 20 5c 20 28 26 46 32 29 2c 59 20 20 20 70 6f | \ (&F2),Y po| 00000d70 69 6e 74 73 20 74 6f 20 70 61 72 74 69 74 69 6f |ints to partitio| 00000d80 6e 20 6e 61 6d 65 0d 03 ac 3a 20 54 59 41 3a 43 |n name...: TYA:C| 00000d90 4c 43 3a 41 44 43 20 26 46 32 3a 53 54 41 20 26 |LC:ADC &F2:STA &| 00000da0 46 32 3a 4c 44 41 20 26 46 33 3a 41 44 43 20 23 |F2:LDA &F3:ADC #| 00000db0 30 3a 53 54 41 20 26 46 33 3a 4c 44 59 20 23 30 |0:STA &F3:LDY #0| 00000dc0 0d 03 b6 2a 20 4c 44 41 20 28 26 46 32 29 2c 59 |...* LDA (&F2),Y| 00000dd0 3a 43 4d 50 20 23 97 22 44 22 3a 42 4e 45 20 73 |:CMP #."D":BNE s| 00000de0 65 6c 65 63 74 5f 70 61 72 74 0d 03 c0 44 20 49 |elect_part...D I| 00000df0 4e 59 3a 4c 44 41 20 28 26 46 32 29 2c 59 3a 43 |NY:LDA (&F2),Y:C| 00000e00 4d 50 20 23 34 38 3a 42 43 43 20 73 65 6c 65 63 |MP #48:BCC selec| 00000e10 74 5f 70 61 72 74 3a 43 4d 50 20 23 35 32 3a 42 |t_part:CMP #52:B| 00000e20 43 53 20 73 65 6c 65 63 74 5f 70 61 72 74 0d 03 |CS select_part..| 00000e30 ca 30 20 54 41 58 3a 49 4e 59 3a 4c 44 41 20 28 |.0 TAX:INY:LDA (| 00000e40 26 46 32 29 2c 59 3a 43 4d 50 20 23 31 33 3a 42 |&F2),Y:CMP #13:B| 00000e50 4e 45 20 73 65 6c 65 63 74 5f 70 61 72 74 0d 03 |NE select_part..| 00000e60 d4 41 20 54 58 41 3a 53 45 43 3a 53 42 43 20 23 |.A TXA:SEC:SBC #| 00000e70 34 38 3a 53 54 41 20 64 72 69 76 65 3a 4c 44 41 |48:STA drive:LDA| 00000e80 20 23 39 3a 53 54 41 20 70 61 67 65 3a 4c 44 41 | #9:STA page:LDA| 00000e90 20 23 32 3a 53 54 41 20 73 65 63 5f 6e 75 6d 0d | #2:STA sec_num.| 00000ea0 03 de 21 20 4c 44 41 20 23 73 61 76 65 3a 4a 53 |..! LDA #save:JS| 00000eb0 52 20 6d 6f 76 65 5f 62 79 74 65 73 3a 52 54 53 |R move_bytes:RTS| 00000ec0 0d 03 e8 06 20 5c 0d 03 f2 11 20 2e 73 65 6c 65 |.... \.... .sele| 00000ed0 63 74 5f 70 61 72 74 0d 03 fc 3e 20 4c 44 41 20 |ct_part...> LDA | 00000ee0 23 30 3a 53 54 41 20 73 65 63 5f 6e 75 6d 3a 4c |#0:STA sec_num:L| 00000ef0 44 41 20 23 26 45 3a 53 54 41 20 70 61 67 65 3a |DA #&E:STA page:| 00000f00 4c 44 41 20 23 70 61 72 74 73 25 3a 53 54 41 20 |LDA #parts%:STA | 00000f10 63 6f 75 6e 74 0d 04 06 11 20 2e 73 65 6c 65 63 |count.... .selec| 00000f20 74 5f 6c 6f 6f 70 0d 04 10 3e 20 4c 44 41 20 23 |t_loop...> LDA #| 00000f30 6c 6f 61 64 3a 4a 53 52 20 6d 6f 76 65 5f 62 79 |load:JSR move_by| 00000f40 74 65 73 3a 4a 53 52 20 63 6f 6d 70 61 72 65 5f |tes:JSR compare_| 00000f50 6e 61 6d 65 73 3a 42 43 53 20 70 61 72 74 5f 66 |names:BCS part_f| 00000f60 6f 75 6e 64 0d 04 1a 3d 20 44 45 43 20 63 6f 75 |ound...= DEC cou| 00000f70 6e 74 3a 42 45 51 20 6e 6f 5f 73 75 63 68 5f 70 |nt:BEQ no_such_p| 00000f80 61 72 74 3a 4a 53 52 20 6e 65 78 74 5f 70 61 72 |art:JSR next_par| 00000f90 74 3a 4a 4d 50 20 73 65 6c 65 63 74 5f 6c 6f 6f |t:JMP select_loo| 00000fa0 70 0d 04 24 47 20 2e 6e 6f 5f 73 75 63 68 5f 70 |p..$G .no_such_p| 00000fb0 61 72 74 20 42 52 4b 3a 4f 50 54 20 a4 65 71 75 |art BRK:OPT .equ| 00000fc0 62 28 35 30 29 3a 4f 50 54 20 a4 65 71 75 73 28 |b(50):OPT .equs(| 00000fd0 22 4e 6f 20 73 75 63 68 20 70 61 72 74 69 74 69 |"No such partiti| 00000fe0 6f 6e 22 29 3a 42 52 4b 0d 04 2e 06 20 5c 0d 04 |on"):BRK.... \..| 00000ff0 38 10 20 2e 70 61 72 74 5f 66 6f 75 6e 64 0d 04 |8. .part_found..| 00001000 42 26 20 4c 44 41 20 74 72 61 63 6b 5f 6e 75 6d |B& LDA track_num| 00001010 3a 50 48 41 3a 4c 44 41 20 73 65 63 5f 6e 75 6d |:PHA:LDA sec_num| 00001020 3a 50 48 41 0d 04 4c 45 20 4c 44 41 20 23 30 3a |:PHA..LE LDA #0:| 00001030 53 54 41 20 74 72 61 63 6b 5f 6e 75 6d 3a 4c 44 |STA track_num:LD| 00001040 41 20 23 34 3a 53 54 41 20 73 65 63 5f 6e 75 6d |A #4:STA sec_num| 00001050 3a 4c 44 41 20 23 73 61 76 65 3a 4a 53 52 20 6d |:LDA #save:JSR m| 00001060 6f 76 65 5f 62 79 74 65 73 0d 04 56 30 20 4c 44 |ove_bytes..V0 LD| 00001070 41 20 23 30 3a 53 54 41 20 73 65 63 5f 6e 75 6d |A #0:STA sec_num| 00001080 3a 4c 44 41 20 23 6c 6f 61 64 3a 4a 53 52 20 6d |:LDA #load:JSR m| 00001090 6f 76 65 5f 62 79 74 65 73 0d 04 60 3f 20 50 4c |ove_bytes..`? PL| 000010a0 41 3a 53 54 41 20 73 65 63 5f 6e 75 6d 3a 50 4c |A:STA sec_num:PL| 000010b0 41 3a 53 54 41 20 74 72 61 63 6b 5f 6e 75 6d 3a |A:STA track_num:| 000010c0 4c 44 41 20 23 73 61 76 65 3a 4a 53 52 20 6d 6f |LDA #save:JSR mo| 000010d0 76 65 5f 62 79 74 65 73 0d 04 6a 45 20 4c 44 41 |ve_bytes..jE LDA| 000010e0 20 23 30 3a 53 54 41 20 74 72 61 63 6b 5f 6e 75 | #0:STA track_nu| 000010f0 6d 3a 4c 44 41 20 23 34 3a 53 54 41 20 73 65 63 |m:LDA #4:STA sec| 00001100 5f 6e 75 6d 3a 4c 44 41 20 23 6c 6f 61 64 3a 4a |_num:LDA #load:J| 00001110 53 52 20 6d 6f 76 65 5f 62 79 74 65 73 0d 04 74 |SR move_bytes..t| 00001120 30 20 4c 44 41 20 23 30 3a 53 54 41 20 73 65 63 |0 LDA #0:STA sec| 00001130 5f 6e 75 6d 3a 4c 44 41 20 23 73 61 76 65 3a 4a |_num:LDA #save:J| 00001140 53 52 20 6d 6f 76 65 5f 62 79 74 65 73 0d 04 7e |SR move_bytes..~| 00001150 08 20 52 54 53 0d 04 88 06 20 5c 0d 04 92 13 20 |. RTS.... \.... | 00001160 2e 63 6f 6d 70 61 72 65 5f 6e 61 6d 65 73 0d 04 |.compare_names..| 00001170 9c 1a 20 4a 53 52 20 62 75 69 6c 64 5f 6e 61 6d |.. JSR build_nam| 00001180 65 3a 4c 44 59 20 23 30 0d 04 a6 34 20 2e 63 6f |e:LDY #0...4 .co| 00001190 6d 70 61 72 65 5f 6c 6f 6f 70 20 4c 44 41 20 28 |mpare_loop LDA (| 000011a0 6e 61 6d 65 5f 70 74 72 29 2c 59 3a 84 41 20 23 |name_ptr),Y:.A #| 000011b0 26 32 30 3a 53 54 41 20 63 68 61 72 0d 04 b0 2e |&20:STA char....| 000011c0 20 4c 44 41 20 28 26 46 32 29 2c 59 3a 84 41 20 | LDA (&F2),Y:.A | 000011d0 23 26 32 30 3a 43 4d 50 20 63 68 61 72 3a 42 4e |#&20:CMP char:BN| 000011e0 45 20 6e 6f 5f 6d 61 74 63 68 0d 04 ba 3d 20 4c |E no_match...= L| 000011f0 44 41 20 28 26 46 32 29 2c 59 3a 43 4d 50 20 23 |DA (&F2),Y:CMP #| 00001200 31 33 3a 42 45 51 20 6d 61 74 63 68 5f 66 6f 75 |13:BEQ match_fou| 00001210 6e 64 3a 49 4e 59 3a 4a 4d 50 20 63 6f 6d 70 61 |nd:INY:JMP compa| 00001220 72 65 5f 6c 6f 6f 70 0d 04 c4 19 20 2e 6e 6f 5f |re_loop.... .no_| 00001230 6d 61 74 63 68 20 20 20 20 43 4c 43 3a 52 54 53 |match CLC:RTS| 00001240 0d 04 ce 19 20 2e 6d 61 74 63 68 5f 66 6f 75 6e |.... .match_foun| 00001250 64 20 53 45 43 3a 52 54 53 0d 04 d8 06 20 5c 0d |d SEC:RTS.... \.| 00001260 04 e2 0f 20 2e 70 61 72 5f 62 6c 6f 63 6b 0d 04 |... .par_block..| 00001270 ec 25 20 2e 64 72 69 76 65 20 20 20 20 20 4f 50 |.% .drive OP| 00001280 54 20 a4 65 71 75 62 28 64 72 69 76 65 25 29 3a |T .equb(drive%):| 00001290 42 52 4b 0d 04 f6 28 20 2e 70 61 67 65 20 20 20 |BRK...( .page | 000012a0 20 20 20 42 52 4b 3a 42 52 4b 3a 42 52 4b 3a 4f | BRK:BRK:BRK:O| 000012b0 50 54 20 a4 65 71 75 62 28 33 29 0d 05 00 13 20 |PT .equb(3).... | 000012c0 2e 63 6f 6d 6d 61 6e 64 20 20 20 42 52 4b 0d 05 |.command BRK..| 000012d0 0a 13 20 2e 74 72 61 63 6b 5f 6e 75 6d 20 42 52 |.. .track_num BR| 000012e0 4b 0d 05 14 22 20 2e 73 65 63 5f 6e 75 6d 20 20 |K..." .sec_num | 000012f0 20 42 52 4b 3a 4f 50 54 20 a4 65 71 75 62 28 26 | BRK:OPT .equb(&| 00001300 32 32 29 0d 05 1e 13 20 2e 65 72 72 6f 72 20 20 |22).... .error | 00001310 20 20 20 42 52 4b 0d 05 28 08 20 5d 3a ed 0d 05 | BRK..(. ]:...| 00001320 32 06 20 e1 0d 05 3c 06 20 3a 0d 05 46 13 20 dd |2. ...<. :..F. .| 00001330 20 f2 63 72 65 61 74 65 5f 64 69 73 63 0d 05 50 | .create_disc..P| 00001340 0f 20 de 20 63 61 74 20 26 32 30 30 0d 05 5a 20 |. . cat &200..Z | 00001350 20 e3 20 41 25 3d 63 61 74 20 b8 20 63 61 74 2b | . A%=cat . cat+| 00001360 26 31 46 46 3a 3f 41 25 3d 30 3a ed 0d 05 64 1d |&1FF:?A%=0:...d.| 00001370 20 74 72 61 63 6b 73 5f 73 6f 5f 66 61 72 25 3d | tracks_so_far%=| 00001380 63 61 74 5f 73 69 7a 65 25 0d 05 6e 32 20 3f 26 |cat_size%..n2 ?&| 00001390 37 30 3d 64 72 69 76 65 25 3a 21 26 37 31 3d 63 |70=drive%:!&71=c| 000013a0 61 74 3a 3f 26 37 35 3d 33 3a 3f 26 37 36 3d 26 |at:?&75=3:?&76=&| 000013b0 34 42 3a 3f 26 37 39 3d 26 32 32 0d 05 78 18 20 |4B:?&79=&22..x. | 000013c0 e3 20 6e 75 6d 25 3d 30 20 b8 20 70 61 72 74 73 |. num%=0 . parts| 000013d0 25 2d 31 0d 05 82 3e 20 24 63 61 74 3d c0 70 61 |%-1...> $cat=.pa| 000013e0 72 74 5f 6e 61 6d 65 24 28 6e 75 6d 25 29 2c 38 |rt_name$(num%),8| 000013f0 29 3a 24 28 63 61 74 2b 32 35 36 29 3d c2 70 61 |):$(cat+256)=.pa| 00001400 72 74 5f 6e 61 6d 65 24 28 6e 75 6d 25 29 2c 34 |rt_name$(num%),4| 00001410 29 0d 05 8c 19 20 63 61 74 3f 32 36 30 3d 38 3a |).... cat?260=8:| 00001420 63 61 74 3f 32 36 31 3d 31 36 0d 05 96 3a 20 63 |cat?261=16...: c| 00001430 61 74 3f 32 36 32 3d 28 28 74 72 61 63 6b 73 5f |at?262=((tracks_| 00001440 73 6f 5f 66 61 72 25 2b 70 61 72 74 5f 73 69 7a |so_far%+part_siz| 00001450 65 25 28 6e 75 6d 25 29 29 2a 31 30 29 20 81 20 |e%(num%))*10) . | 00001460 26 31 30 30 0d 05 a0 3a 20 63 61 74 3f 32 36 33 |&100...: cat?263| 00001470 3d 28 28 74 72 61 63 6b 73 5f 73 6f 5f 66 61 72 |=((tracks_so_far| 00001480 25 2b 70 61 72 74 5f 73 69 7a 65 25 28 6e 75 6d |%+part_size%(num| 00001490 25 29 29 2a 31 30 29 20 83 20 26 31 30 30 0d 05 |%))*10) . &100..| 000014a0 aa 41 20 24 28 63 61 74 2b 38 29 3d 22 21 64 75 |.A $(cat+8)="!du| 000014b0 6d 6d 79 21 22 3a 63 61 74 3f 31 35 3d 31 36 34 |mmy!":cat?15=164| 000014c0 3a 24 28 63 61 74 2b 31 36 29 3d 22 50 41 52 54 |:$(cat+16)="PART| 000014d0 20 20 20 22 3a 63 61 74 3f 32 33 3d 31 36 34 0d | ":cat?23=164.| 000014e0 05 b4 16 20 63 61 74 21 32 36 34 3d 26 38 30 30 |... cat!264=&800| 000014f0 30 38 30 30 30 0d 05 be 33 20 63 61 74 3f 32 36 |08000...3 cat?26| 00001500 38 3d 30 3a 63 61 74 3f 32 36 39 3d 28 74 72 61 |8=0:cat?269=(tra| 00001510 63 6b 73 5f 73 6f 5f 66 61 72 25 2a 31 30 2d 34 |cks_so_far%*10-4| 00001520 29 20 83 20 26 31 30 30 0d 05 c8 38 20 63 61 74 |) . &100...8 cat| 00001530 3f 32 37 30 3d 31 36 2a 28 28 74 72 61 63 6b 73 |?270=16*((tracks| 00001540 5f 73 6f 5f 66 61 72 25 2a 31 30 2d 34 29 20 81 |_so_far%*10-4) .| 00001550 20 26 31 30 30 29 3a 63 61 74 3f 32 37 31 3d 34 | &100):cat?271=4| 00001560 0d 05 d2 3e 20 63 61 74 21 32 37 32 3d 26 30 39 |...> cat!272=&09| 00001570 30 30 30 39 30 30 3a 63 61 74 3f 32 37 36 3d 30 |000900:cat?276=0| 00001580 3a 63 61 74 3f 32 37 37 3d 32 3a 63 61 74 3f 32 |:cat?277=2:cat?2| 00001590 37 38 3d 30 3a 63 61 74 3f 32 37 39 3d 32 0d 05 |78=0:cat?279=2..| 000015a0 dc 43 20 e7 20 6e 75 6d 25 3d 30 20 8c 20 3f 26 |.C . num%=0 . ?&| 000015b0 37 37 3d 30 3a 3f 26 37 38 3d 30 3a 8b 20 3f 26 |77=0:?&78=0:. ?&| 000015c0 37 37 3d 28 6e 75 6d 25 2b 32 29 81 35 3a 3f 26 |77=(num%+2).5:?&| 000015d0 37 38 3d 32 2a 28 28 6e 75 6d 25 2b 32 29 83 35 |78=2*((num%+2).5| 000015e0 29 0d 05 e6 1f 20 58 25 3d 26 37 30 3a 59 25 3d |).... X%=&70:Y%=| 000015f0 30 3a 41 25 3d 26 37 46 3a d6 20 26 46 46 46 31 |0:A%=&7F:. &FFF1| 00001600 0d 05 f0 33 20 74 72 61 63 6b 73 5f 73 6f 5f 66 |...3 tracks_so_f| 00001610 61 72 25 3d 74 72 61 63 6b 73 5f 73 6f 5f 66 61 |ar%=tracks_so_fa| 00001620 72 25 2b 70 61 72 74 5f 73 69 7a 65 25 28 6e 75 |r%+part_size%(nu| 00001630 6d 25 29 0d 05 fa 06 20 ed 0d 06 04 20 20 3f 26 |m%).... .... ?&| 00001640 37 31 3d 30 3a 3f 26 37 32 3d 39 3a 3f 26 37 37 |71=0:?&72=9:?&77| 00001650 3d 30 3a 3f 26 37 38 3d 32 0d 06 0e 1f 20 58 25 |=0:?&78=2.... X%| 00001660 3d 26 37 30 3a 59 25 3d 30 3a 41 25 3d 26 37 46 |=&70:Y%=0:A%=&7F| 00001670 3a d6 20 26 46 46 46 31 0d 06 18 09 20 f1 27 3a |:. &FFF1.... .':| 00001680 e1 0d 06 22 06 20 3a 0d 06 2c 21 20 dd 20 a4 67 |...". :..,! . .g| 00001690 65 74 5f 6e 75 6d 62 65 72 28 73 24 2c 6c 6f 77 |et_number(s$,low| 000016a0 25 2c 68 69 67 68 25 29 0d 06 36 06 20 f5 0d 06 |%,high%)..6. ...| 000016b0 40 33 20 f1 20 bd 31 33 30 3b 73 24 3b 22 20 28 |@3 . .130;s$;" (| 000016c0 22 3b 6c 6f 77 25 3b 22 2d 22 3b 68 69 67 68 25 |";low%;"-";high%| 000016d0 3b 22 29 3a 22 3b bd 31 33 31 3b 3a e8 22 22 69 |;"):";.131;:.""i| 000016e0 25 0d 06 4a 1b 20 fd 20 69 25 3e 3d 6c 6f 77 25 |%..J. . i%>=low%| 000016f0 20 80 20 69 25 3c 3d 68 69 67 68 25 0d 06 54 08 | . i%<=high%..T.| 00001700 20 3d 69 25 0d 06 5e 06 20 3a 0d 06 68 1e 20 dd | =i%..^. :..h. .| 00001710 20 a4 67 65 74 5f 73 74 72 69 6e 67 28 73 24 2c | .get_string(s$,| 00001720 6c 65 6e 67 74 68 25 29 0d 06 72 06 20 f5 0d 06 |length%)..r. ...| 00001730 7c 37 20 f1 20 bd 31 33 30 3b 73 24 3b 22 20 28 ||7 . .130;s$;" (| 00001740 6d 61 78 20 6c 65 6e 67 74 68 20 22 3b 6c 65 6e |max length ";len| 00001750 67 74 68 25 3b 22 29 3a 22 3b bd 31 33 31 3b 3a |gth%;"):";.131;:| 00001760 e8 22 22 69 24 0d 06 86 1d 20 fd 20 a9 20 69 24 |.""i$.... . . i$| 00001770 3e 30 20 80 20 a9 20 69 24 3c 3d 6c 65 6e 67 74 |>0 . . i$<=lengt| 00001780 68 25 0d 06 90 20 20 3d 69 24 2b c0 c4 31 32 2c |h%... =i$+..12,| 00001790 22 20 22 29 2c 6c 65 6e 67 74 68 25 2d a9 20 69 |" "),length%-. i| 000017a0 24 29 0d 06 9a 06 20 3a 0d 06 a4 11 20 dd 20 f2 |$).... :.... . .| 000017b0 6f 73 63 6c 69 28 63 24 29 0d 06 ae 0d 20 de 20 |oscli(c$).... . | 000017c0 6d 65 6d 20 34 30 0d 06 b8 26 20 24 6d 65 6d 3d |mem 40...& $mem=| 000017d0 63 24 3a 58 25 3d 6d 65 6d 20 83 20 32 35 36 3a |c$:X%=mem . 256:| 000017e0 59 25 3d 6d 65 6d 20 81 20 32 35 36 0d 06 c2 0e |Y%=mem . 256....| 000017f0 20 d6 20 26 46 46 46 37 3a e1 0d 06 cc 06 20 3a | . &FFF7:..... :| 00001800 0d 06 d6 10 20 dd 20 a4 65 71 75 73 28 73 24 29 |.... . .equs(s$)| 00001810 0d 06 e0 15 20 24 50 25 3d 73 24 3a 50 25 3d 50 |.... $P%=s$:P%=P| 00001820 25 2b a9 73 24 0d 06 ea 0a 20 3d 6f 70 74 25 0d |%+.s$.... =opt%.| 00001830 06 f4 06 20 3a 0d 06 fe 0f 20 dd 20 a4 65 71 75 |... :.... . .equ| 00001840 62 28 62 29 0d 07 08 12 20 3f 50 25 3d 62 3a 50 |b(b).... ?P%=b:P| 00001850 25 3d 50 25 2b 31 0d 07 12 0a 20 3d 6f 70 74 25 |%=P%+1.... =opt%| 00001860 0d ff |..| 00001862