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

LIST

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: LIST
Read OK:
File size: 06F5 bytes
Load address: FFFF1D00
Exec address: FFFF8023
Duplicates

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

File contents
   10REM >LIST
   20REM Program Variable & Procedure Lister (c) M Comley 1990
   30code%=&7000
   40PROCmc_code
   50END
   60----------
   70DEFPROCmc_code
   80FOR pass=0 TO 3 STEP 3
   90P%=code%
  100[OPT pass
  110LDY #0
  120.loop LDA var,Y:JSR &FFEE:INY:CMP #0:BNE loop
  130LDA #65:STA &70:LDA #4:STA &72  \ Init. counter to 65 & linked list
  140.calc LDA &70:ASL A:STA &71     \ Calc address
  150LDY #1:LDA (&71),Y:BEQ return   \ Check for variable
  160STA &74:DEY:LDA (&71),Y:STA &73 \ Get add of first variable
  170.start LDA &70:JSR &FFEE        \ Print first letter
  180LDY #2
  190.loop LDA (&73),Y:BEQ next:CMP #40:BEQ bracket \Check for name end or (
  200JSR &FFEE:INY:JMP loop          \ Print out
  210.next JSR space
  220LDY #0:LDA (&73),Y:STA &75:INY:LDA (&73),Y:BEQ return \ Check for next variable
  230STA &74:LDA &75:STA &73:JMP start         \ Get next address
  240.return INC &70:LDA &70:CMP #123:BNE calc \ Increment counter & check last
  250JSR &FFE7:JSR &FFE7:JMP p
  260.bracket JSR &FFEE:LDA #41:JSR &FFEE:JMP next \ Print brackets
  270.p LDY #0
  280.loop1 LDA proc,Y:JSR &FFEE:INY:CMP #0:BNE loop1
  290LDA #0:STA &70:LDA &18:STA &71                \ Get PAGE
  300.checkend LDY #1:LDA (&70),Y:CMP #&FF:BNE linelength
  310JSR &FFE7:RTS
  320.linelength LDY #3:LDA (&70),Y:STA &72        \ Get line length
  330INY:LDA (&70),Y:CMP #&DD:BNE nextline         \ Get first char.
  340INY:LDA (&70),Y:CMP #&A4:BNE char             \ Print FN
  350LDA #70:JSR &FFEE:LDA #78:JSR &FFEE
  360.char INY:LDA (&70),Y:CMP #58:BEQ space1
  370CPY &72:BEQ space1
  380JSR &FFEE:JMP char
  390.space1 JSR space
  400.nextline CLC:LDA &70:ADC &72:STA &70:LDA &71:ADC #0:STA &71
  410JMP checkend
  420.space LDA #32:JSR &FFEE:LDA #45:JSR &FFEE:LDA #32:JMP &FFEE \ Print space
  430BRK:.proc EQUS "PROCEDURES - "
  440BRK:.var EQUS "VARIABLES - ":BRK
  450]
  460NEXT
  470ENDPROC

� >LIST
;� Program Variable & Procedure Lister (c) M Comley 1990
code%=&7000
(�mc_code
2�
<----------
F
��mc_code
P� pass=0 � 3 � 3
ZP%=code%
d
[OPT pass
n
LDY #0
x1.loop LDA var,Y:JSR &FFEE:INY:CMP #0:BNE loop
�GLDA #65:STA &70:LDA #4:STA &72  \ Init. counter to 65 & linked list
�2.calc LDA &70:ASL A:STA &71     \ Calc address
�8LDY #1:LDA (&71),Y:BEQ return   \ Check for variable
�?STA &74:DEY:LDA (&71),Y:STA &73 \ Get add of first variable
�8.start LDA &70:JSR &FFEE        \ Print first letter
�
LDY #2
�K.loop LDA (&73),Y:BEQ next:CMP #40:BEQ bracket \Check for name end or (
�/JSR &FFEE:INY:JMP loop          \ Print out
�.next JSR space
�SLDY #0:LDA (&73),Y:STA &75:INY:LDA (&73),Y:BEQ return \ Check for next variable
�@STA &74:LDA &75:STA &73:JMP start         \ Get next address
�N.return INC &70:LDA &70:CMP #123:BNE calc \ Increment counter & check last
�JSR &FFE7:JSR &FFE7:JMP p
B.bracket JSR &FFEE:LDA #41:JSR &FFEE:JMP next \ Print brackets

.p LDY #0
4.loop1 LDA proc,Y:JSR &FFEE:INY:CMP #0:BNE loop1
"9LDA #0:STA &70:LDA &18:STA &71                \ Get �
,8.checkend LDY #1:LDA (&70),Y:CMP #&FF:BNE linelength
6JSR &FFE7:RTS
@C.linelength LDY #3:LDA (&70),Y:STA &72        \ Get line length
JCINY:LDA (&70),Y:CMP #&DD:BNE nextline         \ Get first char.
T;INY:LDA (&70),Y:CMP #&A4:BNE char             \ Print �
^'LDA #70:JSR &FFEE:LDA #78:JSR &FFEE
h,.char INY:LDA (&70),Y:CMP #58:BEQ space1
rCPY &72:BEQ space1
|JSR &FFEE:JMP char
�.space1 JSR space
�@.nextline CLC:LDA &70:ADC &72:STA &70:LDA &71:ADC #0:STA &71
�JMP checkend
�N.space LDA #32:JSR &FFEE:LDA #45:JSR &FFEE:LDA #32:JMP &FFEE \ Print space
�"BRK:.proc EQUS "PROCEDURES - "
�$BRK:.var EQUS "VARIABLES - ":BRK
�]
��
��
�
00000000  0d 00 0a 0b f4 20 3e 4c  49 53 54 0d 00 14 3b f4  |..... >LIST...;.|
00000010  20 50 72 6f 67 72 61 6d  20 56 61 72 69 61 62 6c  | Program Variabl|
00000020  65 20 26 20 50 72 6f 63  65 64 75 72 65 20 4c 69  |e & Procedure Li|
00000030  73 74 65 72 20 28 63 29  20 4d 20 43 6f 6d 6c 65  |ster (c) M Comle|
00000040  79 20 31 39 39 30 0d 00  1e 0f 63 6f 64 65 25 3d  |y 1990....code%=|
00000050  26 37 30 30 30 0d 00 28  0c f2 6d 63 5f 63 6f 64  |&7000..(..mc_cod|
00000060  65 0d 00 32 05 e0 0d 00  3c 0e 2d 2d 2d 2d 2d 2d  |e..2....<.------|
00000070  2d 2d 2d 2d 0d 00 46 0d  dd f2 6d 63 5f 63 6f 64  |----..F...mc_cod|
00000080  65 0d 00 50 14 e3 20 70  61 73 73 3d 30 20 b8 20  |e..P.. pass=0 . |
00000090  33 20 88 20 33 0d 00 5a  0c 50 25 3d 63 6f 64 65  |3 . 3..Z.P%=code|
000000a0  25 0d 00 64 0d 5b 4f 50  54 20 70 61 73 73 0d 00  |%..d.[OPT pass..|
000000b0  6e 0a 4c 44 59 20 23 30  0d 00 78 31 2e 6c 6f 6f  |n.LDY #0..x1.loo|
000000c0  70 20 4c 44 41 20 76 61  72 2c 59 3a 4a 53 52 20  |p LDA var,Y:JSR |
000000d0  26 46 46 45 45 3a 49 4e  59 3a 43 4d 50 20 23 30  |&FFEE:INY:CMP #0|
000000e0  3a 42 4e 45 20 6c 6f 6f  70 0d 00 82 47 4c 44 41  |:BNE loop...GLDA|
000000f0  20 23 36 35 3a 53 54 41  20 26 37 30 3a 4c 44 41  | #65:STA &70:LDA|
00000100  20 23 34 3a 53 54 41 20  26 37 32 20 20 5c 20 49  | #4:STA &72  \ I|
00000110  6e 69 74 2e 20 63 6f 75  6e 74 65 72 20 74 6f 20  |nit. counter to |
00000120  36 35 20 26 20 6c 69 6e  6b 65 64 20 6c 69 73 74  |65 & linked list|
00000130  0d 00 8c 32 2e 63 61 6c  63 20 4c 44 41 20 26 37  |...2.calc LDA &7|
00000140  30 3a 41 53 4c 20 41 3a  53 54 41 20 26 37 31 20  |0:ASL A:STA &71 |
00000150  20 20 20 20 5c 20 43 61  6c 63 20 61 64 64 72 65  |    \ Calc addre|
00000160  73 73 0d 00 96 38 4c 44  59 20 23 31 3a 4c 44 41  |ss...8LDY #1:LDA|
00000170  20 28 26 37 31 29 2c 59  3a 42 45 51 20 72 65 74  | (&71),Y:BEQ ret|
00000180  75 72 6e 20 20 20 5c 20  43 68 65 63 6b 20 66 6f  |urn   \ Check fo|
00000190  72 20 76 61 72 69 61 62  6c 65 0d 00 a0 3f 53 54  |r variable...?ST|
000001a0  41 20 26 37 34 3a 44 45  59 3a 4c 44 41 20 28 26  |A &74:DEY:LDA (&|
000001b0  37 31 29 2c 59 3a 53 54  41 20 26 37 33 20 5c 20  |71),Y:STA &73 \ |
000001c0  47 65 74 20 61 64 64 20  6f 66 20 66 69 72 73 74  |Get add of first|
000001d0  20 76 61 72 69 61 62 6c  65 0d 00 aa 38 2e 73 74  | variable...8.st|
000001e0  61 72 74 20 4c 44 41 20  26 37 30 3a 4a 53 52 20  |art LDA &70:JSR |
000001f0  26 46 46 45 45 20 20 20  20 20 20 20 20 5c 20 50  |&FFEE        \ P|
00000200  72 69 6e 74 20 66 69 72  73 74 20 6c 65 74 74 65  |rint first lette|
00000210  72 0d 00 b4 0a 4c 44 59  20 23 32 0d 00 be 4b 2e  |r....LDY #2...K.|
00000220  6c 6f 6f 70 20 4c 44 41  20 28 26 37 33 29 2c 59  |loop LDA (&73),Y|
00000230  3a 42 45 51 20 6e 65 78  74 3a 43 4d 50 20 23 34  |:BEQ next:CMP #4|
00000240  30 3a 42 45 51 20 62 72  61 63 6b 65 74 20 5c 43  |0:BEQ bracket \C|
00000250  68 65 63 6b 20 66 6f 72  20 6e 61 6d 65 20 65 6e  |heck for name en|
00000260  64 20 6f 72 20 28 0d 00  c8 2f 4a 53 52 20 26 46  |d or (.../JSR &F|
00000270  46 45 45 3a 49 4e 59 3a  4a 4d 50 20 6c 6f 6f 70  |FEE:INY:JMP loop|
00000280  20 20 20 20 20 20 20 20  20 20 5c 20 50 72 69 6e  |          \ Prin|
00000290  74 20 6f 75 74 0d 00 d2  13 2e 6e 65 78 74 20 4a  |t out.....next J|
000002a0  53 52 20 73 70 61 63 65  0d 00 dc 53 4c 44 59 20  |SR space...SLDY |
000002b0  23 30 3a 4c 44 41 20 28  26 37 33 29 2c 59 3a 53  |#0:LDA (&73),Y:S|
000002c0  54 41 20 26 37 35 3a 49  4e 59 3a 4c 44 41 20 28  |TA &75:INY:LDA (|
000002d0  26 37 33 29 2c 59 3a 42  45 51 20 72 65 74 75 72  |&73),Y:BEQ retur|
000002e0  6e 20 5c 20 43 68 65 63  6b 20 66 6f 72 20 6e 65  |n \ Check for ne|
000002f0  78 74 20 76 61 72 69 61  62 6c 65 0d 00 e6 40 53  |xt variable...@S|
00000300  54 41 20 26 37 34 3a 4c  44 41 20 26 37 35 3a 53  |TA &74:LDA &75:S|
00000310  54 41 20 26 37 33 3a 4a  4d 50 20 73 74 61 72 74  |TA &73:JMP start|
00000320  20 20 20 20 20 20 20 20  20 5c 20 47 65 74 20 6e  |         \ Get n|
00000330  65 78 74 20 61 64 64 72  65 73 73 0d 00 f0 4e 2e  |ext address...N.|
00000340  72 65 74 75 72 6e 20 49  4e 43 20 26 37 30 3a 4c  |return INC &70:L|
00000350  44 41 20 26 37 30 3a 43  4d 50 20 23 31 32 33 3a  |DA &70:CMP #123:|
00000360  42 4e 45 20 63 61 6c 63  20 5c 20 49 6e 63 72 65  |BNE calc \ Incre|
00000370  6d 65 6e 74 20 63 6f 75  6e 74 65 72 20 26 20 63  |ment counter & c|
00000380  68 65 63 6b 20 6c 61 73  74 0d 00 fa 1d 4a 53 52  |heck last....JSR|
00000390  20 26 46 46 45 37 3a 4a  53 52 20 26 46 46 45 37  | &FFE7:JSR &FFE7|
000003a0  3a 4a 4d 50 20 70 0d 01  04 42 2e 62 72 61 63 6b  |:JMP p...B.brack|
000003b0  65 74 20 4a 53 52 20 26  46 46 45 45 3a 4c 44 41  |et JSR &FFEE:LDA|
000003c0  20 23 34 31 3a 4a 53 52  20 26 46 46 45 45 3a 4a  | #41:JSR &FFEE:J|
000003d0  4d 50 20 6e 65 78 74 20  5c 20 50 72 69 6e 74 20  |MP next \ Print |
000003e0  62 72 61 63 6b 65 74 73  0d 01 0e 0d 2e 70 20 4c  |brackets.....p L|
000003f0  44 59 20 23 30 0d 01 18  34 2e 6c 6f 6f 70 31 20  |DY #0...4.loop1 |
00000400  4c 44 41 20 70 72 6f 63  2c 59 3a 4a 53 52 20 26  |LDA proc,Y:JSR &|
00000410  46 46 45 45 3a 49 4e 59  3a 43 4d 50 20 23 30 3a  |FFEE:INY:CMP #0:|
00000420  42 4e 45 20 6c 6f 6f 70  31 0d 01 22 39 4c 44 41  |BNE loop1.."9LDA|
00000430  20 23 30 3a 53 54 41 20  26 37 30 3a 4c 44 41 20  | #0:STA &70:LDA |
00000440  26 31 38 3a 53 54 41 20  26 37 31 20 20 20 20 20  |&18:STA &71     |
00000450  20 20 20 20 20 20 20 20  20 20 20 5c 20 47 65 74  |           \ Get|
00000460  20 90 0d 01 2c 38 2e 63  68 65 63 6b 65 6e 64 20  | ...,8.checkend |
00000470  4c 44 59 20 23 31 3a 4c  44 41 20 28 26 37 30 29  |LDY #1:LDA (&70)|
00000480  2c 59 3a 43 4d 50 20 23  26 46 46 3a 42 4e 45 20  |,Y:CMP #&FF:BNE |
00000490  6c 69 6e 65 6c 65 6e 67  74 68 0d 01 36 11 4a 53  |linelength..6.JS|
000004a0  52 20 26 46 46 45 37 3a  52 54 53 0d 01 40 43 2e  |R &FFE7:RTS..@C.|
000004b0  6c 69 6e 65 6c 65 6e 67  74 68 20 4c 44 59 20 23  |linelength LDY #|
000004c0  33 3a 4c 44 41 20 28 26  37 30 29 2c 59 3a 53 54  |3:LDA (&70),Y:ST|
000004d0  41 20 26 37 32 20 20 20  20 20 20 20 20 5c 20 47  |A &72        \ G|
000004e0  65 74 20 6c 69 6e 65 20  6c 65 6e 67 74 68 0d 01  |et line length..|
000004f0  4a 43 49 4e 59 3a 4c 44  41 20 28 26 37 30 29 2c  |JCINY:LDA (&70),|
00000500  59 3a 43 4d 50 20 23 26  44 44 3a 42 4e 45 20 6e  |Y:CMP #&DD:BNE n|
00000510  65 78 74 6c 69 6e 65 20  20 20 20 20 20 20 20 20  |extline         |
00000520  5c 20 47 65 74 20 66 69  72 73 74 20 63 68 61 72  |\ Get first char|
00000530  2e 0d 01 54 3b 49 4e 59  3a 4c 44 41 20 28 26 37  |...T;INY:LDA (&7|
00000540  30 29 2c 59 3a 43 4d 50  20 23 26 41 34 3a 42 4e  |0),Y:CMP #&A4:BN|
00000550  45 20 63 68 61 72 20 20  20 20 20 20 20 20 20 20  |E char          |
00000560  20 20 20 5c 20 50 72 69  6e 74 20 a4 0d 01 5e 27  |   \ Print ...^'|
00000570  4c 44 41 20 23 37 30 3a  4a 53 52 20 26 46 46 45  |LDA #70:JSR &FFE|
00000580  45 3a 4c 44 41 20 23 37  38 3a 4a 53 52 20 26 46  |E:LDA #78:JSR &F|
00000590  46 45 45 0d 01 68 2c 2e  63 68 61 72 20 49 4e 59  |FEE..h,.char INY|
000005a0  3a 4c 44 41 20 28 26 37  30 29 2c 59 3a 43 4d 50  |:LDA (&70),Y:CMP|
000005b0  20 23 35 38 3a 42 45 51  20 73 70 61 63 65 31 0d  | #58:BEQ space1.|
000005c0  01 72 16 43 50 59 20 26  37 32 3a 42 45 51 20 73  |.r.CPY &72:BEQ s|
000005d0  70 61 63 65 31 0d 01 7c  16 4a 53 52 20 26 46 46  |pace1..|.JSR &FF|
000005e0  45 45 3a 4a 4d 50 20 63  68 61 72 0d 01 86 15 2e  |EE:JMP char.....|
000005f0  73 70 61 63 65 31 20 4a  53 52 20 73 70 61 63 65  |space1 JSR space|
00000600  0d 01 90 40 2e 6e 65 78  74 6c 69 6e 65 20 43 4c  |...@.nextline CL|
00000610  43 3a 4c 44 41 20 26 37  30 3a 41 44 43 20 26 37  |C:LDA &70:ADC &7|
00000620  32 3a 53 54 41 20 26 37  30 3a 4c 44 41 20 26 37  |2:STA &70:LDA &7|
00000630  31 3a 41 44 43 20 23 30  3a 53 54 41 20 26 37 31  |1:ADC #0:STA &71|
00000640  0d 01 9a 10 4a 4d 50 20  63 68 65 63 6b 65 6e 64  |....JMP checkend|
00000650  0d 01 a4 4e 2e 73 70 61  63 65 20 4c 44 41 20 23  |...N.space LDA #|
00000660  33 32 3a 4a 53 52 20 26  46 46 45 45 3a 4c 44 41  |32:JSR &FFEE:LDA|
00000670  20 23 34 35 3a 4a 53 52  20 26 46 46 45 45 3a 4c  | #45:JSR &FFEE:L|
00000680  44 41 20 23 33 32 3a 4a  4d 50 20 26 46 46 45 45  |DA #32:JMP &FFEE|
00000690  20 5c 20 50 72 69 6e 74  20 73 70 61 63 65 0d 01  | \ Print space..|
000006a0  ae 22 42 52 4b 3a 2e 70  72 6f 63 20 45 51 55 53  |."BRK:.proc EQUS|
000006b0  20 22 50 52 4f 43 45 44  55 52 45 53 20 2d 20 22  | "PROCEDURES - "|
000006c0  0d 01 b8 24 42 52 4b 3a  2e 76 61 72 20 45 51 55  |...$BRK:.var EQU|
000006d0  53 20 22 56 41 52 49 41  42 4c 45 53 20 2d 20 22  |S "VARIABLES - "|
000006e0  3a 42 52 4b 0d 01 c2 05  5d 0d 01 cc 05 ed 0d 01  |:BRK....].......|
000006f0  d6 05 e1 0d ff                                    |.....|
000006f5
LIST.m0
LIST.m1
LIST.m2
LIST.m4
LIST.m5