Created dim. 29 oct. 2023 23:40:23 CET by whygee@f-cpu.org PRELIMINARY / WORK IN PROGRESS
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | 1 | 0 | 0 | 0 | N | CND3 | SRI | SND | ||||||
1 | CND2 | Imm4 | |||||||||||||
1 | IMM8 |
This opcode takes the SRI operand and computes a boolean multiplication (masking) with the SND operand, then writes the result back into SND.
If the destination register (SND unless instructed otherwise by PF) is PC, this performs a jump. But it's pretty dumb.
AND affects the Sign and Zero flags but not the Carry.
This is a core operation that supports all 3 types of operand for SRI:
AND R1 R2 ; R2 = R2 & R1 AND 123 R3 ; R3 = R3 & 123 ; mask R2's bits into R1 if external bit 1 is set AND R2 R1 IF0 ; keep only bit 1 of R3 if the last result was positive AND 2 R3 IFNS