annotate docs/ccguide/chap3.chapter @ 2772:0a3f4d8ea6d5

Found ENDC in wrong location in dwread.asm and dwwrite.asm. Corrected. Moved the native 6309 code in dwread.asm and dwwrite.asm into the H6309 labeled area and changed IFEQ H6309 to IFNE H6309. Also moved the 57600bps 6809 code to the default location. This change had been done in the old dwread.asm and dwwrite.asm files to make it easier to follow. Though these two files were overwritten from the HDBDOS project dwread.asm and dwwrite.asm files. So this conversion needed to be done again so it made the source easier to follow.
author drencor-xeen
date Wed, 23 Jan 2013 12:36:55 -0600
parents 86139e126926
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
1 <chapter>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
2 <title>C System Calls</title>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
3 <para>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
4 This section of the C compiler manual is a guide to the system
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
5 calls available from C programs.
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
6 </para>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
7 <para>
531
86139e126926 Mainly section structures added.
roug
parents: 468
diff changeset
8 It is <emphasis>not</emphasis> intended as a definitive description of OS-9 service
86139e126926 Mainly section structures added.
roug
parents: 468
diff changeset
9 requests as these are described in the OS-9 System Programmer's
86139e126926 Mainly section structures added.
roug
parents: 468
diff changeset
10 Manual. However, for most calls, enough information is available
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
11 here to enable the programmer to write systems calls into programs
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
12 without looking further.
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
13 </para>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
14 <para>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
15 The names used for the system calls are chosen so that programs
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
16 transported from other machines or operating systems should compile
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
17 and run with as little modification as possible. However, care
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
18 should be taken as the parameters and returned values of some calls
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
19 may not be compatible with those on other systems. Programmers that
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
20 are already familiar with OS-9 names and values should take
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
21 particular care. Some calls do not share the same names as the OS-9
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
22 assembly language equivalents. The assembly language equivalent
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
23 call is shown, where there is one, on the relevant page of the C
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
24 call description, and a cross-reference list is provided for those
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
25 already familiar with OS-9 calls.
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
26 </para>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
27 <para>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
28 The normal error indication on return from a system call is a
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
29 returned value of -1. The relevant error will be found in the
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
30 predefined int "errno". Errno always contains the error from the last
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
31 erroneous system call. Definitions for the errors for inclusion in
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
32 the programs are in "&lt;errno.h&gt;".
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
33 </para>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
34 <para>
531
86139e126926 Mainly section structures added.
roug
parents: 468
diff changeset
35 In the "See Also" sections on the following pages, unless
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
36 otherwise stated, the references are to other system calls.
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
37 </para>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
38 <para>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
39 Where "#include" files are shown, it is not mandatory to include
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
40 them, but it might be convenient to use the manifest constants
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
41 defined in them rather than integers; it certainly makes for
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
42 more readable programs.
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
43 </para>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
44 &abortref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
45 &absref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
46 &accessref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
47 &chainref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
48 &chdirref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
49 &chmodref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
50 &chownref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
51 &closeref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
52 &crcref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
53 &creatref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
54 &defdriveref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
55 &dupref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
56 &exitref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
57 &getpidref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
58 &getstatref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
59 &getuidref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
60 &interceptref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
61 &killref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
62 &lseekref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
63 &mknodref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
64 &modloadref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
65 &munlinkref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
66 &os9ref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
67 &openref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
68 &os9forkref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
69 &pauseref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
70 &prerrref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
71 &readref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
72 &sbrkref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
73 &setprref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
74 &setimeref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
75 &setuidref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
76 &setstatref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
77 &signalref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
78 &stacksizeref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
79 &strassref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
80 &tsleepref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
81 &unlinkref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
82 &waitref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
83 &writeref;
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
84
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
85 </chapter>