Class: N65::ASCII
- Inherits:
-
InstructionBase
- Object
- InstructionBase
- N65::ASCII
- Defined in:
- lib/n65/directives/ascii.rb
Overview
This directive to include bytes
Class Method Summary collapse
-
.parse(line) ⇒ Object
Try to parse an incbin directive.
Instance Method Summary collapse
-
#exec(assembler) ⇒ Object
Execute on the assembler.
-
#initialize(string) ⇒ ASCII
constructor
Initialize with filename.
-
#to_s ⇒ Object
Display.
Methods inherited from InstructionBase
Constructor Details
#initialize(string) ⇒ ASCII
Initialize with filename
22 23 24 |
# File 'lib/n65/directives/ascii.rb', line 22 def initialize(string) @string = string end |
Class Method Details
Instance Method Details
#exec(assembler) ⇒ Object
Execute on the assembler
29 30 31 |
# File 'lib/n65/directives/ascii.rb', line 29 def exec(assembler) assembler.write_memory(@string.bytes) end |
#to_s ⇒ Object
Display
36 37 38 |
# File 'lib/n65/directives/ascii.rb', line 36 def to_s ".ascii \"#{@string}\"" end |