log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Elsear brings super-fast Networking to Risc PC/A7000/A7000+ (News:)
- Latest hardware upgrade from RISCOSbits (News:)
- RISC OS London Show Report 2024 (News:1)
- Announcing the TIB 2024 Advent Calendar (News:1)
- Code GCC produces that makes you cry #12684 (Prog:39)
- RISCOSbits releases a new laptop solution (News:)
- Rougol November 2024 meeting on monday (News:)
- Drag'n'Drop 14i1 edition reviewed (News:)
- WROCC November 2024 talk o...ay - Andrew Rawnsley (ROD) (News:2)
- October 2024 News Summary (News:3)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
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
PhlamethrowerHot 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
PhlamethrowerHot 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