.org 0x000
jmp $0400
nop
jmp $0402
nop
nop
jmp $0404
sel rb0
...
.end
I took the disassembly generated with the included 8039dasm.Quote from: manopac on January 18, 2025, 01:16:19 PMmay I ask WHY you want to compile your own BIOS? :DBecause, the original BIOS won't work with what I'm attempting. Literally not at all (except for the processor, which will be compatible). But, I need a framework to modify, to the hardware I plan to use. And, I believe, the significant differences in code/hardware will avoid any legal issues, should Philips get wind of this project.
Quote from: bataais on January 18, 2025, 03:26:31 PMI use asm48 on osx, no problem with dis- and assembling the o2rom.bin..
https://github.com/daveho/asm48
it's a little different than asw, but I like it waaay more.
on mac, I disassembled with: ./8039dasm o2rom.bin 0 1024 > o2rom.a48
then added in the file:
.org 0
and at the end:
.end
assembling: ./asm48 -o o2rom_2.bin o2rom.a48
compared with hex editor, contents are the same
Quote from: TedFoolery on January 16, 2025, 05:18:18 PMI haven't used either of these tools in sometime, so not sure of specifics. The disassembly already exists here, though: https://atarihq.com/danb/files/o2romsrc.txt
I would get a hex editor and compare your compiled code with a working version and see where the differences are.
As for compiling, I think asw is the complier that inserts some instructions (like sel mb0, sel mb1) for you, whether you want it to or not. These get inserted when either jumping or returning across the 1k barrier I believe, so not sure if that applies here.
The compiled code may function properly, but it might be a few bytes bigger than expected and causing an error.
Also, for the bios, make sure you are compiling to the $000 - $399 address range.