DASM
Classes
DASMIO/Source.pm File Reference

DASM DCPU-16 source assembler class. More...

#include "DASM.pm"
#include "DCPU.pm"
#include "Carp.pm"

Go to the source code of this file.

Classes

class  DASMIO::Source
 DASM DCPU-16 source assembler class. More...

Detailed Description

DASM DCPU-16 source assembler class.

This class provides the implementation of the source code assembler for DASM.

The files we support end in '.dasm'.

Source file format:

[<label>]    <opcode>       <operand a>, <operand b>
[<label>]    <ext-opcode>   <operand>
; <comment>

It also provides a disassembler which can produce source code which can be passed back to the assembler. If the source comes from one of the binary formats that doesn't offer relocations or symblols, the content will be more difficult to parse interpret, but should still work.

The structures we use are intended to be able to support libraries of relocatable, partially linked code. This has not yet been tested and the lack of any indication of which symbols are local and which are imported may be a problem in the future.

In addition to the 1.1 DCPU-16 specification, the assembler supports:

Note:
We should really consider changing the structure so that the DASMIO objects inherit from a parser class, rather than having to reference `$self->{'dasm'}` for parser operations like error().
Author:
Justin Fletcher

Definition in file Source.pm.