Class: C8dasm::Comment8
- Inherits:
-
CommentBase
- Object
- CommentBase
- C8dasm::Comment8
- Defined in:
- lib/c8dasm/comments/comment8.rb
Instance Method Summary collapse
Methods inherited from CommentBase
#initialize, #kk, #nnn, #x, #y
Constructor Details
This class inherits a constructor from C8dasm::CommentBase
Instance Method Details
#to_s ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/c8dasm/comments/comment8.rb', line 5 def to_s case @opcode[3] when '0' "Set V#{x} = V#{y}." when '2' "Set V#{x} = V#{x} AND V#{y}." when '3' "Set V#{x} = V#{x} XOR V#{y}." when '4' "Set V#{x} = V#{x} + V#{y}, set VF = carry." when '5' "Set V#{x} = V#{x} - V#{y}, set VF = NOT borrow." when '6' "Set V#{x} = V#{y} SHR 1." when 'e' "Set V#{x} = V#{y} SHL 1." end end |