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
- WROCC Newsletter Volume 41:11 reviewed (News:)
- WROCC March 2024 meeting o... Hughes and Peter Richmond (News:1)
- Rougol March 2024 meeting on monday with Bernard Boase (News:)
- Drag'n'Drop 13i2 edition reviewed (News:)
- South-West Show 2024 talks (News:4)
- February 2024 News Summary (News:1)
- Next developer fireside chat (News:)
- DDE31d released (News:)
- South-West Show 2024 Report (News:)
- South-West Show 2024 in pictures (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
The Icon Bar: Programming: Some OS_Byte corrupt flags
 
  Some OS_Byte corrupt flags
  sirbod (23:45 27/8/2015)
 
Jon Abbott Message #123709, posted by sirbod at 23:45, 27/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 ]
 

The Icon Bar: Programming: Some OS_Byte corrupt flags