Input / Output
The instructions in this section are included for completeness, but are not usable in user privileged code. Attempting to use anoutinstruction will trigger a reset andinwill return garbage.
Reads a byte from the port located at a 16-bit address formed by the value in a and imm8. The upper byte of the address is the value in a, and the lower byte is imm8. The byte read from the port is then stored in a.
- Opcode:
11011011imm8 - Bytes: 2
- Flags:
- None
- Cycles: 2F + 1R
Reads a byte from the port located at the 16-bit address in bc, which is then stored at the address in hl. Both b and hl are decremented, and the Z flag is set if b is decremented to 0.
- Opcode:
1110110110101010 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + 1R + 1W + 1
Reads a byte from the port located at the 16-bit address in bc, which is then stored at the address in hl. Both b and hl are decremented, and the Z flag is set if b is decremented to 0. This operation is repeated until b is equal to 0.
- Opcode:
1110110110111010 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + (1R + 1W + 1) * b
Reads a byte from the port located at the 16-bit address in de, which is then stored at the address in hl. Both bc and hl are decremented, and the Z flag is set if bc is decremented to 0. This operation is repeated until bc is equal to 0.
- Opcode:
1110110111001010 - Bytes: 2
- Flags:
- Z: Set if
bcis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + (1R + 1W + 1) * bc
Reads a byte from the port located at the 16-bit address in bc, which is then stored at the address in hl. Both b, c, and hl are decremented, and the Z flag is set if b is decremented to 0.
- Opcode:
1110110110001100 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + 1R + 1W + 1
Reads a byte from the port located at the 16-bit address in de, which is then stored at the address in hl. Both bc, de, and hl are decremented, and the Z flag is set if bc is decremented to 0. This operation is repeated until bc is equal to 0.
- Opcode:
1110110110011100 - Bytes: 2
- Flags:
- Z: Set if
bcis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + (1R + 1W + 1) * bc
Reads a byte from port c, which is then stored at the address in hl. Both b, c, and hl are decremented, and the Z flag is set if b is decremented to 0.
- Opcode:
1110110110001010 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + 1R + 1W + 1
Reads a byte from port c, which is then stored at the address in hl. Both b, c, and hl are decremented, and the Z flag is set if b is decremented to 0. This operation is repeated until b is equal to 0.
- Opcode:
1110110110011010 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + (1R + 1W + 1) * b
Reads a byte from the port located at the 16-bit address in bc, which is then stored at the address in hl. Then, b is decremented and hl is incremented by 1, and the Z flag is set if b is decremented to 0.
- Opcode:
1110110110100010 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + 1R + 1W + 1
Reads a byte from the port located at the 16-bit address in bc, which is then stored at the address in hl. Then, b is decremented and hl is incremented by 1, and the Z flag is set if b is decremented to 0. This operation is repeated until b is equal to 0.
- Opcode:
1110110110110010 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + (1R + 1W + 1) * b
Reads a byte from the port located at the 16-bit address in de, which is then stored at the address in hl. Then, bc is decremented and hl is incremented by 1, and the Z flag is set if bc is decremented to 0. This operation is repeated until bc is equal to 0.
- Opcode:
1110110111000010 - Bytes: 2
- Flags:
- Z: Set if
bcis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + (1R + 1W + 1) * bc
Reads a byte from the port located at the 16-bit address in bc, which is then stored at the address in hl. Then, b is decremented and c and hl are both incremented by 1, and the Z flag is set if b is decremented to 0.
- Opcode:
1110110110000100 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + 1R + 1W + 1
Reads a byte from the port located at the 16-bit address in de, which is then stored at the address in hl. Then, bc is decremented and de and hl are both incremented by 1, and the Z flag is set if bc is decremented to 0. This operation is repeated until bc is equal to 0.
- Opcode:
1110110110010100 - Bytes: 2
- Flags:
- Z: Set if
bcis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + (1R + 1W + 1) * bc
Reads a byte from port c, which is then stored at the address in hl. Then, b is decremented and c and hl are both incremented by 1, and the Z flag is set if b is decremented to 0.
- Opcode:
1110110110000010 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + 1R + 1W + 1
Reads a byte from port c, which is then stored at the address in hl. Then, b is decremented and c and hl are both incremented by 1, and the Z flag is set if b is decremented to 0. This operation is repeated until b is equal to 0.
- Opcode:
1110110110010010 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + (1R + 1W + 1) * b
Outputs the value pointed to by hl to port c. Both b, c, and hl are decremented, and the Z flag is set if b is decremented to 0.
- Opcode:
1110110110001011 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + 1R + 1W + 1
Outputs the value pointed to by hl to port c. Both b, c, and hl are decremented, and the Z flag is set if b is decremented to 0. This operation is repeated until b is equal to 0.
- Opcode:
1110110110011011 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + (1R + 1W + 1) * b
Outputs the value pointed to by hl to the port located at the 16-bit address in de. Both bc and hl are decremented, and the Z flag is set if bc is decremented to 0. This operation is repeated until bc is equal to 0.
- Opcode:
1110110111001011 - Bytes: 2
- Flags:
- Z: Set if
bcis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + (1R + 1W + 1) * bc
Outputs the value pointed to by hl to port c. Then, b is decremented and c and hl are both incremented by 1, and the Z flag is set if b is decremented to 0.
- Opcode:
1110110110000011 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + 1R + 1W + 1
Outputs the value pointed to by hl to port c. Then, b is decremented and c and hl are both incremented by 1, and the Z flag is set if b is decremented to 0. This operation is repeated until b is equal to 0.
- Opcode:
1110110110010011 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + (1R + 1W + 1) * b
Outputs the value pointed to by hl to the port located at the 16-bit address in de. Then, bc is decremented and hl is incremented by 1, and the Z flag is set if bc is decremented to 0. This operation is repeated until bc is equal to 0.
- Opcode:
1110110111000011 - Bytes: 2
- Flags:
- Z: Set if
bcis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + (1R + 1W + 1) * bc
Outputs the value in a to the port located at a 16-bit address formed by the value in a and imm8. The upper byte of the address is the value in a, and the lower byte is imm8.
- Opcode:
11010011imm8 - Bytes: 2
- Flags:
- None
- Cycles: 2F + 1W
Outputs the byte in reg8 to the port located at the 16-bit address in bc.
-
Opcode:
1110110101reg8001Register Bit Field a111b000c001d010e011h100l101 -
Bytes: 2
-
Flags:
- None
-
Cycles: 2F + 1R
Outputs the value in reg8 to port imm8.
- Opcode:
1110110100reg8001imm8Register Bit Field a111b000c001d010e011h100l101 - Bytes: 3
- Flags:
- None
- Cycles: 3F + 1W
Outputs the value pointed to by hl to the port located at the 16-bit address in bc. Both b and hl are decremented, and the Z flag is set if b is decremented to 0.
- Opcode:
1110110110101011 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + 1R + 1W + 1
Outputs the value pointed to by hl to the port located at the 16-bit address in bc. Both b and hl are decremented, and the Z flag is set if b is decremented to 0. This operation is repeated until b is equal to 0.
- Opcode:
1110110110111011 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + (1R + 1W + 1) * b
Outputs the value pointed to by hl to the port located at the 16-bit address in bc. Both b, c, and hl are decremented, and the Z flag is set if b is decremented to 0.
- Opcode:
1110110110101100 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + 1R + 1W + 1
Outputs the value pointed to by hl to the port located at the 16-bit address in de. Both bc, de, and hl are decremented, and the Z flag is set if bc is decremented to 0. This operation is repeated until bc is equal to 0.
- Opcode:
1110110110111100 - Bytes: 2
- Flags:
- Z: Set if
bcis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + (1R + 1W + 1) * bc
Outputs the value pointed to by hl to the port located at the 16-bit address in bc. Then, b is decremented and hl is incremented by 1, and the Z flag is set if b is decremented to 0.
- Opcode:
1110110110100011 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + 1R + 1W + 1
Outputs the value pointed to by hl to the port located at the 16-bit address in bc. Then, b is decremented and hl is incremented by 1, and the Z flag is set if b is decremented to 0. This operation is repeated until b is equal to 0.
- Opcode:
1110110110110011 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + (1R + 1W + 1) * b
Outputs the value pointed to by hl to the port located at the 16-bit address in bc. Then, b is decremented and c and hl are both incremented by 1, and the Z flag is set if b is decremented to 0.
- Opcode:
1110110110100100 - Bytes: 2
- Flags:
- Z: Set if
bis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + 1R + 1W + 1
Outputs the value pointed to by hl to the port located at the 16-bit address in de. Then, bc is decremented and de and hl are both incremented by 1, and the Z flag is set if bc is decremented to 0. This operation is repeated until bc is equal to 0.
- Opcode:
1110110110110100 - Bytes: 2
- Flags:
- Z: Set if
bcis decremented to 0, reset otherwise - N: Set if msb of data is 1, reset otherwise
- Z: Set if
- Cycles: 2F + (1R + 1W + 1) * bc