-
Notifications
You must be signed in to change notification settings - Fork 1
Description
2 of them could be changed from reserved to ADC (Add Carry) and SBB (Sub Borrow). But instead of using the last flag bit, it does the addition or sub then buts the carry/borrow result in the LSB of rA.
So in order to do a true add with carry you would only need to do the following
Adding 32bit A r1/r2 to 32bit B r3/r4 (Destructive to A)
MOV r1 r5
ADD r1 r2
ADC r5 r2
ADD r3 r4
ADD r3 r5
So its 5 instructions instead of just 2... but that is shorter than out old that is 7 instructions, requires a branch, and only allows 15bit values, not 16bit.
The remaining 2 instructions I could leave them as reserved,,, or add a modified version of Inc and Dec that doesn't wrap the value around, so it has a floor or ceiling effect when hitting a bounds... ex you dec a 0, it stays 0,, inc ffff, it stays ffff.... not sure how useful this would be, so I am leaning towards leaving these two as reserved.