Professional Documents
Culture Documents
LANGUAGE
INSTRUCTIONS
ASSEMBLY LANGUAGE SYNTAX
• The data memory used with C5X processors is split into 512 pages
each of 128 words long. The data memory page pointer (DP) in ST0
holds the address of the current data memory page.
• In the direct addressing mode of C5X, only lower-order 7 bits of the
address are specified in the instruction. The upper 9 bits are taken
from the DP.
Memory-Mapped Register Addressing
• The RAM area in page 0 is used for storing some of the registers,
interrupt vector addresses and so on.
• These locations can be accessed by specifying the actual address or by
the register name, (e.g., the AR0 can either be denoted by the actual
memory location (10h) used for storing its value or by the symbol
AR0).
• Since these memory locations can be interchangeably used with the
register names, the registers corresponding to page 0 are referred to as
memory-mapped registers (MMRs).
• The memory-mapped register addressing mode operates like the direct
addressing mode, except that the 9 MSBs of the address are forced to 0
instead of being loaded with the contents of the DP.
• The following instructions operate in the memory mapped register
addressing mode. Using these instructions does not affect the contents
of the DP:
• LAMM—Load accumulator with memory-mapped register
• LMMR—Load memory-mapped register
• SAMM—Store accumulator in memory-mapped register
• SMMR—Store memory-mapped register
Immediate Addressing
• When this instruction is executed, the contents of the TOS are copied
to the program counter (PC).
• The stack is popped one level after the contents are copied.
• The RET instruction is used with the CALA, CALL and CC
instructions for subroutines.
• For the RPTB instruction, the register block repeat count register
(BRCR) determines the number of times a block of instructions is
repeatedly executed.
• It should be loaded before the RPTB instruction is used.
• The PASR and PAER registers give the starting and ending address of
the block of instructions
PERIPHERAL CONTROL
• IN and OUT Instructions
• The IN instruction of C5X reads a 16-bit number from input port and
stores it in the data memory location.
• The OUT instruction of C5X reads a 16-bit number from data memory
and writes it onto the output port.
• Instructions Used with Interrupts
• The core of C5X consists of the following on-chip devices: serial port,
TDM serial port, timer, software programmable wait state generators,
I/O ports and divide by one clock circuit. They are controlled using
memory mapped registers