Astrobe's SYSTEM offers easy access to the PC, LNK, SP, and FP registers, both readable and writable, which is very -- very! -- useful to muck around with separate stacks for each process, exception handling (errors, faults), and other low level code of that nature.
To separate the process stacks (thread mode) from the stack used by the exception handlers (handler mode), access to the PSP, MSP, and CONTROL registers is required. It would be useful to access these registers without resorting to EMIT wizardry.
Would it be a big effort to extend SYSTEM accordingly (SYSTEM.PSP, SYSTEM.MSP, SYSTEM.CONTROL)?
And, extending the question, what about the other Special Registers (PSR, PRIMASK and friends)?
SYSTEM Extensions
-
- Site Admin
- Posts: 525
- Joined: Fri Dec 31, 2010 12:30 pm
- Contact:
Re: SYSTEM Extensions
The reason we provided SYSTEM.EMIT was to enable you to implement rarely-used system functions like this for yourself. There was a similar, but different, request in the past - see the topic titled SYSTEM function for special register for more information.