Here is how I test if a new part of an AMMX instruction work.
1. You can see on the left Sublime Text windows, my AMMX_Load macro file. Each instruction will own its own separated file (I'll create a file that will include all instructions files so only 1 file will have to be included in source code.
2. On the Right Sublime Text window you can see source code used to test the MACRO.
In that example you can see the full
Load VAL(An,Dm),Dn replaced by AMMX_Load VAL,(An,Dm),Dn
A comma was inserted because in Devpac Macro, only comma create separation between arguments.
3. Under WinUAE (On the right), I compile the test (execute build that simply do a : GenAm FROM test.asm TO test.exe)
4. Then I run Flype's Nemo tool with the same Load
5. And Finally, on my PC, I open the compiled test.exe file and check between the two "TEST" available in the binary if the AMMX instruction was correctly coded.
And it works.
Now, the AMMX_Load command support all variants I know there is (if some are missing, please tell me so I can insert them). :
ADRW is a 16 bit value
ADRL is a 32 bit value.
Auto adjustement for 16bit/32bit value is done so Load instruction value is coded to the depth you entered. If you entered 128 or -1024 it will be 16 bits, if you enter 131072 or -120000 it will be 32 bits.
An are A0-A7 registers
Dm are D0-D7 registers
Dn are D0-D7 registers.
With this 1st MACRO completed, I have setup a system structure that all me to have the "base" about how I will construct the others MACROS to complete the AMMX instructions sets in Devpac 3.x .
This system did evolve several time during the coding process for this 1st MACRO to reach the optimized way I have done. It's maybe not the faster (maybe someone will find a faster compilation methodology), but it do the job and I have sub-Macroed recursive style checkings to optimize source code and allow an easy implementation of new
I have also setup a way to handle the variable amount of arguments we can use depending on what is requester (this macro handle, for example, from 2 "(An),Dn" up to 4 "ADRw/L(An,Dm),Dn" parameters. and I check by increment from 2 to 4 parameters.
This show me that it is possible to create Macro to add support for AMMX 68080 instructions set inside Devpac 3.x with really low changes (a single comma to handle direct value) to achieve the job.