class GB::DmgOps::Operation

Included Modules

Defined in:

crab/gb/update_opcodes.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def assign_extra_integers : Array(String) #

set u8, u16, and i8 if necessary


[View source]
def branch(cond : String, body : Array(String)) : Array(String) #

create a branch condition


[View source]
def codegen : Array(String) #

generate the code required to process this operation


[View source]
def cycles : UInt8 #

[View source]
def cycles=(cycles : UInt8) #

[View source]
def cycles_branch : UInt8 #

[View source]
def cycles_branch=(cycles_branch : UInt8) #

[View source]
def flags : Flags #

[View source]
def flags=(flags : Flags) #

[View source]
def group : Group #

read the group as a Group enum


[View source]
def length : UInt8 #

[View source]
def length=(length : UInt8) #

[View source]
def name : String #

[View source]
def name=(name : String) #

[View source]
def normalize_operand(operand : String) : String #

normalize an operand to work with the existing cpu methods/fields


[View source]
def operands : Array(String) #

read the operation operands from the name


[View source]
def set_flag_c(o : Object) : Array(String) #

set flag c to the given value if specified by this operation


[View source]
def set_flag_c!(o : Object) : Array(String) #

set flag c to the given value


[View source]
def set_flag_h(o : Object) : Array(String) #

set flag h to the given value if specified by this operation


[View source]
def set_flag_h!(o : Object) : Array(String) #

set flag h to the given value


[View source]
def set_flag_n(o : Object) : Array(String) #

set flag n to the given value if specified by this operation


[View source]
def set_flag_n!(o : Object) : Array(String) #

set flag n to the given value


[View source]
def set_flag_z(o : Object) : Array(String) #

set flag z to the given value if specified by this operation


[View source]
def set_flag_z!(o : Object) : Array(String) #

set flag z to the given value


[View source]
def set_reset_flags : Array(String) #

generate code to set/reset flags if necessary


[View source]
def type : String #

read the operation type from the name


[View source]