Electronics > Projects, Designs, and Technical Stuff
Found a weird old computer dumpster diving. (z80?)
grumpydoc:
--- Quote from: rstofer on March 30, 2020, 12:32:14 am ---The point is, the LXI H, is never executed it is there simply to trip up the disassembler. It looks like the start of a code block because it follows a RET but it is not really an entry point.
--- End quote ---
Of course if you wish to deliberately get a disassembler out of sync any instruction which takes an operand placed before a block of code will do it.
However it will only consistently confuse simple disassemblers - more sophisticated ones which aim to build a list of entry points by scanning for jumps and calls will be harder to trick with this technique.
As I said the BDOS code and a similar block is not intended to confuse disassemblers (though it might do so) - it is there to turn a block of
--- Code: ---ep1: ld r, const1
jr next_step
ep2: ld r, const2
jr next_step
ep3: ld r, const3
jr next_step
...
next_step:
--- End code ---
into
--- Code: ---ep1: ld r, const1
db 0x21 ; fall through eating the 8 bit load immediately following - r should not be H or L, obviously
ep2: ld r, const2
db 0x21 ; fall through
ep3: ld r, const3
db 0x21 ; fall through
...
next_step:
--- End code ---
It saves a byte per entry point and is primarily about code density over execution speed (and clarity, until you recognise the trick).
T3sl4co1l:
Also easy to find if it's only ever done with the 0x21 byte.
Tim
greenpossum:
--- Quote from: james_s on March 29, 2020, 11:53:00 pm ---If you want to dump the ROM, pick up a TL866, unless you have a lot of free time and want to hook up something like an Arduino Mega.
--- End quote ---
Plus OP will need the burner if intending to make his own *EPROM.
SiliconWizard:
--- Quote from: greenpossum on March 30, 2020, 07:00:32 am ---
--- Quote from: james_s on March 29, 2020, 11:53:00 pm ---If you want to dump the ROM, pick up a TL866, unless you have a lot of free time and want to hook up something like an Arduino Mega.
--- End quote ---
Plus OP will need the burner if intending to make his own *EPROM.
--- End quote ---
That's why I suggested the OP to replace it with a Flash chip. All you'd need is a TL866 which can handle these fine (check the one you select is supported) No need to mess with UV erasers and such.
I've done that to restore a Sinclair QL.
As I said before, I think reverse-engineering the address decoding on the board would be much faster than trying to figure it out from the disassembled code (I haven't seen any PAL/GAL, only discrete logic?), but in any case, a programmer such as a TL866 will come handy.
tsvisimcha:
Will this work? https://m.aliexpress.com/item/32951386262.html?pid=808_0000_0101&spm=a2g0n.search-amp.list.32951386262&aff_trace_key=&aff_platform=msite&m_page_id=7316amp-6U1iuuFAU6RA7PUPX_omKQ1585583972595&browser_id=e9767940aded429aa2f1e4fb52beaf99&is_c=Y
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version