We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS
SEV: Difference between revisions
From SnesLab
(RTS) |
(SEP example) |
||
Line 1: | Line 1: | ||
SEV (SEt Overflow) is a mnemonic for a non-existant 6502 instruction. | SEV (SEt Overflow) is a mnemonic for a non-existant 6502 instruction. | ||
To set the [[overflow flag]], consider using [[SEP]] or [[BIT]]. | To set the [[overflow flag]], consider using [[SEP]] or [[BIT]]. Like this: | ||
<pre> | |||
SEP #$40 | |||
</pre> | |||
A common way is to use BIT on the address of a byte in ROM that has bit 6 set, like an [[RTS]].<sup>[1]</sup> | A common way is to use BIT on the address of a byte in ROM that has bit 6 set, like an [[RTS]].<sup>[1]</sup> |
Revision as of 15:49, 24 July 2024
SEV (SEt Overflow) is a mnemonic for a non-existant 6502 instruction.
To set the overflow flag, consider using SEP or BIT. Like this:
SEP #$40
A common way is to use BIT on the address of a byte in ROM that has bit 6 set, like an RTS.[1]