Module: Badline::InstructionSet::Flag
- Included in:
- Badline::InstructionSet
- Defined in:
- lib/badline/instruction_set/flag.rb
Instance Method Summary collapse
-
#clc(_addr, _value) ⇒ Object
Clear carry flag.
-
#cld(_addr, _value) ⇒ Object
Clear decimal mode flag.
-
#cli(_addr, _value) ⇒ Object
Clear interrupt disable flag.
-
#clv(_addr, _value) ⇒ Object
Clear overflow flag.
-
#sec(_addr, _value) ⇒ Object
Set carry flag.
-
#sed(_addr, _value) ⇒ Object
Set decimal mode flag.
-
#sei(_addr, _value) ⇒ Object
Set interrupt disable flag.
Instance Method Details
#clc(_addr, _value) ⇒ Object
Clear carry flag.
Opcodes:
$18 - implied - 2 cycles
10 11 12 |
# File 'lib/badline/instruction_set/flag.rb', line 10 def clc(_addr, _value) cycle { status.carry = false } end |
#cld(_addr, _value) ⇒ Object
Clear decimal mode flag.
Opcodes:
$D8 - implied - 2 cycles
18 19 20 |
# File 'lib/badline/instruction_set/flag.rb', line 18 def cld(_addr, _value) cycle { status.decimal = false } end |
#cli(_addr, _value) ⇒ Object
Clear interrupt disable flag.
Opcodes:
$58 - implied - 2 cycles
26 27 28 |
# File 'lib/badline/instruction_set/flag.rb', line 26 def cli(_addr, _value) cycle { status.interrupt = false } end |
#clv(_addr, _value) ⇒ Object
Clear overflow flag.
Opcodes:
$B8 - implied - 2 cycles
34 35 36 |
# File 'lib/badline/instruction_set/flag.rb', line 34 def clv(_addr, _value) cycle { status.overflow = false } end |
#sec(_addr, _value) ⇒ Object
Set carry flag.
Opcodes:
$38 - implied - 2 cycles
42 43 44 |
# File 'lib/badline/instruction_set/flag.rb', line 42 def sec(_addr, _value) cycle { status.carry = true } end |
#sed(_addr, _value) ⇒ Object
Set decimal mode flag.
Opcodes:
$F8 - implied - 2 cycles
50 51 52 |
# File 'lib/badline/instruction_set/flag.rb', line 50 def sed(_addr, _value) cycle { status.decimal = true } end |
#sei(_addr, _value) ⇒ Object
Set interrupt disable flag.
Opcodes:
$78 - implied - 2 cycles
58 59 60 |
# File 'lib/badline/instruction_set/flag.rb', line 58 def sei(_addr, _value) cycle { status.interrupt = true } end |