Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_09.ADF » PROCLST

PROCLST

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_09.ADF
Filename: PROCLST
Read OK:
File size: 167D bytes
Load address: FFFF1D00
Exec address: FFFF8023
Duplicates

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

File contents
   10REM >PROC
   20REM PROCedure LISTer (c) M Comley 1993
   30 
   40code%=&7000
   50linelength=&70:flag=&71:memory=&72:nline=&74
   60FOR pass=0 TO 3 STEP 3
   70P%=code%
   80[OPT pass
   90LDA #10:JSR &FFEE:LDA #14:JSR &FFEE                 \ VDU10,14
  100LDA #0:STA flag                                     \ zero flag
  110STA memory:LDA &18:STA memory+1                     \ store PAGE
  120LDY #0
  130.print_lp INY:LDA listproc,Y:JSR &FFEE:CMP ASC"C":BNE print_lp  \ print WHENPROC
  140 
  150LDY #0
  160.get INY:JSR &FFE0:STA name,Y:JSR &FFE3     \ get CHAR echo to screen
  170CMP #13:BNE get                             \ look for carriage return
  180CPY #50:BCC f                               \ check name length <50
  190JMP error_r                                 \ jump to error message
  200 
  210.f LDA name+1:CMP #ASC"F":BNE proc          \ check for F
  220LDA name+2:CMP #ASC"N":BNE proc             \ check for N
  230LDA #&A4:STA name                           \ store byte for FN
  240LDY #2                                      \ delete 'FN' from name
  250.fn INY:LDA name,Y:STA name-2,Y:CMP #13:BNE fn
  260JMP ahead                                   \ skip next ruitine
  270 
  280.proc LDA #&F2:STA name                     \ store byte for PROC
  290 
  300.ahead LDY #3:LDA (memory),Y:STA linelength \ store line length
  310 
  320LDA flag:CMP #1:BEQ end                     \ check flag set
  330 
  340LDY #2:LDA (memory),Y:STA first             \ store low byte of line num
  350DEY:LDA (memory),Y:STA first+1              \ store high byte of line num
  360 
  370LDY #4:LDA (memory),Y:CMP #&DD:BNE nextline \ check for DEF
  380 
  390LDX #255
  400.checkname INX:INY:LDA name,X:CMP #13:BEQ return \ end of name?
  410CMP (memory),Y:BNE nextline                      \ no match / next line
  420JMP checkname
  430 
  440.return LDA (memory),Y:CMP #13:BEQ incflag       \ check last byte of PROC
  450CMP #58:BEQ incflag                              \ is it a :
  460CMP #40:BEQ incflag                              \ is it a (
  470JMP nextline
  480 
  490LDA flag:CMP #0:BEQ nextline                     \ check for flag set
  500 
  510.end CLC:LDA linelength:ADC memory:STA nline     \ calc next line
  520LDA #0:ADC memory+1:STA nline+1
  530 
  540LDY #2:LDA (memory),Y:STA second             \ store low byte of line num
  550DEY:LDA (memory),Y:STA second+1              \ store high byte of line num
  560LDY #4:LDA (nline),Y:CMP #&DD:BEQ incflag    \ check for DEF in next line
  570CMP #&DC:BEQ incflag                         \ check for DATA in next line
  580LDY #2:LDA (nline),Y:CMP #&FF:BEQ incflag
  590 
  600.nextline CLC                                  \ calc. next line
  610LDA linelength:ADC memory:STA memory
  620LDA #0:ADC memory+1:STA memory+1
  630 
  640LDY #1:LDA (memory),Y:CMP #&FF:BEQ notfound       \ check END of prog flag
  650.jump JMP ahead                                   \ else check next line
  660 
  670.incflag INC flag:LDA flag:CMP #2:BEQ start       \ increment flag
  680JMP ahead
  690 
  700.error_r LDY #0
  710.errorloop INY:LDA message,Y:JSR &FFE3:CMP #13:BNE errorloop
  720RTS
  730 
  740.notfound LDA flag:CMP #1:BEQ start
  750LDY #0
  760.notloop INY:LDA error,Y:JSR &FFE3:CMP #13:BNE notloop
  770RTS
  780 
  790.start LDA #5:STA count                       \ set counter to 5
  800LDA #0:LDY #12
  810.clear DEY:STA buffer,Y:CPY #0:BNE clear      \ load buffer with zero's
  820STA count+1                                   \ set flag to clear
  830LDA #ASC",":LDY #6:STA buffer,Y               \ put , in centre of buffer
  840 
  850.second_start SEC
  860.convert LDA #0:STA temp:STA temp+1           \ zero temp
  870CLC
  880LDX #16                  \ 16 bits to do
  890.loop
  900ROL first                \ move bit7 into carry
  910ROL first+1              \ and on into bit 0
  920ROL temp                 \ move bit7 into carry
  930ROL temp+1               \ and on into bit 0
  940SEC
  950LDA temp                 \ get low byte of temp
  960SBC #10                  \ subtract ten
  970TAY                      \ save result in Y
  980LDA temp+1               \ get high byte temp first
  990SBC #0                   \ subtract carry bit
 1000BCC less_than            \ branch if Divisor > Dividend
 1010STY temp                 \ else save result of operation
 1020STA temp+1               \ ie Dividend-Divisor
 1030 
 1040.less_than DEX           \ decrement bit count
 1050BNE loop                 \ branch until 16 bits done
 1060ROL first                \ rotate bit 7 into carry
 1070ROL first+1              \ and on into bit 0
 1080 
 1090.add_ascii CLC
 1100LDA temp                 \ get low byte temp
 1110ADC #ASC"0"              \ convert to ascii character code
 1120LDY count                \ get buffer length
 1130STA buffer,Y             \ store number
 1140DEC count
 1150LDA first                \ get low byte binary address
 1160ORA first+1              \ or with high byte. Result=0 if all done
 1170BNE convert              \ not finished repeat
 1180LDA #11
 1190STA count                \ reset count for next number
 1200LDA second
 1210STA first                \ shift low byte of next number
 1220LDA second+1
 1230STA first+1              \ shift high byte of next number
 1240INC count+1              \ set flag to return to start
 1250LDA count+1
 1260CMP #2
 1270BEQ print         \ test for convertion of both numbers
 1280JMP second_start         \ convert second number
 1290 
 1300.print LDA #0:STA flag    \ string printing routine
 1310.printloop LDX flag:LDY list,X:LDX #0:LDA #138:JSR &FFF4:INC flag
 1320LDA flag:CMP #17:BNE printloop
 1330RTS
 1340 
 1350.message  BRK:EQUS"Name too long, 50 characters maximum"+CHR$7+CHR$13
 1360.listproc BRK:EQUS "LISTPROC"
 1370.error    BRK:EQUS "Not found"+CHR$7+CHR$13
 1380.first    EQUW 0
 1390.second   EQUW 0
 1400.temp     EQUW 0
 1410.count    EQUW 0
 1420.list     EQUS "LIST"
 1430.buffer   EQUD 0:EQUD 0:EQUD 0:EQUB 13
 1440.name                    \ name of PROC stored in 50 bytes
 1450]NEXT

� >PROC
(� PROCedure LISTer (c) M Comley 1993
 
(code%=&7000
20linelength=&70:flag=&71:memory=&72:nline=&74
<� pass=0 � 3 � 3
FP%=code%
P
[OPT pass
Z@LDA #10:JSR &FFEE:LDA #14:JSR &FFEE                 \ �10,14
dCLDA #0:STA flag                                     \ zero flag
nASTA memory:LDA &18:STA memory+1                     \ store �
x
LDY #0
�L.print_lp INY:LDA listproc,Y:JSR &FFEE:CMP �"C":BNE print_lp  \ print ��
� 
�
LDY #0
�I.get INY:JSR &FFE0:STA name,Y:JSR &FFE3     \ get CHAR echo to screen
�JCMP #13:BNE get                             \ look for carriage return
�GCPY #50:BCC f                               \ check name length <50
�GJMP error_r                                 \ jump to error message
� 
�;.f LDA name+1:CMP #�"F":BNE proc          \ check for F
�;LDA name+2:CMP #�"N":BNE proc             \ check for N
�BLDA #&A4:STA name                           \ store byte for �
�FLDY #2                                      \ delete '�' from name
�2.fn INY:LDA name,Y:STA name-2,Y:CMP #13:BNE fn
CJMP ahead                                   \ skip next ruitine
 
B.proc LDA #&F2:STA name                     \ store byte for �
" 
,C.ahead LDY #3:LDA (memory),Y:STA linelength \ store line length
6 
@@LDA flag:CMP #1:BEQ end                     \ check flag set
J 
TLLDY #2:LDA (memory),Y:STA first             \ store low byte of line num
^MDEY:LDA (memory),Y:STA first+1              \ store high byte of line num
h 
r=LDY #4:LDA (memory),Y:CMP #&DD:BNE nextline \ check for �
| 
�LDX #255
�C.checkname INX:INY:LDA name,X:CMP #13:BEQ return \ end of name?
�KCMP (memory),Y:BNE nextline                      \ no match / next line
�JMP checkname
� 
�K.return LDA (memory),Y:CMP #13:BEQ incflag       \ check last byte of �
�@CMP #58:BEQ incflag                              \ is it a :
�@CMP #40:BEQ incflag                              \ is it a (
�JMP nextline
� 
�ILDA flag:CMP #0:BEQ nextline                     \ check for flag set
� 
�E.end CLC:LDA linelength:ADC memory:STA nline     \ calc next line
#LDA #0:ADC memory+1:STA nline+1
 
MLDY #2:LDA (memory),Y:STA second             \ store low byte of line num
&NDEY:LDA (memory),Y:STA second+1              \ store high byte of line num
0KLDY #4:LDA (nline),Y:CMP #&DD:BEQ incflag    \ check for � in next line
:KCMP #&DC:BEQ incflag                         \ check for � in next line
D-LDY #2:LDA (nline),Y:CMP #&FF:BEQ incflag
N 
XD.nextline CLC                                  \ calc. next line
b(LDA linelength:ADC memory:STA memory
l$LDA #0:ADC memory+1:STA memory+1
v 
�LLDY #1:LDA (memory),Y:CMP #&FF:BEQ notfound       \ check � of prog flag
�L.jump JMP ahead                                   \ else check next line
� 
�F.incflag INC flag:LDA flag:CMP #2:BEQ start       \ increment flag
�
JMP ahead
� 
�.error_r LDY #0
�@.errorloop INY:LDA message,Y:JSR &FFE3:CMP #13:BNE errorloop
�RTS
� 
�'.notfound LDA flag:CMP #1:BEQ start
�
LDY #0
�:.notloop INY:LDA error,Y:JSR &FFE3:CMP #13:BNE notloop
RTS
 
D.start LDA #5:STA count                       \ set counter to 5
 LDA #0:LDY #12
*K.clear DEY:STA buffer,Y:CPY #0:BNE clear      \ load buffer with zero's
4ESTA count+1                                   \ set flag to clear
>KLDA #�",":LDY #6:STA buffer,Y               \ put , in centre of buffer
H 
R.second_start SEC
\=.convert LDA #0:STA temp:STA temp+1           \ zero temp
fCLC
p,LDX #16                  \ 16 bits to do
z	.loop
�3ROL first                \ move bit7 into carry
�0ROL first+1              \ and on into bit 0
�3ROL temp                 \ move bit7 into carry
�0ROL temp+1               \ and on into bit 0
�SEC
�3LDA temp                 \ get low byte of temp
�+SBC #10                  \ subtract ten
�/TAY                      \ save result in Y
�7LDA temp+1               \ get high byte temp first
�1SBC #0                   \ subtract carry bit
�;BCC less_than            \ branch if Divisor > Dividend
�<STY temp                 \ else save result of operation
�2STA temp+1               \ ie Dividend-Divisor
 
2.less_than DEX           \ decrement bit count
8BNE loop                 \ branch until 16 bits done
$6ROL first                \ rotate bit 7 into carry
.0ROL first+1              \ and on into bit 0
8 
B.add_ascii CLC
L0LDA temp                 \ get low byte temp
V<ADC #�"0"              \ convert to ascii character code
`0LDY count                \ get buffer length
j+STA buffer,Y             \ store number
t
DEC count
~:LDA first                \ get low byte binary address
�E�A first+1              \ or with high byte. Result=0 if all done
�2BNE convert              \ not finished repeat
�LDA #11
�:STA count                \ reset count for next number
�LDA second
�<STA first                \ shift low byte of next number
�LDA second+1
�=STA first+1              \ shift high byte of next number
�:INC count+1              \ set flag to return to start
�LDA count+1
�
CMP #2
�;BEQ print         \ test for convertion of both numbers
4JMP second_start         \ convert second number

 
7.print LDA #0:STA flag    \ string printing routine
E.printloop LDX flag:LDY list,X:LDX #0:LDA #138:JSR &FFF4:INC flag
("LDA flag:CMP #17:BNE printloop
2RTS
< 
FC.message  BRK:EQUS"Name too long, 50 characters maximum"+�7+�13
P!.listproc BRK:EQUS "LISTPROC"
Z).error    BRK:EQUS "Not found"+�7+�13
d.first    EQUW 0
n.second   EQUW 0
x.temp     EQUW 0
�.count    EQUW 0
�.list     EQUS "LIST"
�*.buffer   EQUD 0:EQUD 0:EQUD 0:EQUB 13
�;.name                    \ name of � stored in 50 bytes
�]�
�
00000000  0d 00 0a 0b f4 20 3e 50  52 4f 43 0d 00 14 28 f4  |..... >PROC...(.|
00000010  20 50 52 4f 43 65 64 75  72 65 20 4c 49 53 54 65  | PROCedure LISTe|
00000020  72 20 28 63 29 20 4d 20  43 6f 6d 6c 65 79 20 31  |r (c) M Comley 1|
00000030  39 39 33 0d 00 1e 05 20  0d 00 28 0f 63 6f 64 65  |993.... ..(.code|
00000040  25 3d 26 37 30 30 30 0d  00 32 30 6c 69 6e 65 6c  |%=&7000..20linel|
00000050  65 6e 67 74 68 3d 26 37  30 3a 66 6c 61 67 3d 26  |ength=&70:flag=&|
00000060  37 31 3a 6d 65 6d 6f 72  79 3d 26 37 32 3a 6e 6c  |71:memory=&72:nl|
00000070  69 6e 65 3d 26 37 34 0d  00 3c 14 e3 20 70 61 73  |ine=&74..<.. pas|
00000080  73 3d 30 20 b8 20 33 20  88 20 33 0d 00 46 0c 50  |s=0 . 3 . 3..F.P|
00000090  25 3d 63 6f 64 65 25 0d  00 50 0d 5b 4f 50 54 20  |%=code%..P.[OPT |
000000a0  70 61 73 73 0d 00 5a 40  4c 44 41 20 23 31 30 3a  |pass..Z@LDA #10:|
000000b0  4a 53 52 20 26 46 46 45  45 3a 4c 44 41 20 23 31  |JSR &FFEE:LDA #1|
000000c0  34 3a 4a 53 52 20 26 46  46 45 45 20 20 20 20 20  |4:JSR &FFEE     |
000000d0  20 20 20 20 20 20 20 20  20 20 20 20 5c 20 ef 31  |            \ .1|
000000e0  30 2c 31 34 0d 00 64 43  4c 44 41 20 23 30 3a 53  |0,14..dCLDA #0:S|
000000f0  54 41 20 66 6c 61 67 20  20 20 20 20 20 20 20 20  |TA flag         |
00000100  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000110  20 20 20 20 20 20 20 20  20 20 20 20 5c 20 7a 65  |            \ ze|
00000120  72 6f 20 66 6c 61 67 0d  00 6e 41 53 54 41 20 6d  |ro flag..nASTA m|
00000130  65 6d 6f 72 79 3a 4c 44  41 20 26 31 38 3a 53 54  |emory:LDA &18:ST|
00000140  41 20 6d 65 6d 6f 72 79  2b 31 20 20 20 20 20 20  |A memory+1      |
00000150  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 5c  |               \|
00000160  20 73 74 6f 72 65 20 90  0d 00 78 0a 4c 44 59 20  | store ...x.LDY |
00000170  23 30 0d 00 82 4c 2e 70  72 69 6e 74 5f 6c 70 20  |#0...L.print_lp |
00000180  49 4e 59 3a 4c 44 41 20  6c 69 73 74 70 72 6f 63  |INY:LDA listproc|
00000190  2c 59 3a 4a 53 52 20 26  46 46 45 45 3a 43 4d 50  |,Y:JSR &FFEE:CMP|
000001a0  20 97 22 43 22 3a 42 4e  45 20 70 72 69 6e 74 5f  | ."C":BNE print_|
000001b0  6c 70 20 20 5c 20 70 72  69 6e 74 20 c9 f2 0d 00  |lp  \ print ....|
000001c0  8c 05 20 0d 00 96 0a 4c  44 59 20 23 30 0d 00 a0  |.. ....LDY #0...|
000001d0  49 2e 67 65 74 20 49 4e  59 3a 4a 53 52 20 26 46  |I.get INY:JSR &F|
000001e0  46 45 30 3a 53 54 41 20  6e 61 6d 65 2c 59 3a 4a  |FE0:STA name,Y:J|
000001f0  53 52 20 26 46 46 45 33  20 20 20 20 20 5c 20 67  |SR &FFE3     \ g|
00000200  65 74 20 43 48 41 52 20  65 63 68 6f 20 74 6f 20  |et CHAR echo to |
00000210  73 63 72 65 65 6e 0d 00  aa 4a 43 4d 50 20 23 31  |screen...JCMP #1|
00000220  33 3a 42 4e 45 20 67 65  74 20 20 20 20 20 20 20  |3:BNE get       |
00000230  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000240  20 20 20 20 20 20 5c 20  6c 6f 6f 6b 20 66 6f 72  |      \ look for|
00000250  20 63 61 72 72 69 61 67  65 20 72 65 74 75 72 6e  | carriage return|
00000260  0d 00 b4 47 43 50 59 20  23 35 30 3a 42 43 43 20  |...GCPY #50:BCC |
00000270  66 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |f               |
00000280  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000290  5c 20 63 68 65 63 6b 20  6e 61 6d 65 20 6c 65 6e  |\ check name len|
000002a0  67 74 68 20 3c 35 30 0d  00 be 47 4a 4d 50 20 65  |gth <50...GJMP e|
000002b0  72 72 6f 72 5f 72 20 20  20 20 20 20 20 20 20 20  |rror_r          |
000002c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000002d0  20 20 20 20 20 20 20 5c  20 6a 75 6d 70 20 74 6f  |       \ jump to|
000002e0  20 65 72 72 6f 72 20 6d  65 73 73 61 67 65 0d 00  | error message..|
000002f0  c8 05 20 0d 00 d2 3b 2e  66 20 4c 44 41 20 6e 61  |.. ...;.f LDA na|
00000300  6d 65 2b 31 3a 43 4d 50  20 23 97 22 46 22 3a 42  |me+1:CMP #."F":B|
00000310  4e 45 20 70 72 6f 63 20  20 20 20 20 20 20 20 20  |NE proc         |
00000320  20 5c 20 63 68 65 63 6b  20 66 6f 72 20 46 0d 00  | \ check for F..|
00000330  dc 3b 4c 44 41 20 6e 61  6d 65 2b 32 3a 43 4d 50  |.;LDA name+2:CMP|
00000340  20 23 97 22 4e 22 3a 42  4e 45 20 70 72 6f 63 20  | #."N":BNE proc |
00000350  20 20 20 20 20 20 20 20  20 20 20 20 5c 20 63 68  |            \ ch|
00000360  65 63 6b 20 66 6f 72 20  4e 0d 00 e6 42 4c 44 41  |eck for N...BLDA|
00000370  20 23 26 41 34 3a 53 54  41 20 6e 61 6d 65 20 20  | #&A4:STA name  |
00000380  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000390  20 20 20 20 20 20 20 20  20 5c 20 73 74 6f 72 65  |         \ store|
000003a0  20 62 79 74 65 20 66 6f  72 20 a4 0d 00 f0 46 4c  | byte for ....FL|
000003b0  44 59 20 23 32 20 20 20  20 20 20 20 20 20 20 20  |DY #2           |
000003c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000003d0  20 20 20 20 20 20 20 20  20 20 20 5c 20 64 65 6c  |           \ del|
000003e0  65 74 65 20 27 a4 27 20  66 72 6f 6d 20 6e 61 6d  |ete '.' from nam|
000003f0  65 0d 00 fa 32 2e 66 6e  20 49 4e 59 3a 4c 44 41  |e...2.fn INY:LDA|
00000400  20 6e 61 6d 65 2c 59 3a  53 54 41 20 6e 61 6d 65  | name,Y:STA name|
00000410  2d 32 2c 59 3a 43 4d 50  20 23 31 33 3a 42 4e 45  |-2,Y:CMP #13:BNE|
00000420  20 66 6e 0d 01 04 43 4a  4d 50 20 61 68 65 61 64  | fn...CJMP ahead|
00000430  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00000450  20 20 20 5c 20 73 6b 69  70 20 6e 65 78 74 20 72  |   \ skip next r|
00000460  75 69 74 69 6e 65 0d 01  0e 05 20 0d 01 18 42 2e  |uitine.... ...B.|
00000470  70 72 6f 63 20 4c 44 41  20 23 26 46 32 3a 53 54  |proc LDA #&F2:ST|
00000480  41 20 6e 61 6d 65 20 20  20 20 20 20 20 20 20 20  |A name          |
00000490  20 20 20 20 20 20 20 20  20 20 20 5c 20 73 74 6f  |           \ sto|
000004a0  72 65 20 62 79 74 65 20  66 6f 72 20 f2 0d 01 22  |re byte for ..."|
000004b0  05 20 0d 01 2c 43 2e 61  68 65 61 64 20 4c 44 59  |. ..,C.ahead LDY|
000004c0  20 23 33 3a 4c 44 41 20  28 6d 65 6d 6f 72 79 29  | #3:LDA (memory)|
000004d0  2c 59 3a 53 54 41 20 6c  69 6e 65 6c 65 6e 67 74  |,Y:STA linelengt|
000004e0  68 20 5c 20 73 74 6f 72  65 20 6c 69 6e 65 20 6c  |h \ store line l|
000004f0  65 6e 67 74 68 0d 01 36  05 20 0d 01 40 40 4c 44  |ength..6. ..@@LD|
00000500  41 20 66 6c 61 67 3a 43  4d 50 20 23 31 3a 42 45  |A flag:CMP #1:BE|
00000510  51 20 65 6e 64 20 20 20  20 20 20 20 20 20 20 20  |Q end           |
00000520  20 20 20 20 20 20 20 20  20 20 5c 20 63 68 65 63  |          \ chec|
00000530  6b 20 66 6c 61 67 20 73  65 74 0d 01 4a 05 20 0d  |k flag set..J. .|
00000540  01 54 4c 4c 44 59 20 23  32 3a 4c 44 41 20 28 6d  |.TLLDY #2:LDA (m|
00000550  65 6d 6f 72 79 29 2c 59  3a 53 54 41 20 66 69 72  |emory),Y:STA fir|
00000560  73 74 20 20 20 20 20 20  20 20 20 20 20 20 20 5c  |st             \|
00000570  20 73 74 6f 72 65 20 6c  6f 77 20 62 79 74 65 20  | store low byte |
00000580  6f 66 20 6c 69 6e 65 20  6e 75 6d 0d 01 5e 4d 44  |of line num..^MD|
00000590  45 59 3a 4c 44 41 20 28  6d 65 6d 6f 72 79 29 2c  |EY:LDA (memory),|
000005a0  59 3a 53 54 41 20 66 69  72 73 74 2b 31 20 20 20  |Y:STA first+1   |
000005b0  20 20 20 20 20 20 20 20  20 20 20 5c 20 73 74 6f  |           \ sto|
000005c0  72 65 20 68 69 67 68 20  62 79 74 65 20 6f 66 20  |re high byte of |
000005d0  6c 69 6e 65 20 6e 75 6d  0d 01 68 05 20 0d 01 72  |line num..h. ..r|
000005e0  3d 4c 44 59 20 23 34 3a  4c 44 41 20 28 6d 65 6d  |=LDY #4:LDA (mem|
000005f0  6f 72 79 29 2c 59 3a 43  4d 50 20 23 26 44 44 3a  |ory),Y:CMP #&DD:|
00000600  42 4e 45 20 6e 65 78 74  6c 69 6e 65 20 5c 20 63  |BNE nextline \ c|
00000610  68 65 63 6b 20 66 6f 72  20 dd 0d 01 7c 05 20 0d  |heck for ...|. .|
00000620  01 86 0c 4c 44 58 20 23  32 35 35 0d 01 90 43 2e  |...LDX #255...C.|
00000630  63 68 65 63 6b 6e 61 6d  65 20 49 4e 58 3a 49 4e  |checkname INX:IN|
00000640  59 3a 4c 44 41 20 6e 61  6d 65 2c 58 3a 43 4d 50  |Y:LDA name,X:CMP|
00000650  20 23 31 33 3a 42 45 51  20 72 65 74 75 72 6e 20  | #13:BEQ return |
00000660  5c 20 65 6e 64 20 6f 66  20 6e 61 6d 65 3f 0d 01  |\ end of name?..|
00000670  9a 4b 43 4d 50 20 28 6d  65 6d 6f 72 79 29 2c 59  |.KCMP (memory),Y|
00000680  3a 42 4e 45 20 6e 65 78  74 6c 69 6e 65 20 20 20  |:BNE nextline   |
00000690  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000006a0  20 20 20 5c 20 6e 6f 20  6d 61 74 63 68 20 2f 20  |   \ no match / |
000006b0  6e 65 78 74 20 6c 69 6e  65 0d 01 a4 11 4a 4d 50  |next line....JMP|
000006c0  20 63 68 65 63 6b 6e 61  6d 65 0d 01 ae 05 20 0d  | checkname.... .|
000006d0  01 b8 4b 2e 72 65 74 75  72 6e 20 4c 44 41 20 28  |..K.return LDA (|
000006e0  6d 65 6d 6f 72 79 29 2c  59 3a 43 4d 50 20 23 31  |memory),Y:CMP #1|
000006f0  33 3a 42 45 51 20 69 6e  63 66 6c 61 67 20 20 20  |3:BEQ incflag   |
00000700  20 20 20 20 5c 20 63 68  65 63 6b 20 6c 61 73 74  |    \ check last|
00000710  20 62 79 74 65 20 6f 66  20 f2 0d 01 c2 40 43 4d  | byte of ....@CM|
00000720  50 20 23 35 38 3a 42 45  51 20 69 6e 63 66 6c 61  |P #58:BEQ incfla|
00000730  67 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |g               |
00000740  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 5c  |               \|
00000750  20 69 73 20 69 74 20 61  20 3a 0d 01 cc 40 43 4d  | is it a :...@CM|
00000760  50 20 23 34 30 3a 42 45  51 20 69 6e 63 66 6c 61  |P #40:BEQ incfla|
00000770  67 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |g               |
00000780  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 5c  |               \|
00000790  20 69 73 20 69 74 20 61  20 28 0d 01 d6 10 4a 4d  | is it a (....JM|
000007a0  50 20 6e 65 78 74 6c 69  6e 65 0d 01 e0 05 20 0d  |P nextline.... .|
000007b0  01 ea 49 4c 44 41 20 66  6c 61 67 3a 43 4d 50 20  |..ILDA flag:CMP |
000007c0  23 30 3a 42 45 51 20 6e  65 78 74 6c 69 6e 65 20  |#0:BEQ nextline |
000007d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000007e0  20 20 20 20 5c 20 63 68  65 63 6b 20 66 6f 72 20  |    \ check for |
000007f0  66 6c 61 67 20 73 65 74  0d 01 f4 05 20 0d 01 fe  |flag set.... ...|
00000800  45 2e 65 6e 64 20 43 4c  43 3a 4c 44 41 20 6c 69  |E.end CLC:LDA li|
00000810  6e 65 6c 65 6e 67 74 68  3a 41 44 43 20 6d 65 6d  |nelength:ADC mem|
00000820  6f 72 79 3a 53 54 41 20  6e 6c 69 6e 65 20 20 20  |ory:STA nline   |
00000830  20 20 5c 20 63 61 6c 63  20 6e 65 78 74 20 6c 69  |  \ calc next li|
00000840  6e 65 0d 02 08 23 4c 44  41 20 23 30 3a 41 44 43  |ne...#LDA #0:ADC|
00000850  20 6d 65 6d 6f 72 79 2b  31 3a 53 54 41 20 6e 6c  | memory+1:STA nl|
00000860  69 6e 65 2b 31 0d 02 12  05 20 0d 02 1c 4d 4c 44  |ine+1.... ...MLD|
00000870  59 20 23 32 3a 4c 44 41  20 28 6d 65 6d 6f 72 79  |Y #2:LDA (memory|
00000880  29 2c 59 3a 53 54 41 20  73 65 63 6f 6e 64 20 20  |),Y:STA second  |
00000890  20 20 20 20 20 20 20 20  20 20 20 5c 20 73 74 6f  |           \ sto|
000008a0  72 65 20 6c 6f 77 20 62  79 74 65 20 6f 66 20 6c  |re low byte of l|
000008b0  69 6e 65 20 6e 75 6d 0d  02 26 4e 44 45 59 3a 4c  |ine num..&NDEY:L|
000008c0  44 41 20 28 6d 65 6d 6f  72 79 29 2c 59 3a 53 54  |DA (memory),Y:ST|
000008d0  41 20 73 65 63 6f 6e 64  2b 31 20 20 20 20 20 20  |A second+1      |
000008e0  20 20 20 20 20 20 20 20  5c 20 73 74 6f 72 65 20  |        \ store |
000008f0  68 69 67 68 20 62 79 74  65 20 6f 66 20 6c 69 6e  |high byte of lin|
00000900  65 20 6e 75 6d 0d 02 30  4b 4c 44 59 20 23 34 3a  |e num..0KLDY #4:|
00000910  4c 44 41 20 28 6e 6c 69  6e 65 29 2c 59 3a 43 4d  |LDA (nline),Y:CM|
00000920  50 20 23 26 44 44 3a 42  45 51 20 69 6e 63 66 6c  |P #&DD:BEQ incfl|
00000930  61 67 20 20 20 20 5c 20  63 68 65 63 6b 20 66 6f  |ag    \ check fo|
00000940  72 20 dd 20 69 6e 20 6e  65 78 74 20 6c 69 6e 65  |r . in next line|
00000950  0d 02 3a 4b 43 4d 50 20  23 26 44 43 3a 42 45 51  |..:KCMP #&DC:BEQ|
00000960  20 69 6e 63 66 6c 61 67  20 20 20 20 20 20 20 20  | incflag        |
00000970  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000980  20 5c 20 63 68 65 63 6b  20 66 6f 72 20 dc 20 69  | \ check for . i|
00000990  6e 20 6e 65 78 74 20 6c  69 6e 65 0d 02 44 2d 4c  |n next line..D-L|
000009a0  44 59 20 23 32 3a 4c 44  41 20 28 6e 6c 69 6e 65  |DY #2:LDA (nline|
000009b0  29 2c 59 3a 43 4d 50 20  23 26 46 46 3a 42 45 51  |),Y:CMP #&FF:BEQ|
000009c0  20 69 6e 63 66 6c 61 67  0d 02 4e 05 20 0d 02 58  | incflag..N. ..X|
000009d0  44 2e 6e 65 78 74 6c 69  6e 65 20 43 4c 43 20 20  |D.nextline CLC  |
000009e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00000a00  5c 20 63 61 6c 63 2e 20  6e 65 78 74 20 6c 69 6e  |\ calc. next lin|
00000a10  65 0d 02 62 28 4c 44 41  20 6c 69 6e 65 6c 65 6e  |e..b(LDA linelen|
00000a20  67 74 68 3a 41 44 43 20  6d 65 6d 6f 72 79 3a 53  |gth:ADC memory:S|
00000a30  54 41 20 6d 65 6d 6f 72  79 0d 02 6c 24 4c 44 41  |TA memory..l$LDA|
00000a40  20 23 30 3a 41 44 43 20  6d 65 6d 6f 72 79 2b 31  | #0:ADC memory+1|
00000a50  3a 53 54 41 20 6d 65 6d  6f 72 79 2b 31 0d 02 76  |:STA memory+1..v|
00000a60  05 20 0d 02 80 4c 4c 44  59 20 23 31 3a 4c 44 41  |. ...LLDY #1:LDA|
00000a70  20 28 6d 65 6d 6f 72 79  29 2c 59 3a 43 4d 50 20  | (memory),Y:CMP |
00000a80  23 26 46 46 3a 42 45 51  20 6e 6f 74 66 6f 75 6e  |#&FF:BEQ notfoun|
00000a90  64 20 20 20 20 20 20 20  5c 20 63 68 65 63 6b 20  |d       \ check |
00000aa0  e0 20 6f 66 20 70 72 6f  67 20 66 6c 61 67 0d 02  |. of prog flag..|
00000ab0  8a 4c 2e 6a 75 6d 70 20  4a 4d 50 20 61 68 65 61  |.L.jump JMP ahea|
00000ac0  64 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |d               |
00000ad0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000ae0  20 20 20 20 5c 20 65 6c  73 65 20 63 68 65 63 6b  |    \ else check|
00000af0  20 6e 65 78 74 20 6c 69  6e 65 0d 02 94 05 20 0d  | next line.... .|
00000b00  02 9e 46 2e 69 6e 63 66  6c 61 67 20 49 4e 43 20  |..F.incflag INC |
00000b10  66 6c 61 67 3a 4c 44 41  20 66 6c 61 67 3a 43 4d  |flag:LDA flag:CM|
00000b20  50 20 23 32 3a 42 45 51  20 73 74 61 72 74 20 20  |P #2:BEQ start  |
00000b30  20 20 20 20 20 5c 20 69  6e 63 72 65 6d 65 6e 74  |     \ increment|
00000b40  20 66 6c 61 67 0d 02 a8  0d 4a 4d 50 20 61 68 65  | flag....JMP ahe|
00000b50  61 64 0d 02 b2 05 20 0d  02 bc 13 2e 65 72 72 6f  |ad.... .....erro|
00000b60  72 5f 72 20 4c 44 59 20  23 30 0d 02 c6 40 2e 65  |r_r LDY #0...@.e|
00000b70  72 72 6f 72 6c 6f 6f 70  20 49 4e 59 3a 4c 44 41  |rrorloop INY:LDA|
00000b80  20 6d 65 73 73 61 67 65  2c 59 3a 4a 53 52 20 26  | message,Y:JSR &|
00000b90  46 46 45 33 3a 43 4d 50  20 23 31 33 3a 42 4e 45  |FFE3:CMP #13:BNE|
00000ba0  20 65 72 72 6f 72 6c 6f  6f 70 0d 02 d0 07 52 54  | errorloop....RT|
00000bb0  53 0d 02 da 05 20 0d 02  e4 27 2e 6e 6f 74 66 6f  |S.... ...'.notfo|
00000bc0  75 6e 64 20 4c 44 41 20  66 6c 61 67 3a 43 4d 50  |und LDA flag:CMP|
00000bd0  20 23 31 3a 42 45 51 20  73 74 61 72 74 0d 02 ee  | #1:BEQ start...|
00000be0  0a 4c 44 59 20 23 30 0d  02 f8 3a 2e 6e 6f 74 6c  |.LDY #0...:.notl|
00000bf0  6f 6f 70 20 49 4e 59 3a  4c 44 41 20 65 72 72 6f  |oop INY:LDA erro|
00000c00  72 2c 59 3a 4a 53 52 20  26 46 46 45 33 3a 43 4d  |r,Y:JSR &FFE3:CM|
00000c10  50 20 23 31 33 3a 42 4e  45 20 6e 6f 74 6c 6f 6f  |P #13:BNE notloo|
00000c20  70 0d 03 02 07 52 54 53  0d 03 0c 05 20 0d 03 16  |p....RTS.... ...|
00000c30  44 2e 73 74 61 72 74 20  4c 44 41 20 23 35 3a 53  |D.start LDA #5:S|
00000c40  54 41 20 63 6f 75 6e 74  20 20 20 20 20 20 20 20  |TA count        |
00000c50  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 5c  |               \|
00000c60  20 73 65 74 20 63 6f 75  6e 74 65 72 20 74 6f 20  | set counter to |
00000c70  35 0d 03 20 12 4c 44 41  20 23 30 3a 4c 44 59 20  |5.. .LDA #0:LDY |
00000c80  23 31 32 0d 03 2a 4b 2e  63 6c 65 61 72 20 44 45  |#12..*K.clear DE|
00000c90  59 3a 53 54 41 20 62 75  66 66 65 72 2c 59 3a 43  |Y:STA buffer,Y:C|
00000ca0  50 59 20 23 30 3a 42 4e  45 20 63 6c 65 61 72 20  |PY #0:BNE clear |
00000cb0  20 20 20 20 20 5c 20 6c  6f 61 64 20 62 75 66 66  |     \ load buff|
00000cc0  65 72 20 77 69 74 68 20  7a 65 72 6f 27 73 0d 03  |er with zero's..|
00000cd0  34 45 53 54 41 20 63 6f  75 6e 74 2b 31 20 20 20  |4ESTA count+1   |
00000ce0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00000d00  5c 20 73 65 74 20 66 6c  61 67 20 74 6f 20 63 6c  |\ set flag to cl|
00000d10  65 61 72 0d 03 3e 4b 4c  44 41 20 23 97 22 2c 22  |ear..>KLDA #.","|
00000d20  3a 4c 44 59 20 23 36 3a  53 54 41 20 62 75 66 66  |:LDY #6:STA buff|
00000d30  65 72 2c 59 20 20 20 20  20 20 20 20 20 20 20 20  |er,Y            |
00000d40  20 20 20 5c 20 70 75 74  20 2c 20 69 6e 20 63 65  |   \ put , in ce|
00000d50  6e 74 72 65 20 6f 66 20  62 75 66 66 65 72 0d 03  |ntre of buffer..|
00000d60  48 05 20 0d 03 52 15 2e  73 65 63 6f 6e 64 5f 73  |H. ..R..second_s|
00000d70  74 61 72 74 20 53 45 43  0d 03 5c 3d 2e 63 6f 6e  |tart SEC..\=.con|
00000d80  76 65 72 74 20 4c 44 41  20 23 30 3a 53 54 41 20  |vert LDA #0:STA |
00000d90  74 65 6d 70 3a 53 54 41  20 74 65 6d 70 2b 31 20  |temp:STA temp+1 |
00000da0  20 20 20 20 20 20 20 20  20 20 5c 20 7a 65 72 6f  |          \ zero|
00000db0  20 74 65 6d 70 0d 03 66  07 43 4c 43 0d 03 70 2c  | temp..f.CLC..p,|
00000dc0  4c 44 58 20 23 31 36 20  20 20 20 20 20 20 20 20  |LDX #16         |
00000dd0  20 20 20 20 20 20 20 20  20 5c 20 31 36 20 62 69  |         \ 16 bi|
00000de0  74 73 20 74 6f 20 64 6f  0d 03 7a 09 2e 6c 6f 6f  |ts to do..z..loo|
00000df0  70 0d 03 84 33 52 4f 4c  20 66 69 72 73 74 20 20  |p...3ROL first  |
00000e00  20 20 20 20 20 20 20 20  20 20 20 20 20 20 5c 20  |              \ |
00000e10  6d 6f 76 65 20 62 69 74  37 20 69 6e 74 6f 20 63  |move bit7 into c|
00000e20  61 72 72 79 0d 03 8e 30  52 4f 4c 20 66 69 72 73  |arry...0ROL firs|
00000e30  74 2b 31 20 20 20 20 20  20 20 20 20 20 20 20 20  |t+1             |
00000e40  20 5c 20 61 6e 64 20 6f  6e 20 69 6e 74 6f 20 62  | \ and on into b|
00000e50  69 74 20 30 0d 03 98 33  52 4f 4c 20 74 65 6d 70  |it 0...3ROL temp|
00000e60  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000e70  20 5c 20 6d 6f 76 65 20  62 69 74 37 20 69 6e 74  | \ move bit7 int|
00000e80  6f 20 63 61 72 72 79 0d  03 a2 30 52 4f 4c 20 74  |o carry...0ROL t|
00000e90  65 6d 70 2b 31 20 20 20  20 20 20 20 20 20 20 20  |emp+1           |
00000ea0  20 20 20 20 5c 20 61 6e  64 20 6f 6e 20 69 6e 74  |    \ and on int|
00000eb0  6f 20 62 69 74 20 30 0d  03 ac 07 53 45 43 0d 03  |o bit 0....SEC..|
00000ec0  b6 33 4c 44 41 20 74 65  6d 70 20 20 20 20 20 20  |.3LDA temp      |
00000ed0  20 20 20 20 20 20 20 20  20 20 20 5c 20 67 65 74  |           \ get|
00000ee0  20 6c 6f 77 20 62 79 74  65 20 6f 66 20 74 65 6d  | low byte of tem|
00000ef0  70 0d 03 c0 2b 53 42 43  20 23 31 30 20 20 20 20  |p...+SBC #10    |
00000f00  20 20 20 20 20 20 20 20  20 20 20 20 20 20 5c 20  |              \ |
00000f10  73 75 62 74 72 61 63 74  20 74 65 6e 0d 03 ca 2f  |subtract ten.../|
00000f20  54 41 59 20 20 20 20 20  20 20 20 20 20 20 20 20  |TAY             |
00000f30  20 20 20 20 20 20 20 20  20 5c 20 73 61 76 65 20  |         \ save |
00000f40  72 65 73 75 6c 74 20 69  6e 20 59 0d 03 d4 37 4c  |result in Y...7L|
00000f50  44 41 20 74 65 6d 70 2b  31 20 20 20 20 20 20 20  |DA temp+1       |
00000f60  20 20 20 20 20 20 20 20  5c 20 67 65 74 20 68 69  |        \ get hi|
00000f70  67 68 20 62 79 74 65 20  74 65 6d 70 20 66 69 72  |gh byte temp fir|
00000f80  73 74 0d 03 de 31 53 42  43 20 23 30 20 20 20 20  |st...1SBC #0    |
00000f90  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 5c  |               \|
00000fa0  20 73 75 62 74 72 61 63  74 20 63 61 72 72 79 20  | subtract carry |
00000fb0  62 69 74 0d 03 e8 3b 42  43 43 20 6c 65 73 73 5f  |bit...;BCC less_|
00000fc0  74 68 61 6e 20 20 20 20  20 20 20 20 20 20 20 20  |than            |
00000fd0  5c 20 62 72 61 6e 63 68  20 69 66 20 44 69 76 69  |\ branch if Divi|
00000fe0  73 6f 72 20 3e 20 44 69  76 69 64 65 6e 64 0d 03  |sor > Dividend..|
00000ff0  f2 3c 53 54 59 20 74 65  6d 70 20 20 20 20 20 20  |.<STY temp      |
00001000  20 20 20 20 20 20 20 20  20 20 20 5c 20 65 6c 73  |           \ els|
00001010  65 20 73 61 76 65 20 72  65 73 75 6c 74 20 6f 66  |e save result of|
00001020  20 6f 70 65 72 61 74 69  6f 6e 0d 03 fc 32 53 54  | operation...2ST|
00001030  41 20 74 65 6d 70 2b 31  20 20 20 20 20 20 20 20  |A temp+1        |
00001040  20 20 20 20 20 20 20 5c  20 69 65 20 44 69 76 69  |       \ ie Divi|
00001050  64 65 6e 64 2d 44 69 76  69 73 6f 72 0d 04 06 05  |dend-Divisor....|
00001060  20 0d 04 10 32 2e 6c 65  73 73 5f 74 68 61 6e 20  | ...2.less_than |
00001070  44 45 58 20 20 20 20 20  20 20 20 20 20 20 5c 20  |DEX           \ |
00001080  64 65 63 72 65 6d 65 6e  74 20 62 69 74 20 63 6f  |decrement bit co|
00001090  75 6e 74 0d 04 1a 38 42  4e 45 20 6c 6f 6f 70 20  |unt...8BNE loop |
000010a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000010b0  5c 20 62 72 61 6e 63 68  20 75 6e 74 69 6c 20 31  |\ branch until 1|
000010c0  36 20 62 69 74 73 20 64  6f 6e 65 0d 04 24 36 52  |6 bits done..$6R|
000010d0  4f 4c 20 66 69 72 73 74  20 20 20 20 20 20 20 20  |OL first        |
000010e0  20 20 20 20 20 20 20 20  5c 20 72 6f 74 61 74 65  |        \ rotate|
000010f0  20 62 69 74 20 37 20 69  6e 74 6f 20 63 61 72 72  | bit 7 into carr|
00001100  79 0d 04 2e 30 52 4f 4c  20 66 69 72 73 74 2b 31  |y...0ROL first+1|
00001110  20 20 20 20 20 20 20 20  20 20 20 20 20 20 5c 20  |              \ |
00001120  61 6e 64 20 6f 6e 20 69  6e 74 6f 20 62 69 74 20  |and on into bit |
00001130  30 0d 04 38 05 20 0d 04  42 12 2e 61 64 64 5f 61  |0..8. ..B..add_a|
00001140  73 63 69 69 20 43 4c 43  0d 04 4c 30 4c 44 41 20  |scii CLC..L0LDA |
00001150  74 65 6d 70 20 20 20 20  20 20 20 20 20 20 20 20  |temp            |
00001160  20 20 20 20 20 5c 20 67  65 74 20 6c 6f 77 20 62  |     \ get low b|
00001170  79 74 65 20 74 65 6d 70  0d 04 56 3c 41 44 43 20  |yte temp..V<ADC |
00001180  23 97 22 30 22 20 20 20  20 20 20 20 20 20 20 20  |#."0"           |
00001190  20 20 20 5c 20 63 6f 6e  76 65 72 74 20 74 6f 20  |   \ convert to |
000011a0  61 73 63 69 69 20 63 68  61 72 61 63 74 65 72 20  |ascii character |
000011b0  63 6f 64 65 0d 04 60 30  4c 44 59 20 63 6f 75 6e  |code..`0LDY coun|
000011c0  74 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |t               |
000011d0  20 5c 20 67 65 74 20 62  75 66 66 65 72 20 6c 65  | \ get buffer le|
000011e0  6e 67 74 68 0d 04 6a 2b  53 54 41 20 62 75 66 66  |ngth..j+STA buff|
000011f0  65 72 2c 59 20 20 20 20  20 20 20 20 20 20 20 20  |er,Y            |
00001200  20 5c 20 73 74 6f 72 65  20 6e 75 6d 62 65 72 0d  | \ store number.|
00001210  04 74 0d 44 45 43 20 63  6f 75 6e 74 0d 04 7e 3a  |.t.DEC count..~:|
00001220  4c 44 41 20 66 69 72 73  74 20 20 20 20 20 20 20  |LDA first       |
00001230  20 20 20 20 20 20 20 20  20 5c 20 67 65 74 20 6c  |         \ get l|
00001240  6f 77 20 62 79 74 65 20  62 69 6e 61 72 79 20 61  |ow byte binary a|
00001250  64 64 72 65 73 73 0d 04  88 45 84 41 20 66 69 72  |ddress...E.A fir|
00001260  73 74 2b 31 20 20 20 20  20 20 20 20 20 20 20 20  |st+1            |
00001270  20 20 5c 20 6f 72 20 77  69 74 68 20 68 69 67 68  |  \ or with high|
00001280  20 62 79 74 65 2e 20 52  65 73 75 6c 74 3d 30 20  | byte. Result=0 |
00001290  69 66 20 61 6c 6c 20 64  6f 6e 65 0d 04 92 32 42  |if all done...2B|
000012a0  4e 45 20 63 6f 6e 76 65  72 74 20 20 20 20 20 20  |NE convert      |
000012b0  20 20 20 20 20 20 20 20  5c 20 6e 6f 74 20 66 69  |        \ not fi|
000012c0  6e 69 73 68 65 64 20 72  65 70 65 61 74 0d 04 9c  |nished repeat...|
000012d0  0b 4c 44 41 20 23 31 31  0d 04 a6 3a 53 54 41 20  |.LDA #11...:STA |
000012e0  63 6f 75 6e 74 20 20 20  20 20 20 20 20 20 20 20  |count           |
000012f0  20 20 20 20 20 5c 20 72  65 73 65 74 20 63 6f 75  |     \ reset cou|
00001300  6e 74 20 66 6f 72 20 6e  65 78 74 20 6e 75 6d 62  |nt for next numb|
00001310  65 72 0d 04 b0 0e 4c 44  41 20 73 65 63 6f 6e 64  |er....LDA second|
00001320  0d 04 ba 3c 53 54 41 20  66 69 72 73 74 20 20 20  |...<STA first   |
00001330  20 20 20 20 20 20 20 20  20 20 20 20 20 5c 20 73  |             \ s|
00001340  68 69 66 74 20 6c 6f 77  20 62 79 74 65 20 6f 66  |hift low byte of|
00001350  20 6e 65 78 74 20 6e 75  6d 62 65 72 0d 04 c4 10  | next number....|
00001360  4c 44 41 20 73 65 63 6f  6e 64 2b 31 0d 04 ce 3d  |LDA second+1...=|
00001370  53 54 41 20 66 69 72 73  74 2b 31 20 20 20 20 20  |STA first+1     |
00001380  20 20 20 20 20 20 20 20  20 5c 20 73 68 69 66 74  |         \ shift|
00001390  20 68 69 67 68 20 62 79  74 65 20 6f 66 20 6e 65  | high byte of ne|
000013a0  78 74 20 6e 75 6d 62 65  72 0d 04 d8 3a 49 4e 43  |xt number...:INC|
000013b0  20 63 6f 75 6e 74 2b 31  20 20 20 20 20 20 20 20  | count+1        |
000013c0  20 20 20 20 20 20 5c 20  73 65 74 20 66 6c 61 67  |      \ set flag|
000013d0  20 74 6f 20 72 65 74 75  72 6e 20 74 6f 20 73 74  | to return to st|
000013e0  61 72 74 0d 04 e2 0f 4c  44 41 20 63 6f 75 6e 74  |art....LDA count|
000013f0  2b 31 0d 04 ec 0a 43 4d  50 20 23 32 0d 04 f6 3b  |+1....CMP #2...;|
00001400  42 45 51 20 70 72 69 6e  74 20 20 20 20 20 20 20  |BEQ print       |
00001410  20 20 5c 20 74 65 73 74  20 66 6f 72 20 63 6f 6e  |  \ test for con|
00001420  76 65 72 74 69 6f 6e 20  6f 66 20 62 6f 74 68 20  |vertion of both |
00001430  6e 75 6d 62 65 72 73 0d  05 00 34 4a 4d 50 20 73  |numbers...4JMP s|
00001440  65 63 6f 6e 64 5f 73 74  61 72 74 20 20 20 20 20  |econd_start     |
00001450  20 20 20 20 5c 20 63 6f  6e 76 65 72 74 20 73 65  |    \ convert se|
00001460  63 6f 6e 64 20 6e 75 6d  62 65 72 0d 05 0a 05 20  |cond number.... |
00001470  0d 05 14 37 2e 70 72 69  6e 74 20 4c 44 41 20 23  |...7.print LDA #|
00001480  30 3a 53 54 41 20 66 6c  61 67 20 20 20 20 5c 20  |0:STA flag    \ |
00001490  73 74 72 69 6e 67 20 70  72 69 6e 74 69 6e 67 20  |string printing |
000014a0  72 6f 75 74 69 6e 65 0d  05 1e 45 2e 70 72 69 6e  |routine...E.prin|
000014b0  74 6c 6f 6f 70 20 4c 44  58 20 66 6c 61 67 3a 4c  |tloop LDX flag:L|
000014c0  44 59 20 6c 69 73 74 2c  58 3a 4c 44 58 20 23 30  |DY list,X:LDX #0|
000014d0  3a 4c 44 41 20 23 31 33  38 3a 4a 53 52 20 26 46  |:LDA #138:JSR &F|
000014e0  46 46 34 3a 49 4e 43 20  66 6c 61 67 0d 05 28 22  |FF4:INC flag..("|
000014f0  4c 44 41 20 66 6c 61 67  3a 43 4d 50 20 23 31 37  |LDA flag:CMP #17|
00001500  3a 42 4e 45 20 70 72 69  6e 74 6c 6f 6f 70 0d 05  |:BNE printloop..|
00001510  32 07 52 54 53 0d 05 3c  05 20 0d 05 46 43 2e 6d  |2.RTS..<. ..FC.m|
00001520  65 73 73 61 67 65 20 20  42 52 4b 3a 45 51 55 53  |essage  BRK:EQUS|
00001530  22 4e 61 6d 65 20 74 6f  6f 20 6c 6f 6e 67 2c 20  |"Name too long, |
00001540  35 30 20 63 68 61 72 61  63 74 65 72 73 20 6d 61  |50 characters ma|
00001550  78 69 6d 75 6d 22 2b bd  37 2b bd 31 33 0d 05 50  |ximum"+.7+.13..P|
00001560  21 2e 6c 69 73 74 70 72  6f 63 20 42 52 4b 3a 45  |!.listproc BRK:E|
00001570  51 55 53 20 22 4c 49 53  54 50 52 4f 43 22 0d 05  |QUS "LISTPROC"..|
00001580  5a 29 2e 65 72 72 6f 72  20 20 20 20 42 52 4b 3a  |Z).error    BRK:|
00001590  45 51 55 53 20 22 4e 6f  74 20 66 6f 75 6e 64 22  |EQUS "Not found"|
000015a0  2b bd 37 2b bd 31 33 0d  05 64 14 2e 66 69 72 73  |+.7+.13..d..firs|
000015b0  74 20 20 20 20 45 51 55  57 20 30 0d 05 6e 14 2e  |t    EQUW 0..n..|
000015c0  73 65 63 6f 6e 64 20 20  20 45 51 55 57 20 30 0d  |second   EQUW 0.|
000015d0  05 78 14 2e 74 65 6d 70  20 20 20 20 20 45 51 55  |.x..temp     EQU|
000015e0  57 20 30 0d 05 82 14 2e  63 6f 75 6e 74 20 20 20  |W 0.....count   |
000015f0  20 45 51 55 57 20 30 0d  05 8c 19 2e 6c 69 73 74  | EQUW 0.....list|
00001600  20 20 20 20 20 45 51 55  53 20 22 4c 49 53 54 22  |     EQUS "LIST"|
00001610  0d 05 96 2a 2e 62 75 66  66 65 72 20 20 20 45 51  |...*.buffer   EQ|
00001620  55 44 20 30 3a 45 51 55  44 20 30 3a 45 51 55 44  |UD 0:EQUD 0:EQUD|
00001630  20 30 3a 45 51 55 42 20  31 33 0d 05 a0 3b 2e 6e  | 0:EQUB 13...;.n|
00001640  61 6d 65 20 20 20 20 20  20 20 20 20 20 20 20 20  |ame             |
00001650  20 20 20 20 20 20 20 5c  20 6e 61 6d 65 20 6f 66  |       \ name of|
00001660  20 f2 20 73 74 6f 72 65  64 20 69 6e 20 35 30 20  | . stored in 50 |
00001670  62 79 74 65 73 0d 05 aa  06 5d ed 0d ff           |bytes....]...|
0000167d
PROCLST.m0
PROCLST.m1
PROCLST.m2
PROCLST.m4
PROCLST.m5