Class: C8dasm::Asmf

Inherits:
AsmBase show all
Defined in:
lib/c8dasm/assemblies/asmf.rb

Instance Method Summary collapse

Methods inherited from AsmBase

#initialize, #kk, #nnn, #x, #y

Constructor Details

This class inherits a constructor from C8dasm::AsmBase

Instance Method Details

#to_sObject



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/c8dasm/assemblies/asmf.rb', line 5

def to_s
  case kk
  when '07' then "LD V#{x}, DT"
  when '0a' then "LD V#{x}, KEY"
  when '15' then "LD DT, V#{x}"
  when '18' then "LD ST, V#{x}"
  when '1e' then "ADD I, V#{x}"
  when '29' then "LD F, V#{x}"
  when '33' then "LD B, V#{x}"
  when '55' then "LD [I], V#{x}"
  when '65' then "LD V#{x}, [I]"
  end
end