Continuing my search for a way to convert the Missile Command disassembly to beebasm, I have decided to use 6502Bench to export for cc65 and then convert that to beebasm.
It doesn't export the addresses, and I haven't included an assembler to find what addresses things should be but so far, I have only found one thing that throws things off. If the cc65 asm uses an absolute addressing instruction where the same could have been done with a zero page addressing mode, beebasm will generate one byte less. Fortunately, cc65 has an expression/label/something prefix of a: to say 16 bit address, so when I see this I add a NOP after the instruction with a comment to make them easy to find later.
I have used this and the only differences is where this has happened and the opcode has been changed to ZP addressing and the &00 byte replaced with &EA (NIOP).
Read the code at your own risk!
Mostly basic C++ with one auto and a few for(:)s.
Zip includes a VS2019 project and solution.
Local labels mean that scopes have to be added to the code, but making them from the nearest global variables before and after seems to work.
There are a few other tricky bits, like variables and what there scopes are. These sometimes require the same variable to be declared locally and globally, but beebasm seems happy. They also need redefining when they get redefined!
.faraddr is a three byte value, which I split into three separate bytes in an EQUB.
.setcpu just generates a comment of whatever the string was.
.asciiz should be a C style NULL terminated string, but this isn't used and I haven't supported it.
I may have missed some other things, as I have never used cc65 assembler, but they should hopefully be trivial to add if anyone ever wants to.
Converter from cc65 asm to beebasm
discuss pc<>acorn file transfer issues and the use of other utils
Return to “software & utilities for the pc, mac or unix”
Jump to
- announcements, events and introductions
- ↳ announcements
- ↳ archived announcements
- ↳ acorn & bbc micro user group (abug) events
- ↳ past all-day virtual ABugs
- ↳ past weeknight 'general' acorn sessions
- ↳ past weeknight 'developer' sessions
- ↳ past acorn preservation team sessions
- ↳ past physical ABug events (UK)
- ↳ past physical ABug events (Canada)
- ↳ other events + general event chat
- ↳ past events & exhibitions
- ↳ introduce yourself
- 8-bit acorn
- ↳ 8-bit acorn software: classic games
- ↳ 8-bit acorn software: classic adventure games
- ↳ 8-bit acorn software: games - high scores
- ↳ 8-bit acorn software: other
- ↳ 8-bit acorn hardware
- ↳ 8-bit acorn emulators
- ↳ acorn atom and acorn system series
- the retro software forum
- ↳ new releases: games
- ↳ new bbc and electron games from 'retro software'
- ↳ trickysoft (new bbc micro games)
- ↳ bitshifters (new bbc master games)
- ↳ educraft (new bbc master games)
- ↳ miscellaneous new bbc and electron games
- ↳ new acorn atom games & conversions
- ↳ new acorn atom games made with agd
- ↳ new risc os games and conversions
- ↳ conversions of acorn games to non-acorn platforms
- ↳ new projects in development: games
- ↳ new projects and releases: text and graphic adventures
- ↳ new projects and releases: demoscene
- ↳ new ideas wishlist & general chat
- ↳ programming
- ↳ development tools
- 32-bit acorn
- ↳ 32-bit acorn software: classic games
- ↳ 32-bit acorn software: other
- ↳ 32-bit acorn hardware
- ↳ 32-bit acorn software: RISC iX
- ↳ 32-bit acorn emulators
- websites & archives
- ↳ stardot FORUM
- ↳ the complete BBC games archive
- ↳ archive issues
- ↳ archive requests
- ↳ archive submissions
- ↳ software preservation
- ↳ scanning of books, magazines, ads and letters
- ↳ coordination of magazine scanning projects
- miscellaneous
- ↳ Econet and Econet over IP
- ↳ communications
- ↳ software & utilities for the pc, mac or unix
- ↳ modern implementations of classic programming languages
- ↳ general
- ↳ other vintage hardware, software and languages
- ↳ off-topic
- archives
- ↳ ezboard
- ↳ general
- ↳ adventures
- ↳ problems
- ↳ requests
- ↳ polls
- ↳ wanted
- ↳ for sale