Low-level functions

This section describes functions used for low-level input and output. These functions requires that LME runs as root; you can either login as root or su to root (type su and enter the root password before running LME), or set LME owned by root and suid (login as root, then chown root lme and chmod +s lme).

inp

Low-level processor input.

Syntax

value = inp(addr)

Description

inp(addr) reads a single byte at address addr of the I/O address space. The result is a number between 0 and 255, given as a double number.

See also

waitinp, outp

outp

Low-level processor output.

Syntax

outp(addr, value)

Description

outp(addr,value) writes the single byte value to address addr of the I/O address space. Both arguments must be non-negative integers given as double numbers.

See also

inp

waitinp

Wait until an input switches to the desired value.

Syntax

waitinp(addr, value, mask)
waitinp(addr, value)
b = waitinp(...)

Description

waitimp(addr,value,mask) reads the byte b at address addr of the I/O address space until bitand(b,mask) == value. The default value of mask is 255 (i.e. no masking). With an output argument, the last unmasked value read is returned.

See also

inp, outp


Copyright 2002-2014, Calerga.
All rights reserved.