Closed smdjeff closed 20 hours ago
Can you post the binary file?
Actually maybe I'm just not understanding the syntax. If I want to skip the first 0x53FF bytes and then start disassembly as if 0x5400 was 0x0000 how do you do that? I can't seem to find the combination.
What you could try is put a 'b0000' first, then 'c5400'. You'll get a load of binary dump, and then your binary. The skip command is really for handling zeroed data and will fail if the skipped bytes are not zero. Do you want the code disasm to have address 0x0000 when dumped from 0x5400? The myriad ways that embedded systems connect up ROMs to CPUs makes it an interesting problem with many corner cases!
If you don't need the first 0x5400 bytes from the ROM image then you could just "tail" the file, something like "tail -c +21505 romset.bin > 5400romset.bin"
And then just 'c5400' will treat the start of the file as being address 0x5400.
But I can see it might be useful for the skip command to be able to skip any data not just zero data, although the purpose of the skip is more when generating assembler output.
Of course it's rare to have an image that starts somewhere other than 0, but in my case I actually have a Z80 image that downloads to a 8035. So that's why I was looking at the 'c' command to start at 0x5400. romset.bin.zip
OK, thanks, I think I have an idea or two. In the meantime you could try the tail trick?
This should now be fixed in commit 9633dae.
Testing with your romset.bin with the command file
fromset.bin
>5400
c0000
e01ff
produces this:
dasm48 -- Intel MCS-48 (8048, 8049) Disassembler --
-----------------------------------------------------------------
; Processing "romset.bin" (49152 bytes)
; File offset: 0x5400
; Disassembly start address: 0x0000
; String terminator: 0x00
___CL_0001:
0000: E5 SEL MB0
0001: 04 0E JMP 0000EH
0003: 15 DIS I
0004: 00 NOP
0005: 00 NOP
0006: 93 RETR
0007: 35 DIS TCNTI
0008: 00 NOP
0009: 00 NOP
000A: 93 RETR
000B: 02 OUTL BUS, A
000C: 05 EN I
000D: 61 ADD A, @R1
000E: 27 CLR A
000F: 3A OUTL P2, A
0010: 15 DIS I
0011: 35 DIS TCNTI
0012: 65 STOP TCNT
0013: 55 STRT T
0014: 75 ENT0 CLK
0015: E5 SEL MB0
0016: 23 10 MOV A, #010H
0018: D7 MOV PSW, A
0019: A5 CLR F1
001A: B5 CPL F1
001B: 23 7F MOV A, #07FH
... etc ...
It seems that c5400 results in an output that says it's disassembling at 0x5400 but those bytes are from 0x0000