Difference between revisions of "OSBYTE &97"

From BeebWiki
Jump to: navigation, search
m (style)
(citation)
Line 6: Line 6:
 
;Warning
 
;Warning
  
Acorn MOS 1.20 writes the byte using STA &FE00,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.
+
Acorn MOS 1.20 writes the byte using STA &FE00,X. As it is an indexed-addressing instruction, the 6502 CPU always<ref name="64doc">Jarkko Sonninen ''et al.'' (1994), [http://rk.nvg.ntnu.no/bbc/doc/6502.txt 64doc]</ref> 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=&FFFFFE00 + offset, XY?4=byte.
 
A safer alternative is to call [[OSWORD &06]] with !XY=&FFFFFE00 + offset, XY?4=byte.
Line 14: Line 14:
  
 
[[User:Jgharston|Jgharston]] 22:08, 26 May 2009 (UTC)
 
[[User:Jgharston|Jgharston]] 22:08, 26 May 2009 (UTC)
 +
 +
==References==
 +
<references/>

Revision as of 12:42, 19 April 2016

OSBYTE &97 (151) - Write SHEILA

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

Acorn MOS 1.20 writes the byte using STA &FE00,X. As it is an indexed-addressing instruction, the 6502 CPU always[1] 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=&FFFFFE00 + offset, XY?4=byte.

See Also

Jgharston 22:08, 26 May 2009 (UTC)

References

  1. Jarkko Sonninen et al. (1994), 64doc