Opsys Subroutine Library

ALARM (Signal Event SI at Time DX)

Arranges with the PC clock for the event SI to be signaled at the time of day given in DX.

DXAlarm Time of Day.
B15:B11
Hour (0:23)
B10:B5
Minute (0:59)
B4:B0
Second/2 (0:29)
SIEvent to be signaled.

BX, CX, DS and ES returned unchanged. Other registers returned undefined.

BEEP (Sound Tone for approx 165msec)

Turns on the speaker and returns immediately. The speaker will be turned off on the third clock tick (approx 165msec later).

All registers are returned unchanged.

CBD (Conversion: Binary to Decimal)

Binary to ASCII decimal string conversion, with the option to display directly onto the screen. If the target is too small the string >99.. is returned (with any sign).

SS:SPSigned Binary Source value, when Source Word Length > 0. On return SP will be popped to discard the source value.
AXUnsigned Binary Source value, when Source Word Length = 0.
CXControl Word.
B15
Leading Zeros required.
B14
Suppress Zero field.
B13
Display at Row DH Column DL (DH B15=Bright).
B12
Leaders from DH (rightmost), DL (others)
B9:B8
1,2 or 3 = Signed Source Word Length at SS:SP
0 = Unsigned Single Word in AX
B7:B4
Number of Decimal Digits (figures after Decimal Point).
B3:B0
Number of characters in fixed length Target ASCII string, including sign when source is signed and decimal point when Decimal Digits > 0,
0 = Variable length Target ASCII string.
DH,DLTarget Row, Column when CX B13=1. Returned updated to Row, Column following target.
Leader characters when CX B12=1.
ES:DITarget Field when CX B13=0. Returned updated to byte following target (unchanged when CX B13=1).

CDB (Conversion: Decimal to Binary)

ASCII Decimal String to Unsigned Binary conversion. Non-numeric characters within the source string are ignored.

DX,AXDouble Word target if Target Word Length=0, otherwise returned undefined.
BXNot used. Returned unchanged.
CXControl Word. Returned undefined.
B9:B81,2 or 3 = Target Word Length at ES:DI
0 = Double Word Target in DX,AX
B3:B0Number of characters in Source ASCII string
0 = Variable length Source terminated with NUL.
DS:SI-> ASCII Source. Returned updated to byte following source.
ES:DI-> Target Binary Field. Returned updated to byte following target.

CLA (Clear Area in Window)

DH,DL(Row-1), (Column-1) of top left corner of area to be cleared within current window. Returned undefined.
CH,CL(Number of rows), (Number of columns) to be cleared. Returned undefined.

Other registers returned unchanged except DI undefined.

CDATE (Conversion: DX to Date at ES:DI)

CHAR (Keystroke -> AL)

ZReturned 0 if a keystroke is in AL; otherwise task has been signaled by some other event.
ALReturned with next keystroke, if Z=0.

CLOSE (Close COM Port)

The task's serial port (set up by OPEN) control lines are turned OFF.

All registers returned unchanged except AX, DX undefined.

CTIME (Conversion: DX to Time at ES:DI)

CUT (Disconnect Telecom Port)

ECHO (AL -> Mainframe)

The Opsys Archive