06 Jul 2019 22:46:02 UTC
- Distribution: CPU-Z80-Assembler
- Module version: 2.18
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (445 / 0 / 6)
- KwaliteeBus factor: 1
- 97.18% Coverage
- License: perl_5
- Perl: v5.10.0
- Activity24 month
- Download (155.54KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:1 non-PAUSE userPSCUST Paulo Custodio
- BUGS and FEEDBACK
- SEE ALSO
- AUTHORS, COPYRIGHT and LICENCE
CPU::Z80::Assembler::Opcode - Represents one assembly expression to be computed at link time
use CPU::Z80::Assembler::Opcode; $opcode = CPU::Z80::Assembler::Opcode->new( address => 0, line => $line, child => [byte, byte, ["type", $expr]]); $value = $opcode->evaluate; $bytes = $opcode->bytes($address, \%symbol_table); $size = $opcode->size;
This module defines the class that represents one assembly instruction to be added to the object code. The instruction can contain references to CPU::Z80::Assembler::Expr expressions that are computed at link time.
Creates a new object.
Address where this opcode is loaded, computed at link time.
The number of children is the number of bytes stored in the object code for this instruction.
Each child is either a scalar containing the byte value to be added to the object code, or a CPU::Z80::Assembler::Expr expression to be evaluated at link time. In case of a word expression, then a special undef value is used as a placeholder to keep the
childlist the correct size.
Get/set the line - text, file name and line number where the token was read.
Called when opcode is referred to by a label, returns the opcode address.
$bytes = $opcode->bytes($address, \%symbol_table);
Computes all the expressions in
childand returns the bytes string with the result object code.
$size = $opcode->size;
Return the number of bytes that this opcode will generate.
Module Install Instructions
To install CPU::Z80::Assembler, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install CPU::Z80::Assembler
For more information on module installation, please visit the detailed CPAN module installation guide.