BLUE
kissa.bsky.social
@kissa.bsky.social
Tomfoolery, nincompoopery, programming
37 followers374 following39 posts
kissa.bsky.social

Good two hours reserved for today, let's continue with immediate instructions. Since we have augmented mode too, there's quite a bunch of these. Instructions that logically take only 1 argument don't make sense, such as INC/DEC, and some potential ones like NEG, NOT, CLR. Except for MOV.

Immediate instructions with 16-bit operand (32-47), plus augmented ones (48-63)

(Details omitted due to space constraints)

addi op1, op2, imm16 ; op1 <- op2 + imm16   00100000
subi
muli
divi
modi
andi
ori
xori
shli
shri
add1i
sub1i
movi

addai op1, imm16     ; op1 <- op2 + imm16   00110000
subai
mulai
divai
modai
andai
orai
xorai
shlai
shrai
incai
decai
nopai
1

kissa.bsky.social

I'm deliberately making a 1:1 mapping between names and opcodes to make assembling and disassembling easier. I may have to walk back on this decision later. It makes more complex names for often used instructions: addai a, 1234 ; a: augmented assignment, b: immediate addab a, 10 ; b: byte immediate

1
kissa.bsky.social
@kissa.bsky.social
Tomfoolery, nincompoopery, programming
37 followers374 following39 posts