cpm - How can I relocate CP/M BDOS to a custom memory address? -
maybe it's newbie cp/m question, anyway ... possible relocate cp/m bdos? have hardware i've written bios for, able use cpm 2.2. bdos (seen disassembling it) uses fixed addresses. since don't know cp/m well, have no idea how place cp/m bdos start address. (somewhat ugly!) solution figure out: found cp/m disassembly list, i've modified "org" directive , re-assembled it. there other way, eg cp/m utilty? , if so, how can that, since bdos uses jp, call etc opcodes (sorry familiar z80, not original 8080 assembly) it's not pc independent. thanks!
no need disassembly; original cp/m source code available (and, yes, bdos , else resident assembly, not pl/m). within "cp/m 2.2 original source" offered there should find both os3bdos.asm , os3bdos1.asm. these both different released versions of cp/m 2.2 bdos source (see readme.txt); should able adjust org
, rebuild either of them, using assembler provided in archive.
alternatively can use the movcpm tool (also included in archive). it's intended relocate bdos , supplied bios there's nothing stop replacing bios after fact.
possibly of interest if you'd prefer write cross-relocator: a quick bit of research, interesting bit bdos source:
if test org 0dc00h else org 0800h endif
why bdos ever @ 0800
on useful machine? why dc00
'test' address? because relocation handled trivially: bdos built once @ 0800
, once @ dc00
. through binary compare of 2 builds differences must correct addresses need inserted, , difference original org
value tells how calculate value insert.
Comments
Post a Comment