English
Language : 

S3CK225 Datasheet, PDF (90/256 Pages) Samsung semiconductor – CalmRISC 8-Bit CMOS MICROCONTROLLER
INSTRUCTION SET
AND SR0, #imm:8/OR SR0, #imm:8
Sets/resets bits in SR0 and stores the result back into SR0.
Operation
SR0 ← SR0 & #imm:8
SR0 ← SR0 | #imm:8
BANK #imm:2
Loads SR0[4:3] with #imm[1:0].
Operation
SR0[4:3] ← #imm[1:0]
MISCELLANEOUS INSTRUCTION
SWAP GPR, SPR
Swaps the values in GPR and SPR. SR0 and SR1 can NOT be used for this instruction.
No flag is updated, even though the destination is GPR.
Operation
temp ← SPR
SPR ← GPR
GPR ← temp
Example
SWAP R0, IDH
// assume IDH = 00h and R0 = 08h.
// after this, IDH = 08h and R0 = 00h.
PUSH REG
Saves REG in the stack (Pushes REG into stack).
REG = GPR, SPR
Operation
HS[sptr][7:0] ← REG and sptr ← sptr + 1
Example
PUSH R0
// assume R0 = 08h and sptr = 2h
// then HS[2][7:0] ← 08h and sptr ← 3h
S3CK225/FK225
7-26