CPSR_flg in Arm assembler
Chris Dewhurst (1709) 167 posts |
Hi all, The page at: http://www.heyrick.co.uk/armwiki/The_Status_register which is linked from a page on this site <https://www.riscosopen.org/wiki/documentation/show/Converting%20older%20software%20to%20run%20on%2032%20bit%20systems> says: To set the V flag without affecting the control bits: When I try putting this instruction into an assembly program to test it out: 10DIM code 50 and RUN it I get the error “Missing , at line 40”. What am I doing wrong? Can anyone help me out please? Thanks :) |
Chris Dewhurst (1709) 167 posts |
Update: a quick Google for Arm in general brings up references to CPSR_f |
Jeffrey Lee (213) 6048 posts |
I’m fairly certain BASIC’s syntax is based around ARM’s official syntax – so CPSR_f would be correct. In fact you can have any combination of c, x, s, f (in that order). ‘c’ writes to the ‘control’ bits (0-7), ‘x’ to the ‘extension’ bits (8-15), ‘s’ to the ‘status’ bits (16-23), and ‘f’ to the ‘flags’ bits (24-31) |
Rick Murray (539) 13840 posts |
I think that is old fashioned code rather than modern code. ARM have a tendency to rename stuff (re. UAL). That code and examples worked on the RiscPC. But today….? |
Chris Dewhurst (1709) 167 posts |
Thanks guys. Having played around a bit I’ve confirmed it definitely is CPSR_f. The confusion has arisen because RISC OS open are linking to this page from their “Converting older software to run on 32 bit systems” page so I assumed (wrongly) that the heyrick.co.uk page was about programming on modern RISC OS machines, which it doesn’t seem to be on second reading. Chris. |
Rick Murray (539) 13840 posts |
Depends, I guess, on your definition of “modern”. ;-) I have updated the page to mention the ‘current’ way of referring to the CPSR and note that “_all”, “_flg”, and “_ctl” are to be considered obsolete. |