not logged in | [Login]
add(reg, val) add val to register
reg = reg + val
add(regA, regB, val) add val to regB and put result into regA
regA = regB + val
regA can be same as regB i.e.
add(r0, r1, 3)
add(r0, r0, 3)
adc(regA, regB) add with carry - regA + regb +
regA = regB + 1
carry over flag holds bit that spills over the top of 32 from current, a previous operation? anyway, far as i can tell = regA + regB + 1 in every test
*sub(reg, val) subtract val from register
'reg = reg-val`
will switch the high bit to signify a negative result care with pointer operations required
sub(regA, regB, val) subtract val from regB and put into regA (regB can be same as regA)
regA = regB + val
sbc(regA, regB)* subtract with carry - regA-regB(-1 if carry flag is clear)
mul(regA, regB) multiply regA by regB result into regA
regA = regA * regB
_overflow? how is it handled?
neg(regA, regB) negative - make regB negative and move into regA (overwrite) (regB can be same as regA)
regA = -regB
neg(regA, regA)
will just make regA negative, without affecting anything else
Last edited by Peter Hinch, 2015-03-11 15:02:24