EXOS 2.1 Kernel Specification

8. EXOS Variables

The read/write/toggle EXOS variable EXOS call (code 16), which is described in section 11.14, provides a way for the user, a device driver or a system extension, to access a set of system variables without knowing their actual address. These variables control many aspects of the system, particularly in setting up options for devices before opening channels to them. The ones which are relevant to particular built in devices are described in the appropriate device driver specification but a complete list is included here.

Each variable has an 8­bit value, and is identified by an 8­bit EXOS variable number. This list includes all variables which are implemented by the EXOS kernel but there is a facility for system extensions to implement further ones, with numbers above 127 (see section 9.2.4).

Any variable can be set to any value from zero to 255. However many of the variables act as switches to turn something on or off. In these cases, zero corresponds to on and 255 to off. The EXOS call to manipulate them has a toggle function which does a ones complement of the value and will thus switch from zero to 255 and vice versa.

0 - IRQ_ENABLE_STATE
      b0 - set to enable sound IRQ.
      b2 - set to enable 1 Hz IRQ.
      b4 - set to enable video IRQ.
      b6 - set to enable external IRQ.
b1,3,5,7 - must be zero               
1 - FLAG_SOFT_IRQ
This is the byte set non­zero by a device to cause a software interrupt. It could also be set by the user to cause a software interrupt directly. This variable is also available at a fixed address given in an earlier section.

2 - CODE_SOFT_IRQ
This is the copy of the flag set by the device and is the variable that should be inspected by a software interrupt service routine to determine the reason for the interrupt.

3 - DEF_TYPE
Type of default device:

0 => non file handling device (eg. TAPE).
1 => file handling device (eg. DISK).

4 - DEF_CHAN
Default channel number. This channel number will be used whenever a channel call is made with channel number 255.

5 - TIMER
1Hz down counter. Will cause a software interrupt when it reaches zero and will then stop.

6 - LOCK_KEY
Current keyboard lock status.

7 - CLICK_KEY
=0 : Key click enabled.

8 - STOP_IRQ

=0 : STOP key causes soft IRQ.
¬0 : STOP key returns code.

9 - KEY_IRQ
=0 : Any key press causes soft IRQ, as well as returning a code.

10 - RATE_KEY
Keyboard auto­repeat rate in 1/50 seconds.

11 - DELAY_KEY
Delay until auto­repeat starts (=0 : no auto­repeat).

12 - TAPE_SND
=0 : Tape sound feedthrough enabled.

13 - WAIT_SND

=0 : Sound driver waits when queue full.
¬0 : Returns .SQFUL error when queue full.

14 - MUTE_SND

=0 : Internal speaker active.
¬0 : Internal speaker disabled.

15 - BUF_SND
Sound envelope storage size in phases.

16 - BAUD_SER
Defines serial baud rate.

17 - FORM_SER
Defines serial word format.

18 - ADDR_NET
Network address of this machine.

19 - NET_IRQ
=0 : Data received on network will cause a software interrupt.

20 - CHAN_NET
Channel number of network block received.

21 - MACH_NET
Source machine number of network block.

22 - MODE_VID : Video Mode,
23 - COLR_VID : Colour Mode,
24 - X_SIZ_VID: X page size,
25 - Y_SIZ_VID: Y page size
These variables select the characteristics of a video page page when it is opened.

26 - ST_FLAG
=0 : Status line is displayed.

27 - BORD_VID
Border colour of screen.

28 - BIAS_VID
Colour bias for palette colours 8 ··· 16.

29 - VID_EDIT
Channel number of video page for editor.

30 - KEY_EDIT
Channel number of keyboard for editor.

31 - BUF_EDIT
Size of edit buffer (in 256 byte pages).

32 - FLG_EDIT
Flags to control reading from editor.

33 - SP_TAPE
Non­zero to force slow tape saving.

34 - PROTECT
Non­zero to make cassette write out protected file.

35 - LV_TAPE
Controls tape output level

36 - REM1
37 - REM2
State of cassette remote controls, zero is off, non­zero is on.

38 - SPRITE
Controls external sprite colour priority.

39 - RANDOM_IRQ
Incremented on every interrupt. Can be used as a source of random numbers provided it is only accessed infrequently.

Next chapter: System Extension Interface.



David Bouman. (dsbouma@cs.vu.nl)