Category : C Source Code
Archive   : TC_MAN.ZIP
Filename : SEC___5D.RNO

 
Output of file : SEC___5D.RNO contained in archive : TC_MAN.ZIP
.ls 2
.he 'APPENDIX D''V.003'
.fo ''-#-''
.ce
APPENDIX D SYSTEM AND USER MACHINE CALLS FOR THE IBM PC AND PCjr
.sp 2
.fi
These Machine Calls are furnished with the tiny-c interpreter.
They are always loaded and available for use. They are called
as described in Section 4.6. The function number is the LAST
argument. Thus MC 1 is called like this:
.sp 1
.in 10
MC('x', 1)
.in -10
.sp 1
Where no results are indicated, a 0 is returned as the
value of the MC.
.sp 2
.nf
Function: MC(character, 1)
Arguments: A character value
Results: None
Errors: None
Action: `character' is transmitted to the screen.
.in 0
.sp 2
Function: MC(2)
Arguments: None
Results: A character value
Errors: None
Action: A character is retrieved from the console
.in +12
.fi
terminal and returned as the value of the function. The input port
from the console terminal is cleared to receive another character.
.in 0
.sp 2
.nf
Function: MC(mode, name, size, channel, 3)
Arguments: A mode, filename, file size, and channel number.
Results: An open status indicator
Errors: None
Action: Same as `fopen' in the standard library, see
.in +12
Appendix C.
.in 0
.sp 2
Function: MC(buffer, channel, 4)
Arguments: Pointer and a channel number
Results: A get status indicator
Errors: None
Action: Same as `fread' in the standard library, see
.in +12
Appendix C.
.in 0
.sp 2
Function: MC(from, to, 5)
Arguments: Two pointers and a channel number
Results: A put status indicator
Errors: None
Action: Same as `fwrite' in the standard library, see
.in +12
Appendix C.
.in 0
.sp 2
Function: MC(channel, 6)
Arguments: A channel number
Results: None
Errors: None
Action: Same as `fclose' in the standard library, see
.in +12
Appendix C.
.in 0
Function: MC(from, to, bytes, 7)
Arguments: Two pointers and an integer
Results: None
Errors: None
Action: Same as `movebl' in the standard library, see
.in +12
Appendix C.
.in 0
.sp 2
Function: MC(from, to, character, 8)
Arguments: Two pointers and a character value
Results: The number of appearances of the character
.in +12
between the two pointers inclusively.
.in 0
Errors: None
Action: Same as `countch' in the standard library, see
.in +12
Appendix C.
.in 0
.sp 2
Function: MC(from, to, character, nptr, 9)
Arguments: Two pointers, a character value, and an integer pointer
Results: A pointer to the last character examined
Errors: None
Action: Same as `scann' in the standard library, see
.in +12
Appendix C.
.in 0
.sp 2
Function: MC(10)
Arguments: None
Results: None
Errors: None
Action: An immediate return to the operating system.
.sp 2

Function: MC(facts, start, first, last, 11)
Arguments: Four pointers
Results: None
Errors: None
Action: See Section 4.6.
.nf
.sp 2
Function: MC(12)
Arguments: None
Results: A character value

Errors: None
Action: Same as `chrdy' in the standard library, see
.in +12
Appendix C.
.in 0
.sp 2

Function: MC(from, to, 13)
Arguments: Two pointers
Results: None
Errors: None
Action: Same as `pft' in the standard library, see
.in +12
Appendix C.
.in 0
.sp 2
Function: MC(n, 14)
Arguments: An integer
Results: None
Errors: None
Action: Same as `pn' in the standard library, see
.in +12
Appendix C.
.in 0
.sp 2
Function: MC(buffer, 15)
Arguments: A character buffer
Results: None
Errors: None
Action: Same as `gs' in the standard library, see
.in +12
Appendix C.
.in 0
.sp 2
Function: MC(start, bytes, character, 16)
Arguments: A pointer, a number of bytes, a character
Results: None
Errors: None
Action: The argument number of bytes starting at `start'
.in +12
are set to `character'.
.in 0
.sp 2
Function: MC(frequency, duration, 17)
Arguments: Two integers
Results: None
Errors: None
Action: Same as `beep' in the standard library, see
.in +12
Appendix C.
.sp 2
.in 0
.fi
In addition to the seventeen standard machine calls, the IBM PC and PCjr
version of tiny-c comes with three user machine calls. They are included
primarily to demonstrate the use of user machine calls. They
implement an interface to the sound system of the PCjr.
.nf
.sp 2
Function: MC(noise_type, attenuation, 1000)
Arguments: Two integers
Results: None
Errors: None
Action: The noise generator is turned on. The
.in +12
`noise_type' is coded as follows:
.in +6
0 periodic noise shifted at 6992 Hz
1 periodic noise shifted at 3496 Hz
2 periodic noise shifted at 1748 Hz
3 periodic noise shifted by tone voice 2
4 white noise shifted at 6992 Hz
5 white noise shifted at 3496 Hz
6 white noise shifted at 1748 Hz
7 white noise shifted by tone voice 2
.in -6
and the `attenuation' is coded as follows:
.in +6
0 OFF
1 28 dB
2 26 dB
3 24 dB
4 22 dB
5 20 dB
6 18 dB
7 16 dB
8 14 dB
9 12 dB
.in -1
10 10 dB
11 8 dB
12 6 dB
13 4 dB
14 2 dB
.in 0
.sp 2
Function: MC(voice, frequency, attenuation, 1001)
Arguments: Three integers
Results: None
Errors: None
Action: Tone generator `voice' is turned on at the
.in +12
.fi
`frequency' and `attenuation'. `Attenuation' is coded
as above and `voice' is 0, 1, or 2.
.in 0
.nf
.sp 2
Function: MC(frequency, 1002)
Arguments: An integer
Results: None
Errors: None
Action: The frequency of the most recently mentioned
.in +12
.fi
tone generator voice is changed to `frequency'.
.in 0

  3 Responses to “Category : C Source Code
Archive   : TC_MAN.ZIP
Filename : SEC___5D.RNO

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/