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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 1 | 0 | 1 | Imm9 | SND |
This is the complementary instruction to the IN opcode.
This opcode takes the SND operand and writes it to the I/O register space at the address given by the 9-bit Imm9 field.
Unimplemented addresses are not reported (no trap/error).
OUT does not affect the Carry, Sign or Zero flags.
However writing to the I/O space can have all kinds of side effects, be careful where you write.
This is a core operation that supports only the Imm9 format, with no condition/inhibition.
No indirect/register address form is provided, keeping decoding as fast as possible. This could change in the future (with a PF option? with a dedicated IO index register?) but so far, it's already enough (and messy) to get it going.
OUT 123 R3 ; write the contents of R3 to the IO register #123