Module

other

Members

# inner ARGS

Properties:
Name Type Description
ARGS Array.<string> the command line arguments including the script name.

View Source doc/internal.js, line 54

# inner DEBUG

Properties:
Name Type Description
DEBUG boolean enable/disable Debug() output.

View Source jsboot/func.js, line 36

# inner DOJS_VERSION

Properties:
Name Type Description
DOJS_VERSION number the version

View Source doc/internal.js, line 49

# inner FILE

file mode definition.
Properties:
Name Type Description
READ * open file in read mode.
WRITE * open file in write mode (truncating existing contents)
APPEND * open file in append mode.

View Source jsboot/file.js, line 31

# inner IPX_AVAILABLE

Properties:
Name Type Description
IPX_AVAILABLE boolean true if networking is available.

View Source doc/internal.js, line 44

# inner KEY

keyboard input.
Properties:
Name Type Description
Code * key definitions.

View Source jsboot/func.js, line 470

# inner MOUSE

event interface.
Properties:
Name Type Description
Mode.NONE * no cursor
Mode.ARROW * arrow cursor
Mode.BUSY * busy cursor
Mode.QUESTION * questionmark cursor
Mode.CURSOR_EDIT * edit cursor
Buttons * mouse button definitions
LEFT *
RIGHT *
MIDDLE *

View Source jsboot/func.js, line 451

# inner MOUSE_AVAILABLE

Properties:
Name Type Description
MOUSE_AVAILABLE boolean true if mouse is available.

View Source doc/internal.js, line 39

# inner PARALLEL

parallel port IO register definitions. [*] CONTROL.BIDI must be set to 1 in order to read from DATA. Not supported by all ports!
Properties:
Name Type Description
DATA.BIT0 * Data 0, pin 2 (out/in*)
DATA.BIT1 * Data 1, pin 3 (out/in*)
DATA.BIT2 * Data 2, pin 4 (out/in*)
DATA.BIT3 * Data 3, pin 5 (out/in*)
DATA.BIT4 * Data 4, pin 6 (out/in*)
DATA.BIT5 * Data 5, pin 7 (out/in*)
DATA.BIT6 * Data 6, pin 8 (out/in*)
DATA.BIT7 * Data 7, pin 9 (out/in*)
STATUS.BUSY * pin 11, inverted (in)
STATUS.ACK * pin 10 (in)
STATUS.PAPER_OUT * pin 12 (in)
STATUS.SELECT_IN * pin 13 (in)
STATUS.ERROR * pin 15 (in)
STATUS.TIMEOUT * LPTStatus() only
CONTROL.BIDI * this bit must be set in order to read DATA
CONTROL.SELECT_OUT * pin 17, inverted (out)
CONTROL.RESET * pin 16 (out)
CONTROL.LINEFEED * pin 14, inverted (out)
CONTROL.STROBE * pin 1, inverted (out)

View Source jsboot/func.js, line 372

# inner REMOTE_DEBUG

Properties:
Name Type Description
REMOTE_DEBUG boolean enable/disable Debug() sending via IPX.

View Source jsboot/func.js, line 41

# inner SOUND

sound input selection.
Properties:
Name Type Description
Input.MIC * use microphone input
Input.LINE * use line input
Input.CD * use CD input
Bits.BITS8 * use 8 bits
Bits.BITS16 * use 16 bits

View Source jsboot/func.js, line 411

# inner SOUND_AVAILABLE

Properties:
Name Type Description
SOUND_AVAILABLE boolean true if sound is available.

View Source doc/internal.js, line 34

# inner SYSTEM

System() flags for subsystem shutdown/restart.
Properties:
Name Type Description
MOUSE * de/reinit mouse
SOUND * de/reinit sound
JOYSTICK * de/reinit joystick
KEYBOARD * de/reinit keyboard
TIMER * de/reinit timer

View Source jsboot/func.js, line 431

Methods

# inner _Debug(str)

Internal debug which does not redirect to IPX if enabled.
Parameters:
Name Type Description
str string the message to print.

View Source jsboot/func.js, line 60

# inner CharCode(s)

get char code.
Parameters:
Name Type Description
s string a string

View Source jsboot/func.js, line 176

the ASCII-code of the first character.

# inner CompareKey(k, s)

compare a keycode with a character.
Parameters:
Name Type Description
k number keycode from an Event
s string a string with one char

View Source jsboot/func.js, line 186

# inner Debug(str)

print javascript debug output if DEBUG is true.
Parameters:
Name Type Description
str string the message to print.

View Source jsboot/func.js, line 48

# inner Gc(info)

Run garbage collector, print statistics to logfile if 'info==true'.
Parameters:
Name Type Description
info boolean true to print collection stats to logfile.

View Source doc/internal.js, line 536

# inner GetFramerate() → {number}

Current frame rate.

View Source doc/internal.js, line 554

current framerate.
number

# inner GetParallelPorts() → {Array.<number>}

get available parallel ports.

View Source doc/internal.js, line 616

list of available parallel ports and their addresses.
Array.<number>

# inner GetSerialPorts() → {Array.<number>}

get available serial ports.

View Source doc/internal.js, line 622

list of available serial ports and their addresses.
Array.<number>

# inner Include(name)

include a module. The exported functions are copied into global scope.
Parameters:
Name Type Description
name string module file name.

View Source jsboot/func.js, line 116

# inner Info(str)

Print info message.
Parameters:
Name Type Description
str string the message to print.

View Source jsboot/func.js, line 71

# inner InPortByte(port) → {number}

read a byte value from a hardware io-port.
Parameters:
Name Type Description
port number port address to read from.

View Source doc/internal.js, line 596

8-bit value read from port.
number

# inner InPortLong(port) → {number}

read a long value from a hardware io-port.
Parameters:
Name Type Description
port number port address to read from.

View Source doc/internal.js, line 610

32-bit value read from port.
number

# inner InPortWord(port) → {number}

read a word value from a hardware io-port.
Parameters:
Name Type Description
port number port address to read from.

View Source doc/internal.js, line 603

16-bit value read from port.
number

# inner List(dname) → {Array.<string>}

Get directory listing.
Parameters:
Name Type Description
dname string name of directory to list.

View Source doc/internal.js, line 522

Throws an error if listing fails.
array of entry names.
Array.<string>

# inner LPTRawControl(port, bits)

write bits to LPT control register.
Parameters:
Name Type Description
port number port number (0-3).
bits number data to write
See:
  • GetParallelPorts

View Source jsboot/func.js, line 296

# inner LPTRawData(port, data) → {number}

read/write data to LPT data register.
Parameters:
Name Type Description
port number port number (0-3).
data number data to write, null to read
See:
  • GetParallelPorts

View Source jsboot/func.js, line 254

current LPT value if data was null.
number

# inner LPTRawStatus(port)

read status register of LPT port.
Parameters:
Name Type Description
port number port number (0-3).
See:
  • GetParallelPorts

View Source jsboot/func.js, line 279

# inner LPTReset(port)

reset parallel port.
Parameters:
Name Type Description
port number port number (0-3).
See:
  • GetParallelPorts

View Source jsboot/func.js, line 311

# inner LPTSend(port, data)

send data to parallel port.
Parameters:
Name Type Description
port number port number (0-3).
data string data to transfer.
See:
  • GetParallelPorts

View Source jsboot/func.js, line 325

# inner LPTStatus(port)

read parallel port status.
Parameters:
Name Type Description
port number port number (0-3).
See:
  • GetParallelPorts

View Source jsboot/func.js, line 338

# inner MemoryInfo() → {MemInfo}

Get information system memory.

View Source doc/internal.js, line 542

an info object.
MemInfo

# inner MouseSetCursorMode(mode)

Change mode of the mouse cursor.
Parameters:
Name Type Description
mode * a mode from MOUSE.

View Source doc/internal.js, line 478

# inner MouseSetLimits(x1, y1, x2, y2)

Limit mouse movement.
Parameters:
Name Type Description
x1 number start x coordinate.
y1 number start y coordinate.
x2 number end x coordinate.
y2 number end y coordinate.

View Source doc/internal.js, line 459

# inner MouseSetSpeed(x, y)

Set mouse speed.
Parameters:
Name Type Description
x number horizontal speed.
y number vertical speed.

View Source doc/internal.js, line 450

# inner MouseShowCursor(b)

Show hide mouse cursor.
Parameters:
Name Type Description
b boolean true or false.

View Source doc/internal.js, line 472

# inner MouseWarp(x, y)

Move mouse cursor.
Parameters:
Name Type Description
x number x coordinate.
y number y coordinate.

View Source doc/internal.js, line 466

# inner MsecTime() → {number}

Get ms timestamp.

View Source doc/internal.js, line 506

ms time.
number

# inner OutPortByte(port, value)

write a byte value to a hardware io-port.
Parameters:
Name Type Description
port number port address to write to.
value number 8-bit value to write to port.

View Source doc/internal.js, line 575

# inner OutPortLong(port, value)

write a long value to a hardware io-port.
Parameters:
Name Type Description
port number port address to write to.
value number 32-bit value to write to port.

View Source doc/internal.js, line 589

# inner OutPortWord(port, value)

write a word value to a hardware io-port.
Parameters:
Name Type Description
port number port address to write to.
value number 16-bit value to write to port.

View Source doc/internal.js, line 582

# inner POST(val)

Write the given value to io-port 80h to be displayed by a POST card.
Parameters:
Name Type Description
val number value to write to 0x80.

View Source jsboot/func.js, line 230

# inner Print(s)

Write data to JSLOG.TXT logfile.
Parameters:
Name Type Description
s string the string to print.

View Source doc/internal.js, line 484

# inner Println(s)

Write data to JSLOG.TXT logfile with a newline.
Parameters:
Name Type Description
s string the string to print.

View Source doc/internal.js, line 489

# inner RandomInt(min, max) → {number}

get random integer between min and max (or between 0 and min if max is not provided).
Parameters:
Name Type Description
min number min
max number max

View Source jsboot/func.js, line 198

an integer between min and max.
number

# inner Read(filename) → {string}

Load the contents of a file into a string. Throws exception if loading fails.
Parameters:
Name Type Description
filename string name of file to read.

View Source doc/internal.js, line 514

Throws an error if reading fails.
the contents of the file.
string

# inner Require(name)

import a module.
Parameters:
Name Type Description
name string module file name.

View Source jsboot/func.js, line 80

the imported module.

# inner SetExitKey(key)

Change the exit key from ESCAPE to any other keycode from KEY}.
Parameters:
Name Type Description
key number

View Source doc/internal.js, line 560

# inner SetFramerate(rate)

Set maximum frame rate. If Loop takes longer than '1/rate' seconds then the framerate will not be reached.
Parameters:
Name Type Description
rate number max frame rate wanted.

View Source doc/internal.js, line 548

# inner Sleep(ms)

Sleep for the given number of ms.
Parameters:
Name Type Description
ms number time to sleep.

View Source doc/internal.js, line 500

# inner StartupInfo()

print startup info with screen details.

View Source jsboot/func.js, line 135

# inner Stat(name) → {StatInfo}

Get information about a file / directory.
Parameters:
Name Type Description
name string name of the file to get info for.

View Source doc/internal.js, line 530

Throws an error if stat fails.
an info object.
StatInfo

# inner Stop()

DOjS will exit after the current call to Loop.

View Source doc/internal.js, line 494

# inner System(cmd, flags) → {number}

Run a DOS command.
Parameters:
Name Type Description
cmd string the command to execute with its parameters.
flags SYSTEM flags indicating which subsystems to shutdown (if any) during execution of cmd.

View Source doc/internal.js, line 568

the return code of the command.
number

Members

# inner ARGS

Properties:
Name Type Description
ARGS Array.<string> the command line arguments including the script name.

View Source doc/internal.js, line 54

# inner DEBUG

Properties:
Name Type Description
DEBUG boolean enable/disable Debug() output.

View Source jsboot/func.js, line 36

# inner DOJS_VERSION

Properties:
Name Type Description
DOJS_VERSION number the version

View Source doc/internal.js, line 49

# inner FILE

file mode definition.
Properties:
Name Type Description
READ * open file in read mode.
WRITE * open file in write mode (truncating existing contents)
APPEND * open file in append mode.

View Source jsboot/file.js, line 31

# inner IPX_AVAILABLE

Properties:
Name Type Description
IPX_AVAILABLE boolean true if networking is available.

View Source doc/internal.js, line 44

# inner KEY

keyboard input.
Properties:
Name Type Description
Code * key definitions.

View Source jsboot/func.js, line 470

# inner MOUSE

event interface.
Properties:
Name Type Description
Mode.NONE * no cursor
Mode.ARROW * arrow cursor
Mode.BUSY * busy cursor
Mode.QUESTION * questionmark cursor
Mode.CURSOR_EDIT * edit cursor
Buttons * mouse button definitions
LEFT *
RIGHT *
MIDDLE *

View Source jsboot/func.js, line 451

# inner MOUSE_AVAILABLE

Properties:
Name Type Description
MOUSE_AVAILABLE boolean true if mouse is available.

View Source doc/internal.js, line 39

# inner PARALLEL

parallel port IO register definitions. [*] CONTROL.BIDI must be set to 1 in order to read from DATA. Not supported by all ports!
Properties:
Name Type Description
DATA.BIT0 * Data 0, pin 2 (out/in*)
DATA.BIT1 * Data 1, pin 3 (out/in*)
DATA.BIT2 * Data 2, pin 4 (out/in*)
DATA.BIT3 * Data 3, pin 5 (out/in*)
DATA.BIT4 * Data 4, pin 6 (out/in*)
DATA.BIT5 * Data 5, pin 7 (out/in*)
DATA.BIT6 * Data 6, pin 8 (out/in*)
DATA.BIT7 * Data 7, pin 9 (out/in*)
STATUS.BUSY * pin 11, inverted (in)
STATUS.ACK * pin 10 (in)
STATUS.PAPER_OUT * pin 12 (in)
STATUS.SELECT_IN * pin 13 (in)
STATUS.ERROR * pin 15 (in)
STATUS.TIMEOUT * LPTStatus() only
CONTROL.BIDI * this bit must be set in order to read DATA
CONTROL.SELECT_OUT * pin 17, inverted (out)
CONTROL.RESET * pin 16 (out)
CONTROL.LINEFEED * pin 14, inverted (out)
CONTROL.STROBE * pin 1, inverted (out)

View Source jsboot/func.js, line 372

# inner REMOTE_DEBUG

Properties:
Name Type Description
REMOTE_DEBUG boolean enable/disable Debug() sending via IPX.

View Source jsboot/func.js, line 41

# inner SOUND

sound input selection.
Properties:
Name Type Description
Input.MIC * use microphone input
Input.LINE * use line input
Input.CD * use CD input
Bits.BITS8 * use 8 bits
Bits.BITS16 * use 16 bits

View Source jsboot/func.js, line 411

# inner SOUND_AVAILABLE

Properties:
Name Type Description
SOUND_AVAILABLE boolean true if sound is available.

View Source doc/internal.js, line 34

# inner SYSTEM

System() flags for subsystem shutdown/restart.
Properties:
Name Type Description
MOUSE * de/reinit mouse
SOUND * de/reinit sound
JOYSTICK * de/reinit joystick
KEYBOARD * de/reinit keyboard
TIMER * de/reinit timer

View Source jsboot/func.js, line 431

Methods

# inner _Debug(str)

Internal debug which does not redirect to IPX if enabled.
Parameters:
Name Type Description
str string the message to print.

View Source jsboot/func.js, line 60

# inner CharCode(s)

get char code.
Parameters:
Name Type Description
s string a string

View Source jsboot/func.js, line 176

the ASCII-code of the first character.

# inner CompareKey(k, s)

compare a keycode with a character.
Parameters:
Name Type Description
k number keycode from an Event
s string a string with one char

View Source jsboot/func.js, line 186

# inner Debug(str)

print javascript debug output if DEBUG is true.
Parameters:
Name Type Description
str string the message to print.

View Source jsboot/func.js, line 48

# inner Gc(info)

Run garbage collector, print statistics to logfile if 'info==true'.
Parameters:
Name Type Description
info boolean true to print collection stats to logfile.

View Source doc/internal.js, line 536

# inner GetFramerate() → {number}

Current frame rate.

View Source doc/internal.js, line 554

current framerate.
number

# inner GetParallelPorts() → {Array.<number>}

get available parallel ports.

View Source doc/internal.js, line 616

list of available parallel ports and their addresses.
Array.<number>

# inner GetSerialPorts() → {Array.<number>}

get available serial ports.

View Source doc/internal.js, line 622

list of available serial ports and their addresses.
Array.<number>

# inner Include(name)

include a module. The exported functions are copied into global scope.
Parameters:
Name Type Description
name string module file name.

View Source jsboot/func.js, line 116

# inner Info(str)

Print info message.
Parameters:
Name Type Description
str string the message to print.

View Source jsboot/func.js, line 71

# inner InPortByte(port) → {number}

read a byte value from a hardware io-port.
Parameters:
Name Type Description
port number port address to read from.

View Source doc/internal.js, line 596

8-bit value read from port.
number

# inner InPortLong(port) → {number}

read a long value from a hardware io-port.
Parameters:
Name Type Description
port number port address to read from.

View Source doc/internal.js, line 610

32-bit value read from port.
number

# inner InPortWord(port) → {number}

read a word value from a hardware io-port.
Parameters:
Name Type Description
port number port address to read from.

View Source doc/internal.js, line 603

16-bit value read from port.
number

# inner List(dname) → {Array.<string>}

Get directory listing.
Parameters:
Name Type Description
dname string name of directory to list.

View Source doc/internal.js, line 522

Throws an error if listing fails.
array of entry names.
Array.<string>

# inner LPTRawControl(port, bits)

write bits to LPT control register.
Parameters:
Name Type Description
port number port number (0-3).
bits number data to write
See:
  • GetParallelPorts

View Source jsboot/func.js, line 296

# inner LPTRawData(port, data) → {number}

read/write data to LPT data register.
Parameters:
Name Type Description
port number port number (0-3).
data number data to write, null to read
See:
  • GetParallelPorts

View Source jsboot/func.js, line 254

current LPT value if data was null.
number

# inner LPTRawStatus(port)

read status register of LPT port.
Parameters:
Name Type Description
port number port number (0-3).
See:
  • GetParallelPorts

View Source jsboot/func.js, line 279

# inner LPTReset(port)

reset parallel port.
Parameters:
Name Type Description
port number port number (0-3).
See:
  • GetParallelPorts

View Source jsboot/func.js, line 311

# inner LPTSend(port, data)

send data to parallel port.
Parameters:
Name Type Description
port number port number (0-3).
data string data to transfer.
See:
  • GetParallelPorts

View Source jsboot/func.js, line 325

# inner LPTStatus(port)

read parallel port status.
Parameters:
Name Type Description
port number port number (0-3).
See:
  • GetParallelPorts

View Source jsboot/func.js, line 338

# inner MemoryInfo() → {MemInfo}

Get information system memory.

View Source doc/internal.js, line 542

an info object.
MemInfo

# inner MouseSetCursorMode(mode)

Change mode of the mouse cursor.
Parameters:
Name Type Description
mode * a mode from MOUSE.

View Source doc/internal.js, line 478

# inner MouseSetLimits(x1, y1, x2, y2)

Limit mouse movement.
Parameters:
Name Type Description
x1 number start x coordinate.
y1 number start y coordinate.
x2 number end x coordinate.
y2 number end y coordinate.

View Source doc/internal.js, line 459

# inner MouseSetSpeed(x, y)

Set mouse speed.
Parameters:
Name Type Description
x number horizontal speed.
y number vertical speed.

View Source doc/internal.js, line 450

# inner MouseShowCursor(b)

Show hide mouse cursor.
Parameters:
Name Type Description
b boolean true or false.

View Source doc/internal.js, line 472

# inner MouseWarp(x, y)

Move mouse cursor.
Parameters:
Name Type Description
x number x coordinate.
y number y coordinate.

View Source doc/internal.js, line 466

# inner MsecTime() → {number}

Get ms timestamp.

View Source doc/internal.js, line 506

ms time.
number

# inner OutPortByte(port, value)

write a byte value to a hardware io-port.
Parameters:
Name Type Description
port number port address to write to.
value number 8-bit value to write to port.

View Source doc/internal.js, line 575

# inner OutPortLong(port, value)

write a long value to a hardware io-port.
Parameters:
Name Type Description
port number port address to write to.
value number 32-bit value to write to port.

View Source doc/internal.js, line 589

# inner OutPortWord(port, value)

write a word value to a hardware io-port.
Parameters:
Name Type Description
port number port address to write to.
value number 16-bit value to write to port.

View Source doc/internal.js, line 582

# inner POST(val)

Write the given value to io-port 80h to be displayed by a POST card.
Parameters:
Name Type Description
val number value to write to 0x80.

View Source jsboot/func.js, line 230

# inner Print(s)

Write data to JSLOG.TXT logfile.
Parameters:
Name Type Description
s string the string to print.

View Source doc/internal.js, line 484

# inner Println(s)

Write data to JSLOG.TXT logfile with a newline.
Parameters:
Name Type Description
s string the string to print.

View Source doc/internal.js, line 489

# inner RandomInt(min, max) → {number}

get random integer between min and max (or between 0 and min if max is not provided).
Parameters:
Name Type Description
min number min
max number max

View Source jsboot/func.js, line 198

an integer between min and max.
number

# inner Read(filename) → {string}

Load the contents of a file into a string. Throws exception if loading fails.
Parameters:
Name Type Description
filename string name of file to read.

View Source doc/internal.js, line 514

Throws an error if reading fails.
the contents of the file.
string

# inner Require(name)

import a module.
Parameters:
Name Type Description
name string module file name.

View Source jsboot/func.js, line 80

the imported module.

# inner SetExitKey(key)

Change the exit key from ESCAPE to any other keycode from KEY}.
Parameters:
Name Type Description
key number

View Source doc/internal.js, line 560

# inner SetFramerate(rate)

Set maximum frame rate. If Loop takes longer than '1/rate' seconds then the framerate will not be reached.
Parameters:
Name Type Description
rate number max frame rate wanted.

View Source doc/internal.js, line 548

# inner Sleep(ms)

Sleep for the given number of ms.
Parameters:
Name Type Description
ms number time to sleep.

View Source doc/internal.js, line 500

# inner StartupInfo()

print startup info with screen details.

View Source jsboot/func.js, line 135

# inner Stat(name) → {StatInfo}

Get information about a file / directory.
Parameters:
Name Type Description
name string name of the file to get info for.

View Source doc/internal.js, line 530

Throws an error if stat fails.
an info object.
StatInfo

# inner Stop()

DOjS will exit after the current call to Loop.

View Source doc/internal.js, line 494

# inner System(cmd, flags) → {number}

Run a DOS command.
Parameters:
Name Type Description
cmd string the command to execute with its parameters.
flags SYSTEM flags indicating which subsystems to shutdown (if any) during execution of cmd.

View Source doc/internal.js, line 568

the return code of the command.
number
Other properties

View Source doc/internal.js, line 26

Members

# inner ARGS

Properties:
Name Type Description
ARGS Array.<string> the command line arguments including the script name.

View Source doc/internal.js, line 54

# inner DEBUG

Properties:
Name Type Description
DEBUG boolean enable/disable Debug() output.

View Source jsboot/func.js, line 36

# inner DOJS_VERSION

Properties:
Name Type Description
DOJS_VERSION number the version

View Source doc/internal.js, line 49

# inner FILE

file mode definition.
Properties:
Name Type Description
READ * open file in read mode.
WRITE * open file in write mode (truncating existing contents)
APPEND * open file in append mode.

View Source jsboot/file.js, line 31

# inner IPX_AVAILABLE

Properties:
Name Type Description
IPX_AVAILABLE boolean true if networking is available.

View Source doc/internal.js, line 44

# inner KEY

keyboard input.
Properties:
Name Type Description
Code * key definitions.

View Source jsboot/func.js, line 470

# inner MOUSE

event interface.
Properties:
Name Type Description
Mode.NONE * no cursor
Mode.ARROW * arrow cursor
Mode.BUSY * busy cursor
Mode.QUESTION * questionmark cursor
Mode.CURSOR_EDIT * edit cursor
Buttons * mouse button definitions
LEFT *
RIGHT *
MIDDLE *

View Source jsboot/func.js, line 451

# inner MOUSE_AVAILABLE

Properties:
Name Type Description
MOUSE_AVAILABLE boolean true if mouse is available.

View Source doc/internal.js, line 39

# inner PARALLEL

parallel port IO register definitions. [*] CONTROL.BIDI must be set to 1 in order to read from DATA. Not supported by all ports!
Properties:
Name Type Description
DATA.BIT0 * Data 0, pin 2 (out/in*)
DATA.BIT1 * Data 1, pin 3 (out/in*)
DATA.BIT2 * Data 2, pin 4 (out/in*)
DATA.BIT3 * Data 3, pin 5 (out/in*)
DATA.BIT4 * Data 4, pin 6 (out/in*)
DATA.BIT5 * Data 5, pin 7 (out/in*)
DATA.BIT6 * Data 6, pin 8 (out/in*)
DATA.BIT7 * Data 7, pin 9 (out/in*)
STATUS.BUSY * pin 11, inverted (in)
STATUS.ACK * pin 10 (in)
STATUS.PAPER_OUT * pin 12 (in)
STATUS.SELECT_IN * pin 13 (in)
STATUS.ERROR * pin 15 (in)
STATUS.TIMEOUT * LPTStatus() only
CONTROL.BIDI * this bit must be set in order to read DATA
CONTROL.SELECT_OUT * pin 17, inverted (out)
CONTROL.RESET * pin 16 (out)
CONTROL.LINEFEED * pin 14, inverted (out)
CONTROL.STROBE * pin 1, inverted (out)

View Source jsboot/func.js, line 372

# inner REMOTE_DEBUG

Properties:
Name Type Description
REMOTE_DEBUG boolean enable/disable Debug() sending via IPX.

View Source jsboot/func.js, line 41

# inner SOUND

sound input selection.
Properties:
Name Type Description
Input.MIC * use microphone input
Input.LINE * use line input
Input.CD * use CD input
Bits.BITS8 * use 8 bits
Bits.BITS16 * use 16 bits

View Source jsboot/func.js, line 411

# inner SOUND_AVAILABLE

Properties:
Name Type Description
SOUND_AVAILABLE boolean true if sound is available.

View Source doc/internal.js, line 34

# inner SYSTEM

System() flags for subsystem shutdown/restart.
Properties:
Name Type Description
MOUSE * de/reinit mouse
SOUND * de/reinit sound
JOYSTICK * de/reinit joystick
KEYBOARD * de/reinit keyboard
TIMER * de/reinit timer

View Source jsboot/func.js, line 431

Methods

# inner _Debug(str)

Internal debug which does not redirect to IPX if enabled.
Parameters:
Name Type Description
str string the message to print.

View Source jsboot/func.js, line 60

# inner CharCode(s)

get char code.
Parameters:
Name Type Description
s string a string

View Source jsboot/func.js, line 176

the ASCII-code of the first character.

# inner CompareKey(k, s)

compare a keycode with a character.
Parameters:
Name Type Description
k number keycode from an Event
s string a string with one char

View Source jsboot/func.js, line 186

# inner Debug(str)

print javascript debug output if DEBUG is true.
Parameters:
Name Type Description
str string the message to print.

View Source jsboot/func.js, line 48

# inner Gc(info)

Run garbage collector, print statistics to logfile if 'info==true'.
Parameters:
Name Type Description
info boolean true to print collection stats to logfile.

View Source doc/internal.js, line 536

# inner GetFramerate() → {number}

Current frame rate.

View Source doc/internal.js, line 554

current framerate.
number

# inner GetParallelPorts() → {Array.<number>}

get available parallel ports.

View Source doc/internal.js, line 616

list of available parallel ports and their addresses.
Array.<number>

# inner GetSerialPorts() → {Array.<number>}

get available serial ports.

View Source doc/internal.js, line 622

list of available serial ports and their addresses.
Array.<number>

# inner Include(name)

include a module. The exported functions are copied into global scope.
Parameters:
Name Type Description
name string module file name.

View Source jsboot/func.js, line 116

# inner Info(str)

Print info message.
Parameters:
Name Type Description
str string the message to print.

View Source jsboot/func.js, line 71

# inner InPortByte(port) → {number}

read a byte value from a hardware io-port.
Parameters:
Name Type Description
port number port address to read from.

View Source doc/internal.js, line 596

8-bit value read from port.
number

# inner InPortLong(port) → {number}

read a long value from a hardware io-port.
Parameters:
Name Type Description
port number port address to read from.

View Source doc/internal.js, line 610

32-bit value read from port.
number

# inner InPortWord(port) → {number}

read a word value from a hardware io-port.
Parameters:
Name Type Description
port number port address to read from.

View Source doc/internal.js, line 603

16-bit value read from port.
number

# inner List(dname) → {Array.<string>}

Get directory listing.
Parameters:
Name Type Description
dname string name of directory to list.

View Source doc/internal.js, line 522

Throws an error if listing fails.
array of entry names.
Array.<string>

# inner LPTRawControl(port, bits)

write bits to LPT control register.
Parameters:
Name Type Description
port number port number (0-3).
bits number data to write
See:
  • GetParallelPorts

View Source jsboot/func.js, line 296

# inner LPTRawData(port, data) → {number}

read/write data to LPT data register.
Parameters:
Name Type Description
port number port number (0-3).
data number data to write, null to read
See:
  • GetParallelPorts

View Source jsboot/func.js, line 254

current LPT value if data was null.
number

# inner LPTRawStatus(port)

read status register of LPT port.
Parameters:
Name Type Description
port number port number (0-3).
See:
  • GetParallelPorts

View Source jsboot/func.js, line 279

# inner LPTReset(port)

reset parallel port.
Parameters:
Name Type Description
port number port number (0-3).
See:
  • GetParallelPorts

View Source jsboot/func.js, line 311

# inner LPTSend(port, data)

send data to parallel port.
Parameters:
Name Type Description
port number port number (0-3).
data string data to transfer.
See:
  • GetParallelPorts

View Source jsboot/func.js, line 325

# inner LPTStatus(port)

read parallel port status.
Parameters:
Name Type Description
port number port number (0-3).
See:
  • GetParallelPorts

View Source jsboot/func.js, line 338

# inner MemoryInfo() → {MemInfo}

Get information system memory.

View Source doc/internal.js, line 542

an info object.
MemInfo

# inner MouseSetCursorMode(mode)

Change mode of the mouse cursor.
Parameters:
Name Type Description
mode * a mode from MOUSE.

View Source doc/internal.js, line 478

# inner MouseSetLimits(x1, y1, x2, y2)

Limit mouse movement.
Parameters:
Name Type Description
x1 number start x coordinate.
y1 number start y coordinate.
x2 number end x coordinate.
y2 number end y coordinate.

View Source doc/internal.js, line 459

# inner MouseSetSpeed(x, y)

Set mouse speed.
Parameters:
Name Type Description
x number horizontal speed.
y number vertical speed.

View Source doc/internal.js, line 450

# inner MouseShowCursor(b)

Show hide mouse cursor.
Parameters:
Name Type Description
b boolean true or false.

View Source doc/internal.js, line 472

# inner MouseWarp(x, y)

Move mouse cursor.
Parameters:
Name Type Description
x number x coordinate.
y number y coordinate.

View Source doc/internal.js, line 466

# inner MsecTime() → {number}

Get ms timestamp.

View Source doc/internal.js, line 506

ms time.
number

# inner OutPortByte(port, value)

write a byte value to a hardware io-port.
Parameters:
Name Type Description
port number port address to write to.
value number 8-bit value to write to port.

View Source doc/internal.js, line 575

# inner OutPortLong(port, value)

write a long value to a hardware io-port.
Parameters:
Name Type Description
port number port address to write to.
value number 32-bit value to write to port.

View Source doc/internal.js, line 589

# inner OutPortWord(port, value)

write a word value to a hardware io-port.
Parameters:
Name Type Description
port number port address to write to.
value number 16-bit value to write to port.

View Source doc/internal.js, line 582

# inner POST(val)

Write the given value to io-port 80h to be displayed by a POST card.
Parameters:
Name Type Description
val number value to write to 0x80.

View Source jsboot/func.js, line 230

# inner Print(s)

Write data to JSLOG.TXT logfile.
Parameters:
Name Type Description
s string the string to print.

View Source doc/internal.js, line 484

# inner Println(s)

Write data to JSLOG.TXT logfile with a newline.
Parameters:
Name Type Description
s string the string to print.

View Source doc/internal.js, line 489

# inner RandomInt(min, max) → {number}

get random integer between min and max (or between 0 and min if max is not provided).
Parameters:
Name Type Description
min number min
max number max

View Source jsboot/func.js, line 198

an integer between min and max.
number

# inner Read(filename) → {string}

Load the contents of a file into a string. Throws exception if loading fails.
Parameters:
Name Type Description
filename string name of file to read.

View Source doc/internal.js, line 514

Throws an error if reading fails.
the contents of the file.
string

# inner Require(name)

import a module.
Parameters:
Name Type Description
name string module file name.

View Source jsboot/func.js, line 80

the imported module.

# inner SetExitKey(key)

Change the exit key from ESCAPE to any other keycode from KEY}.
Parameters:
Name Type Description
key number

View Source doc/internal.js, line 560

# inner SetFramerate(rate)

Set maximum frame rate. If Loop takes longer than '1/rate' seconds then the framerate will not be reached.
Parameters:
Name Type Description
rate number max frame rate wanted.

View Source doc/internal.js, line 548

# inner Sleep(ms)

Sleep for the given number of ms.
Parameters:
Name Type Description
ms number time to sleep.

View Source doc/internal.js, line 500

# inner StartupInfo()

print startup info with screen details.

View Source jsboot/func.js, line 135

# inner Stat(name) → {StatInfo}

Get information about a file / directory.
Parameters:
Name Type Description
name string name of the file to get info for.

View Source doc/internal.js, line 530

Throws an error if stat fails.
an info object.
StatInfo

# inner Stop()

DOjS will exit after the current call to Loop.

View Source doc/internal.js, line 494

# inner System(cmd, flags) → {number}

Run a DOS command.
Parameters:
Name Type Description
cmd string the command to execute with its parameters.
flags SYSTEM flags indicating which subsystems to shutdown (if any) during execution of cmd.

View Source doc/internal.js, line 568

the return code of the command.
number

Members

# inner ARGS

Properties:
Name Type Description
ARGS Array.<string> the command line arguments including the script name.

View Source doc/internal.js, line 54

# inner DEBUG

Properties:
Name Type Description
DEBUG boolean enable/disable Debug() output.

View Source jsboot/func.js, line 36

# inner DOJS_VERSION

Properties:
Name Type Description
DOJS_VERSION number the version

View Source doc/internal.js, line 49

# inner FILE

file mode definition.
Properties:
Name Type Description
READ * open file in read mode.
WRITE * open file in write mode (truncating existing contents)
APPEND * open file in append mode.

View Source jsboot/file.js, line 31

# inner IPX_AVAILABLE

Properties:
Name Type Description
IPX_AVAILABLE boolean true if networking is available.

View Source doc/internal.js, line 44

# inner KEY

keyboard input.
Properties:
Name Type Description
Code * key definitions.

View Source jsboot/func.js, line 470

# inner MOUSE

event interface.
Properties:
Name Type Description
Mode.NONE * no cursor
Mode.ARROW * arrow cursor
Mode.BUSY * busy cursor
Mode.QUESTION * questionmark cursor
Mode.CURSOR_EDIT * edit cursor
Buttons * mouse button definitions
LEFT *
RIGHT *
MIDDLE *

View Source jsboot/func.js, line 451

# inner MOUSE_AVAILABLE

Properties:
Name Type Description
MOUSE_AVAILABLE boolean true if mouse is available.

View Source doc/internal.js, line 39

# inner PARALLEL

parallel port IO register definitions. [*] CONTROL.BIDI must be set to 1 in order to read from DATA. Not supported by all ports!
Properties:
Name Type Description
DATA.BIT0 * Data 0, pin 2 (out/in*)
DATA.BIT1 * Data 1, pin 3 (out/in*)
DATA.BIT2 * Data 2, pin 4 (out/in*)
DATA.BIT3 * Data 3, pin 5 (out/in*)
DATA.BIT4 * Data 4, pin 6 (out/in*)
DATA.BIT5 * Data 5, pin 7 (out/in*)
DATA.BIT6 * Data 6, pin 8 (out/in*)
DATA.BIT7 * Data 7, pin 9 (out/in*)
STATUS.BUSY * pin 11, inverted (in)
STATUS.ACK * pin 10 (in)
STATUS.PAPER_OUT * pin 12 (in)
STATUS.SELECT_IN * pin 13 (in)
STATUS.ERROR * pin 15 (in)
STATUS.TIMEOUT * LPTStatus() only
CONTROL.BIDI * this bit must be set in order to read DATA
CONTROL.SELECT_OUT * pin 17, inverted (out)
CONTROL.RESET * pin 16 (out)
CONTROL.LINEFEED * pin 14, inverted (out)
CONTROL.STROBE * pin 1, inverted (out)

View Source jsboot/func.js, line 372

# inner REMOTE_DEBUG

Properties:
Name Type Description
REMOTE_DEBUG boolean enable/disable Debug() sending via IPX.

View Source jsboot/func.js, line 41

# inner SOUND

sound input selection.
Properties:
Name Type Description
Input.MIC * use microphone input
Input.LINE * use line input
Input.CD * use CD input
Bits.BITS8 * use 8 bits
Bits.BITS16 * use 16 bits

View Source jsboot/func.js, line 411

# inner SOUND_AVAILABLE

Properties:
Name Type Description
SOUND_AVAILABLE boolean true if sound is available.

View Source doc/internal.js, line 34

# inner SYSTEM

System() flags for subsystem shutdown/restart.
Properties:
Name Type Description
MOUSE * de/reinit mouse
SOUND * de/reinit sound
JOYSTICK * de/reinit joystick
KEYBOARD * de/reinit keyboard
TIMER * de/reinit timer

View Source jsboot/func.js, line 431

Methods

# inner _Debug(str)

Internal debug which does not redirect to IPX if enabled.
Parameters:
Name Type Description
str string the message to print.

View Source jsboot/func.js, line 60

# inner CharCode(s)

get char code.
Parameters:
Name Type Description
s string a string

View Source jsboot/func.js, line 176

the ASCII-code of the first character.

# inner CompareKey(k, s)

compare a keycode with a character.
Parameters:
Name Type Description
k number keycode from an Event
s string a string with one char

View Source jsboot/func.js, line 186

# inner Debug(str)

print javascript debug output if DEBUG is true.
Parameters:
Name Type Description
str string the message to print.

View Source jsboot/func.js, line 48

# inner Gc(info)

Run garbage collector, print statistics to logfile if 'info==true'.
Parameters:
Name Type Description
info boolean true to print collection stats to logfile.

View Source doc/internal.js, line 536

# inner GetFramerate() → {number}

Current frame rate.

View Source doc/internal.js, line 554

current framerate.
number

# inner GetParallelPorts() → {Array.<number>}

get available parallel ports.

View Source doc/internal.js, line 616

list of available parallel ports and their addresses.
Array.<number>

# inner GetSerialPorts() → {Array.<number>}

get available serial ports.

View Source doc/internal.js, line 622

list of available serial ports and their addresses.
Array.<number>

# inner Include(name)

include a module. The exported functions are copied into global scope.
Parameters:
Name Type Description
name string module file name.

View Source jsboot/func.js, line 116

# inner Info(str)

Print info message.
Parameters:
Name Type Description
str string the message to print.

View Source jsboot/func.js, line 71

# inner InPortByte(port) → {number}

read a byte value from a hardware io-port.
Parameters:
Name Type Description
port number port address to read from.

View Source doc/internal.js, line 596

8-bit value read from port.
number

# inner InPortLong(port) → {number}

read a long value from a hardware io-port.
Parameters:
Name Type Description
port number port address to read from.

View Source doc/internal.js, line 610

32-bit value read from port.
number

# inner InPortWord(port) → {number}

read a word value from a hardware io-port.
Parameters:
Name Type Description
port number port address to read from.

View Source doc/internal.js, line 603

16-bit value read from port.
number

# inner List(dname) → {Array.<string>}

Get directory listing.
Parameters:
Name Type Description
dname string name of directory to list.

View Source doc/internal.js, line 522

Throws an error if listing fails.
array of entry names.
Array.<string>

# inner LPTRawControl(port, bits)

write bits to LPT control register.
Parameters:
Name Type Description
port number port number (0-3).
bits number data to write
See:
  • GetParallelPorts

View Source jsboot/func.js, line 296

# inner LPTRawData(port, data) → {number}

read/write data to LPT data register.
Parameters:
Name Type Description
port number port number (0-3).
data number data to write, null to read
See:
  • GetParallelPorts

View Source jsboot/func.js, line 254

current LPT value if data was null.
number

# inner LPTRawStatus(port)

read status register of LPT port.
Parameters:
Name Type Description
port number port number (0-3).
See:
  • GetParallelPorts

View Source jsboot/func.js, line 279

# inner LPTReset(port)

reset parallel port.
Parameters:
Name Type Description
port number port number (0-3).
See:
  • GetParallelPorts

View Source jsboot/func.js, line 311

# inner LPTSend(port, data)

send data to parallel port.
Parameters:
Name Type Description
port number port number (0-3).
data string data to transfer.
See:
  • GetParallelPorts

View Source jsboot/func.js, line 325

# inner LPTStatus(port)

read parallel port status.
Parameters:
Name Type Description
port number port number (0-3).
See:
  • GetParallelPorts

View Source jsboot/func.js, line 338

# inner MemoryInfo() → {MemInfo}

Get information system memory.

View Source doc/internal.js, line 542

an info object.
MemInfo

# inner MouseSetCursorMode(mode)

Change mode of the mouse cursor.
Parameters:
Name Type Description
mode * a mode from MOUSE.

View Source doc/internal.js, line 478

# inner MouseSetLimits(x1, y1, x2, y2)

Limit mouse movement.
Parameters:
Name Type Description
x1 number start x coordinate.
y1 number start y coordinate.
x2 number end x coordinate.
y2 number end y coordinate.

View Source doc/internal.js, line 459

# inner MouseSetSpeed(x, y)

Set mouse speed.
Parameters:
Name Type Description
x number horizontal speed.
y number vertical speed.

View Source doc/internal.js, line 450

# inner MouseShowCursor(b)

Show hide mouse cursor.
Parameters:
Name Type Description
b boolean true or false.

View Source doc/internal.js, line 472

# inner MouseWarp(x, y)

Move mouse cursor.
Parameters:
Name Type Description
x number x coordinate.
y number y coordinate.

View Source doc/internal.js, line 466

# inner MsecTime() → {number}

Get ms timestamp.

View Source doc/internal.js, line 506

ms time.
number

# inner OutPortByte(port, value)

write a byte value to a hardware io-port.
Parameters:
Name Type Description
port number port address to write to.
value number 8-bit value to write to port.

View Source doc/internal.js, line 575

# inner OutPortLong(port, value)

write a long value to a hardware io-port.
Parameters:
Name Type Description
port number port address to write to.
value number 32-bit value to write to port.

View Source doc/internal.js, line 589

# inner OutPortWord(port, value)

write a word value to a hardware io-port.
Parameters:
Name Type Description
port number port address to write to.
value number 16-bit value to write to port.

View Source doc/internal.js, line 582

# inner POST(val)

Write the given value to io-port 80h to be displayed by a POST card.
Parameters:
Name Type Description
val number value to write to 0x80.

View Source jsboot/func.js, line 230

# inner Print(s)

Write data to JSLOG.TXT logfile.
Parameters:
Name Type Description
s string the string to print.

View Source doc/internal.js, line 484

# inner Println(s)

Write data to JSLOG.TXT logfile with a newline.
Parameters:
Name Type Description
s string the string to print.

View Source doc/internal.js, line 489

# inner RandomInt(min, max) → {number}

get random integer between min and max (or between 0 and min if max is not provided).
Parameters:
Name Type Description
min number min
max number max

View Source jsboot/func.js, line 198

an integer between min and max.
number

# inner Read(filename) → {string}

Load the contents of a file into a string. Throws exception if loading fails.
Parameters:
Name Type Description
filename string name of file to read.

View Source doc/internal.js, line 514

Throws an error if reading fails.
the contents of the file.
string

# inner Require(name)

import a module.
Parameters:
Name Type Description
name string module file name.

View Source jsboot/func.js, line 80

the imported module.

# inner SetExitKey(key)

Change the exit key from ESCAPE to any other keycode from KEY}.
Parameters:
Name Type Description
key number

View Source doc/internal.js, line 560

# inner SetFramerate(rate)

Set maximum frame rate. If Loop takes longer than '1/rate' seconds then the framerate will not be reached.
Parameters:
Name Type Description
rate number max frame rate wanted.

View Source doc/internal.js, line 548

# inner Sleep(ms)

Sleep for the given number of ms.
Parameters:
Name Type Description
ms number time to sleep.

View Source doc/internal.js, line 500

# inner StartupInfo()

print startup info with screen details.

View Source jsboot/func.js, line 135

# inner Stat(name) → {StatInfo}

Get information about a file / directory.
Parameters:
Name Type Description
name string name of the file to get info for.

View Source doc/internal.js, line 530

Throws an error if stat fails.
an info object.
StatInfo

# inner Stop()

DOjS will exit after the current call to Loop.

View Source doc/internal.js, line 494

# inner System(cmd, flags) → {number}

Run a DOS command.
Parameters:
Name Type Description
cmd string the command to execute with its parameters.
flags SYSTEM flags indicating which subsystems to shutdown (if any) during execution of cmd.

View Source doc/internal.js, line 568

the return code of the command.
number