NAME
Language::Zcode::Parser::Routine - A single Z-code subroutine
SYNOPSIS
# New routine at address $start, ends at $end
my $routine = new Language::Zcode::Parser::Routine $address;
$routine->end($end);
# Now actually parse it
$routine => parse();
# ... and look at the parsed commands (which are simple hashes, not objects)
my @commands = $routine->commands();
print map {$_->{opcode_address}, " ", $_->{opcode}, "\n"} @commands;
DESCRIPTION
A set of Z-code commands at a given address.
new (address)
Create a new subroutine at given address. The Z-code will not be parsed until a parse() command is explicitly given.
address (val)
get/set start address of the subroutine
end (val)
get/set end address (including padding zeroes!) of the subroutine
last_command_address (val)
get/set address of last command in the subroutine (needed because "end" may include padding zeroes)
locals (list of values)
get/set default values of this sub's local variables (returns list, not ref)
commands (list of values)
get/set parsed Z-code commands in this sub (returns list, not ref)
txd_commands (list of values)
get/set commands in this sub as returned by the txd Z-code parsing program, to compare with my Pure Perl results. (returns list, not ref)
parse()
Parse (and store) the commands in this sub