Home » CEEFAX disks » telesoftware1.adl » Utils/DISAS2

Utils/DISAS2

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » CEEFAX disks » telesoftware1.adl
Filename: Utils/DISAS2
Read OK:
File size: 06D6 bytes
Load address: 1900
Exec address: 8023
File contents
   10REM CMOS disassembler driver
   20REM By Kevin Edwards
   30IF PAGE<&1900 VDU7:PRINT"PAGE must be &1900 or greater!":END
   40ON ERROR VDU3:REPORT:PRINT" at line ";ERL:END
   50MODE7
   60*LOAD cmosdis 1100
   70PROCinit
   80REPEAT
   90PROCscreen
  100REPEAT
  110command$=GET$
  120comm%=INSTR("DPRT",command$)
  130UNTILcomm%
  140PRINTcommand$
  150IF comm%=1 PROCdisassemble
  160IF comm%=2 PROCprinter
  170IF comm%=3 PROCrom_number
  180IF comm%=4 PROCtube_select
  190UNTIL bored%
  200DEFPROCinit
  210*FX 12 2
  220bored%=FALSE
  230printer_on%=FALSE
  240mem_loc=&70
  250rom_number=&76
  260tube_io_flag=&77
  270tube_present=&78
  280code_start=&1100
  290A%=&EA:X%=0:Y%=&FF
  300tube%=(USR(&FFF4) AND &FF00)/256
  310IF tube%=&FF tube$="Present and selected" ELSE tube$="Not present"
  320?tube_present=tube%
  330?tube_io_flag=&FF
  340?rom_number=&F
  350ENDPROC
  360DEFPROCscreen
  370CLS
  380PRINT'"CMOS disassembler:"
  390PRINT'CHR$(133)"ROM bank : &";~?rom_number
  400PRINTTAB(20,3)CHR$(134)"Printer : ";
  410IF printer_on% PRINT"On" ELSE PRINT"Off"
  420PRINT'CHR$(131)"Tube : ";tube$
  430PRINT'"Enter command (DPRT) ?"
  440PRINT">";
  450ENDPROC
  460DEFPROCdisassemble
  470REPEAT
  480REPEAT
  490PRINT'"Enter start address &";
  500INPUT""start$
  510start%=EVAL("&0"+start$)
  520UNTIL start%>=0 AND start%<&10000
  530REPEAT
  540PRINT'"Enter end address   &";
  550INPUT""end$
  560end%=EVAL("&0"+end$)
  570UNTIL end%>=0 AND end%<&10000
  580IF end%=FALSE end%=&FFFF
  590UNTIL end%>=start%
  600?mem_loc=start% MOD 256
  610mem_loc?1=start% DIV 256
  620IF printer_on% VDU 2
  630REPEAT
  640CALL code_start
  650IF NOT printer_on% REPEAT UNTIL GET
  660UNTIL INKEY(-82) OR mem_loc?1*256+?mem_loc>end%
  670VDU 3
  680PRINT''"End....Press Space"
  690REPEAT UNTIL INKEY(-99)
  700ENDPROC
  710DEFPROCrom_number
  720IF tube%=&FF ENDPROC
  730REPEAT
  740PRINT'"Enter new ROM number &";
  750INPUT""rom$
  760rom%=EVAL("&0"+rom$)
  770UNTIL rom%>=0 AND rom%<&10
  780?rom_number=rom%
  790ENDPROC
  800DEFPROCprinter
  810printer_on%=NOT printer_on%
  820ENDPROC
  830DEFPROCtube_select
  840IF tube%=FALSE ENDPROC
  850?tube_io_flag=?tube_io_flag EOR &FF
  860IF ?tube_io_flag=FALSE tube$="Present but reading I/O memory" ELSE tube$="Present and selected"
  870ENDPROC

� CMOS disassembler driver
� By Kevin Edwards
4� �<&1900 �7:�"PAGE must be &1900 or greater!":�
(� � �3:�:�" at line ";�:�
2�7
<*LOAD cmosdis 1100
F	�init
P�
Z�screen
d�
ncommand$=�
xcomm%=�"DPRT",command$)
�
�comm%
�
�command$
�� comm%=1 �disassemble
�� comm%=2 �printer
�� comm%=3 �rom_number
�� comm%=4 �tube_select
�� bored%
�
��init
�*FX 12 2
�bored%=�
�printer_on%=�
�mem_loc=&70
�rom_number=&76
tube_io_flag=&77
tube_present=&78
code_start=&1100
"A%=&EA:X%=0:Y%=&FF
, tube%=(�(&FFF4) � &FF00)/256
6B� tube%=&FF tube$="Present and selected" � tube$="Not present"
@?tube_present=tube%
J?tube_io_flag=&FF
T?rom_number=&F
^�
h��screen
r�
|�'"CMOS disassembler:"
�'�'�(133)"ROM bank : &";~?rom_number
��20,3)�(134)"Printer : ";
� � printer_on% �"On" � �"Off"
��'�(131)"Tube : ";tube$
��'"Enter command (DPRT) ?"
�	�">";
��
���disassemble
��
��
��'"Enter start address &";
�
�""start$
�start%=�("&0"+start$)
� start%>=0 � start%<&10000
�
�'"Enter end address   &";
&�""end$
0end%=�("&0"+end$)
:� end%>=0 � end%<&10000
D� end%=� end%=&FFFF
N� end%>=start%
X?mem_loc=start% � 256
bmem_loc?1=start% � 256
l� printer_on% � 2
v�
�� code_start
�� � printer_on% � � �
�*� �(-82) � mem_loc?1*256+?mem_loc>end%
�� 3
��''"End....Press Space"
�� � �(-99)
��
���rom_number
�� tube%=&FF �
��
��'"Enter new ROM number &";
��""rom$
�rom%=�("&0"+rom$)
� rom%>=0 � rom%<&10
?rom_number=rom%
�
 
��printer
*printer_on%=� printer_on%
4�
>��tube_select
H� tube%=� �
R%?tube_io_flag=?tube_io_flag � &FF
\[� ?tube_io_flag=� tube$="Present but reading I/O memory" � tube$="Present and selected"
f�
�
00000000  0d 00 0a 1e f4 20 43 4d  4f 53 20 64 69 73 61 73  |..... CMOS disas|
00000010  73 65 6d 62 6c 65 72 20  64 72 69 76 65 72 0d 00  |sembler driver..|
00000020  14 16 f4 20 42 79 20 4b  65 76 69 6e 20 45 64 77  |... By Kevin Edw|
00000030  61 72 64 73 0d 00 1e 34  e7 20 90 3c 26 31 39 30  |ards...4. .<&190|
00000040  30 20 ef 37 3a f1 22 50  41 47 45 20 6d 75 73 74  |0 .7:."PAGE must|
00000050  20 62 65 20 26 31 39 30  30 20 6f 72 20 67 72 65  | be &1900 or gre|
00000060  61 74 65 72 21 22 3a e0  0d 00 28 1d ee 20 85 20  |ater!":...(.. . |
00000070  ef 33 3a f6 3a f1 22 20  61 74 20 6c 69 6e 65 20  |.3:.:." at line |
00000080  22 3b 9e 3a e0 0d 00 32  06 eb 37 0d 00 3c 16 2a  |";.:...2..7..<.*|
00000090  4c 4f 41 44 20 63 6d 6f  73 64 69 73 20 31 31 30  |LOAD cmosdis 110|
000000a0  30 0d 00 46 09 f2 69 6e  69 74 0d 00 50 05 f5 0d  |0..F..init..P...|
000000b0  00 5a 0b f2 73 63 72 65  65 6e 0d 00 64 05 f5 0d  |.Z..screen..d...|
000000c0  00 6e 0e 63 6f 6d 6d 61  6e 64 24 3d be 0d 00 78  |.n.command$=...x|
000000d0  1b 63 6f 6d 6d 25 3d a7  22 44 50 52 54 22 2c 63  |.comm%=."DPRT",c|
000000e0  6f 6d 6d 61 6e 64 24 29  0d 00 82 0a fd 63 6f 6d  |ommand$).....com|
000000f0  6d 25 0d 00 8c 0d f1 63  6f 6d 6d 61 6e 64 24 0d  |m%.....command$.|
00000100  00 96 1a e7 20 63 6f 6d  6d 25 3d 31 20 f2 64 69  |.... comm%=1 .di|
00000110  73 61 73 73 65 6d 62 6c  65 0d 00 a0 16 e7 20 63  |sassemble..... c|
00000120  6f 6d 6d 25 3d 32 20 f2  70 72 69 6e 74 65 72 0d  |omm%=2 .printer.|
00000130  00 aa 19 e7 20 63 6f 6d  6d 25 3d 33 20 f2 72 6f  |.... comm%=3 .ro|
00000140  6d 5f 6e 75 6d 62 65 72  0d 00 b4 1a e7 20 63 6f  |m_number..... co|
00000150  6d 6d 25 3d 34 20 f2 74  75 62 65 5f 73 65 6c 65  |mm%=4 .tube_sele|
00000160  63 74 0d 00 be 0c fd 20  62 6f 72 65 64 25 0d 00  |ct..... bored%..|
00000170  c8 0a dd f2 69 6e 69 74  0d 00 d2 0c 2a 46 58 20  |....init....*FX |
00000180  31 32 20 32 0d 00 dc 0c  62 6f 72 65 64 25 3d a3  |12 2....bored%=.|
00000190  0d 00 e6 11 70 72 69 6e  74 65 72 5f 6f 6e 25 3d  |....printer_on%=|
000001a0  a3 0d 00 f0 0f 6d 65 6d  5f 6c 6f 63 3d 26 37 30  |.....mem_loc=&70|
000001b0  0d 00 fa 12 72 6f 6d 5f  6e 75 6d 62 65 72 3d 26  |....rom_number=&|
000001c0  37 36 0d 01 04 14 74 75  62 65 5f 69 6f 5f 66 6c  |76....tube_io_fl|
000001d0  61 67 3d 26 37 37 0d 01  0e 14 74 75 62 65 5f 70  |ag=&77....tube_p|
000001e0  72 65 73 65 6e 74 3d 26  37 38 0d 01 18 14 63 6f  |resent=&78....co|
000001f0  64 65 5f 73 74 61 72 74  3d 26 31 31 30 30 0d 01  |de_start=&1100..|
00000200  22 16 41 25 3d 26 45 41  3a 58 25 3d 30 3a 59 25  |".A%=&EA:X%=0:Y%|
00000210  3d 26 46 46 0d 01 2c 20  74 75 62 65 25 3d 28 ba  |=&FF.., tube%=(.|
00000220  28 26 46 46 46 34 29 20  80 20 26 46 46 30 30 29  |(&FFF4) . &FF00)|
00000230  2f 32 35 36 0d 01 36 42  e7 20 74 75 62 65 25 3d  |/256..6B. tube%=|
00000240  26 46 46 20 74 75 62 65  24 3d 22 50 72 65 73 65  |&FF tube$="Prese|
00000250  6e 74 20 61 6e 64 20 73  65 6c 65 63 74 65 64 22  |nt and selected"|
00000260  20 8b 20 74 75 62 65 24  3d 22 4e 6f 74 20 70 72  | . tube$="Not pr|
00000270  65 73 65 6e 74 22 0d 01  40 17 3f 74 75 62 65 5f  |esent"..@.?tube_|
00000280  70 72 65 73 65 6e 74 3d  74 75 62 65 25 0d 01 4a  |present=tube%..J|
00000290  15 3f 74 75 62 65 5f 69  6f 5f 66 6c 61 67 3d 26  |.?tube_io_flag=&|
000002a0  46 46 0d 01 54 12 3f 72  6f 6d 5f 6e 75 6d 62 65  |FF..T.?rom_numbe|
000002b0  72 3d 26 46 0d 01 5e 05  e1 0d 01 68 0c dd f2 73  |r=&F..^....h...s|
000002c0  63 72 65 65 6e 0d 01 72  05 db 0d 01 7c 1a f1 27  |creen..r....|..'|
000002d0  22 43 4d 4f 53 20 64 69  73 61 73 73 65 6d 62 6c  |"CMOS disassembl|
000002e0  65 72 3a 22 0d 01 86 27  f1 27 bd 28 31 33 33 29  |er:"...'.'.(133)|
000002f0  22 52 4f 4d 20 62 61 6e  6b 20 3a 20 26 22 3b 7e  |"ROM bank : &";~|
00000300  3f 72 6f 6d 5f 6e 75 6d  62 65 72 0d 01 90 1e f1  |?rom_number.....|
00000310  8a 32 30 2c 33 29 bd 28  31 33 34 29 22 50 72 69  |.20,3).(134)"Pri|
00000320  6e 74 65 72 20 3a 20 22  3b 0d 01 9a 20 e7 20 70  |nter : ";... . p|
00000330  72 69 6e 74 65 72 5f 6f  6e 25 20 f1 22 4f 6e 22  |rinter_on% ."On"|
00000340  20 8b 20 f1 22 4f 66 66  22 0d 01 a4 1b f1 27 bd  | . ."Off".....'.|
00000350  28 31 33 31 29 22 54 75  62 65 20 3a 20 22 3b 74  |(131)"Tube : ";t|
00000360  75 62 65 24 0d 01 ae 1e  f1 27 22 45 6e 74 65 72  |ube$.....'"Enter|
00000370  20 63 6f 6d 6d 61 6e 64  20 28 44 50 52 54 29 20  | command (DPRT) |
00000380  3f 22 0d 01 b8 09 f1 22  3e 22 3b 0d 01 c2 05 e1  |?".....">";.....|
00000390  0d 01 cc 11 dd f2 64 69  73 61 73 73 65 6d 62 6c  |......disassembl|
000003a0  65 0d 01 d6 05 f5 0d 01  e0 05 f5 0d 01 ea 1e f1  |e...............|
000003b0  27 22 45 6e 74 65 72 20  73 74 61 72 74 20 61 64  |'"Enter start ad|
000003c0  64 72 65 73 73 20 26 22  3b 0d 01 f4 0d e8 22 22  |dress &";.....""|
000003d0  73 74 61 72 74 24 0d 01  fe 19 73 74 61 72 74 25  |start$....start%|
000003e0  3d a0 28 22 26 30 22 2b  73 74 61 72 74 24 29 0d  |=.("&0"+start$).|
000003f0  02 08 1f fd 20 73 74 61  72 74 25 3e 3d 30 20 80  |.... start%>=0 .|
00000400  20 73 74 61 72 74 25 3c  26 31 30 30 30 30 0d 02  | start%<&10000..|
00000410  12 05 f5 0d 02 1c 1e f1  27 22 45 6e 74 65 72 20  |........'"Enter |
00000420  65 6e 64 20 61 64 64 72  65 73 73 20 20 20 26 22  |end address   &"|
00000430  3b 0d 02 26 0b e8 22 22  65 6e 64 24 0d 02 30 15  |;..&..""end$..0.|
00000440  65 6e 64 25 3d a0 28 22  26 30 22 2b 65 6e 64 24  |end%=.("&0"+end$|
00000450  29 0d 02 3a 1b fd 20 65  6e 64 25 3e 3d 30 20 80  |)..:.. end%>=0 .|
00000460  20 65 6e 64 25 3c 26 31  30 30 30 30 0d 02 44 17  | end%<&10000..D.|
00000470  e7 20 65 6e 64 25 3d a3  20 65 6e 64 25 3d 26 46  |. end%=. end%=&F|
00000480  46 46 46 0d 02 4e 12 fd  20 65 6e 64 25 3e 3d 73  |FFF..N.. end%>=s|
00000490  74 61 72 74 25 0d 02 58  19 3f 6d 65 6d 5f 6c 6f  |tart%..X.?mem_lo|
000004a0  63 3d 73 74 61 72 74 25  20 83 20 32 35 36 0d 02  |c=start% . 256..|
000004b0  62 1a 6d 65 6d 5f 6c 6f  63 3f 31 3d 73 74 61 72  |b.mem_loc?1=star|
000004c0  74 25 20 81 20 32 35 36  0d 02 6c 15 e7 20 70 72  |t% . 256..l.. pr|
000004d0  69 6e 74 65 72 5f 6f 6e  25 20 ef 20 32 0d 02 76  |inter_on% . 2..v|
000004e0  05 f5 0d 02 80 10 d6 20  63 6f 64 65 5f 73 74 61  |....... code_sta|
000004f0  72 74 0d 02 8a 19 e7 20  ac 20 70 72 69 6e 74 65  |rt..... . printe|
00000500  72 5f 6f 6e 25 20 f5 20  fd 20 a5 0d 02 94 2a fd  |r_on% . . ....*.|
00000510  20 a6 28 2d 38 32 29 20  84 20 6d 65 6d 5f 6c 6f  | .(-82) . mem_lo|
00000520  63 3f 31 2a 32 35 36 2b  3f 6d 65 6d 5f 6c 6f 63  |c?1*256+?mem_loc|
00000530  3e 65 6e 64 25 0d 02 9e  07 ef 20 33 0d 02 a8 1b  |>end%..... 3....|
00000540  f1 27 27 22 45 6e 64 2e  2e 2e 2e 50 72 65 73 73  |.''"End....Press|
00000550  20 53 70 61 63 65 22 0d  02 b2 0e f5 20 fd 20 a6  | Space"..... . .|
00000560  28 2d 39 39 29 0d 02 bc  05 e1 0d 02 c6 10 dd f2  |(-99)...........|
00000570  72 6f 6d 5f 6e 75 6d 62  65 72 0d 02 d0 11 e7 20  |rom_number..... |
00000580  74 75 62 65 25 3d 26 46  46 20 e1 0d 02 da 05 f5  |tube%=&FF ......|
00000590  0d 02 e4 1f f1 27 22 45  6e 74 65 72 20 6e 65 77  |.....'"Enter new|
000005a0  20 52 4f 4d 20 6e 75 6d  62 65 72 20 26 22 3b 0d  | ROM number &";.|
000005b0  02 ee 0b e8 22 22 72 6f  6d 24 0d 02 f8 15 72 6f  |....""rom$....ro|
000005c0  6d 25 3d a0 28 22 26 30  22 2b 72 6f 6d 24 29 0d  |m%=.("&0"+rom$).|
000005d0  03 02 18 fd 20 72 6f 6d  25 3e 3d 30 20 80 20 72  |.... rom%>=0 . r|
000005e0  6f 6d 25 3c 26 31 30 0d  03 0c 14 3f 72 6f 6d 5f  |om%<&10....?rom_|
000005f0  6e 75 6d 62 65 72 3d 72  6f 6d 25 0d 03 16 05 e1  |number=rom%.....|
00000600  0d 03 20 0d dd f2 70 72  69 6e 74 65 72 0d 03 2a  |.. ...printer..*|
00000610  1d 70 72 69 6e 74 65 72  5f 6f 6e 25 3d ac 20 70  |.printer_on%=. p|
00000620  72 69 6e 74 65 72 5f 6f  6e 25 0d 03 34 05 e1 0d  |rinter_on%..4...|
00000630  03 3e 11 dd f2 74 75 62  65 5f 73 65 6c 65 63 74  |.>...tube_select|
00000640  0d 03 48 0f e7 20 74 75  62 65 25 3d a3 20 e1 0d  |..H.. tube%=. ..|
00000650  03 52 25 3f 74 75 62 65  5f 69 6f 5f 66 6c 61 67  |.R%?tube_io_flag|
00000660  3d 3f 74 75 62 65 5f 69  6f 5f 66 6c 61 67 20 82  |=?tube_io_flag .|
00000670  20 26 46 46 0d 03 5c 5b  e7 20 3f 74 75 62 65 5f  | &FF..\[. ?tube_|
00000680  69 6f 5f 66 6c 61 67 3d  a3 20 74 75 62 65 24 3d  |io_flag=. tube$=|
00000690  22 50 72 65 73 65 6e 74  20 62 75 74 20 72 65 61  |"Present but rea|
000006a0  64 69 6e 67 20 49 2f 4f  20 6d 65 6d 6f 72 79 22  |ding I/O memory"|
000006b0  20 8b 20 74 75 62 65 24  3d 22 50 72 65 73 65 6e  | . tube$="Presen|
000006c0  74 20 61 6e 64 20 73 65  6c 65 63 74 65 64 22 0d  |t and selected".|
000006d0  03 66 05 e1 0d ff                                 |.f....|
000006d6
Utils/DISAS2.m0
Utils/DISAS2.m1
Utils/DISAS2.m2
Utils/DISAS2.m4
Utils/DISAS2.m5