Datasheet

ARMulator Reference
ARM DUI0058D Copyright © 1999-2001 ARM Limited. All rights reserved. 4-5
4.2.2 ARMulif_GetReg
This function reads a register for a specified processor mode.
Syntax
ARMword ARMulif_GetReg(RDI_ModuleDesc *mdesc, ARMword mode, unsigned reg)
where:
mdesc
is the handle for the core.
mode
is the processor mode. Values for mode are defined in
armdefs.h
(see
Mode numbers on page 4-4).
reg
is the register to read. Valid values are 0 to 14 for registers r0 to r14, PC,
or CPSR.
Return
The function returns the value in the given register for the specified mode.
4.2.3 ARMulif_SetReg
This function writes a register for a specified processor mode.
Syntax
void ARMulif_SetReg(RDI_ModuleDesc *mdesc, ARMword mode,
unsigned reg, ARMword value)
where:
mdesc
is the handle for the core.
mode
is the processor mode. Mode numbers are defined in
armdefs.h
(see Mode
numbers on page 4-4).
reg
is the register to write. Valid values are 0 to 14 for registers r0 to r14, PC,
or CPSR.
value
is the value to be written to register
reg
for the specified processor mode.
Usage
You can use this function to write to any of the general purpose registers r0 to r14, the
PC, or CPSR.