Acorn Arcade forums: Programming: A9home identification
|
A9home identification |
|
Phlamethrower (15:47 24/2/2008) jmb (20:07 24/2/2008) Phlamethrower (20:33 24/2/2008)
|
|
Jeffrey Lee |
Message #106514, posted by Phlamethrower at 15:47, 24/2/2008 |
Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff
Posts: 15100
|
Anyone know the value of CP15 register 0 for the A9home's CPU, or some other reliable way of working out whether code is running on an A9home?
If anyone owns an A9home and doesn't know what I'm talking about, this short BASIC program should (hopefully) tell you all I need to know:
DIM code% 128 P%=code% [ OPT 0 SWI "OS_EnterOS" MRC CP15,0,R0,C0,C0,0 MSR CPSR_c,#0 MOV R0,R0 MOV PC,R14 ] A%=USR code% PRINT ~A%
Cheers! |
|
[ Log in to reply ] |
|
JMB |
Message #106515, posted by jmb at 20:07, 24/2/2008, in reply to message #106514 |
Member
Posts: 467
|
Anyone know the value of CP15 register 0 for the A9home's CPU, or some other reliable way of working out whether code is running on an A9home? OS_ReadSysInfo 8 is your friend. See http://select.riscos.com/prm/core/osreadsysyinfo.html |
|
[ Log in to reply ] |
|
Jeffrey Lee |
Message #106516, posted by Phlamethrower at 20:33, 24/2/2008, in reply to message #106515 |
Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff
Posts: 15100
|
Yeah, that looks like it will do the trick.
Cheers! |
|
[ Log in to reply ] |
|
|
Acorn Arcade forums: Programming: A9home identification |