Assembler generates OPL output
Posted: Mon Jan 30, 2023 7:56 am
I've just added a feature to the 6303 Psion macro assembler (https://github.com/blackjetrock/psion-org2-assembler) that outputs OPL code with the assembled machine code in it. It might be useful to someone...
So, if you have this example code:
and you assemble it, you get (as well as other output files), a file with this in it:
It's easily customised by altering the assembler Tcl source.
Andrew
So, if you have this example code:
Code: Select all
MUL ;Multiplies A and B together.
XGDX ;Put result in X ;
RTS ;Return
Code: Select all
mult%:(M%,N%)
LOCAL MC$(3)
MC$=CHR$($3d)
MC$=MC$+CHR$($18)
MC$=MC$+CHR$($39)
RETURN USR(ADDR(MC$)+1,M%*256+N%)
Andrew