browser

Modes

modes
calendarsave
axy supports three different "modes", encoded with an instruction opcode by applying bit mask on the last three bytes, like this: 11001100 => $CC -> ADDx │││└└└└└ base opcode ($0C) ││└ mode y not set │└ mode x set ($40) └ mode a set ($80) The first bit identifies an instruction if it is set. If it isn't set, then the value is a small integer between 0 and 127 which gets immediately pushed on the stack. The second and third bit are used to specify that the instruction operates with register x and/or y. In this case, the final opcode will be $CC, which is an ADD instruction ($0C | $80) with mode x set (ADDx). === Modes x and y (register modes) If mode x or y are set, the corresponding 8-bit register will be used, typically instead of popping an argument from the stack (like for ADDx or SUBy), and in some cases as a "destination" for the result of an instruction (such as for POPx or POPy). If both modes are specified, both registers will be used in some way, typically as two arguments for an instruction.