DASM
Classes
DASMIO/Hardware.pm File Reference

DCPU-16 execution environment - hardware profile initialisation. More...

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

Go to the source code of this file.

Classes

class  DASMIO::Hardware
 DCPU-16 execution environment - hardware profile initialisation. More...

Detailed Description

DCPU-16 execution environment - hardware profile initialisation.

This module provides the initialisation of the hardware mapped devices in the core of the DCPU-16 emulation. The mappings are defined in a hardware profile which describes the base address of the devices.

Each device is implemented by a device module in the directory DExecHW. An instance of the devices is created and attached to the addresses through a DExecHWAdapter. The adapter supplies the offset parameter to the device object, allowing multiple registers to be easily implemented in the device, despite not being known to the execution environment.

The hardware profiles take the form of lines in a file of the form:

  <address> <device> [ '(' <arguments> ')' ]

Comments are prefixed by a '#' character.

Devices may be registered in multiple locations with different arguments.

Each device has a window size, which it defines. This is the number of registers it provides and which will be allocated in the core.

Author:
Justin Fletcher

Definition in file Hardware.pm.