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
- PinBoard 2.05 released (News:2)
- Rougol Talk July 2024 - Nathan Atkinson (News:2)
- Rougol August 2024 meeting on monday (News:)
- Rougol July 2024 meeting on monday (News:2)
- Sunday coding session with Gerph on Sunday (News:1)
- Livestream coding session with Gerph this sunday (News:2)
- WROCC July 2024 meeting - Draw/ROD double bill (News:)
- WROCC July 2024 meeting on... Hughes and Peter Richmond (News:)
- July developer 'fireside' chat is on saturday night (News:)
- June 2024 News Summary (News:)
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: Some OS_Byte corrupt flags
 
  Some OS_Byte corrupt flags
  sirbod (00:45 28/8/2015)
 
Jon Abbott Message #123709, posted by sirbod at 00:45, 28/8/2015
Member
Posts: 563
Whilst trying to track down why some games corrupt the screen, I finally tracked it down to reliance on a bug in RISCOS:

OS_Byte 19 always clears C

The PRM doesn't mention C, so I believe it should be preserved across the SWI.

I've confirmed C is always cleared on Arthur, RO2, RO3.11, RO3.71 and RO5 RC14 (which is obviously allowed) and I suspect it's cleared on all RO versions.

Z and N flags are preserved.

This got me wondering if this was a wider issue with OS_Byte, so I started testing all OS_Byte on RO3.11:

0..4 - clear C
5 - sets C
6..19 - clear C (Cascade relies on this behaviour for 19)
20 - sets C
21 - clears C
25 - sets C
70..71 - set C
106..117 - clears C
118..120 - set C
121 - clears C
122 - set C
124..128 - clears C
129,0,255 - clears C
129,1,0 - sets C
129,128,255 - clears C
134..135 - set C

EDIT: I'm not going to test any further, it looks like C isn't preserved across OS_Byte - unless I missed that in the PRM, I'm guessing it's a bug, possibly introduced due to OS_Byte 138, 145, 152 and 153 needing to alter C

EDIT2: For the purposes of ADFFS, I think I'll preserve C across all OS_Byte except for 138, 145, 152 and 153 and forcibly clear C across 19 to match pre-RO5 - which is the root cause of the problem I'm seeing in some games.

[Edited by sirbod at 16:21, 16/11/2016]
  ^[ Log in to reply ]
 

Acorn Arcade forums: Programming: Some OS_Byte corrupt flags