Skip to content

Use for the 2 or 4 reserved operations in ALU0 #6

@LTDS-Capo

Description

@LTDS-Capo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions