Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_31.ADF » P/dfsPart

P/dfsPart

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 ADFS disks » Electron_User_Group » EUG_31.ADF
Filename: P/dfsPart
Read OK:
File size: 16B5 bytes
Load address: FFFF0E00
Exec address: FFFF802B
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
   10 REM Disc Partitioning
   20 REM by Richard Hindle
   30 REM For B/B+/M/C with DFS
   40 REM MICRO USER NOV 91
   50 REM Modified to use REM lines
   60 REM By Richard Dimond, March 1997
   70 REM :
   80 MODE 7
   90 DIM part_name$(66),part_size%(66)
  100 PROCget_info
  110 PROCassemble
  120 PROCcreate_disc
  130 END
  140 :
  150 DEF PROCget_info
  160 PRINT SPC9;CHR$141;CHR$134;"Disc Partitioner"
  170 PRINT SPC9;CHR$141;CHR$134;"Disc Partitioner"'
  180 drive%=FNget_number("Please enter drive number",0,3)
  190 PROCoscli("DRIVE "+STR$(drive%))
  200 X%=&70:Y%=0:A%=&7E:CALL &FFF1:sectors%=!&70/256:tracks%=sectors%/10
  210 IF sectors%<>400 AND sectors%<>800 THEN PRINT '"Disc is dodgy, please re-format to"'"single-density 40- or 80-track disc.":END
  220 PRINT '" Disc in drive ";drive%;" is ";tracks%;" track."
  230IFdrive%=0 OR drive%=1 RESTORE1800 ELSE RESTORE1810
  240READparts%
  250 cat_size%=(parts%*2+15) DIV 10
  260 FOR num%=0 TO parts%-1
  270READpart_name$(num%)
  280 NEXT
  290 REPEAT
  300 total%=0:FOR num%=0 TO parts%-2
  310READpart_size%(num%)
  320 total%=total%+part_size%(num%):NEXT
  330 part_size%(num%)=tracks%-cat_size%-total%
  340 PRINT''"Disc defined as:"'
  350 FOR num%=0 TO parts%-1:PRINT part_name$(num%),part_size%(num%):NEXT
  360PRINT'"Go (Y/N)?"
  370 REPEATUNTILGET
  380IFGET<>89 THENEND
  390 PRINT''CHR$129;" Creating disc...";:ENDPROC
  400 :
  410 DEF PROCassemble
  420 cat_ptr=&80:name_ptr=&82:count=&84:build_flag=&85:char=&86
  430 load=&53:save=&4B
  440 FOR opt%=0 TO 2 STEP 2:P%=&900
  450 [ OPT opt%
  460 JSR find_args:CMP #13:BEQ list_parts:JMP decode_args
  470 \
  480 .list_parts
  490 LDA #&E:STA page:LDA #10:JSR &FFEE
  500 LDA #parts%:STA count:LDA #0:STA sec_num
  510 .read_loop
  520 LDA #load:JSR move_bytes:JSR build_name:JSR print_name
  530 DEC count:BEQ list_done:JSR next_part:JMP read_loop
  540 .list_done LDA #10:JSR &FFEE:RTS
  550 \
  560 .next_part
  570 LDA track_num:BNE ok_inc:LDA sec_num:BNE ok_inc:LDA #6:STA sec_num:RTS
  580 .ok_inc LDA sec_num:SEC:ADC #1:STA sec_num:CMP #10:BEQ inc_track:RTS
  590 .inc_track LDA #0:STA sec_num:INC track_num:RTS
  600 \
  610 .find_args
  620 LDY #1: .args_loop
  630 LDA (&F2),Y:CMP #32:BEQ found_32:CMP #13:BEQ end_find
  640 INY:JMP args_loop
  650 .found_32 INY:LDA (&F2),Y:CMP #32:BEQ found_32
  660 .end_find RTS
  670 \
  680 .build_name
  690 LDA #13:STA &7C:LDA #0:STA cat_ptr:STA name_ptr+1:STA build_flag
  700 LDA #&F:STA cat_ptr+1:LDA #&78:STA name_ptr:LDY #4:JSR do_build
  710 LDA #&E:STA cat_ptr+1:LDA #&70:STA name_ptr:LDY #8:JSR do_build:RTS
  720 \
  730 .do_build
  740 DEY:LDA (cat_ptr),Y:BEQ db_blank:CMP #32:BEQ db_blank
  750 LDX #1:STA build_flag:JMP db_write
  760 .db_blank LDA #32:LDX build_flag:BNE db_write:LDA #13
  770 .db_write STA (name_ptr),Y
  780 CPY #0:BNE do_build:RTS
  790 \
  800 .print_name
  810 LDA #32:JSR &FFEE:JSR &FFEE:LDY #0: .print_loop
  820 LDA (name_ptr),Y:JSR &FFEE:CMP #13:BEQ print_done
  830 INY:JMP print_loop
  840 .print_done LDA #10:JSR &FFEE:RTS
  850 \
  860 .move_bytes
  870 STA command:LDX #par_block MOD 256:LDY #par_block DIV 256
  880 LDA #&7F:JSR &FFF1:LDA error:BNE disc_error:RTS
  890 .disc_error STA disc_error+5:BRK:BRK:OPT FNequs("Disc Error"):BRK
  900 \
  910 .decode_args        \ (&F2),Y   points to partition name
  920 TYA:CLC:ADC &F2:STA &F2:LDA &F3:ADC #0:STA &F3:LDY #0
  930 LDA (&F2),Y:CMP #ASC"D":BNE select_part
  940 INY:LDA (&F2),Y:CMP #48:BCC select_part:CMP #52:BCS select_part
  950 TAX:INY:LDA (&F2),Y:CMP #13:BNE select_part
  960 TXA:SEC:SBC #48:STA drive:LDA #9:STA page:LDA #2:STA sec_num
  970 LDA #save:JSR move_bytes:RTS
  980 \
  990 .select_part
 1000 LDA #0:STA sec_num:LDA #&E:STA page:LDA #parts%:STA count
 1010 .select_loop
 1020 LDA #load:JSR move_bytes:JSR compare_names:BCS part_found
 1030 DEC count:BEQ no_such_part:JSR next_part:JMP select_loop
 1040 .no_such_part BRK:OPT FNequb(50):OPT FNequs("No such partition"):BRK
 1050 \
 1060 .part_found
 1070 LDA track_num:PHA:LDA sec_num:PHA
 1080 LDA #0:STA track_num:LDA #4:STA sec_num:LDA #save:JSR move_bytes
 1090 LDA #0:STA sec_num:LDA #load:JSR move_bytes
 1100 PLA:STA sec_num:PLA:STA track_num:LDA #save:JSR move_bytes
 1110 LDA #0:STA track_num:LDA #4:STA sec_num:LDA #load:JSR move_bytes
 1120 LDA #0:STA sec_num:LDA #save:JSR move_bytes
 1130 RTS
 1140 \
 1150 .compare_names
 1160 JSR build_name:LDY #0
 1170 .compare_loop LDA (name_ptr),Y:ORA #&20:STA char
 1180 LDA (&F2),Y:ORA #&20:CMP char:BNE no_match
 1190 LDA (&F2),Y:CMP #13:BEQ match_found:INY:JMP compare_loop
 1200 .no_match    CLC:RTS
 1210 .match_found SEC:RTS
 1220 \
 1230 .par_block
 1240 .drive     OPT FNequb(drive%):BRK
 1250 .page      BRK:BRK:BRK:OPT FNequb(3)
 1260 .command   BRK
 1270 .track_num BRK
 1280 .sec_num   BRK:OPT FNequb(&22)
 1290 .error     BRK
 1300 ]:NEXT
 1310 ENDPROC
 1320 :
 1330 DEF PROCcreate_disc
 1340 DIM cat &200
 1350 FOR A%=cat TO cat+&1FF:?A%=0:NEXT
 1360 tracks_so_far%=cat_size%
 1370 ?&70=drive%:!&71=cat:?&75=3:?&76=&4B:?&79=&22
 1380 FOR num%=0 TO parts%-1
 1390 $cat=LEFT$(part_name$(num%),8):$(cat+256)=RIGHT$(part_name$(num%),4)
 1400 cat?260=8:cat?261=16
 1410 cat?262=((tracks_so_far%+part_size%(num%))*10) DIV &100
 1420 cat?263=((tracks_so_far%+part_size%(num%))*10) MOD &100
 1430 $(cat+8)="!dummy!":cat?15=164:$(cat+16)="PART   ":cat?23=164
 1440 cat!264=&80008000
 1450 cat?268=0:cat?269=(tracks_so_far%*10-4) MOD &100
 1460 cat?270=16*((tracks_so_far%*10-4) DIV &100):cat?271=4
 1470 cat!272=&09000900:cat?276=0:cat?277=2:cat?278=0:cat?279=2
 1480 IF num%=0 THEN ?&77=0:?&78=0:ELSE ?&77=(num%+2)DIV5:?&78=2*((num%+2)MOD5)
 1490 X%=&70:Y%=0:A%=&7F:CALL &FFF1
 1500 tracks_so_far%=tracks_so_far%+part_size%(num%)
 1510 NEXT
 1520 ?&71=0:?&72=9:?&77=0:?&78=2
 1530 X%=&70:Y%=0:A%=&7F:CALL &FFF1
 1540 PRINT':ENDPROC
 1550 :
 1560 DEF FNget_number(s$,low%,high%)
 1570 REPEAT
 1580 PRINT CHR$130;s$;" (";low%;"-";high%;"):";CHR$131;:INPUT""i%
 1590 UNTIL i%>=low% AND i%<=high%
 1600 =i%
 1610 :
 1620 DEF FNget_string(s$,length%)
 1630 REPEAT
 1640 PRINT CHR$130;s$;" (max length ";length%;"):";CHR$131;:INPUT""i$
 1650 UNTIL LEN i$>0 AND LEN i$<=length%
 1660 =i$+LEFT$(STRING$(12," "),length%-LEN i$)
 1670 :
 1680 DEF PROCoscli(c$)
 1690 DIM mem 40
 1700 $mem=c$:X%=mem MOD 256:Y%=mem DIV 256
 1710 CALL &FFF7:ENDPROC
 1720 :
 1730 DEF FNequs(s$)
 1740 $P%=s$:P%=P%+LENs$
 1750 =opt%
 1760 :
 1770 DEF FNequb(b)
 1780 ?P%=b:P%=P%+1
 1790 =opt%
 1800DATA 3,UTILS,FEATS,ROMS,30,20,28
 1810DATA 4,LETTS,GAMES,PROGS,SHOPG,19,30,18,10

 � Disc Partitioning
 � by Richard Hindle
 � For B/B+/M/C with DFS
( � MICRO USER NOV 91
2  � Modified to use REM lines
<$ � By Richard Dimond, March 1997
F � :
P � 7
Z$ � part_name$(66),part_size%(66)
d �get_info
n �assemble
x �create_disc
� �
� :
� � �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%))
�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."
�&�drive%=0 � drive%=1 ��THG � ��TRG
��parts%
�! cat_size%=(parts%*2+15) � 10
 � num%=0 � parts%-1
�part_name$(num%)
 �
" �
,! total%=0:� num%=0 � parts%-2
6�part_size%(num%)
@% total%=total%+part_size%(num%):�
J. part_size%(num%)=tracks%-cat_size%-total%
T �''"Disc defined as:"'
^> � num%=0 � parts%-1:� part_name$(num%),part_size%(num%):�
h�'"Go (Y/N)?"
r ���
|
�<>89 ��
�# �''�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
% .list_done LDA #10:JSR &FFEE:RTS
& \
0 .next_part
:K LDA track_num:BNE ok_inc:LDA sec_num:BNE ok_inc:LDA #6:STA sec_num:RTS
DI .ok_inc LDA sec_num:SEC:ADC #1:STA sec_num:CMP #10:BEQ inc_track:RTS
N4 .inc_track LDA #0:STA sec_num:INC track_num:RTS
X \
b .find_args
l LDY #1: .args_loop
v: 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
 \
  .print_name
*4 LDA #32:JSR &FFEE:JSR &FFEE:LDY #0: .print_loop
46 LDA (name_ptr),Y:JSR &FFEE:CMP #13:BEQ print_done
> INY:JMP print_loop
H& .print_done LDA #10:JSR &FFEE:RTS
R \
\ .move_bytes
f: STA command:LDX #par_block � 256:LDY #par_block � 256
p4 LDA #&7F:JSR &FFF1:LDA error:BNE disc_error:RTS
zE .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
 \
$ .part_found
.& LDA track_num:PHA:LDA sec_num:PHA
8E LDA #0:STA track_num:LDA #4:STA sec_num:LDA #save:JSR move_bytes
B0 LDA #0:STA sec_num:LDA #load:JSR move_bytes
L? PLA:STA sec_num:PLA:STA track_num:LDA #save:JSR move_bytes
VE LDA #0:STA track_num:LDA #4:STA sec_num:LDA #load:JSR move_bytes
`0 LDA #0:STA sec_num:LDA #save:JSR move_bytes
j RTS
t \
~ .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 � �create_disc
< � cat &200
F  � A%=cat � cat+&1FF:?A%=0:�
P tracks_so_far%=cat_size%
Z2 ?&70=drive%:!&71=cat:?&75=3:?&76=&4B:?&79=&22
d � num%=0 � parts%-1
n> $cat=�part_name$(num%),8):$(cat+256)=�part_name$(num%),4)
x 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%)
" �
,3 � �130;s$;" (";low%;"-";high%;"):";�131;:�""i%
6 � i%>=low% � i%<=high%
@ =i%
J :
T � �get_string(s$,length%)
^ �
h7 � �130;s$;" (max length ";length%;"):";�131;:�""i$
r � � 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%
!� 3,UTILS,FEATS,ROMS,30,20,28
+� 4,LETTS,GAMES,PROGS,SHOPG,19,30,18,10
�
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 18  |M/C with DFS..(.|
00000050  20 f4 20 4d 49 43 52 4f  20 55 53 45 52 20 4e 4f  | . MICRO USER NO|
00000060  56 20 39 31 0d 00 32 20  20 f4 20 4d 6f 64 69 66  |V 91..2  . Modif|
00000070  69 65 64 20 74 6f 20 75  73 65 20 52 45 4d 20 6c  |ied to use REM l|
00000080  69 6e 65 73 0d 00 3c 24  20 f4 20 42 79 20 52 69  |ines..<$ . By Ri|
00000090  63 68 61 72 64 20 44 69  6d 6f 6e 64 2c 20 4d 61  |chard Dimond, Ma|
000000a0  72 63 68 20 31 39 39 37  0d 00 46 08 20 f4 20 3a  |rch 1997..F. . :|
000000b0  0d 00 50 08 20 eb 20 37  0d 00 5a 24 20 de 20 70  |..P. . 7..Z$ . p|
000000c0  61 72 74 5f 6e 61 6d 65  24 28 36 36 29 2c 70 61  |art_name$(66),pa|
000000d0  72 74 5f 73 69 7a 65 25  28 36 36 29 0d 00 64 0e  |rt_size%(66)..d.|
000000e0  20 f2 67 65 74 5f 69 6e  66 6f 0d 00 6e 0e 20 f2  | .get_info..n. .|
000000f0  61 73 73 65 6d 62 6c 65  0d 00 78 11 20 f2 63 72  |assemble..x. .cr|
00000100  65 61 74 65 5f 64 69 73  63 0d 00 82 06 20 e0 0d  |eate_disc.... ..|
00000110  00 8c 06 20 3a 0d 00 96  10 20 dd 20 f2 67 65 74  |... :.... . .get|
00000120  5f 69 6e 66 6f 0d 00 a0  26 20 f1 20 89 39 3b bd  |_info...& . .9;.|
00000130  31 34 31 3b bd 31 33 34  3b 22 44 69 73 63 20 50  |141;.134;"Disc P|
00000140  61 72 74 69 74 69 6f 6e  65 72 22 0d 00 aa 27 20  |artitioner"...' |
00000150  f1 20 89 39 3b bd 31 34  31 3b bd 31 33 34 3b 22  |. .9;.141;.134;"|
00000160  44 69 73 63 20 50 61 72  74 69 74 69 6f 6e 65 72  |Disc Partitioner|
00000170  22 27 0d 00 b4 38 20 64  72 69 76 65 25 3d a4 67  |"'...8 drive%=.g|
00000180  65 74 5f 6e 75 6d 62 65  72 28 22 50 6c 65 61 73  |et_number("Pleas|
00000190  65 20 65 6e 74 65 72 20  64 72 69 76 65 20 6e 75  |e enter drive nu|
000001a0  6d 62 65 72 22 2c 30 2c  33 29 0d 00 be 1f 20 f2  |mber",0,3).... .|
000001b0  6f 73 63 6c 69 28 22 44  52 49 56 45 20 22 2b c3  |oscli("DRIVE "+.|
000001c0  28 64 72 69 76 65 25 29  29 0d 00 c8 45 20 58 25  |(drive%))...E X%|
000001d0  3d 26 37 30 3a 59 25 3d  30 3a 41 25 3d 26 37 45  |=&70:Y%=0:A%=&7E|
000001e0  3a d6 20 26 46 46 46 31  3a 73 65 63 74 6f 72 73  |:. &FFF1:sectors|
000001f0  25 3d 21 26 37 30 2f 32  35 36 3a 74 72 61 63 6b  |%=!&70/256:track|
00000200  73 25 3d 73 65 63 74 6f  72 73 25 2f 31 30 0d 00  |s%=sectors%/10..|
00000210  d2 77 20 e7 20 73 65 63  74 6f 72 73 25 3c 3e 34  |.w . sectors%<>4|
00000220  30 30 20 80 20 73 65 63  74 6f 72 73 25 3c 3e 38  |00 . sectors%<>8|
00000230  30 30 20 8c 20 f1 20 27  22 44 69 73 63 20 69 73  |00 . . '"Disc is|
00000240  20 64 6f 64 67 79 2c 20  70 6c 65 61 73 65 20 72  | dodgy, please r|
00000250  65 2d 66 6f 72 6d 61 74  20 74 6f 22 27 22 73 69  |e-format to"'"si|
00000260  6e 67 6c 65 2d 64 65 6e  73 69 74 79 20 34 30 2d  |ngle-density 40-|
00000270  20 6f 72 20 38 30 2d 74  72 61 63 6b 20 64 69 73  | or 80-track dis|
00000280  63 2e 22 3a e0 0d 00 dc  39 20 f1 20 27 22 20 44  |c.":....9 . '" D|
00000290  69 73 63 20 69 6e 20 64  72 69 76 65 20 22 3b 64  |isc in drive ";d|
000002a0  72 69 76 65 25 3b 22 20  69 73 20 22 3b 74 72 61  |rive%;" is ";tra|
000002b0  63 6b 73 25 3b 22 20 74  72 61 63 6b 2e 22 0d 00  |cks%;" track."..|
000002c0  e6 26 e7 64 72 69 76 65  25 3d 30 20 84 20 64 72  |.&.drive%=0 . dr|
000002d0  69 76 65 25 3d 31 20 f7  8d 54 48 47 20 8b 20 f7  |ive%=1 ..THG . .|
000002e0  8d 54 52 47 0d 00 f0 0b  f3 70 61 72 74 73 25 0d  |.TRG.....parts%.|
000002f0  00 fa 21 20 63 61 74 5f  73 69 7a 65 25 3d 28 70  |..! cat_size%=(p|
00000300  61 72 74 73 25 2a 32 2b  31 35 29 20 81 20 31 30  |arts%*2+15) . 10|
00000310  0d 01 04 18 20 e3 20 6e  75 6d 25 3d 30 20 b8 20  |.... . num%=0 . |
00000320  70 61 72 74 73 25 2d 31  0d 01 0e 15 f3 70 61 72  |parts%-1.....par|
00000330  74 5f 6e 61 6d 65 24 28  6e 75 6d 25 29 0d 01 18  |t_name$(num%)...|
00000340  06 20 ed 0d 01 22 06 20  f5 0d 01 2c 21 20 74 6f  |. ...". ...,! to|
00000350  74 61 6c 25 3d 30 3a e3  20 6e 75 6d 25 3d 30 20  |tal%=0:. num%=0 |
00000360  b8 20 70 61 72 74 73 25  2d 32 0d 01 36 15 f3 70  |. parts%-2..6..p|
00000370  61 72 74 5f 73 69 7a 65  25 28 6e 75 6d 25 29 0d  |art_size%(num%).|
00000380  01 40 25 20 74 6f 74 61  6c 25 3d 74 6f 74 61 6c  |.@% total%=total|
00000390  25 2b 70 61 72 74 5f 73  69 7a 65 25 28 6e 75 6d  |%+part_size%(num|
000003a0  25 29 3a ed 0d 01 4a 2e  20 70 61 72 74 5f 73 69  |%):...J. part_si|
000003b0  7a 65 25 28 6e 75 6d 25  29 3d 74 72 61 63 6b 73  |ze%(num%)=tracks|
000003c0  25 2d 63 61 74 5f 73 69  7a 65 25 2d 74 6f 74 61  |%-cat_size%-tota|
000003d0  6c 25 0d 01 54 1b 20 f1  27 27 22 44 69 73 63 20  |l%..T. .''"Disc |
000003e0  64 65 66 69 6e 65 64 20  61 73 3a 22 27 0d 01 5e  |defined as:"'..^|
000003f0  3e 20 e3 20 6e 75 6d 25  3d 30 20 b8 20 70 61 72  |> . num%=0 . par|
00000400  74 73 25 2d 31 3a f1 20  70 61 72 74 5f 6e 61 6d  |ts%-1:. part_nam|
00000410  65 24 28 6e 75 6d 25 29  2c 70 61 72 74 5f 73 69  |e$(num%),part_si|
00000420  7a 65 25 28 6e 75 6d 25  29 3a ed 0d 01 68 11 f1  |ze%(num%):...h..|
00000430  27 22 47 6f 20 28 59 2f  4e 29 3f 22 0d 01 72 08  |'"Go (Y/N)?"..r.|
00000440  20 f5 fd a5 0d 01 7c 0d  e7 a5 3c 3e 38 39 20 8c  | .....|...<>89 .|
00000450  e0 0d 01 86 23 20 f1 27  27 bd 31 32 39 3b 22 20  |....# .''.129;" |
00000460  43 72 65 61 74 69 6e 67  20 64 69 73 63 2e 2e 2e  |Creating disc...|
00000470  22 3b 3a e1 0d 01 90 06  20 3a 0d 01 9a 10 20 dd  |";:..... :.... .|
00000480  20 f2 61 73 73 65 6d 62  6c 65 0d 01 a4 3f 20 63  | .assemble...? c|
00000490  61 74 5f 70 74 72 3d 26  38 30 3a 6e 61 6d 65 5f  |at_ptr=&80:name_|
000004a0  70 74 72 3d 26 38 32 3a  63 6f 75 6e 74 3d 26 38  |ptr=&82:count=&8|
000004b0  34 3a 62 75 69 6c 64 5f  66 6c 61 67 3d 26 38 35  |4:build_flag=&85|
000004c0  3a 63 68 61 72 3d 26 38  36 0d 01 ae 16 20 6c 6f  |:char=&86.... lo|
000004d0  61 64 3d 26 35 33 3a 73  61 76 65 3d 26 34 42 0d  |ad=&53:save=&4B.|
000004e0  01 b8 1d 20 e3 20 6f 70  74 25 3d 30 20 b8 20 32  |... . opt%=0 . 2|
000004f0  20 88 20 32 3a 50 25 3d  26 39 30 30 0d 01 c2 0f  | . 2:P%=&900....|
00000500  20 5b 20 4f 50 54 20 6f  70 74 25 0d 01 cc 39 20  | [ OPT opt%...9 |
00000510  4a 53 52 20 66 69 6e 64  5f 61 72 67 73 3a 43 4d  |JSR find_args:CM|
00000520  50 20 23 31 33 3a 42 45  51 20 6c 69 73 74 5f 70  |P #13:BEQ list_p|
00000530  61 72 74 73 3a 4a 4d 50  20 64 65 63 6f 64 65 5f  |arts:JMP decode_|
00000540  61 72 67 73 0d 01 d6 06  20 5c 0d 01 e0 10 20 2e  |args.... \.... .|
00000550  6c 69 73 74 5f 70 61 72  74 73 0d 01 ea 27 20 4c  |list_parts...' L|
00000560  44 41 20 23 26 45 3a 53  54 41 20 70 61 67 65 3a  |DA #&E:STA page:|
00000570  4c 44 41 20 23 31 30 3a  4a 53 52 20 26 46 46 45  |LDA #10:JSR &FFE|
00000580  45 0d 01 f4 2d 20 4c 44  41 20 23 70 61 72 74 73  |E...- LDA #parts|
00000590  25 3a 53 54 41 20 63 6f  75 6e 74 3a 4c 44 41 20  |%:STA count:LDA |
000005a0  23 30 3a 53 54 41 20 73  65 63 5f 6e 75 6d 0d 01  |#0:STA sec_num..|
000005b0  fe 0f 20 2e 72 65 61 64  5f 6c 6f 6f 70 0d 02 08  |.. .read_loop...|
000005c0  3b 20 4c 44 41 20 23 6c  6f 61 64 3a 4a 53 52 20  |; LDA #load:JSR |
000005d0  6d 6f 76 65 5f 62 79 74  65 73 3a 4a 53 52 20 62  |move_bytes:JSR b|
000005e0  75 69 6c 64 5f 6e 61 6d  65 3a 4a 53 52 20 70 72  |uild_name:JSR pr|
000005f0  69 6e 74 5f 6e 61 6d 65  0d 02 12 38 20 44 45 43  |int_name...8 DEC|
00000600  20 63 6f 75 6e 74 3a 42  45 51 20 6c 69 73 74 5f  | count:BEQ list_|
00000610  64 6f 6e 65 3a 4a 53 52  20 6e 65 78 74 5f 70 61  |done:JSR next_pa|
00000620  72 74 3a 4a 4d 50 20 72  65 61 64 5f 6c 6f 6f 70  |rt:JMP read_loop|
00000630  0d 02 1c 25 20 2e 6c 69  73 74 5f 64 6f 6e 65 20  |...% .list_done |
00000640  4c 44 41 20 23 31 30 3a  4a 53 52 20 26 46 46 45  |LDA #10:JSR &FFE|
00000650  45 3a 52 54 53 0d 02 26  06 20 5c 0d 02 30 0f 20  |E:RTS..&. \..0. |
00000660  2e 6e 65 78 74 5f 70 61  72 74 0d 02 3a 4b 20 4c  |.next_part..:K L|
00000670  44 41 20 74 72 61 63 6b  5f 6e 75 6d 3a 42 4e 45  |DA track_num:BNE|
00000680  20 6f 6b 5f 69 6e 63 3a  4c 44 41 20 73 65 63 5f  | ok_inc:LDA sec_|
00000690  6e 75 6d 3a 42 4e 45 20  6f 6b 5f 69 6e 63 3a 4c  |num:BNE ok_inc:L|
000006a0  44 41 20 23 36 3a 53 54  41 20 73 65 63 5f 6e 75  |DA #6:STA sec_nu|
000006b0  6d 3a 52 54 53 0d 02 44  49 20 2e 6f 6b 5f 69 6e  |m:RTS..DI .ok_in|
000006c0  63 20 4c 44 41 20 73 65  63 5f 6e 75 6d 3a 53 45  |c LDA sec_num:SE|
000006d0  43 3a 41 44 43 20 23 31  3a 53 54 41 20 73 65 63  |C:ADC #1:STA sec|
000006e0  5f 6e 75 6d 3a 43 4d 50  20 23 31 30 3a 42 45 51  |_num:CMP #10:BEQ|
000006f0  20 69 6e 63 5f 74 72 61  63 6b 3a 52 54 53 0d 02  | inc_track:RTS..|
00000700  4e 34 20 2e 69 6e 63 5f  74 72 61 63 6b 20 4c 44  |N4 .inc_track LD|
00000710  41 20 23 30 3a 53 54 41  20 73 65 63 5f 6e 75 6d  |A #0:STA sec_num|
00000720  3a 49 4e 43 20 74 72 61  63 6b 5f 6e 75 6d 3a 52  |:INC track_num:R|
00000730  54 53 0d 02 58 06 20 5c  0d 02 62 0f 20 2e 66 69  |TS..X. \..b. .fi|
00000740  6e 64 5f 61 72 67 73 0d  02 6c 17 20 4c 44 59 20  |nd_args..l. LDY |
00000750  23 31 3a 20 2e 61 72 67  73 5f 6c 6f 6f 70 0d 02  |#1: .args_loop..|
00000760  76 3a 20 4c 44 41 20 28  26 46 32 29 2c 59 3a 43  |v: LDA (&F2),Y:C|
00000770  4d 50 20 23 33 32 3a 42  45 51 20 66 6f 75 6e 64  |MP #32:BEQ found|
00000780  5f 33 32 3a 43 4d 50 20  23 31 33 3a 42 45 51 20  |_32:CMP #13:BEQ |
00000790  65 6e 64 5f 66 69 6e 64  0d 02 80 16 20 49 4e 59  |end_find.... INY|
000007a0  3a 4a 4d 50 20 61 72 67  73 5f 6c 6f 6f 70 0d 02  |:JMP args_loop..|
000007b0  8a 33 20 2e 66 6f 75 6e  64 5f 33 32 20 49 4e 59  |.3 .found_32 INY|
000007c0  3a 4c 44 41 20 28 26 46  32 29 2c 59 3a 43 4d 50  |:LDA (&F2),Y:CMP|
000007d0  20 23 33 32 3a 42 45 51  20 66 6f 75 6e 64 5f 33  | #32:BEQ found_3|
000007e0  32 0d 02 94 12 20 2e 65  6e 64 5f 66 69 6e 64 20  |2.... .end_find |
000007f0  52 54 53 0d 02 9e 06 20  5c 0d 02 a8 10 20 2e 62  |RTS.... \.... .b|
00000800  75 69 6c 64 5f 6e 61 6d  65 0d 02 b2 45 20 4c 44  |uild_name...E LD|
00000810  41 20 23 31 33 3a 53 54  41 20 26 37 43 3a 4c 44  |A #13:STA &7C:LD|
00000820  41 20 23 30 3a 53 54 41  20 63 61 74 5f 70 74 72  |A #0:STA cat_ptr|
00000830  3a 53 54 41 20 6e 61 6d  65 5f 70 74 72 2b 31 3a  |:STA name_ptr+1:|
00000840  53 54 41 20 62 75 69 6c  64 5f 66 6c 61 67 0d 02  |STA build_flag..|
00000850  bc 44 20 4c 44 41 20 23  26 46 3a 53 54 41 20 63  |.D LDA #&F:STA c|
00000860  61 74 5f 70 74 72 2b 31  3a 4c 44 41 20 23 26 37  |at_ptr+1:LDA #&7|
00000870  38 3a 53 54 41 20 6e 61  6d 65 5f 70 74 72 3a 4c  |8:STA name_ptr:L|
00000880  44 59 20 23 34 3a 4a 53  52 20 64 6f 5f 62 75 69  |DY #4:JSR do_bui|
00000890  6c 64 0d 02 c6 48 20 4c  44 41 20 23 26 45 3a 53  |ld...H LDA #&E:S|
000008a0  54 41 20 63 61 74 5f 70  74 72 2b 31 3a 4c 44 41  |TA cat_ptr+1:LDA|
000008b0  20 23 26 37 30 3a 53 54  41 20 6e 61 6d 65 5f 70  | #&70:STA name_p|
000008c0  74 72 3a 4c 44 59 20 23  38 3a 4a 53 52 20 64 6f  |tr:LDY #8:JSR do|
000008d0  5f 62 75 69 6c 64 3a 52  54 53 0d 02 d0 06 20 5c  |_build:RTS.... \|
000008e0  0d 02 da 0e 20 2e 64 6f  5f 62 75 69 6c 64 0d 02  |.... .do_build..|
000008f0  e4 3a 20 44 45 59 3a 4c  44 41 20 28 63 61 74 5f  |.: DEY:LDA (cat_|
00000900  70 74 72 29 2c 59 3a 42  45 51 20 64 62 5f 62 6c  |ptr),Y:BEQ db_bl|
00000910  61 6e 6b 3a 43 4d 50 20  23 33 32 3a 42 45 51 20  |ank:CMP #32:BEQ |
00000920  64 62 5f 62 6c 61 6e 6b  0d 02 ee 27 20 4c 44 58  |db_blank...' LDX|
00000930  20 23 31 3a 53 54 41 20  62 75 69 6c 64 5f 66 6c  | #1:STA build_fl|
00000940  61 67 3a 4a 4d 50 20 64  62 5f 77 72 69 74 65 0d  |ag:JMP db_write.|
00000950  02 f8 3a 20 2e 64 62 5f  62 6c 61 6e 6b 20 4c 44  |..: .db_blank LD|
00000960  41 20 23 33 32 3a 4c 44  58 20 62 75 69 6c 64 5f  |A #32:LDX build_|
00000970  66 6c 61 67 3a 42 4e 45  20 64 62 5f 77 72 69 74  |flag:BNE db_writ|
00000980  65 3a 4c 44 41 20 23 31  33 0d 03 02 1f 20 2e 64  |e:LDA #13.... .d|
00000990  62 5f 77 72 69 74 65 20  53 54 41 20 28 6e 61 6d  |b_write STA (nam|
000009a0  65 5f 70 74 72 29 2c 59  0d 03 0c 1c 20 43 50 59  |e_ptr),Y.... CPY|
000009b0  20 23 30 3a 42 4e 45 20  64 6f 5f 62 75 69 6c 64  | #0:BNE do_build|
000009c0  3a 52 54 53 0d 03 16 06  20 5c 0d 03 20 10 20 2e  |:RTS.... \.. . .|
000009d0  70 72 69 6e 74 5f 6e 61  6d 65 0d 03 2a 34 20 4c  |print_name..*4 L|
000009e0  44 41 20 23 33 32 3a 4a  53 52 20 26 46 46 45 45  |DA #32:JSR &FFEE|
000009f0  3a 4a 53 52 20 26 46 46  45 45 3a 4c 44 59 20 23  |:JSR &FFEE:LDY #|
00000a00  30 3a 20 2e 70 72 69 6e  74 5f 6c 6f 6f 70 0d 03  |0: .print_loop..|
00000a10  34 36 20 4c 44 41 20 28  6e 61 6d 65 5f 70 74 72  |46 LDA (name_ptr|
00000a20  29 2c 59 3a 4a 53 52 20  26 46 46 45 45 3a 43 4d  |),Y:JSR &FFEE:CM|
00000a30  50 20 23 31 33 3a 42 45  51 20 70 72 69 6e 74 5f  |P #13:BEQ print_|
00000a40  64 6f 6e 65 0d 03 3e 17  20 49 4e 59 3a 4a 4d 50  |done..>. INY:JMP|
00000a50  20 70 72 69 6e 74 5f 6c  6f 6f 70 0d 03 48 26 20  | print_loop..H& |
00000a60  2e 70 72 69 6e 74 5f 64  6f 6e 65 20 4c 44 41 20  |.print_done LDA |
00000a70  23 31 30 3a 4a 53 52 20  26 46 46 45 45 3a 52 54  |#10:JSR &FFEE:RT|
00000a80  53 0d 03 52 06 20 5c 0d  03 5c 10 20 2e 6d 6f 76  |S..R. \..\. .mov|
00000a90  65 5f 62 79 74 65 73 0d  03 66 3a 20 53 54 41 20  |e_bytes..f: STA |
00000aa0  63 6f 6d 6d 61 6e 64 3a  4c 44 58 20 23 70 61 72  |command:LDX #par|
00000ab0  5f 62 6c 6f 63 6b 20 83  20 32 35 36 3a 4c 44 59  |_block . 256:LDY|
00000ac0  20 23 70 61 72 5f 62 6c  6f 63 6b 20 81 20 32 35  | #par_block . 25|
00000ad0  36 0d 03 70 34 20 4c 44  41 20 23 26 37 46 3a 4a  |6..p4 LDA #&7F:J|
00000ae0  53 52 20 26 46 46 46 31  3a 4c 44 41 20 65 72 72  |SR &FFF1:LDA err|
00000af0  6f 72 3a 42 4e 45 20 64  69 73 63 5f 65 72 72 6f  |or:BNE disc_erro|
00000b00  72 3a 52 54 53 0d 03 7a  45 20 2e 64 69 73 63 5f  |r:RTS..zE .disc_|
00000b10  65 72 72 6f 72 20 53 54  41 20 64 69 73 63 5f 65  |error STA disc_e|
00000b20  72 72 6f 72 2b 35 3a 42  52 4b 3a 42 52 4b 3a 4f  |rror+5:BRK:BRK:O|
00000b30  50 54 20 a4 65 71 75 73  28 22 44 69 73 63 20 45  |PT .equs("Disc E|
00000b40  72 72 6f 72 22 29 3a 42  52 4b 0d 03 84 06 20 5c  |rror"):BRK.... \|
00000b50  0d 03 8e 3d 20 2e 64 65  63 6f 64 65 5f 61 72 67  |...= .decode_arg|
00000b60  73 20 20 20 20 20 20 20  20 5c 20 28 26 46 32 29  |s        \ (&F2)|
00000b70  2c 59 20 20 20 70 6f 69  6e 74 73 20 74 6f 20 70  |,Y   points to p|
00000b80  61 72 74 69 74 69 6f 6e  20 6e 61 6d 65 0d 03 98  |artition name...|
00000b90  3a 20 54 59 41 3a 43 4c  43 3a 41 44 43 20 26 46  |: TYA:CLC:ADC &F|
00000ba0  32 3a 53 54 41 20 26 46  32 3a 4c 44 41 20 26 46  |2:STA &F2:LDA &F|
00000bb0  33 3a 41 44 43 20 23 30  3a 53 54 41 20 26 46 33  |3:ADC #0:STA &F3|
00000bc0  3a 4c 44 59 20 23 30 0d  03 a2 2a 20 4c 44 41 20  |:LDY #0...* LDA |
00000bd0  28 26 46 32 29 2c 59 3a  43 4d 50 20 23 97 22 44  |(&F2),Y:CMP #."D|
00000be0  22 3a 42 4e 45 20 73 65  6c 65 63 74 5f 70 61 72  |":BNE select_par|
00000bf0  74 0d 03 ac 44 20 49 4e  59 3a 4c 44 41 20 28 26  |t...D INY:LDA (&|
00000c00  46 32 29 2c 59 3a 43 4d  50 20 23 34 38 3a 42 43  |F2),Y:CMP #48:BC|
00000c10  43 20 73 65 6c 65 63 74  5f 70 61 72 74 3a 43 4d  |C select_part:CM|
00000c20  50 20 23 35 32 3a 42 43  53 20 73 65 6c 65 63 74  |P #52:BCS select|
00000c30  5f 70 61 72 74 0d 03 b6  30 20 54 41 58 3a 49 4e  |_part...0 TAX:IN|
00000c40  59 3a 4c 44 41 20 28 26  46 32 29 2c 59 3a 43 4d  |Y:LDA (&F2),Y:CM|
00000c50  50 20 23 31 33 3a 42 4e  45 20 73 65 6c 65 63 74  |P #13:BNE select|
00000c60  5f 70 61 72 74 0d 03 c0  41 20 54 58 41 3a 53 45  |_part...A TXA:SE|
00000c70  43 3a 53 42 43 20 23 34  38 3a 53 54 41 20 64 72  |C:SBC #48:STA dr|
00000c80  69 76 65 3a 4c 44 41 20  23 39 3a 53 54 41 20 70  |ive:LDA #9:STA p|
00000c90  61 67 65 3a 4c 44 41 20  23 32 3a 53 54 41 20 73  |age:LDA #2:STA s|
00000ca0  65 63 5f 6e 75 6d 0d 03  ca 21 20 4c 44 41 20 23  |ec_num...! LDA #|
00000cb0  73 61 76 65 3a 4a 53 52  20 6d 6f 76 65 5f 62 79  |save:JSR move_by|
00000cc0  74 65 73 3a 52 54 53 0d  03 d4 06 20 5c 0d 03 de  |tes:RTS.... \...|
00000cd0  11 20 2e 73 65 6c 65 63  74 5f 70 61 72 74 0d 03  |. .select_part..|
00000ce0  e8 3e 20 4c 44 41 20 23  30 3a 53 54 41 20 73 65  |.> LDA #0:STA se|
00000cf0  63 5f 6e 75 6d 3a 4c 44  41 20 23 26 45 3a 53 54  |c_num:LDA #&E:ST|
00000d00  41 20 70 61 67 65 3a 4c  44 41 20 23 70 61 72 74  |A page:LDA #part|
00000d10  73 25 3a 53 54 41 20 63  6f 75 6e 74 0d 03 f2 11  |s%:STA count....|
00000d20  20 2e 73 65 6c 65 63 74  5f 6c 6f 6f 70 0d 03 fc  | .select_loop...|
00000d30  3e 20 4c 44 41 20 23 6c  6f 61 64 3a 4a 53 52 20  |> LDA #load:JSR |
00000d40  6d 6f 76 65 5f 62 79 74  65 73 3a 4a 53 52 20 63  |move_bytes:JSR c|
00000d50  6f 6d 70 61 72 65 5f 6e  61 6d 65 73 3a 42 43 53  |ompare_names:BCS|
00000d60  20 70 61 72 74 5f 66 6f  75 6e 64 0d 04 06 3d 20  | part_found...= |
00000d70  44 45 43 20 63 6f 75 6e  74 3a 42 45 51 20 6e 6f  |DEC count:BEQ no|
00000d80  5f 73 75 63 68 5f 70 61  72 74 3a 4a 53 52 20 6e  |_such_part:JSR n|
00000d90  65 78 74 5f 70 61 72 74  3a 4a 4d 50 20 73 65 6c  |ext_part:JMP sel|
00000da0  65 63 74 5f 6c 6f 6f 70  0d 04 10 47 20 2e 6e 6f  |ect_loop...G .no|
00000db0  5f 73 75 63 68 5f 70 61  72 74 20 42 52 4b 3a 4f  |_such_part BRK:O|
00000dc0  50 54 20 a4 65 71 75 62  28 35 30 29 3a 4f 50 54  |PT .equb(50):OPT|
00000dd0  20 a4 65 71 75 73 28 22  4e 6f 20 73 75 63 68 20  | .equs("No such |
00000de0  70 61 72 74 69 74 69 6f  6e 22 29 3a 42 52 4b 0d  |partition"):BRK.|
00000df0  04 1a 06 20 5c 0d 04 24  10 20 2e 70 61 72 74 5f  |... \..$. .part_|
00000e00  66 6f 75 6e 64 0d 04 2e  26 20 4c 44 41 20 74 72  |found...& LDA tr|
00000e10  61 63 6b 5f 6e 75 6d 3a  50 48 41 3a 4c 44 41 20  |ack_num:PHA:LDA |
00000e20  73 65 63 5f 6e 75 6d 3a  50 48 41 0d 04 38 45 20  |sec_num:PHA..8E |
00000e30  4c 44 41 20 23 30 3a 53  54 41 20 74 72 61 63 6b  |LDA #0:STA track|
00000e40  5f 6e 75 6d 3a 4c 44 41  20 23 34 3a 53 54 41 20  |_num:LDA #4:STA |
00000e50  73 65 63 5f 6e 75 6d 3a  4c 44 41 20 23 73 61 76  |sec_num:LDA #sav|
00000e60  65 3a 4a 53 52 20 6d 6f  76 65 5f 62 79 74 65 73  |e:JSR move_bytes|
00000e70  0d 04 42 30 20 4c 44 41  20 23 30 3a 53 54 41 20  |..B0 LDA #0:STA |
00000e80  73 65 63 5f 6e 75 6d 3a  4c 44 41 20 23 6c 6f 61  |sec_num:LDA #loa|
00000e90  64 3a 4a 53 52 20 6d 6f  76 65 5f 62 79 74 65 73  |d:JSR move_bytes|
00000ea0  0d 04 4c 3f 20 50 4c 41  3a 53 54 41 20 73 65 63  |..L? PLA:STA sec|
00000eb0  5f 6e 75 6d 3a 50 4c 41  3a 53 54 41 20 74 72 61  |_num:PLA:STA tra|
00000ec0  63 6b 5f 6e 75 6d 3a 4c  44 41 20 23 73 61 76 65  |ck_num:LDA #save|
00000ed0  3a 4a 53 52 20 6d 6f 76  65 5f 62 79 74 65 73 0d  |:JSR move_bytes.|
00000ee0  04 56 45 20 4c 44 41 20  23 30 3a 53 54 41 20 74  |.VE LDA #0:STA t|
00000ef0  72 61 63 6b 5f 6e 75 6d  3a 4c 44 41 20 23 34 3a  |rack_num:LDA #4:|
00000f00  53 54 41 20 73 65 63 5f  6e 75 6d 3a 4c 44 41 20  |STA sec_num:LDA |
00000f10  23 6c 6f 61 64 3a 4a 53  52 20 6d 6f 76 65 5f 62  |#load:JSR move_b|
00000f20  79 74 65 73 0d 04 60 30  20 4c 44 41 20 23 30 3a  |ytes..`0 LDA #0:|
00000f30  53 54 41 20 73 65 63 5f  6e 75 6d 3a 4c 44 41 20  |STA sec_num:LDA |
00000f40  23 73 61 76 65 3a 4a 53  52 20 6d 6f 76 65 5f 62  |#save:JSR move_b|
00000f50  79 74 65 73 0d 04 6a 08  20 52 54 53 0d 04 74 06  |ytes..j. RTS..t.|
00000f60  20 5c 0d 04 7e 13 20 2e  63 6f 6d 70 61 72 65 5f  | \..~. .compare_|
00000f70  6e 61 6d 65 73 0d 04 88  1a 20 4a 53 52 20 62 75  |names.... JSR bu|
00000f80  69 6c 64 5f 6e 61 6d 65  3a 4c 44 59 20 23 30 0d  |ild_name:LDY #0.|
00000f90  04 92 34 20 2e 63 6f 6d  70 61 72 65 5f 6c 6f 6f  |..4 .compare_loo|
00000fa0  70 20 4c 44 41 20 28 6e  61 6d 65 5f 70 74 72 29  |p LDA (name_ptr)|
00000fb0  2c 59 3a 84 41 20 23 26  32 30 3a 53 54 41 20 63  |,Y:.A #&20:STA c|
00000fc0  68 61 72 0d 04 9c 2e 20  4c 44 41 20 28 26 46 32  |har.... LDA (&F2|
00000fd0  29 2c 59 3a 84 41 20 23  26 32 30 3a 43 4d 50 20  |),Y:.A #&20:CMP |
00000fe0  63 68 61 72 3a 42 4e 45  20 6e 6f 5f 6d 61 74 63  |char:BNE no_matc|
00000ff0  68 0d 04 a6 3d 20 4c 44  41 20 28 26 46 32 29 2c  |h...= LDA (&F2),|
00001000  59 3a 43 4d 50 20 23 31  33 3a 42 45 51 20 6d 61  |Y:CMP #13:BEQ ma|
00001010  74 63 68 5f 66 6f 75 6e  64 3a 49 4e 59 3a 4a 4d  |tch_found:INY:JM|
00001020  50 20 63 6f 6d 70 61 72  65 5f 6c 6f 6f 70 0d 04  |P compare_loop..|
00001030  b0 19 20 2e 6e 6f 5f 6d  61 74 63 68 20 20 20 20  |.. .no_match    |
00001040  43 4c 43 3a 52 54 53 0d  04 ba 19 20 2e 6d 61 74  |CLC:RTS.... .mat|
00001050  63 68 5f 66 6f 75 6e 64  20 53 45 43 3a 52 54 53  |ch_found SEC:RTS|
00001060  0d 04 c4 06 20 5c 0d 04  ce 0f 20 2e 70 61 72 5f  |.... \.... .par_|
00001070  62 6c 6f 63 6b 0d 04 d8  25 20 2e 64 72 69 76 65  |block...% .drive|
00001080  20 20 20 20 20 4f 50 54  20 a4 65 71 75 62 28 64  |     OPT .equb(d|
00001090  72 69 76 65 25 29 3a 42  52 4b 0d 04 e2 28 20 2e  |rive%):BRK...( .|
000010a0  70 61 67 65 20 20 20 20  20 20 42 52 4b 3a 42 52  |page      BRK:BR|
000010b0  4b 3a 42 52 4b 3a 4f 50  54 20 a4 65 71 75 62 28  |K:BRK:OPT .equb(|
000010c0  33 29 0d 04 ec 13 20 2e  63 6f 6d 6d 61 6e 64 20  |3).... .command |
000010d0  20 20 42 52 4b 0d 04 f6  13 20 2e 74 72 61 63 6b  |  BRK.... .track|
000010e0  5f 6e 75 6d 20 42 52 4b  0d 05 00 22 20 2e 73 65  |_num BRK..." .se|
000010f0  63 5f 6e 75 6d 20 20 20  42 52 4b 3a 4f 50 54 20  |c_num   BRK:OPT |
00001100  a4 65 71 75 62 28 26 32  32 29 0d 05 0a 13 20 2e  |.equb(&22).... .|
00001110  65 72 72 6f 72 20 20 20  20 20 42 52 4b 0d 05 14  |error     BRK...|
00001120  08 20 5d 3a ed 0d 05 1e  06 20 e1 0d 05 28 06 20  |. ]:..... ...(. |
00001130  3a 0d 05 32 13 20 dd 20  f2 63 72 65 61 74 65 5f  |:..2. . .create_|
00001140  64 69 73 63 0d 05 3c 0f  20 de 20 63 61 74 20 26  |disc..<. . cat &|
00001150  32 30 30 0d 05 46 20 20  e3 20 41 25 3d 63 61 74  |200..F  . A%=cat|
00001160  20 b8 20 63 61 74 2b 26  31 46 46 3a 3f 41 25 3d  | . cat+&1FF:?A%=|
00001170  30 3a ed 0d 05 50 1d 20  74 72 61 63 6b 73 5f 73  |0:...P. tracks_s|
00001180  6f 5f 66 61 72 25 3d 63  61 74 5f 73 69 7a 65 25  |o_far%=cat_size%|
00001190  0d 05 5a 32 20 3f 26 37  30 3d 64 72 69 76 65 25  |..Z2 ?&70=drive%|
000011a0  3a 21 26 37 31 3d 63 61  74 3a 3f 26 37 35 3d 33  |:!&71=cat:?&75=3|
000011b0  3a 3f 26 37 36 3d 26 34  42 3a 3f 26 37 39 3d 26  |:?&76=&4B:?&79=&|
000011c0  32 32 0d 05 64 18 20 e3  20 6e 75 6d 25 3d 30 20  |22..d. . num%=0 |
000011d0  b8 20 70 61 72 74 73 25  2d 31 0d 05 6e 3e 20 24  |. parts%-1..n> $|
000011e0  63 61 74 3d c0 70 61 72  74 5f 6e 61 6d 65 24 28  |cat=.part_name$(|
000011f0  6e 75 6d 25 29 2c 38 29  3a 24 28 63 61 74 2b 32  |num%),8):$(cat+2|
00001200  35 36 29 3d c2 70 61 72  74 5f 6e 61 6d 65 24 28  |56)=.part_name$(|
00001210  6e 75 6d 25 29 2c 34 29  0d 05 78 19 20 63 61 74  |num%),4)..x. cat|
00001220  3f 32 36 30 3d 38 3a 63  61 74 3f 32 36 31 3d 31  |?260=8:cat?261=1|
00001230  36 0d 05 82 3a 20 63 61  74 3f 32 36 32 3d 28 28  |6...: cat?262=((|
00001240  74 72 61 63 6b 73 5f 73  6f 5f 66 61 72 25 2b 70  |tracks_so_far%+p|
00001250  61 72 74 5f 73 69 7a 65  25 28 6e 75 6d 25 29 29  |art_size%(num%))|
00001260  2a 31 30 29 20 81 20 26  31 30 30 0d 05 8c 3a 20  |*10) . &100...: |
00001270  63 61 74 3f 32 36 33 3d  28 28 74 72 61 63 6b 73  |cat?263=((tracks|
00001280  5f 73 6f 5f 66 61 72 25  2b 70 61 72 74 5f 73 69  |_so_far%+part_si|
00001290  7a 65 25 28 6e 75 6d 25  29 29 2a 31 30 29 20 83  |ze%(num%))*10) .|
000012a0  20 26 31 30 30 0d 05 96  41 20 24 28 63 61 74 2b  | &100...A $(cat+|
000012b0  38 29 3d 22 21 64 75 6d  6d 79 21 22 3a 63 61 74  |8)="!dummy!":cat|
000012c0  3f 31 35 3d 31 36 34 3a  24 28 63 61 74 2b 31 36  |?15=164:$(cat+16|
000012d0  29 3d 22 50 41 52 54 20  20 20 22 3a 63 61 74 3f  |)="PART   ":cat?|
000012e0  32 33 3d 31 36 34 0d 05  a0 16 20 63 61 74 21 32  |23=164.... cat!2|
000012f0  36 34 3d 26 38 30 30 30  38 30 30 30 0d 05 aa 33  |64=&80008000...3|
00001300  20 63 61 74 3f 32 36 38  3d 30 3a 63 61 74 3f 32  | cat?268=0:cat?2|
00001310  36 39 3d 28 74 72 61 63  6b 73 5f 73 6f 5f 66 61  |69=(tracks_so_fa|
00001320  72 25 2a 31 30 2d 34 29  20 83 20 26 31 30 30 0d  |r%*10-4) . &100.|
00001330  05 b4 38 20 63 61 74 3f  32 37 30 3d 31 36 2a 28  |..8 cat?270=16*(|
00001340  28 74 72 61 63 6b 73 5f  73 6f 5f 66 61 72 25 2a  |(tracks_so_far%*|
00001350  31 30 2d 34 29 20 81 20  26 31 30 30 29 3a 63 61  |10-4) . &100):ca|
00001360  74 3f 32 37 31 3d 34 0d  05 be 3e 20 63 61 74 21  |t?271=4...> cat!|
00001370  32 37 32 3d 26 30 39 30  30 30 39 30 30 3a 63 61  |272=&09000900:ca|
00001380  74 3f 32 37 36 3d 30 3a  63 61 74 3f 32 37 37 3d  |t?276=0:cat?277=|
00001390  32 3a 63 61 74 3f 32 37  38 3d 30 3a 63 61 74 3f  |2:cat?278=0:cat?|
000013a0  32 37 39 3d 32 0d 05 c8  43 20 e7 20 6e 75 6d 25  |279=2...C . num%|
000013b0  3d 30 20 8c 20 3f 26 37  37 3d 30 3a 3f 26 37 38  |=0 . ?&77=0:?&78|
000013c0  3d 30 3a 8b 20 3f 26 37  37 3d 28 6e 75 6d 25 2b  |=0:. ?&77=(num%+|
000013d0  32 29 81 35 3a 3f 26 37  38 3d 32 2a 28 28 6e 75  |2).5:?&78=2*((nu|
000013e0  6d 25 2b 32 29 83 35 29  0d 05 d2 1f 20 58 25 3d  |m%+2).5).... X%=|
000013f0  26 37 30 3a 59 25 3d 30  3a 41 25 3d 26 37 46 3a  |&70:Y%=0:A%=&7F:|
00001400  d6 20 26 46 46 46 31 0d  05 dc 33 20 74 72 61 63  |. &FFF1...3 trac|
00001410  6b 73 5f 73 6f 5f 66 61  72 25 3d 74 72 61 63 6b  |ks_so_far%=track|
00001420  73 5f 73 6f 5f 66 61 72  25 2b 70 61 72 74 5f 73  |s_so_far%+part_s|
00001430  69 7a 65 25 28 6e 75 6d  25 29 0d 05 e6 06 20 ed  |ize%(num%).... .|
00001440  0d 05 f0 20 20 3f 26 37  31 3d 30 3a 3f 26 37 32  |...  ?&71=0:?&72|
00001450  3d 39 3a 3f 26 37 37 3d  30 3a 3f 26 37 38 3d 32  |=9:?&77=0:?&78=2|
00001460  0d 05 fa 1f 20 58 25 3d  26 37 30 3a 59 25 3d 30  |.... X%=&70:Y%=0|
00001470  3a 41 25 3d 26 37 46 3a  d6 20 26 46 46 46 31 0d  |:A%=&7F:. &FFF1.|
00001480  06 04 09 20 f1 27 3a e1  0d 06 0e 06 20 3a 0d 06  |... .':..... :..|
00001490  18 21 20 dd 20 a4 67 65  74 5f 6e 75 6d 62 65 72  |.! . .get_number|
000014a0  28 73 24 2c 6c 6f 77 25  2c 68 69 67 68 25 29 0d  |(s$,low%,high%).|
000014b0  06 22 06 20 f5 0d 06 2c  33 20 f1 20 bd 31 33 30  |.". ...,3 . .130|
000014c0  3b 73 24 3b 22 20 28 22  3b 6c 6f 77 25 3b 22 2d  |;s$;" (";low%;"-|
000014d0  22 3b 68 69 67 68 25 3b  22 29 3a 22 3b bd 31 33  |";high%;"):";.13|
000014e0  31 3b 3a e8 22 22 69 25  0d 06 36 1b 20 fd 20 69  |1;:.""i%..6. . i|
000014f0  25 3e 3d 6c 6f 77 25 20  80 20 69 25 3c 3d 68 69  |%>=low% . i%<=hi|
00001500  67 68 25 0d 06 40 08 20  3d 69 25 0d 06 4a 06 20  |gh%..@. =i%..J. |
00001510  3a 0d 06 54 1e 20 dd 20  a4 67 65 74 5f 73 74 72  |:..T. . .get_str|
00001520  69 6e 67 28 73 24 2c 6c  65 6e 67 74 68 25 29 0d  |ing(s$,length%).|
00001530  06 5e 06 20 f5 0d 06 68  37 20 f1 20 bd 31 33 30  |.^. ...h7 . .130|
00001540  3b 73 24 3b 22 20 28 6d  61 78 20 6c 65 6e 67 74  |;s$;" (max lengt|
00001550  68 20 22 3b 6c 65 6e 67  74 68 25 3b 22 29 3a 22  |h ";length%;"):"|
00001560  3b bd 31 33 31 3b 3a e8  22 22 69 24 0d 06 72 1d  |;.131;:.""i$..r.|
00001570  20 fd 20 a9 20 69 24 3e  30 20 80 20 a9 20 69 24  | . . i$>0 . . i$|
00001580  3c 3d 6c 65 6e 67 74 68  25 0d 06 7c 20 20 3d 69  |<=length%..|  =i|
00001590  24 2b c0 c4 31 32 2c 22  20 22 29 2c 6c 65 6e 67  |$+..12," "),leng|
000015a0  74 68 25 2d a9 20 69 24  29 0d 06 86 06 20 3a 0d  |th%-. i$).... :.|
000015b0  06 90 11 20 dd 20 f2 6f  73 63 6c 69 28 63 24 29  |... . .oscli(c$)|
000015c0  0d 06 9a 0d 20 de 20 6d  65 6d 20 34 30 0d 06 a4  |.... . mem 40...|
000015d0  26 20 24 6d 65 6d 3d 63  24 3a 58 25 3d 6d 65 6d  |& $mem=c$:X%=mem|
000015e0  20 83 20 32 35 36 3a 59  25 3d 6d 65 6d 20 81 20  | . 256:Y%=mem . |
000015f0  32 35 36 0d 06 ae 0e 20  d6 20 26 46 46 46 37 3a  |256.... . &FFF7:|
00001600  e1 0d 06 b8 06 20 3a 0d  06 c2 10 20 dd 20 a4 65  |..... :.... . .e|
00001610  71 75 73 28 73 24 29 0d  06 cc 15 20 24 50 25 3d  |qus(s$).... $P%=|
00001620  73 24 3a 50 25 3d 50 25  2b a9 73 24 0d 06 d6 0a  |s$:P%=P%+.s$....|
00001630  20 3d 6f 70 74 25 0d 06  e0 06 20 3a 0d 06 ea 0f  | =opt%.... :....|
00001640  20 dd 20 a4 65 71 75 62  28 62 29 0d 06 f4 12 20  | . .equb(b).... |
00001650  3f 50 25 3d 62 3a 50 25  3d 50 25 2b 31 0d 06 fe  |?P%=b:P%=P%+1...|
00001660  0a 20 3d 6f 70 74 25 0d  07 08 21 dc 20 33 2c 55  |. =opt%...!. 3,U|
00001670  54 49 4c 53 2c 46 45 41  54 53 2c 52 4f 4d 53 2c  |TILS,FEATS,ROMS,|
00001680  33 30 2c 32 30 2c 32 38  0d 07 12 2b dc 20 34 2c  |30,20,28...+. 4,|
00001690  4c 45 54 54 53 2c 47 41  4d 45 53 2c 50 52 4f 47  |LETTS,GAMES,PROG|
000016a0  53 2c 53 48 4f 50 47 2c  31 39 2c 33 30 2c 31 38  |S,SHOPG,19,30,18|
000016b0  2c 31 30 0d ff                                    |,10..|
000016b5
P/dfsPart.m0
P/dfsPart.m1
P/dfsPart.m2
P/dfsPart.m4
P/dfsPart.m5