Here's the problem, I'm porting my SWR utils to be able to be used on the Electron, which means that I have to use a different method for selecting the RAM bank, so
a different block of code.
Handling the above situation is not too much of a problem I can just use something like :
Code:
if (Electron=1)
lda ROMPageElk ; Page out basic
sta RomSel
sta ROMPageElk
lda OurID ; Retieve our ROM id
sta RomSel ; Save here first
sta ROMPageElk ; then page rom
else
lda OurID ; Retieve our ROM id
sta RomSel ; Save here first
sta ROMPage ; then page rom
endif
This works, however the only place I seem to be able to define a variable is within another source file. What I would like to be able to do is define it on the command line (as you can in C) something like :
Code:
beebasm -i Ramutils.asm -DElectron=0 -v > RamUtils.txt
beebasm -i Ramutils.asm -DElectron=1 -v > RamUtils.txt
That way I could build both with the same Makefile, without having to edit source files.
If there is another way to do this I'm quite happy to use that too.
Cheers.
Phill.