User guide

3.3. GLOBAL FUNCTIONS 75
res := sys(Sys
sound, snd waveOutClose, a1) CIN:y, POS:y, NAT:y
This closes sound wave output device a1.
res := sys(Sys
sound, snd midiInOpen, a1) CIN:y, POS:y, NAT:y
This opens MIDI device for input specified by a1 which is typically "/dev/midi",
"/dev/dmmidi1" or a small integer. The result is the file (or device) descriptor of the
opened device or -1 if e rr or .
res := sys(Sys sound, snd midiInRead, a1, a2 , a3 ) CIN:y, POS:y, NAT:y
This reads bytes from MIDI inpu t device a1 into buffer a2. a3 is the number of
MIDI bytes to read. The result i s the actual number of bytes transferred or -1 if there
was an error.
res := sys(Sys sound, snd midiInClose, a1) CIN:y, POS:y, NAT:y
This close MIDI input device a1.
res := sys(Sys
sound, snd midiOutOpen, a1) CIN:y, POS:y, NAT:y
This opens a MIDI device for output. a1 is typically "/dev/midi", "/dev/dmmidi1"
or a small integer. The result is the file (or device) descriptor of the opened device or
-1 if e r r or.
res := sys(Sys sound, snd midiOutWrite1, a1, a2) CIN:y, POS:y, NAT:y
This writes a one byte MIDI message (a2) to MIDI device a1.
res := sys(Sys
sound, snd midiOutWrite2, a1, a2 , a3 ) CIN:y, POS:y, NAT:y
This writes a two byte MIDI m es sage (a2 a3) to MIDI device a1.
res := sys(Sys
sound, snd midiOutWrite3, a1, a2 , a3 , a4 ) CIN:y, POS:y,
NAT:y
This writes a three byte MIDI message (a2 a3 a3) to MIDI device a1.
res := sys(Sys
sound, snd midiOutWrite, a1, a2 ...) CIN:y, POS:y, NAT:y
This write a3 MIDI bytes from buffer a2 to MIDI output device a1. The result is
the number of bytes actually sent.
res := sys(Sys
sound, snd midiOutClose, a1) CIN:y, POS:y, NAT:y
This closes MIDI output device a1.
sys(Sys
setst, val) CIN:n, POS:y, NAT:n
Under Cintpos, this sets the Cintco de ST register to val. Interrupts are enabled
only when ST is zero. By conve ntion, ST=1 why execution within klib, ST=2 when
executing within the interrupt r out i ne , and ST=3 during the initial bootstrapping
process.
res := sys(Sys
shellcom, comstr) CIN:y, PO S : y, NAT:y
This causes the command comstr to be executed by the command language shell
of the operating system under which Cintsys or Cintpos is running.