Skip to content
SashaCrofter edited this page Jul 24, 2012 · 2 revisions

The Hardware Manager is designed to be run to place a layer of abstraction between the software and connected hardware. HWM detects known hardware and maps their port numbers to memory locations, which are accessible through labels. For example, to send a hardware interrupt to a connected LEM1802, one might normally use the command HWI 0, or HWI 1. This might change between emulators and ingame, however. HWM allows such syntax as HWI [LEM1802].

Supported Hardware

*Items marked with an asterisk do not have intialization routines called automatically.

Subroutines

HWM

Maps the ports of all recognized hardware to specific points in memory, which are accessible through labels. Upon recognizing a piece of hardware, it will map it to a memory location and do an automatic JSR to a label of the form HWinit.x, where x is the name of the hardware recognized in either full form (HWinit.LEM1802) or definition camel case (HWinit.GenericClock) if the name of the hardware cannot be represented by labels in its full form.

HWF.LEM1802

Finds the LEM1802 in as few cycles as possible and sets the memory location at the label LEM1802 to its port number without mapping other hardware. This is intended to be run at boottime in order to quickly start the monitor and display a boot screen. Under development

pushReg

Pushes all registers to the stack.

popReg

Pops all registers from the stack, then pops PC from the stack. This must be called by SET PC, popReg. Otherwise, the registers will be popped incorrectly.

Clone this wiki locally