FIM
Detailed Description
The 8 bits of immediate data (word 2) are loaded into the named register pair. The register pairs are defined within the opcode as shown below:
Example program
/ Example program
org ram
fim 2 254
end
This will load the 8-bit decimal value 254 into the register pair 2 & 3.
After execution, register 2 will contain the upper 4 bits of the value 254, with register 3 containing the lower 4 bits i.e. 15 and 14 respectively.
This is because decimal 254 is represented as 0xFE, so register 2 will contain 0xF (decimal 15), while register 3 will contain 0xE (decimal 14).