Showing changes from revision #3 to #4:
Added | Removed | Changed
R1 points to a block containing the following:
Offset | Contents |
---|---|
+0 | This is where the OS jumps when the variable is to be written. Will normally be a branch instruction |
+4 | This is where the OS jumps when the variable is to be read – your code may start here |
Entry | |
---|---|
R2 | Length of value |
Exit | |
---|---|
R1, R2, R4, R10, R11 & R12 may be corrupted |
Entry | |
---|---|
- | - |
Exit | |
---|---|
Pointer to value | |
May be corrupted | |
Length of value |
The two entry points are called in SVC mode, so if you call a SWI then R14 will be corrupted.
Note that OS_ReadVarVal is marked as being re-entrant, so in theory your code could be called while threaded. However, the PRM makes no mention of this, neither warning that it could happen, nor stating that the kernel makes sure that it does not happen.