Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_37.ADF » P/+DA2
P/+DA2
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_37.ADF |
Filename: | P/+DA2 |
Read OK: | ✔ |
File size: | 07DF bytes |
Load address: | 2B204556 |
Exec address: | D324144 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_37.ADF » P/+DA2
- Personal collection » Acorn hard disk » zipped_disks » elk03 » eug37/P/+DA2
File contents
The result: 2000 PHP 2001 PHA 2002 TXA 2003 PHA 2004 LDX #&00 2006 LDA &2016,X 2009 JSR &FFEE 200C INX 200D CMP #&00 200F BNE &F5 2011 PLA 2012 TAX 2013 PLA 2014 PLP 2015 RTS 2016 EQUS "Hello" 201B EQUW &0D0A 201D EQUB &00 "." Note that the disassembler does not assign labels or variable names. The "." after an EQUB is the ASCII code as printed by *DUMP ("." if <32 or >126), and is provided for password programs when one character at a time is tested. The character is also printed following an opcode using the Immediate addressing mode (i.e. data byte after the instruction), so that "LDA #&48" and "CMP #&65" demonstrate that the program under scrutiny loads "H" into the accumulator and compares the accumulator with "e" respectively. Of course, using the disassembler requires some knowledge of 6502 machine code, in order that you can discern whether the current byte is an opcode or a piece of data, and so that you can achieve speed in disassembly by looking at the program and being able to type OOOOOOOOOO, knowing that ten opcode instructions are on the screen. Considering that it used to take me about an hour to disassemble a 256-byte *DUMP listing, the time saving is enormous, and I can now do about four 256-byte pages in ten minutes. Theoretically, a whole 16K ROM could be done in about an hour and a half, though it is better to split it into sections - it is best to end a section after an RTS or JMP instruction. The output file can also grow very fast, at the rate of about 10 bytes per byte of machine code - decoding a ROM would take 160K of output files. I still intend to disassemble the MOS though, so that I can unravel its mysteries. I have decoded the part of the MOS which deals with OSWORDs 14 and 15 - the real-time clock code, and found the hardwired 1900-century code at &9881 in the Terminal ROM. The disassembler has enabled hacking to go into warp drive! Try it and see for yourself! Please feel free to request additional features, if they would be useful.
00000000 0d 54 68 65 20 72 65 73 75 6c 74 3a 0d 32 30 30 |.The result:.200| 00000010 30 20 50 48 50 0d 32 30 30 31 20 50 48 41 0d 32 |0 PHP.2001 PHA.2| 00000020 30 30 32 20 54 58 41 0d 32 30 30 33 20 50 48 41 |002 TXA.2003 PHA| 00000030 0d 32 30 30 34 20 4c 44 58 20 23 26 30 30 0d 32 |.2004 LDX #&00.2| 00000040 30 30 36 20 4c 44 41 20 26 32 30 31 36 2c 58 0d |006 LDA &2016,X.| 00000050 32 30 30 39 20 4a 53 52 20 26 46 46 45 45 0d 32 |2009 JSR &FFEE.2| 00000060 30 30 43 20 49 4e 58 0d 32 30 30 44 20 43 4d 50 |00C INX.200D CMP| 00000070 20 23 26 30 30 0d 32 30 30 46 20 42 4e 45 20 26 | #&00.200F BNE &| 00000080 46 35 0d 32 30 31 31 20 50 4c 41 0d 32 30 31 32 |F5.2011 PLA.2012| 00000090 20 54 41 58 0d 32 30 31 33 20 50 4c 41 0d 32 30 | TAX.2013 PLA.20| 000000a0 31 34 20 50 4c 50 0d 32 30 31 35 20 52 54 53 0d |14 PLP.2015 RTS.| 000000b0 32 30 31 36 20 45 51 55 53 20 22 48 65 6c 6c 6f |2016 EQUS "Hello| 000000c0 22 0d 32 30 31 42 20 45 51 55 57 20 26 30 44 30 |".201B EQUW &0D0| 000000d0 41 0d 32 30 31 44 20 45 51 55 42 20 26 30 30 20 |A.201D EQUB &00 | 000000e0 22 2e 22 0d 0d 4e 6f 74 65 20 74 68 61 74 20 74 |"."..Note that t| 000000f0 68 65 20 64 69 73 61 73 73 65 6d 62 6c 65 72 20 |he disassembler | 00000100 64 6f 65 73 20 6e 6f 74 20 61 73 73 69 67 6e 20 |does not assign | 00000110 6c 61 62 65 6c 73 20 6f 72 20 76 61 72 69 61 62 |labels or variab| 00000120 6c 65 20 6e 61 6d 65 73 2e 0d 0d 54 68 65 20 22 |le names...The "| 00000130 2e 22 20 61 66 74 65 72 20 61 6e 20 45 51 55 42 |." after an EQUB| 00000140 20 69 73 20 74 68 65 20 41 53 43 49 49 20 63 6f | is the ASCII co| 00000150 64 65 20 61 73 20 70 72 69 6e 74 65 64 20 62 79 |de as printed by| 00000160 20 2a 44 55 4d 50 20 28 22 2e 22 20 69 66 0d 3c | *DUMP ("." if.<| 00000170 33 32 20 6f 72 20 3e 31 32 36 29 2c 20 61 6e 64 |32 or >126), and| 00000180 20 69 73 20 70 72 6f 76 69 64 65 64 20 66 6f 72 | is provided for| 00000190 20 70 61 73 73 77 6f 72 64 20 70 72 6f 67 72 61 | password progra| 000001a0 6d 73 20 77 68 65 6e 20 6f 6e 65 20 63 68 61 72 |ms when one char| 000001b0 61 63 74 65 72 0d 61 74 20 61 20 74 69 6d 65 20 |acter.at a time | 000001c0 69 73 20 74 65 73 74 65 64 2e 20 20 54 68 65 20 |is tested. The | 000001d0 63 68 61 72 61 63 74 65 72 20 69 73 20 61 6c 73 |character is als| 000001e0 6f 20 70 72 69 6e 74 65 64 20 66 6f 6c 6c 6f 77 |o printed follow| 000001f0 69 6e 67 20 61 6e 0d 6f 70 63 6f 64 65 20 75 73 |ing an.opcode us| 00000200 69 6e 67 20 74 68 65 20 49 6d 6d 65 64 69 61 74 |ing the Immediat| 00000210 65 20 61 64 64 72 65 73 73 69 6e 67 20 6d 6f 64 |e addressing mod| 00000220 65 20 28 69 2e 65 2e 20 64 61 74 61 20 62 79 74 |e (i.e. data byt| 00000230 65 20 61 66 74 65 72 20 74 68 65 0d 69 6e 73 74 |e after the.inst| 00000240 72 75 63 74 69 6f 6e 29 2c 20 73 6f 20 74 68 61 |ruction), so tha| 00000250 74 20 22 4c 44 41 20 23 26 34 38 22 20 61 6e 64 |t "LDA #&48" and| 00000260 20 22 43 4d 50 20 23 26 36 35 22 20 64 65 6d 6f | "CMP #&65" demo| 00000270 6e 73 74 72 61 74 65 20 74 68 61 74 20 74 68 65 |nstrate that the| 00000280 0d 70 72 6f 67 72 61 6d 20 75 6e 64 65 72 20 73 |.program under s| 00000290 63 72 75 74 69 6e 79 20 6c 6f 61 64 73 20 22 48 |crutiny loads "H| 000002a0 22 20 69 6e 74 6f 20 74 68 65 20 61 63 63 75 6d |" into the accum| 000002b0 75 6c 61 74 6f 72 20 61 6e 64 20 63 6f 6d 70 61 |ulator and compa| 000002c0 72 65 73 0d 74 68 65 20 61 63 63 75 6d 75 6c 61 |res.the accumula| 000002d0 74 6f 72 20 77 69 74 68 20 22 65 22 20 72 65 73 |tor with "e" res| 000002e0 70 65 63 74 69 76 65 6c 79 2e 0d 0d 4f 66 20 63 |pectively...Of c| 000002f0 6f 75 72 73 65 2c 20 75 73 69 6e 67 20 74 68 65 |ourse, using the| 00000300 20 64 69 73 61 73 73 65 6d 62 6c 65 72 20 72 65 | disassembler re| 00000310 71 75 69 72 65 73 20 73 6f 6d 65 20 6b 6e 6f 77 |quires some know| 00000320 6c 65 64 67 65 20 6f 66 20 36 35 30 32 0d 6d 61 |ledge of 6502.ma| 00000330 63 68 69 6e 65 20 63 6f 64 65 2c 20 69 6e 20 6f |chine code, in o| 00000340 72 64 65 72 20 74 68 61 74 20 79 6f 75 20 63 61 |rder that you ca| 00000350 6e 20 64 69 73 63 65 72 6e 20 77 68 65 74 68 65 |n discern whethe| 00000360 72 20 74 68 65 20 63 75 72 72 65 6e 74 20 62 79 |r the current by| 00000370 74 65 0d 69 73 20 61 6e 20 6f 70 63 6f 64 65 20 |te.is an opcode | 00000380 6f 72 20 61 20 70 69 65 63 65 20 6f 66 20 64 61 |or a piece of da| 00000390 74 61 2c 20 61 6e 64 20 73 6f 20 74 68 61 74 20 |ta, and so that | 000003a0 79 6f 75 20 63 61 6e 20 61 63 68 69 65 76 65 20 |you can achieve | 000003b0 73 70 65 65 64 20 69 6e 0d 64 69 73 61 73 73 65 |speed in.disasse| 000003c0 6d 62 6c 79 20 62 79 20 6c 6f 6f 6b 69 6e 67 20 |mbly by looking | 000003d0 61 74 20 74 68 65 20 70 72 6f 67 72 61 6d 20 61 |at the program a| 000003e0 6e 64 20 62 65 69 6e 67 20 61 62 6c 65 20 74 6f |nd being able to| 000003f0 20 74 79 70 65 20 4f 4f 4f 4f 4f 4f 4f 4f 4f 4f | type OOOOOOOOOO| 00000400 2c 0d 6b 6e 6f 77 69 6e 67 20 74 68 61 74 20 74 |,.knowing that t| 00000410 65 6e 20 6f 70 63 6f 64 65 20 69 6e 73 74 72 75 |en opcode instru| 00000420 63 74 69 6f 6e 73 20 61 72 65 20 6f 6e 20 74 68 |ctions are on th| 00000430 65 20 73 63 72 65 65 6e 2e 0d 0d 43 6f 6e 73 69 |e screen...Consi| 00000440 64 65 72 69 6e 67 20 74 68 61 74 20 69 74 20 75 |dering that it u| 00000450 73 65 64 20 74 6f 20 74 61 6b 65 20 6d 65 20 61 |sed to take me a| 00000460 62 6f 75 74 20 61 6e 20 68 6f 75 72 20 74 6f 20 |bout an hour to | 00000470 64 69 73 61 73 73 65 6d 62 6c 65 20 61 0d 32 35 |disassemble a.25| 00000480 36 2d 62 79 74 65 20 2a 44 55 4d 50 20 6c 69 73 |6-byte *DUMP lis| 00000490 74 69 6e 67 2c 20 74 68 65 20 74 69 6d 65 20 73 |ting, the time s| 000004a0 61 76 69 6e 67 20 69 73 20 65 6e 6f 72 6d 6f 75 |aving is enormou| 000004b0 73 2c 20 61 6e 64 20 49 20 63 61 6e 20 6e 6f 77 |s, and I can now| 000004c0 20 64 6f 0d 61 62 6f 75 74 20 66 6f 75 72 20 32 | do.about four 2| 000004d0 35 36 2d 62 79 74 65 20 70 61 67 65 73 20 69 6e |56-byte pages in| 000004e0 20 74 65 6e 20 6d 69 6e 75 74 65 73 2e 20 20 54 | ten minutes. T| 000004f0 68 65 6f 72 65 74 69 63 61 6c 6c 79 2c 20 61 20 |heoretically, a | 00000500 77 68 6f 6c 65 20 31 36 4b 0d 52 4f 4d 20 63 6f |whole 16K.ROM co| 00000510 75 6c 64 20 62 65 20 64 6f 6e 65 20 69 6e 20 61 |uld be done in a| 00000520 62 6f 75 74 20 61 6e 20 68 6f 75 72 20 61 6e 64 |bout an hour and| 00000530 20 61 20 68 61 6c 66 2c 20 74 68 6f 75 67 68 20 | a half, though | 00000540 69 74 20 69 73 20 62 65 74 74 65 72 20 74 6f 0d |it is better to.| 00000550 73 70 6c 69 74 20 69 74 20 69 6e 74 6f 20 73 65 |split it into se| 00000560 63 74 69 6f 6e 73 20 2d 20 69 74 20 69 73 20 62 |ctions - it is b| 00000570 65 73 74 20 74 6f 20 65 6e 64 20 61 20 73 65 63 |est to end a sec| 00000580 74 69 6f 6e 20 61 66 74 65 72 20 61 6e 20 52 54 |tion after an RT| 00000590 53 20 6f 72 0d 4a 4d 50 20 69 6e 73 74 72 75 63 |S or.JMP instruc| 000005a0 74 69 6f 6e 2e 0d 0d 54 68 65 20 6f 75 74 70 75 |tion...The outpu| 000005b0 74 20 66 69 6c 65 20 63 61 6e 20 61 6c 73 6f 20 |t file can also | 000005c0 67 72 6f 77 20 76 65 72 79 20 66 61 73 74 2c 20 |grow very fast, | 000005d0 61 74 20 74 68 65 20 72 61 74 65 20 6f 66 20 61 |at the rate of a| 000005e0 62 6f 75 74 20 31 30 20 62 79 74 65 73 0d 70 65 |bout 10 bytes.pe| 000005f0 72 20 62 79 74 65 20 6f 66 20 6d 61 63 68 69 6e |r byte of machin| 00000600 65 20 63 6f 64 65 20 2d 20 64 65 63 6f 64 69 6e |e code - decodin| 00000610 67 20 61 20 52 4f 4d 20 77 6f 75 6c 64 20 74 61 |g a ROM would ta| 00000620 6b 65 20 31 36 30 4b 20 6f 66 20 6f 75 74 70 75 |ke 160K of outpu| 00000630 74 0d 66 69 6c 65 73 2e 20 20 49 20 73 74 69 6c |t.files. I stil| 00000640 6c 20 69 6e 74 65 6e 64 20 74 6f 20 64 69 73 61 |l intend to disa| 00000650 73 73 65 6d 62 6c 65 20 74 68 65 20 4d 4f 53 20 |ssemble the MOS | 00000660 74 68 6f 75 67 68 2c 20 73 6f 20 74 68 61 74 20 |though, so that | 00000670 49 20 63 61 6e 0d 75 6e 72 61 76 65 6c 20 69 74 |I can.unravel it| 00000680 73 20 6d 79 73 74 65 72 69 65 73 2e 20 20 49 20 |s mysteries. I | 00000690 68 61 76 65 20 64 65 63 6f 64 65 64 20 74 68 65 |have decoded the| 000006a0 20 70 61 72 74 20 6f 66 20 74 68 65 20 4d 4f 53 | part of the MOS| 000006b0 20 77 68 69 63 68 20 64 65 61 6c 73 0d 77 69 74 | which deals.wit| 000006c0 68 20 4f 53 57 4f 52 44 73 20 31 34 20 61 6e 64 |h OSWORDs 14 and| 000006d0 20 31 35 20 2d 20 74 68 65 20 72 65 61 6c 2d 74 | 15 - the real-t| 000006e0 69 6d 65 20 63 6c 6f 63 6b 20 63 6f 64 65 2c 20 |ime clock code, | 000006f0 61 6e 64 20 66 6f 75 6e 64 20 74 68 65 0d 68 61 |and found the.ha| 00000700 72 64 77 69 72 65 64 20 31 39 30 30 2d 63 65 6e |rdwired 1900-cen| 00000710 74 75 72 79 20 63 6f 64 65 20 61 74 20 26 39 38 |tury code at &98| 00000720 38 31 20 69 6e 20 74 68 65 20 54 65 72 6d 69 6e |81 in the Termin| 00000730 61 6c 20 52 4f 4d 2e 0d 0d 54 68 65 20 64 69 73 |al ROM...The dis| 00000740 61 73 73 65 6d 62 6c 65 72 20 68 61 73 20 65 6e |assembler has en| 00000750 61 62 6c 65 64 20 68 61 63 6b 69 6e 67 20 74 6f |abled hacking to| 00000760 20 67 6f 20 69 6e 74 6f 20 77 61 72 70 20 64 72 | go into warp dr| 00000770 69 76 65 21 20 20 54 72 79 20 69 74 20 61 6e 64 |ive! Try it and| 00000780 0d 73 65 65 20 66 6f 72 20 79 6f 75 72 73 65 6c |.see for yoursel| 00000790 66 21 0d 0d 50 6c 65 61 73 65 20 66 65 65 6c 20 |f!..Please feel | 000007a0 66 72 65 65 20 74 6f 20 72 65 71 75 65 73 74 20 |free to request | 000007b0 61 64 64 69 74 69 6f 6e 61 6c 20 66 65 61 74 75 |additional featu| 000007c0 72 65 73 2c 20 69 66 20 74 68 65 79 20 77 6f 75 |res, if they wou| 000007d0 6c 64 20 62 65 20 75 73 65 66 75 6c 2e 0d 0d |ld be useful...| 000007df