Class: N65::Segment
- Inherits:
-
InstructionBase
- Object
- InstructionBase
- N65::Segment
- Defined in:
- lib/n65/directives/segment.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#exec(assembler) ⇒ Object
Execute the segment and bank change on the assembler.
-
#initialize(segment, bank) ⇒ Segment
constructor
Initialize with filename.
- #to_s ⇒ Object
Methods inherited from InstructionBase
Constructor Details
#initialize(segment, bank) ⇒ Segment
Initialize with filename
16 17 18 19 |
# File 'lib/n65/directives/segment.rb', line 16 def initialize(segment, bank) @bank = bank @segment = segment end |
Class Method Details
Instance Method Details
#exec(assembler) ⇒ Object
Execute the segment and bank change on the assembler
22 23 24 25 |
# File 'lib/n65/directives/segment.rb', line 22 def exec(assembler) assembler.current_segment = @segment assembler.current_bank = @bank end |
#to_s ⇒ Object
27 28 29 |
# File 'lib/n65/directives/segment.rb', line 27 def to_s ".segment #{@segment} #{@bank}" end |