I thought I'd start a thread on setting up a modern development environment for the Archie to see what other folks think. As I do most of my hobby coding whilst commuting on the train, it's not really feasible to use real hardware and as awesome as Arculator v2 is, I don't really want to write code inside the emulator itself as the tools of the era now really show their age.
My requirements are:
- Windows based
- Proper code editor
- Fast assembly direct to an executable binary
- Fast testing of output executable in an emulator
- VSCode as the editor
- vasm assembler built for Windows with the standard syntax module, ARM cpu module and simple binary output module
- Arculator v2 emulator (awesome)
- A simple make.bat batch file for assembly and copying to hostfs folder for rapid iteration in the emulator
Some gotchas / things that could be improved:
- I was using simonm's BeebAsm syntax highlighter plugin for VSCode but literally just installed an ARM assembly highlighter - will let you know how I get on!
- I could run the build commands from directly inside VSCode and/or use proper make - old habits die hard, I guess
- The standard syntax module for vasm takes a bit of getting used to - could potentially write my own BeebAsm / BBC Basic assembler syntax module...
- The worst part is that the ARM assembler in vasm has some bugs of which I've fixed a couple:
- mov reg, #imm sometimes results in using a non-obvious / unnecessary shift - fixed(ish)
- adrl just flat out didn't work at all - fixed
- sometimes the assembler fails to resolve all symbols after 8 passes due to an alignment issue - temporarily adding a mov r0,r0 NOP anywhere fixes it
- looks like conditional assembly flag is getting confused with the opcode mnemonic - e.g. adrleq is interpreted as adrle
- For now I'm just assembling one output binary but it is possible to build object files with vasm then link them with vlink
This has proven to be pretty efficient for me. My only missing feature is a debugger in the emulator but !DDT works reasonably well within RISCOS once you get used to the shortcuts, it's a bit slow though. Does anyone else have a similar setup or particular thoughts on this topic?
EDIT: I guess this could have been in the 'development tools' forum. I'll leave it up to the mods if they feel like moving it.