DASM
DExecHW::SimpleKey Class Reference

HW implementation for 'SimpleKey'. More...

List of all members.

Public Member Functions

Public Functions
retval new (scalar proto, scalar object)
 Construct a new hardware device object.
retval start (scalar self)
 Start up the hardware.
retval stop (scalar self)
 Stop the hardware.
retval window (scalar self)
 Return the size of of the implementation.
retval read (scalar self, scalar offset, scalar exec)
 Read value.
retval write (scalar self, scalar offset, scalar exec, scalar value)
 Write value.
retval symbol (scalar self, scalar offset)
 Get the symbol name for an offset.

Detailed Description

HW implementation for 'SimpleKey'.

A very simple key input.

2 words are provided (little endian):

Offset Name Meaning
+0 Read read a key, or 0 if none available
+1 Count number of characters available

The characters available are dequeued by reading the Read register. Every read of the Read register will queue any new characters for reading.

Writing to any register has no effect.

Definition at line 46 of file SimpleKey.pm.


Member Function Documentation

retval DExecHW::SimpleKey::new ( scalar  proto,
scalar  object 
)

Construct a new hardware device object.

Parameters:
[in]$protoThis class object, or prototype to add to
[in]$objectThe object to proxy for
[in]$offsetThe offset this object is created for
Returns:
Assembler object
retval DExecHW::SimpleKey::read ( scalar  self,
scalar  offset,
scalar  exec 
)

Read value.

Parameters:
[in]$selfObject
[in]$offsetOffset of register within window
[in]$execDExec object opon which this object is operating
Returns:
value of this register
retval DExecHW::SimpleKey::start ( scalar  self)

Start up the hardware.

We configure the terminal for 'cbreak' mode which ensures that the keys are not buffered before delivery.

Parameters:
[in]$selfObject
retval DExecHW::SimpleKey::stop ( scalar  self)

Stop the hardware.

Returns the terminal to the mode iti was in prior to being placed in 'cbreak' mode.

Parameters:
[in]$selfObject
retval DExecHW::SimpleKey::symbol ( scalar  self,
scalar  offset 
)

Get the symbol name for an offset.

Parameters:
[in]$selfObject
[in]$offsetOffset of register within window
Returns:
symbol name to use
Return values:
undeffor a default symbol
""for no symbol
retval DExecHW::SimpleKey::window ( scalar  self)

Return the size of of the implementation.

Parameters:
[in]$selfObject
Returns:
Size of the hardware implementation in words
retval DExecHW::SimpleKey::write ( scalar  self,
scalar  offset,
scalar  exec,
scalar  value 
)

Write value.

Parameters:
[in]$selfObject
[in]$offsetOffset of register within window
[in]$execDExec object upon which this object is operating
[in]$valueValue to write
Returns:
ignored

The documentation for this class was generated from the following file: