I was wondering if anyone has written any cross platform software before for multiple incompatible CPUs... an example being: 6502 + 8086 + z80... perhaps more can be added: 68000?
Anyone want to expand on this and prove it works by filling in the Hello World printing code?
| nop | jr | jp/jmp | call/jsr | and a |
z80 | 00 | 18 xx | c3 | cd | a7 |
6502 | ea | - | 4c | 20 | - |
8086 | | eb xx | | | |
bad clashes:
- &00: z80 'nop' is 'brk' in 6502
- &ea: 6502 'nop' is 'jp pe' in z80
- &c3: z80 'jp xxxx' is 'dcm' in 6502
good clashes:
- &18: z80 'jr xx' is 'clc' in 6502 and 'sbb' in 8086
- &eb: 8086 'jr xx' is 'ex de,hl' in z80 and 'sbc xx' in 6502
manageable clashes:
- &4c: 6502 'jmp xxxx' is 'ld c,h' in z80
- &cd: z80 'call xxxx' is 'cmp' in 6502
- &a7: z80 'and a' is 'lax ab' in 6502 and 'cmpsw' in 8086
- &20: 6502 'jsr xxxx' is 'jr nz xxxx' in z80 and 'and' in 8086