Paulo Custodio > CPU-Z80-Disassembler-0.04 > CPU::Z80::Disassembler::Label

Download:
CPU-Z80-Disassembler-0.04.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.04   Source  

NAME ^

CPU::Z80::Disassembler::Label - Label used in the disassembled program

SYNOPSYS ^

  $label = CPU::Z80::Disassembler::Label->new($addr, $name, @from_addr);
  $label->add_refer(@from_addr);
  my @refer = $label->refer_from;
  print $label->label_string;
  print $label->equ_string;

DESCRIPTION ^

Represents one label in the disassembled program. The label contains a name, an address and a list of addresses of opcodes that refer to it.

FUNCTIONS ^

new

Creates a new object.

name

Gets/sets the label name.

comment

Gets/sets the comment to add to the definition of the label.

addr

Gets the label address. The address cannot be modified.

add_refer

Add the given addresses as references to this label, i.e. places from where this label is used.

refer_from

Return the list of all addresses from which this label is used.

label_string

Returns the string to be used in an assembly file to define this label at the current location counter:

  LABEL:            ; COMMENT

equ_string

Returns the string to be used in an assembly file to define this label as a constant:

  LABEL equ ADDR    ; COMMENT

BUGS, FEEDBACK, AUTHORS, COPYRIGHT and LICENCE ^

See CPU::Z80::Disassembler.

syntax highlighting: