Anyway Loeliger. One of my favourite readings.
Here's a template I made for the inner loop. It contains no actual mnemonics because the idea is that to port it to a new platform, one just %defines the required bits, just leaving the platform dictionary to write.
COLON:
PUSH_I_2_RS ; PSH I -> RS
WA_2_I ; WA -> I
JMP_NEXT ; jmp NEXT
SEMI :
my_ca ; Code Address of SEMI
POP_RS_2_I ; POP RS -> I
NEXT:
DEREF_I_2_WA ; @I -> WA
I_2_NEXT_I ; I = I + 2
RUN:
DEREF_WA_2_CA ; @WA -> CA
WA_2_NEXT_WA ; WA = WA + 2
CA_2_PC ; CA -> PC ; implicit JMP CA
I've done the %defines and %macros for x86 now.
work in progress
I've got some nifty macros going there, NASM seems easy to use.
No comments:
Post a Comment