Difference between revisions of "OSBYTE &93"

From BeebWiki
Jump to: navigation, search
(reinstate warning (see Talk:OSBYTE &97))
m (style)
Line 4: Line 4:
 
     X=offset within page &FC and Y=byte to write
 
     X=offset within page &FC and Y=byte to write
  
'''Warning:''' Acorn MOS 1.20 writes the byte using STA &FC00,X. As it is an indexed-addressing instruction, the 6502 CPU (always) performs a dummy read immediately before the write. Some hardware, though not all, may operate inappropriately due to the dummy read: outputs could momentarily be set to the wrong level, or an interrupt condition could be cleared and lost. Review the datasheet for the hardware being accessed to see whether it will be adversely affected.
+
;Warning
 +
 
 +
Acorn MOS 1.20 writes the byte using STA &FC00,X. As it is an indexed-addressing instruction, the 6502 CPU (always) performs a dummy read immediately before the write. Some hardware, though not all, may operate inappropriately due to the dummy read: outputs could momentarily be set to the wrong level, or an interrupt condition could be cleared and lost. Review the datasheet for the hardware being accessed to see whether it will be adversely affected.
  
 
A safer alternative is to call [[OSWORD &06]] with !XY=&FFFFFC00 + offset, XY?4=byte.
 
A safer alternative is to call [[OSWORD &06]] with !XY=&FFFFFC00 + offset, XY?4=byte.

Revision as of 18:06, 18 April 2016

OSBYTE &93 (147) - Write FRED

   X=offset within page &FC and Y=byte to write
Warning

Acorn MOS 1.20 writes the byte using STA &FC00,X. As it is an indexed-addressing instruction, the 6502 CPU (always) performs a dummy read immediately before the write. Some hardware, though not all, may operate inappropriately due to the dummy read: outputs could momentarily be set to the wrong level, or an interrupt condition could be cleared and lost. Review the datasheet for the hardware being accessed to see whether it will be adversely affected.

A safer alternative is to call OSWORD &06 with !XY=&FFFFFC00 + offset, XY?4=byte.

See Also

Jgharston 22:04, 26 May 2009 (UTC)