1
0
mirror of https://github.com/safiire/n65.git synced 2024-12-13 06:29:16 +00:00
n65/lib/instruction_base.rb
2015-03-29 10:19:19 -07:00

30 lines
532 B
Ruby

module N65
class InstructionBase
#####
## Sort of a "pure virtual" class method, not really tho.
def self.parse(line)
fail(NotImplementedError, "#{self.class.name} must implement self.parse")
end
####
## Does this instruction have unresolved symbols?
def unresolved_symbols?
false
end
####
## Another method subclasses will be expected to implement
def exec(assembler)
fail(NotImplementedError, "#{self.class.name} must implement exec")
end
end
end