Open Textmode opened 13 years ago
we've now documented the existing opcodes for easier review.
I've made the mathematical Instructions MOD, DIV, SUB, MUL, and ADD have variants targeting both ACC and RET, which should alleviate some strain.
Added alternate MOV forms: 'MOV nn,B', 'MOV &nn,B', and 'MOV B, &nn'. so A is no longer the only 'clearing house' register.
we'll probably have to revise the conditional instructions to key off relevant flags. Its been suggested that CMP is basically a SUB that doesn't store a value. Its also been pointed out that mathematical operators generally just store their result in the first parm, rather than targeting another register.
Its been suggested that having both an A and an ACC is unconventional and Potentially confusing.
yeah, I'm probably going to have to cave and add a stack (and the StackSegment and StackPointer registers)
That and Call/Ret instructions. opspace Vs. code space...at 64k, codespace wins...
Made structural changes to how opcodes are handled, it should be much easier to revise them now (should be just a matter of updating the numbers in 'opcodes.lua', and reassembling any affected asm segments)
The Instruction Set Architecture is, frankly, horrendous. There's many obvious omissions, and numerous "magic registers". In many cases you have no choice but to work with specific registers (such as 'MOV nn, A' being basically the only defined op that places a number in any register). Its a minor miracle anything can be written at all!