DASM
|
DCPU-16 assembler I/O functions for reading and writing address dumps. More...
Public Member Functions | |
Public Functions | |
retval | new (scalar proto, scalar dasm) |
Create an object upon which we can work. | |
retval | identify (scalar self, scalar filename, scalar type) |
Identify whether we can handle reading or writing a given file by its filename. | |
retval | extensions () |
List the extensions we support. | |
retval | read (scalar self, scalar content, scalar filename) |
Read an address dump and populate our core. | |
retval | write (scalar self) |
Write an address dump from our core. |
DCPU-16 assembler I/O functions for reading and writing address dumps.
Address dumps consist of address prefixed word values, eg:
0000 : 1234
or multiple word values:
0000 : 1234 5678 abce
Address dumps contain no symbols or relocation data. They are just text dumps of the content.
Definition at line 40 of file Address.pm.
retval DASMIO::Address::extensions | ( | ) |
retval DASMIO::Address::identify | ( | scalar | self, |
scalar | filename, | ||
scalar | type | ||
) |
Identify whether we can handle reading or writing a given file by its filename.
[in] | $self | Address object |
[in] | $filename | Filename we're accessing |
[in] | $type | 'read' or 'write' |
1 | if we can access it |
0 | if we cannot access it |
retval DASMIO::Address::new | ( | scalar | proto, |
scalar | dasm | ||
) |
Create an object upon which we can work.
[in] | $proto | Prototype object, or this class's name |
[in] | $dasm | DASM object we're working on |
retval DASMIO::Address::read | ( | scalar | self, |
scalar | content, | ||
scalar | filename | ||
) |
Read an address dump and populate our core.
[in] | $self | Address object |
[in] | $content | Content to parse |
[in] | $filename | File it came from |
retval DASMIO::Address::write | ( | scalar | self | ) |
Write an address dump from our core.
In order to write an address dump, we need to force a resolve of all of the symbols. If there are any symbols that cannot be resolved, that's a fatal error - because they would write out as 0s.
[in] | $self | Address object |