NAME

SIRTX::VM::Assembler - module for assembling SIRTX VM code

VERSION

version v0.04

SYNOPSIS

use SIRTX::VM::Assembler;

my SIRTX::VM::Assembler $asm = SIRTX::VM::Assembler->new(in => $infile, out => $outfile);

$asm->run;

This package inherits from Data::Identifier::Interface::Userdata.

The syntax for the input files is described in details at https://sirtx.keep-cool.org/vm.html.

METHODS

new

my SIRTX::VM::Assembler $asm = SIRTX::VM::Assembler->new(in => $infile, out => $outfile);

(experimental)

Creates a new assembler object. This object can be used to convert code into byte code.

The following options are supported:

in

(required)

The input data as a filename or handle. If a handle the handle must allow seeking. Also attributes on the handle might be changed. It is best to avoid reusing the handle with other code.

out

(required)

The output to write the result to. The same aspects as for in apply.

run

$asm->run;

(experimental)

Runs the assembler.

dump

$asm->dump($filename);

(experimental)

Dumps data collected by "run".

AUTHOR

Löwenfelsen UG (haftungsbeschränkt) <support@loewenfelsen.net>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2024-2025 by Löwenfelsen UG (haftungsbeschränkt) <support@loewenfelsen.net>.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)