Download ETEC Assembler Reference Manual

Transcript
8. Parameter RAM Accesses
8.4
Address Nomenclature
All addresses are specified using the nearly universal byte mode. For instance, consider
the following memory dump.
The following read puts 0x6C7D4C85 into the P register.
ram p31_0 <- sprm0x0.
The following read puts 0x3CB12500 into the P register.
ram p31_0 <- sprm0x4.
8.5
diob Register Relative Accesses
The diob register can be used as a pointer for - PRAM accesses, as follows.
// Read the value from PRAM
// pointed to by the diob register
// into the P register
ram p <- by diob.
ram p -> by diob++.
// Post Increment
ram p -> by --diob.
// Pre-decrement
Fie ld: STC
8.6
Clearing Parameter RAM and Registers
Data RAM and the P or diob registers can be cleared (set to zero), as follows. Note that
when data RAM is being cleared, the size information is required as part of the opcode.
// Clear the diob register
ram diob <- #0.
// Clear some Channel RAM
ram #0 -> prm0x20, p_access_8.
ram #0 -> prm0x21, p_access_24.
ram #0 -> prm0x20, p_access_32.
Freescale Syntax
(C) 2007-2015
Assembler Reference Manual, page 45