INC
Detailed Description
The address contained within the specified register pair designates either a particular DATA RAM data character, a DATA RAM status character, a RAM output port, or a ROM input/output port. However, the address designates all of these simultaneously; it is up to the programmer to then write the correct I/O or RAM instruction to access the proper entity.
The disassembly of the instruction below shows how the register pair are represented in the opcode.
The register specified in the lower 4 bits of the instruction is incremented by 1. The carry bit will remain unchanged. If the register specified contains a value of 0b1111 and an INC instruction is applied, the register will contain a value of 0b0000, but the carry bit will remain unchanged
Example program
/ Example program
/ Loads the Accumulator with a value of 2
/ places that value in Register 6
/ increments Register 6
/ Register 6 contains a value of 3
org ram
ld 2
xch 6
inc 6
end