Folie feature request - inline replacement of constants
I find that my code is much more readable if I use defined constants instead of the raw addresses. Here are some extracts:
$8000 constant 32K $10000. 2constant 64K \ maximum word size \ ASCII control characters 00 constant -NULL ( Null character ) 01 constant -SOH ( Start of Header ) $0261 constant P8Base \ P7, P8 Registers (Base Address: 0260h) $0320 constant PJBase \ PJ Registers (Base Address: 0320h) $00 constant PxIN \ Port Px input P1IN 00h $02 constant PxOUT \ Port Px output P1OUT 02h $04 constant PxDIR \ Port Px direction P1DIR 04h
The disadvantage of this approach is that the constants use a lot of memory space, especially in small footprints.
Is there a way to include the constants as a macro in Folie instead of defining them inside mecrisp? Are there plans for other macro features in Folie?
Just an idea: Keep folie simple, just include the feature to start a script on the host computer. This way a macro-preprocessor (I write my own) would run as a separate program and be started before sending the sourcefile to the ARM-device.
That will also work if !send can call the macro-preprocessor for each file.
The default Folie will the need to include the
pre-process.exe - and pre-process -
scripts that will do nothing if not changed by the user.