mirror of
https://github.com/SEPPDROID/Digital-Research-Source-Code.git
synced 2025-10-25 01:14:21 +00:00
Upload
Digital Research
This commit is contained in:
59
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/a3.rno
Normal file
59
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/a3.rno
Normal file
@@ -0,0 +1,59 @@
|
||||
.title CP/M-68K Alpha Release III 2/15/84
|
||||
.c
|
||||
CP/M-68K Alpha Release III 2/15/84
|
||||
.c
|
||||
----------------------------------
|
||||
.bl 1
|
||||
.hl 1;Status
|
||||
This is a base level of functionality for CP/M-68K with the Alcyon 4.3
|
||||
C compiler and CLEAR-68K v2.0 (CLEAR is the C runtime library). The system
|
||||
is stable, self-compiling, and ready for Q/A testing on the compiler, library,
|
||||
operating system, and language utilities. The following components are
|
||||
still unchanged from the released version (CP/M-68K 1.1):
|
||||
.ls
|
||||
.le;ED, PIP, and STAT
|
||||
.le;DDT
|
||||
.le;FORMAT, INIT, and PUTBOOT
|
||||
.els
|
||||
ED and DDT have known problems: the "J" command under ED crashes the system
|
||||
under known circumstances, and DDT does not properly disassemble some 68K
|
||||
instructions. No changes are planned for FORMAT, INIT, and PUTBOOT.
|
||||
.bl 1
|
||||
The EXORmacs BIOS and boot system have been re-compiled but are not yet
|
||||
verified. These components are unchanged from Alpha I, so the only change is
|
||||
the new compiler. The O/S proper has been tested using the CompuPro BIOS.
|
||||
.hl 1;Known Bugs
|
||||
.hl 2;C compiler
|
||||
The C compiler compiles all the C code associated with the operating system:
|
||||
O/S, Bootstrap, compiler, assembler, linker, and utilities. It passes the
|
||||
Alcyon 4.3 regression tests with one exception (listed below), and has some
|
||||
other known problems:
|
||||
.ls
|
||||
.le;"_\f" in a double or single quoted string evaluates as "f" (66 hex)
|
||||
instead of form feed. The workaround is to use "_\014" instead.
|
||||
.le;Initializing an array of type ^&unsigned int\& with decimal constants
|
||||
causes a bogus "Initializer Alignment" error. The compiler generates
|
||||
correct code, however.
|
||||
.le;Floating point output conversion does not round properly in all cases.
|
||||
Converting 1.5 to ASCII using "ftoa" or "etoa" yields "1.4999...".
|
||||
Unfortunately, "printf" makes use of these functions.
|
||||
.els
|
||||
.hl 2;Operating system
|
||||
We have fixed all known bugs in the operating system except for the
|
||||
"DIR!;DIR" problem. (The second command is not interpreted as a comment).
|
||||
ROMability has not yet been tested.
|
||||
.hl 2;Utilities
|
||||
Other than the bugs listed above, there are no known problems with the
|
||||
utilities.
|
||||
.hl 2;Other notes
|
||||
The system is distributed on six 8-inch SSSD diskettes. Since there is
|
||||
only about 3K free total on these disks, it will be necessary to go to
|
||||
seven diskettes for final release. We are dropping support for the VAX
|
||||
cross-tools.
|
||||
.bl 1
|
||||
Documentation included in this release is engineering input to the writing
|
||||
staff, and takes the form of changes to the existing manuals.
|
||||
.bl 1
|
||||
Time permitting, we add symbols to DDT for the release. We will
|
||||
probably still call it DDT. This depends strictly on the availability of
|
||||
resources.
|
||||
@@ -0,0 +1,81 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
These are notes made while altering the Alcyon compiler for CP/M.
|
||||
|
||||
1. It would really be nice if you confined your filenames to
|
||||
8 letters, all lower case, with a 2 letter extension.
|
||||
This will enable you to put them on any O/S without
|
||||
translating them. (More of a convenience than anything
|
||||
else).
|
||||
|
||||
2. I corrected a number of "#if... MC68000" which should have
|
||||
been "#if... REGULUS". CP/M also requires MC68000, and
|
||||
you could conceivably run the compiler on someone else's
|
||||
(obviously inferior) 68000 UNIX system. Similarly, you
|
||||
have a number of "VAX11" conditionals which really should
|
||||
be "DECC".
|
||||
|
||||
3. How can you not allow nested include files on some O/S's
|
||||
when your own software requires this feature? Including
|
||||
____ ___ ________
|
||||
multiple input buffers in the "filestack" structure fixes
|
||||
this problem (at the expense of extra memory). There is
|
||||
no signifigant performance penalty, since the memory is in
|
||||
BSS.
|
||||
|
||||
4. Command line switches MUST be case-insensitive.
|
||||
|
||||
5. In the preprocessor, you have a lot of "versaxxxx" func-
|
||||
tions. Why not define a run-time library (similar to our
|
||||
"klib") which will enable you to take out most of the
|
||||
conditional compilation? This would have a positive
|
||||
effect on your reliability and testing time.
|
||||
|
||||
6. I changed the name for the Whitesmith's compiler to
|
||||
WHITESM, to eliminate conflicts.
|
||||
|
||||
7. Under CP/M or with our cross tools, users have been
|
||||
accustomed to having the preprocessor "-i" switch take the
|
||||
next argument as the drive / directory for
|
||||
"#include <file>" constructs. I conditionally compiled
|
||||
this. In any event, your standard include logic in
|
||||
"macro.c" was faulty for systems with a colon (":") as
|
||||
device name delimiter.
|
||||
|
||||
8. Jeez, why the "printf((char *)STDERR" stuff? Couldn't you
|
||||
write a function "fprintf" for V6 and not make the rest of
|
||||
the world suffer?
|
||||
|
||||
9. The "C268" pass of the compiler produced a file that the
|
||||
assembler wouldn't assemble (using a very large ".c"
|
||||
file). There were more than 20 labels which needed to be
|
||||
grouped together. Increasing the size of the structures
|
||||
in "optim.h" fixed the problem. You really ought to range
|
||||
|
||||
|
||||
Page 2
|
||||
|
||||
|
||||
|
||||
check your index variables, and print a message if there
|
||||
are too many labels for you to handle.
|
||||
|
||||
10. The assembler will definitely NOT work under the
|
||||
___
|
||||
Whitesmith's compiler, since you rely on being able to
|
||||
open a file twice (pass1a) and on being able to rewind a
|
||||
text file with "lseek" (pass2).
|
||||
|
||||
11. There is some dependency in the assembler on getting
|
||||
storage from sbrk() which is initialized to zeros. I took
|
||||
out the code from our C runtime which zeros the area
|
||||
between the BSS and the stack, and the assembler wouldn't
|
||||
initialize.
|
||||
|
||||
12. The assembler had a bug where assembling an odd length
|
||||
byte string into the text segment caused alignment
|
||||
problems. We fixed this problem over a year ago. Why
|
||||
wasn't the fix incorporated??
|
||||
@@ -0,0 +1,81 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
These are notes made while altering the Alcyon compiler for CP/M.
|
||||
|
||||
1. It would really be nice if you confined your filenames to
|
||||
8 letters, all lower case, with a 2 letter extension.
|
||||
This will enable you to put them on any O/S without
|
||||
translating them. (More of a convenience than anything
|
||||
else).
|
||||
|
||||
2. I corrected a number of "#if... MC68000" which should have
|
||||
been "#if... REGULUS". CP/M also requires MC68000, and
|
||||
you could conceivably run the compiler on someone else's
|
||||
(obviously inferior) 68000 UNIX system. Similarly, you
|
||||
have a number of "VAX11" conditionals which really should
|
||||
be "DECC".
|
||||
|
||||
3. How can you not allow nested include files on some O/S's
|
||||
when your own software requires this feature? Including
|
||||
multiple input buffers in the "filestack" structure fixes
|
||||
this problem (at the expense of extra memory). There is
|
||||
no signifigant performance penalty, since the memory is in
|
||||
BSS.
|
||||
|
||||
4. Command line switches MUST be case-insensitive.
|
||||
|
||||
5. In the preprocessor, you have a lot of "versaxxxx" func-
|
||||
tions. Why not define a run-time library (similar to our
|
||||
"klib") which will enable you to take out most of the
|
||||
conditional compilation? This would have a positive
|
||||
effect on your reliability and testing time.
|
||||
|
||||
6. I changed the name for the Whitesmith's compiler to
|
||||
WHITESM, to eliminate conflicts.
|
||||
|
||||
7. Under CP/M or with our cross tools, users have been
|
||||
accustomed to having the preprocessor "-i" switch take the
|
||||
next argument as the drive / directory for
|
||||
"#include <file>" constructs. I conditionally compiled
|
||||
this. In any event, your standard include logic in
|
||||
"macro.c" was faulty for systems with a colon (":") as
|
||||
device name delimiter.
|
||||
|
||||
8. Jeez, why the "printf((char *)STDERR" stuff? Couldn't you
|
||||
write a function "fprintf" for V6 and not make the rest of
|
||||
the world suffer?
|
||||
|
||||
9. The "C268" pass of the compiler produced a file that the
|
||||
assembler wouldn't assemble (using a very large ".c"
|
||||
file). There were more than 20 labels which needed to be
|
||||
grouped together. Increasing the size of the structures
|
||||
in "optim.h" fixed the problem. You really ought to range
|
||||
|
||||
|
||||
Page 2
|
||||
|
||||
|
||||
|
||||
check your index variables, and print a message if there
|
||||
are too many labels for you to handle.
|
||||
|
||||
10. The assembler will definitely NOT work under the
|
||||
Whitesmith's compiler, since you rely on being able to
|
||||
open a file twice (pass1a) and on being able to rewind a
|
||||
text file with "lseek" (pass2).
|
||||
|
||||
11. There is some dependency in the assembler on getting
|
||||
storage from sbrk() which is initialized to zeros. I took
|
||||
out the code from our C runtime which zeros the area
|
||||
between the BSS and the stack, and the assembler wouldn't
|
||||
initialize.
|
||||
|
||||
12. The assembler had a bug where assembling an odd length
|
||||
byte string into the text segment caused alignment
|
||||
problems. We fixed this problem over a year ago. Why
|
||||
wasn't the fix incorporated??
|
||||
|
||||
We have not encountered any further bugs since the two for which
|
||||
@@ -0,0 +1,54 @@
|
||||
.ps 55,65
|
||||
These are notes made while altering the Alcyon compiler for CP/M.
|
||||
.ls
|
||||
.le;It would really be nice if you confined your filenames to 8 letters, all
|
||||
lower case, with a 2 letter extension. This will enable you to put them on
|
||||
any O/S without translating them. (More of a convenience than anything else).
|
||||
.le;I corrected a number of "_#if...#MC68000" which should have been
|
||||
"_#if...#REGULUS". CP/M also requires MC68000, and you could conceivably
|
||||
run the compiler on someone else's (obviously inferior) 68000 UNIX system.
|
||||
Similarly, you have a number of "VAX11" conditionals which really should
|
||||
be "DECC".
|
||||
.le;How can you not allow nested include files on some O/S's when ^&your own
|
||||
software\& requires this feature? Including multiple input buffers in the
|
||||
"filestack" structure fixes this problem (at the expense of extra memory).
|
||||
There is no signifigant performance penalty, since the memory is in BSS.
|
||||
.le;Command line switches MUST be case-insensitive.
|
||||
.le;In the preprocessor, you have a lot of "versaxxxx" functions. Why not
|
||||
define a run-time library (similar to our "klib") which will enable you to
|
||||
take out most of the conditional compilation? This would have a positive
|
||||
effect on your reliability and testing time.
|
||||
.le;I changed the name for the Whitesmith's compiler to WHITESM, to eliminate
|
||||
conflicts.
|
||||
.le;Under CP/M or with our cross tools, users have been accustomed to having
|
||||
the preprocessor "-i" switch take the next argument as the drive / directory
|
||||
for "_#include#<file>" constructs. I conditionally compiled this. In any
|
||||
event, your standard include logic in "macro.c" was faulty for
|
||||
systems with a colon (":") as device name delimiter.
|
||||
.le;Jeez, why the "printf((char *)STDERR" stuff? Couldn't you write a function
|
||||
"fprintf" for V6 and not make the rest of the world suffer?
|
||||
.le;The "C268" pass of the compiler produced a file that the assembler
|
||||
wouldn't assemble (using a very large ".c" file). There were more than
|
||||
20 labels which needed to be grouped together.
|
||||
Increasing the size of the
|
||||
structures in "optim.h" fixed the problem. You really ought to range check
|
||||
your index variables, and print a message if there are too many labels for
|
||||
you to handle.
|
||||
.le;The assembler will definitely ^&NOT\& work under the Whitesmith's compiler,
|
||||
since you rely on being able to open a file twice (pass1a) and on being
|
||||
able to rewind a text file with "lseek" (pass2).
|
||||
.le;There is some dependency in the assembler on getting storage from
|
||||
sbrk() which is initialized to zeros. I took out the code from our C
|
||||
runtime which zeros the area between the BSS and the stack, and the assembler
|
||||
wouldn't initialize.
|
||||
.le;The assembler had a bug where assembling an odd length byte string into
|
||||
the text segment caused alignment problems. We fixed this problem over a year
|
||||
ago. Why wasn't the fix incorporated??
|
||||
.els
|
||||
We have not encountered any further bugs since the two for which we gave you
|
||||
source code.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
.so macro
|
||||
.he 'AR68''AR68'
|
||||
.pr PROGRAM AR68
|
||||
ar68 - archive maintainer
|
||||
.us USAGE
|
||||
ar68 flags [pos] archive file1 file2 ...
|
||||
.fn FUNCTION
|
||||
\&'ar68' collects individual files into a single archive,
|
||||
or library file.
|
||||
It is primarily used to maintain libraries of object files
|
||||
for use by the loader,
|
||||
although it can be used with any type of file.
|
||||
.sp 1
|
||||
The flags argument determines the function that 'ar68' performs.
|
||||
One character from the set {dprtx} must be specified;
|
||||
these are the function select flags.
|
||||
The function select flags specify the following functions:
|
||||
.sp 2
|
||||
.in +8
|
||||
.ti -8
|
||||
d\ \ \ \ \ \ \ Delete the specified files from the archive.
|
||||
.sp
|
||||
.ti -8
|
||||
p\ \ \ \ \ \ \ Print the specified files.
|
||||
If the files are not printable,
|
||||
e.g. object files, havoc results.
|
||||
.sp
|
||||
.ti -8
|
||||
r\ \ \ \ \ \ \ Replace the specified files.
|
||||
If an optional position flag from the set
|
||||
{abi} is not specified new files are placed at the end of the archive.
|
||||
.sp
|
||||
.ti -8
|
||||
t\ \ \ \ \ \ \ Print a table of contents of the archive.
|
||||
If files are specified only the specified files are listed.
|
||||
.sp
|
||||
.ti -8
|
||||
x\ \ \ \ \ \ \ Extract the specified files from the archive,
|
||||
creating loose files in the current directory.
|
||||
If no files are specified, all of the files in the archive are extracted.
|
||||
Note that 'x' does not alter the archive.
|
||||
The 'd' flag must be used to delete files from an archive.
|
||||
.sp 2
|
||||
.in -8
|
||||
The files must be specified in the same order as they appear in the
|
||||
archive file,
|
||||
otherwise some of the files may not be found.
|
||||
For example, if an archive "t.a" consists of the files file1, file2
|
||||
and file3 in that order,
|
||||
the command "ar t t.a file2 file1" will cause file2 to be listed,
|
||||
but not file1.
|
||||
Instead, the message "file1 not in archive" will be printed.
|
||||
This is because 'ar68' only searches the archive once.
|
||||
Files must be specified in the order they appear in the archive.
|
||||
.sp 2
|
||||
Characters from the set {abiv} may be included in the flags argument.
|
||||
These characters have the following function:
|
||||
.in +8
|
||||
.sp 2
|
||||
.ti -8
|
||||
a\ \ \ \ \ \ \ When used with the 'r' flag, 'a' specifies that new files
|
||||
are to be inserted after the file "pos" in the archive.
|
||||
Note that the "pos" argument must be specified if and only if
|
||||
one of the characters {abi} appear in the flags argument.
|
||||
.sp
|
||||
.ti -8
|
||||
b\ \ \ \ \ \ \ 'b' has the same function as 'a', except that new files are
|
||||
inserted before the file "pos" in the archive.
|
||||
.sp
|
||||
.ti -8
|
||||
i\ \ \ \ \ \ \ 'i' has exactly the same meaning as 'b', the two characters
|
||||
can be used interchangeably (but only one must appear).
|
||||
.sp
|
||||
.ti -8
|
||||
v\ \ \ \ \ \ \ 'v' (verbose) causes a file by file description of the
|
||||
operation of 'ar68' to be printed.
|
||||
Files are either copied (c),
|
||||
replaced (r), added (a), deleted (d) or extracted (x) from an archive.
|
||||
When used with the 't' flag, 'v' causes a long listing to be printed.
|
||||
Verbose has no effect on the print function.
|
||||
.in -8
|
||||
.fl FILES
|
||||
_~ar????? (process id in octal) - temporary file
|
||||
.dg DIAGNOSTICS
|
||||
.sa SEE ALSO
|
||||
lo68 (cmnd), ar68 (files)
|
||||
.bg BUGS
|
||||
When using any of the 'a' 'b', or 'i' flags to position the files,
|
||||
if any of the files in the namelist already exist in the archive,
|
||||
you must delete them with the delete option first. Otherwise, 'ar68'
|
||||
will make another copy of them.
|
||||
113
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/cmnd/as68
Normal file
113
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/cmnd/as68
Normal file
@@ -0,0 +1,113 @@
|
||||
.so macro
|
||||
.he 'AS68''AS68'
|
||||
.pr PROGRAM AS
|
||||
as68 - assembler for the Motorola 68000
|
||||
.us USAGE
|
||||
as68 [-i] [-p] [-u] [-a] [-N] sourcefile
|
||||
.fn FUNCTION
|
||||
\&'as68' is the REGULUS 68000 assembler.
|
||||
It is used to assemble a program for the Motorola 68000.
|
||||
The syntax accepted is identical to the Motorola 68000 cross assembler as
|
||||
described in Motorola Manual M68KXASM(D3) with the exceptions and
|
||||
additions described below.
|
||||
The source file must be present as the first argument.
|
||||
The assembler always produces a relocatable object file whose name
|
||||
is the same as the source file primary name with a ".o" extension --
|
||||
ie. if the source file name is "test.s" then the object file name is
|
||||
"test.o"; if the source file name is "pgm1" then the object file
|
||||
name is "pgm1.o".
|
||||
.sp
|
||||
The -i option is used to initialize the assembler in the case that
|
||||
the file '/lib/as68symb' does not exist or becomes corrupted. It
|
||||
also requires the use of the initialization file /lib/as68init.
|
||||
The command would be of the form : 'as68 -i /lib/as68init'.
|
||||
.sp
|
||||
If the -p flag is specified, the assembler produces a hexidecimal
|
||||
side-by-side listing on the standard output
|
||||
(you may want to redirect this to a file).
|
||||
Error messages are also produced on the standard output file whether or not
|
||||
the -p flag is specified.
|
||||
.sp
|
||||
If the -u flag is specified, all undefined symbols in the assembly
|
||||
are treated as global.
|
||||
.sp
|
||||
If the -a flag is specified, all address constants are generated
|
||||
as 16-bit numbers.
|
||||
Default is 32-bit numbers for all externals.
|
||||
.sp
|
||||
If the -N flag is specified, pass 1.5 of the assembler is not executed.
|
||||
This pass changes all long relative branches to short relative branches
|
||||
where possible.
|
||||
.sp
|
||||
Error messages begin with an &,
|
||||
indicate the source line on which the error occurred
|
||||
and are meant to be self-explanatory.
|
||||
The error messages preceded by a single '&' are generated during the
|
||||
first pass of the assembler and those preceded by a pair '&&' are
|
||||
generated during the second pass of the assembler.
|
||||
.sp
|
||||
The assembler accepts both upper and lower case characters.
|
||||
Labels and variables are case sensitive ('LOOP' is different
|
||||
from 'Loop'), but mnemonics and directives can be in either upper
|
||||
or lower case.
|
||||
.sp
|
||||
Macros are implemented using the C preprocessor which is part of the
|
||||
cc68 command (see C68(cmnd)).
|
||||
Conditional assembly is also implemented using the
|
||||
preprocessor.
|
||||
Use the command "cc -P pgm.s" to expand macros using the C preprocessor.
|
||||
The expanded file is left on pgm.i.
|
||||
.sp
|
||||
.fl FILES
|
||||
/lib/as68symb
|
||||
.br
|
||||
/tmp/a6????A (???? is the process id number)
|
||||
.br
|
||||
/lib/as68init
|
||||
.sa SEE ALSO
|
||||
as68 (misc), lo68 (cmnd), c68 (cmnd)
|
||||
.ex EXTRAS
|
||||
The following enhancements have been added to aid the assembly language
|
||||
programmer by making the assembly language more regular:
|
||||
.sp
|
||||
move, add, sub mnemonics will actually generate moveq, addq, and suba
|
||||
instructions where possible.
|
||||
If a move instruction rather than a moveq instruction is desired (affecting
|
||||
only lower byte or word of D register), the size attribute must be
|
||||
explicitly coded ie. move.b or move.w.
|
||||
The assembler will change any
|
||||
move or move.l to moveq if possible.
|
||||
.sp
|
||||
clr.x An is allowed and will actually generate a suba.x An,An instruction.
|
||||
.sp
|
||||
add, sub, cmp with an A register source/destination are allowed and
|
||||
generate adda, suba, cmpa.
|
||||
.sp
|
||||
add, and, cmp, eor, or, sub are allowed with immediate first operands
|
||||
and actually generate addi, andi, cmpi, eori, ori, subi instructions
|
||||
if the second operand is not register direct.
|
||||
.sp
|
||||
All branch instructions generate short relative branches where
|
||||
possible, including forward references.
|
||||
.sp
|
||||
Any shift instruction with no shift count specified assumes a shift count
|
||||
of one; ie. "asl r1" is equivalent to "asl #1,r1".
|
||||
.sp
|
||||
jsr instructions are changed to bsr instructions if the resulting
|
||||
bsr is shorter than the jsr.
|
||||
.sp
|
||||
The mnemonics 'inc' and 'dec' are also recognized and are functionally
|
||||
equivilent to "addq 1" or "subq 1".
|
||||
.sp
|
||||
Several additional mnemonics have been added to the condition code
|
||||
instructions which map to the standard set (bt -> bra, bhs
|
||||
-> bhis, bnz -> bne, bze -> beq, dbhs -> dbhi,
|
||||
dblo -> dbcs, dbnz -> dbne, dbze -> dbeq, shs
|
||||
-> scc, slo -> scc, snz -> sne, sze -> seq).
|
||||
.bg BUGS
|
||||
\&.set is currently implemented as a .equ.
|
||||
.sp
|
||||
There are several directives which are recognized but ignored:
|
||||
mask2, idnt, ttl, opt, and page.
|
||||
.sp
|
||||
PC relative addressing mode is currently not supported.
|
||||
179
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/cmnd/c68
Normal file
179
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/cmnd/c68
Normal file
@@ -0,0 +1,179 @@
|
||||
.so macro
|
||||
.he 'C68''C68'
|
||||
.de sw
|
||||
.sp
|
||||
.ti -8
|
||||
..
|
||||
.pr PROGRAM C68
|
||||
c68 - 68000 C compiler
|
||||
.us USAGE
|
||||
c68 [-c] [-[e|f]] [-v] [-L] [-a] [-S] [-T] [-t] [-[6|7|3|5]] file...
|
||||
.fn FUNCTION
|
||||
'c68' is the REGULUS 68000 C compiler. It accepts three types of arguments:
|
||||
.sp
|
||||
Arguments whose names end with '.c' are taken to be C source programs;
|
||||
they are compiled, and each object program is left on the file
|
||||
whose name is that of the source with '.o' substituted for '.c'.
|
||||
The '.o' file is normally deleted, however, if a single
|
||||
C program is compiled and loaded all at one go.
|
||||
.sp
|
||||
The aforementioned flags as well as the C preprocessor flags (eg. -P or -D)
|
||||
See 'cpp68(cmnd)' and the link-editor flags (eg. -l or -s) See 'lo68(cmnd)'.
|
||||
The following flags are interpreted by 'c68'.
|
||||
.in +8
|
||||
.sw
|
||||
-c\ \ \ \ \ \ Suppress the loading phase of the compilation and force an
|
||||
object file to be produced, even if only one program is compiled.
|
||||
.sw
|
||||
-e\ \ \ \ \ \ Specify that floating point arithmetic is used. Instructs
|
||||
the loader to load the floating point library 'libE.a'. Constants
|
||||
will be generated in the 'IEEE Floating Point' format. Constants will
|
||||
be generated in this format by default.
|
||||
.sw
|
||||
-f\ \ \ \ \ \ Specify that floating point arithmetic is used. Instructs
|
||||
the loader to load the floating point library 'libF.a'. Constants
|
||||
will be generated in the 'Fast Floating Point' format.
|
||||
.sw
|
||||
-v\ \ \ \ \ \ Force the 'C' source file being processed to be printed
|
||||
regardless of whether there is more than one or not.
|
||||
.sw
|
||||
-S\ \ \ \ \ \ Compile the named C programs, and leave
|
||||
the assembler-language output on corresponding file suffixed by '.s'.
|
||||
Line number comments are included in the assembly code to help relate
|
||||
the assembly code and the C source.
|
||||
.sw
|
||||
-L\ \ \ \ \ \ (default) Compile a program which is larger than 32K bytes.
|
||||
This flag instructs the assembler to generate 32 bit addresses for
|
||||
all external references and also changes some code generation
|
||||
sequences (i.e. indexed array references). This flag MUST be specified
|
||||
for all programs whose total size (text size + data size + bss size)
|
||||
is larger than 32K bytes.
|
||||
.sw
|
||||
-a\ \ \ \ \ \ This is the alternate of the '-L' flag, it causes
|
||||
the assembler to generate 16 bit addresses for all externally referenced
|
||||
variables.
|
||||
.sw
|
||||
-T\ \ \ \ \ \ Generate assembler code suitable for the 68010.
|
||||
Generates "move cc" instead of "move sr". Let's the assembler know the
|
||||
meaning of the "movec", "moves", "rte", and "rtd" instructions.
|
||||
.sw
|
||||
-t\ \ \ \ \ \ Causes string constants to be placed in the text segment
|
||||
(as opposed to the data segment). The '-t' flag with an appended
|
||||
0, 1, 2, or p (eg. '-tp') is used to specify an alternate parser,
|
||||
code generator, assembler or preprocessor respectively. The alternate
|
||||
executables are expected to be located in the directory "/usr/c68".
|
||||
.sw
|
||||
-6\ \ \ \ \ \ Version 6 compatibility mode. Adds the v6 include file
|
||||
directory onto the include file search list (/usr/include/v6), and
|
||||
adds the version 6 compatibility library (/lib/libv6.a) to the
|
||||
loader's library search list.
|
||||
.sw
|
||||
-7\ \ \ \ \ \ Version 7 compatibility mode. Adds the v7 include file
|
||||
directory onto the include file search list (/usr/include/v7), and
|
||||
adds the version 7 compatibility library (/lib/libv7.a) to the
|
||||
loader's library search list.
|
||||
.sw
|
||||
-3\ \ \ \ \ \ System 3 compatibility mode. Adds the s3 include file
|
||||
directory onto the include file search list (/usr/include/sys3), and
|
||||
adds the system 3 compatibility library (/lib/libs3.a) to the
|
||||
loader's library search list.
|
||||
.sw
|
||||
-5\ \ \ \ \ \ System 5 compatibility mode. Adds the s5 include file
|
||||
directory onto the include file search list (/usr/include/sys5), and
|
||||
adds the system 5 compatibility library (/lib/libs5.a) to the
|
||||
loader's library search list.
|
||||
.sw
|
||||
-P\ \ \ \ \ \ Run only the macro preprocessor
|
||||
on the named C programs, and leave the output on corresponding
|
||||
files suffixed '.i'.
|
||||
.sw
|
||||
-E\ \ \ \ \ \ Run only the macro preprocessor on the named C programs,
|
||||
and write the output to the standard output device. Each code block is
|
||||
identified using a sequence consisting of the source file name and
|
||||
line number (eg. # 34 file.c).
|
||||
.sw
|
||||
-C\ \ \ \ \ \ Like the -E flag except that the comments are not removed.
|
||||
This is used by lint and similar programs which need information which
|
||||
is stored in comments.
|
||||
.sw
|
||||
-Dxxx\ \ \ Define the symbol "xxx" as a preprocessor symbol.
|
||||
This flag is useful for setting compile time options such as "DEBUG"
|
||||
or "NOMMU". (See the "ifdef" construct described below)
|
||||
.sw
|
||||
-Idir\ \ \ Specify a directory (eg. -I/usr/include/test) in which to
|
||||
search for include files which are surrounded by angle brackets <stdio.h>
|
||||
or quotes "ctypes.h" before searching in the default directory '/usr/include'.
|
||||
If '-I' is specified without a directory name the current directory will
|
||||
be used.
|
||||
.in -8
|
||||
.sp
|
||||
Other arguments are taken to be either loader flag arguments,
|
||||
or C-compatible object programs, typically produced by an earlier 'c68' run,
|
||||
or perhaps libraries of C-compatible routines. These programs,
|
||||
together with the results of any compilations specified, are loaded
|
||||
(in the order given) to produce an executable program with name 'c.out'.
|
||||
.sp
|
||||
The instruction 'asm("text");' will output a single line of text into the
|
||||
assembly output literally.
|
||||
.fl FILES
|
||||
.nf
|
||||
.na
|
||||
file.c input file
|
||||
file.o object file
|
||||
file.s assembly language file
|
||||
file.i preprocessor output file
|
||||
a.out loaded output
|
||||
/tmp/c6t?a temporary
|
||||
/lib/c068 parser
|
||||
/lib/c168 code generator
|
||||
/lib/c680.o runtime startoff
|
||||
/lib/lib7.a 68000 C library
|
||||
/lib/libF.a 68000 fast floating point library
|
||||
/lib/libE.a 68000 IEEE floating point library
|
||||
/lib/libv6.a version 6 compatibility library
|
||||
/lib/libv7.a version 7 compatibility library
|
||||
/lib/libs3.a system 3 compatiblity library
|
||||
/lib/libs5.a system 5 compatibility library
|
||||
.fi
|
||||
.ad
|
||||
.sa SEE ALSO
|
||||
.fi
|
||||
.ad
|
||||
"The C Programming Language" by Kernighan and Ritchie, published by
|
||||
Prentice-Hall in 1978.
|
||||
.br
|
||||
cpp(cmnd), as(cmnd), ld(cmnd), float(misc), a.out(files)
|
||||
.br
|
||||
float(misc)
|
||||
.dg DIAGNOSTICS
|
||||
The diagnostics produced by C itself are intended to be self-explanatory.
|
||||
Occasional messages may be produced by the assembler or loader.
|
||||
To distinguish the source of error messages,
|
||||
compiler error messages begin with an *,
|
||||
assembler error messages begin with an &,
|
||||
and loader error messages begin with a :.
|
||||
.sp
|
||||
.ti -5
|
||||
DIFFERENCES
|
||||
.br
|
||||
This compiler is an implementation of the language as described in
|
||||
Kernighan and Ritchie Appendix A with the following exceptions
|
||||
and/or machine dependencies:
|
||||
.sp
|
||||
All pointers are 32 bits in length to accommodate the full 68000
|
||||
addressing range.
|
||||
Address constants are generated as 32-bit numbers
|
||||
unless the -a flag is specified.
|
||||
.sp
|
||||
Pointer register variables are assigned to A-registers.
|
||||
All other register variables are assigned to D-registers.
|
||||
There are 5 D-registers and 3 A-registers available for register variables.
|
||||
.sp
|
||||
Structure arguments, and structures returned
|
||||
from procedures are not yet implemented.
|
||||
.sp
|
||||
An additional comment syntax has been added. Comments may be introduced
|
||||
by two slashes (i.e. //) and are terminated by the end of the source line.
|
||||
The standard C comment syntax (i.e. /* comment */) is also supported.
|
||||
.sp
|
||||
Unsigned long and unsigned short have not yet been implemented.
|
||||
155
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/cmnd/cpp68
Normal file
155
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/cmnd/cpp68
Normal file
@@ -0,0 +1,155 @@
|
||||
.so macro
|
||||
.he 'CPP68''CPP68'
|
||||
.de sw
|
||||
.sp
|
||||
.ti -8
|
||||
..
|
||||
.pr PROGRAM CPP68
|
||||
cpp68 - 68000 C preprocessor
|
||||
.us USAGE
|
||||
cpp68 [-C] [-P] [-E] [-D] [-I] [-[6|7|3|5]] source
|
||||
.fn FUNCTION
|
||||
'cpp68' is the REGULUS 68000 C preprocessor. It may be called specifically
|
||||
or by using 'cc'. The following flags re interpreted by the C preprocessor:
|
||||
.sp
|
||||
.sw
|
||||
-P\ \ \ \ \ \ Run only the macro preprocessor
|
||||
on the named C programs, and leave the output on corresponding
|
||||
files suffixed '.i'.
|
||||
.sw
|
||||
-E\ \ \ \ \ \ Run only the macro preprocessor on the named C programs,
|
||||
and write the output to the standard output device. Each code block is
|
||||
identified using a sequence consisting of the source file name and
|
||||
line number (eg. # 34 file.c).
|
||||
.sw
|
||||
-C\ \ \ \ \ \ Like the -C flag except that the comments are not removed.
|
||||
This is used by lint and similar programs which need information which
|
||||
is stored in comments.
|
||||
.sw
|
||||
-Idir\ \ \ Specify a directory (eg. -I/usr/include/test) in which to
|
||||
search for include files which are surrounded by angle brackets <stdio.h>
|
||||
or quotes "ctypes.h" before searching in the default directory '/usr/include'.
|
||||
If '-I' is specified without a directory name the current directory will
|
||||
be used.
|
||||
.sw
|
||||
-6\ \ \ \ \ \ Version 6 compatibility mode. Adds the v6 include file
|
||||
directory onto the include file search list (/usr/include/v6), and
|
||||
adds the version 6 compatibility library (/lib/libv6.a) to the
|
||||
loader's library search list.
|
||||
.sw
|
||||
-7\ \ \ \ \ \ Version 7 compatibility mode. Adds the v7 include file
|
||||
directory onto the include file search list (/usr/include/v7), and
|
||||
adds the version 7 compatibility library (/lib/libv7.a) to the
|
||||
loader's library search list.
|
||||
.sw
|
||||
-3\ \ \ \ \ \ System 3 compatibility mode. Adds the s3 include file
|
||||
directory onto the include file search list (/usr/include/sys3), and
|
||||
adds the system 3 compatibility library (/lib/libs3.a) to the
|
||||
loader's library search list.
|
||||
.sw
|
||||
-5\ \ \ \ \ \ System 5 compatibility mode. Adds the s5 include file
|
||||
directory onto the include file search list (/usr/include/sys5), and
|
||||
adds the system 5 compatibility library (/lib/libs5.a) to the
|
||||
loader's library search list.
|
||||
.in -8
|
||||
.sp
|
||||
.ne 4
|
||||
'cpp68' provides a macro processing facility with the following commands:
|
||||
.sp
|
||||
.in +8
|
||||
.ti -8
|
||||
#include "filename"
|
||||
.br
|
||||
.ti -8
|
||||
#include <filename>
|
||||
.sp
|
||||
Causes the text of the named file to be inserted in the input stream.
|
||||
Files may contain (nested) #include statements. The quoted (single or
|
||||
double) inlude file will first be looked for in the directory where the
|
||||
source file exists which references it, followed by the directories
|
||||
specified using the '-I' flag, and finally in the directory '/usr/include'.
|
||||
An include file surrounded by angle brackets will be looked for only on
|
||||
the include file path list, and in '/usr/include'.
|
||||
.sp
|
||||
.ti -8
|
||||
#define NAME string
|
||||
.sp
|
||||
Causes the contents of "string" to be substituted
|
||||
for NAME whenever NAME is encountered in the input stream.
|
||||
NAME must be a valid "C" identifier.
|
||||
.sp
|
||||
.ti -8
|
||||
#define NAME(a,b,c) text
|
||||
.sp
|
||||
Causes substitution of the text (with
|
||||
parameters) whenever
|
||||
NAME(p1,p2,p3) is encountered in the input stream.
|
||||
NAME, a, b, and c must be valid "C" identifiers.
|
||||
.sp
|
||||
.ti -8
|
||||
#undef NAME
|
||||
.sp
|
||||
Causes the definition of NAME to be forgotten.
|
||||
.sp
|
||||
.ti -8
|
||||
#ifdef NAME
|
||||
.sp
|
||||
If NAME has been previously defined in a #define statement
|
||||
or via the -D flag,
|
||||
include all input until a corresponding #else or #endif is encountered;
|
||||
if NAME is undefined, skip the input.
|
||||
Nesting of conditional statements is permitted.
|
||||
The value of NAME is immaterial.
|
||||
.sp
|
||||
.ti -8
|
||||
#ifndef NAME
|
||||
.sp
|
||||
If NAME has not been defined in a previous #define statement,
|
||||
include all input until a corresponding #else or #endif
|
||||
is encountered in the input
|
||||
stream; if NAME is defined, skip the input.
|
||||
.sp
|
||||
.ti -8
|
||||
#if CONSTANT_EXPRESSION
|
||||
.sp
|
||||
If the CONSTANT_EXPRESSION has a non-zero value, include
|
||||
all input until a corresponding #endif or #else is encountered in the
|
||||
input stream; if CONSTANT_EXPRESSION is zero, skip the input.
|
||||
.sp
|
||||
.ti -8
|
||||
#else
|
||||
.sp
|
||||
If the checked condition in the corresponding #if, #ifdef, or
|
||||
#ifndef is true then any lines between #else and #endif are ignored.
|
||||
If the checked condition is false then any lines between the test
|
||||
and the #else or, lacking a #else, the #endif, are ignored.
|
||||
.sp
|
||||
.ti -8
|
||||
#endif
|
||||
.sp
|
||||
Terminate a #if or #ifdef or #ifndef statement.
|
||||
.sp
|
||||
.ti -8
|
||||
#line LINE [FILENAME]
|
||||
.sp
|
||||
Coerces the preprocessor and the parser into believing that the next line
|
||||
is in the specified file on the specified line. If no filename is
|
||||
specified uses the current source file name.
|
||||
.in -8
|
||||
.sp
|
||||
There are two predefined, user redefineable macro's __FILE and __LINE
|
||||
while will respectively be evaluated to the current file name enclosed
|
||||
in double quotes and line number respectively by the preprocessor.
|
||||
.sp
|
||||
.fl FILES
|
||||
.nf
|
||||
.na
|
||||
file.c input file
|
||||
file.s assembly language input file
|
||||
file.i preprocessor output file
|
||||
.fi
|
||||
.ad
|
||||
.sa SEE ALSO
|
||||
.fi
|
||||
.ad
|
||||
c68(cmnd)
|
||||
130
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/cmnd/lo68
Normal file
130
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/cmnd/lo68
Normal file
@@ -0,0 +1,130 @@
|
||||
.so macro
|
||||
.he 'LO68''LO68'
|
||||
.de np
|
||||
.sp
|
||||
.in -5
|
||||
.lp +5 5
|
||||
..
|
||||
.pr PROGRAM LO68
|
||||
lo68 - 68000 link editor
|
||||
.us USAGE
|
||||
lo68 [ -slXZUoIr] name ...
|
||||
.fn FUNCTION
|
||||
\&'lo68'
|
||||
combines several object programs into one;
|
||||
resolves external references; and searches libraries.
|
||||
In the simplest case the names of several object
|
||||
programs are given, and
|
||||
\&'lo68'
|
||||
combines them, producing
|
||||
an object module which can be executed on the 68000.
|
||||
The output of
|
||||
\&'lo68'
|
||||
is left on
|
||||
\&'c.out'
|
||||
(or the file name specified by -o).
|
||||
This file is made executable only if no errors occurred during the load.
|
||||
.sp
|
||||
The argument routines are concatenated in the order
|
||||
specified.
|
||||
The entry point of the output is the
|
||||
beginning of the first routine.
|
||||
.sp
|
||||
If any argument is a library, it is searched exactly once
|
||||
at the point it is encountered in the argument list.
|
||||
Only those routines defining an unresolved external
|
||||
reference are loaded.
|
||||
If a routine from a library
|
||||
references another routine in the library,
|
||||
the referenced routine must appear after the
|
||||
referencing routine in the library.
|
||||
Thus the order of programs within libraries is important.
|
||||
Libraries are assumed to be standard ar (cmnd) format
|
||||
(either magic number 177555 or magic number 177545 library
|
||||
formats can be searched).
|
||||
.sp
|
||||
\&'lo68'
|
||||
understands several flag arguments which are written
|
||||
preceded by a `-'.
|
||||
Except for -l,
|
||||
they should appear before the file names.
|
||||
.sp
|
||||
.lp +4 4
|
||||
-s\ \ \ `strip' the output, that is, remove the symbol table
|
||||
and relocation bits to save space.
|
||||
.np +4 4
|
||||
-r\ \ \ put the relocation bits on the output file
|
||||
(default is no relocation bits on the output file).
|
||||
.np +4 4
|
||||
-I\ \ \ don't output error messages for 16-bit address overflow.
|
||||
.np +4 4
|
||||
-U\ \ \ take the following argument as a symbol and enter
|
||||
it as undefined in the symbol table.
|
||||
This is useful
|
||||
for loading wholly from a library, since initially the symbol
|
||||
table is empty and an unresolved reference is needed
|
||||
to force the loading of the first routine.
|
||||
.np +4 4
|
||||
-o\ \ \ interprets the argument immediately following it as the name
|
||||
of the output file. If this argument is not specified, the name
|
||||
of the output file is c.out.
|
||||
.np +4 4
|
||||
-l\ \ \ This option is an abbreviation for a library name.
|
||||
-l
|
||||
alone stands for `/lib/lib7.a', which
|
||||
is the standard system library for assembly language programs.
|
||||
-lx
|
||||
stands for `/lib/libx.a' where x is any character.
|
||||
A library is searched when its name is encountered,
|
||||
so the placement of a -l
|
||||
is significant.
|
||||
.np +4 4
|
||||
-X\ \ \ Save local symbols
|
||||
except for those whose names begin with `L'.
|
||||
This option is used by
|
||||
\&'lo68'
|
||||
to discard internally generated labels while
|
||||
retaining symbols local to routines.
|
||||
If the -X flag is not specified, lo68 puts only global symbols
|
||||
into the symbol table.
|
||||
.np +4 4
|
||||
-Znnnnnnnn\ \ \ Define nnnnnnnn as beginning hex address for
|
||||
text segment.
|
||||
This address defaults to 0, but can be specified as any hex number
|
||||
between 0 and 0FFFFFFFF hex.
|
||||
This option is especially useful for stand-alone programs.
|
||||
nnnnnnnn must be a hex number -- lower case a-f or upper case A-F are
|
||||
both allowed.
|
||||
.np +4 4
|
||||
-Tnnnnnnnn\ \ \ Same as -Znnnnnnnn.
|
||||
.np +4 4
|
||||
-Dnnnnnnnn\ \ \ Define nnnnnnnn as beginning hex address for
|
||||
data segment.
|
||||
This address defaults to next byte after end of text segment,
|
||||
but can be specified as any hex number
|
||||
between 0 and 0FFFFFFFF hex.
|
||||
This option is especially useful for stand-alone programs.
|
||||
nnnnnnnn must be a hex number -- lower case a-f or upper case A-F are
|
||||
both allowed.
|
||||
.np +4 4
|
||||
-Bnnnnnnnn\ \ \ Define nnnnnnnn as beginning hex address for
|
||||
bss segment.
|
||||
This address defaults to next byte after end of data segment,
|
||||
but can be specified as any hex number
|
||||
between 0 and 0FFFFFFFF hex.
|
||||
This option is especially useful for stand-alone programs.
|
||||
nnnnnnnn must be a hex number -- lower case a-f or upper case A-F are
|
||||
both allowed.
|
||||
.in -5
|
||||
.dt
|
||||
.fl FILES
|
||||
.nf
|
||||
/lib/lib7.a standard library
|
||||
/lib/libF.a floating point library
|
||||
.fi
|
||||
.br
|
||||
c.out output file
|
||||
.sa "SEE ALSO"
|
||||
as(cmnd), ar(cmnd), cc(cmnd)
|
||||
.dg DIAGNOSTICS
|
||||
Error messages begin with a : and are meant to be self-explanatory.
|
||||
@@ -0,0 +1,4 @@
|
||||
.ll 64
|
||||
.po 8
|
||||
.in 0
|
||||
.so Sectioname
|
||||
@@ -0,0 +1,95 @@
|
||||
.de lp
|
||||
.in +5
|
||||
.ti -5
|
||||
..
|
||||
.de pr
|
||||
.bp 1
|
||||
.sp 2
|
||||
PROGRAM
|
||||
.br
|
||||
.in +5
|
||||
..
|
||||
.de us
|
||||
.sp
|
||||
.ti -5
|
||||
USAGE
|
||||
.br
|
||||
..
|
||||
.de fn
|
||||
.sp
|
||||
.ti -5
|
||||
FUNCTION
|
||||
.br
|
||||
..
|
||||
.de fl
|
||||
.sp
|
||||
.ti -5
|
||||
FILES
|
||||
.br
|
||||
..
|
||||
.de dg
|
||||
.sp
|
||||
.ti -5
|
||||
DIAGNOSTICS
|
||||
.br
|
||||
..
|
||||
.de sa
|
||||
.sp
|
||||
.ti -5
|
||||
SEE ALSO
|
||||
.br
|
||||
..
|
||||
.de bg
|
||||
.sp
|
||||
.ti -5
|
||||
BUGS
|
||||
.br
|
||||
..
|
||||
.de n
|
||||
.bp 1
|
||||
.sp
|
||||
NAME
|
||||
.in +5
|
||||
.br
|
||||
..
|
||||
.de d
|
||||
.sp
|
||||
.ti -5
|
||||
DESCRIPTION
|
||||
.br
|
||||
..
|
||||
.de ex
|
||||
.sp
|
||||
.ti -5
|
||||
EXTRAS
|
||||
.br
|
||||
..
|
||||
.de ai
|
||||
.sp
|
||||
.ti -5
|
||||
.fi
|
||||
ASSEMBLY INTERFACE
|
||||
.br
|
||||
.nf
|
||||
..
|
||||
.de cs
|
||||
.sp
|
||||
.ti -5
|
||||
CALLING SEQUENCE
|
||||
.br
|
||||
..
|
||||
.de sy
|
||||
.sp
|
||||
.ti -5
|
||||
SYNOPSIS
|
||||
.br
|
||||
..
|
||||
.de it
|
||||
\&'\\$1'
|
||||
..
|
||||
.de rt
|
||||
.sp
|
||||
.ti -5
|
||||
RETURN VALUES
|
||||
.br
|
||||
..
|
||||
@@ -0,0 +1,14 @@
|
||||
.so macro
|
||||
.he 'NMC68''NMC68'
|
||||
.pr PROGRAM NMC68
|
||||
nmc68 - print c68 symbol table
|
||||
.us USAGE
|
||||
nmc68 [ name ]
|
||||
.fn FUNCTION
|
||||
prints the symbol table from the output file of an
|
||||
68000 assembler (as68) or loader (lo68) run.
|
||||
Each symbol name is followed by its value
|
||||
and one or more of the following type descriptors: equ (equated), global,
|
||||
equreg (equated register), external, data, text, bss, abs (absolute).
|
||||
The output is not sorted and thus appears in the order that the
|
||||
symbols appear in the file's symbol table.
|
||||
@@ -0,0 +1 @@
|
||||
.fo 'REGULUS Reference Manual'- % -'COMMAND'
|
||||
@@ -0,0 +1,37 @@
|
||||
.so macro
|
||||
.he 'SENDC68''SENDC68'
|
||||
.pr PROGRAM SENDC68
|
||||
sendc68 - 68000 downloader
|
||||
.us USAGE
|
||||
sendc68 [-r] [-d delay] [-s start] [-e end] [-] objectfile [ ttyname ]
|
||||
.fn FUNCTION
|
||||
\&'sendc68' reads the objectfile, which must be in the c.out format produced
|
||||
by the 68000 linking loader lo68. Sendc68 converts this executable
|
||||
object code into the absolute ASCII load format (S records) acceptable
|
||||
by the MACSBUG monitor and then sends these S records to the 68000
|
||||
via a serial line.
|
||||
.sp
|
||||
Locations 400 hexadecimal through 1000 hexidecimal are MACSBUG ram
|
||||
and will not be loaded. In order to override this, the '-s' and '-e'
|
||||
flags can be used to alter the addresses which are not to be
|
||||
loaded. With 'start' being the first address to not load, and 'end'
|
||||
being the last address. By setting the ending address to be smaller
|
||||
than the starting address all locations will be considered legitimate.
|
||||
.sp
|
||||
The optional argument '-r' will only output a newline, rather than
|
||||
the standard newline-carriage return. This is for use by systems
|
||||
which translate newline to carriage return-newline.
|
||||
.sp
|
||||
The '-d delay' flag allows the user to specify a line delay. This is
|
||||
for slowing the output of sendc68 when outputting to a slow device.
|
||||
.sp
|
||||
If the optional final argument 'ttyname' is
|
||||
present, this is the name of the special file (ie. /dev/tty?) to use
|
||||
to download the 68000. If this optional third argument is not
|
||||
present, the standard output file is used.
|
||||
.sp
|
||||
If the optional "-" argument is specified, sendc68 does not clear
|
||||
the bss segment during the load. This results in a faster load, but
|
||||
all bss memory will have random initial values.
|
||||
.sa SEE ALSO
|
||||
c68 (cmnd), as68 (cmnd), lo68 (cmnd), c.out (files)
|
||||
@@ -0,0 +1,20 @@
|
||||
.so macro
|
||||
.he 'SETSTACK68''SETSTACK68'
|
||||
.pr PROGRAM SETSTACK68
|
||||
setstack68 - set the stack size
|
||||
.us USAGE
|
||||
setstack68 file stacksize [breaksize]
|
||||
.fn FUNCTION
|
||||
Sets the stack entry or break size in an executable file to the given
|
||||
values.
|
||||
The values are rounded up to the next 1K value.
|
||||
If the stacksize is 0, the entry in the executable file is not changed.
|
||||
If the breaksize is not given, the entry in the executable file is not
|
||||
changed.
|
||||
The entries are only advisory on a system with a Memory Management Unit.
|
||||
.sa SEE ALSO
|
||||
.br
|
||||
size68 (cmnd)
|
||||
.br
|
||||
c.out (file)
|
||||
.bg BUGS
|
||||
@@ -0,0 +1,23 @@
|
||||
.so macro
|
||||
.he 'TEKSENDC68''TEKSENDC68'
|
||||
.pr PROGRAM TEKSENDC68
|
||||
teksendc68 - 68000 downloader
|
||||
.us USAGE
|
||||
teksendc68 [-] objectfile [ttyname]
|
||||
.fn FUNCTION
|
||||
Teksendc68
|
||||
reads the objectfile, which must be in the c.out format produced
|
||||
by the 68000 linking loader lo68. Teksendc68 converts this executable
|
||||
object code into the Tektronix Extended TEKHEX format acceptable by
|
||||
the 8540 for the 68000 and writes this TEKHEX to the output file.
|
||||
.sp
|
||||
If the optional third argument (ttyname) is
|
||||
present, this is the name of the special file (ie. /dev/tty?) to use
|
||||
to download the 68000. If this optional third argument is not
|
||||
present, the standard output file is used.
|
||||
.sp
|
||||
If the optional "-" argument is specified, teksendc68 does not clear
|
||||
the bss segment during the load. This results in a faster load, but
|
||||
all bss memory will have random initial values.
|
||||
.sa SEE ALSO
|
||||
c68 (cmnd), as68 (cmnd), lo68 (cmnd), c.out (files)
|
||||
@@ -0,0 +1 @@
|
||||
.fo 'REGULUS Reference Manual'- % -'FILES'
|
||||
@@ -0,0 +1,27 @@
|
||||
.so macro
|
||||
.he 'AR68''AR68'
|
||||
.n NAME AR68
|
||||
ar68 - archive format
|
||||
.d DESCRIPTION
|
||||
The first word in an archive file is a magic number which
|
||||
defines the type of archive file.
|
||||
Magic number (0177545) archives are maintained on REGULUS.
|
||||
Each constituent file in an archive file is preceeded by a file header.
|
||||
The structure of the file header is:
|
||||
.sp
|
||||
.in +5
|
||||
.nf
|
||||
.na
|
||||
struct arhdr {
|
||||
char a_fname[14]; // file name
|
||||
long a_modti; // last modified time
|
||||
char a_userid; // user id (uid)
|
||||
char a_gid; // group id (gid)
|
||||
int a_fimode; // mode word
|
||||
long a_fsize; // file size
|
||||
};
|
||||
.fi
|
||||
.ad
|
||||
.in -5
|
||||
.sa SEE ALSO
|
||||
ar68 (cmnd), lo68 (cmnd)
|
||||
165
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/files/c.out
Normal file
165
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/files/c.out
Normal file
@@ -0,0 +1,165 @@
|
||||
.so macro
|
||||
.he 'C.OUT''C.OUT'
|
||||
.n NAME c.out
|
||||
c.out - 68000 loader output
|
||||
.d DESCRIPTION
|
||||
'c.out' is the output file of the loader 'ld68 (cmnd)'.
|
||||
The loader makes 'c.out' executable if there were no
|
||||
errors and no unresolved external references.
|
||||
The *.o relocatable object files which are produced by the assembler
|
||||
'as68 (cmnd)' have this same format.
|
||||
.sp
|
||||
This file has four sections:
|
||||
a header, the program and data text, a symbol table, and relocation bits
|
||||
(in that order).
|
||||
The last two may be empty if the program was loaded
|
||||
with the '-s' option of 'ld68 (cmnd)'.
|
||||
.sp
|
||||
There are two formats of the header.
|
||||
The first header format starts
|
||||
with the identifying number 601A hex and contains 14 words in the
|
||||
following format:
|
||||
.sp
|
||||
.nf
|
||||
.na
|
||||
.in +5
|
||||
struct hdr {
|
||||
int magic; //c.out magic number = 601A hex
|
||||
long tsize; //# bytes in program text segment
|
||||
long dsize; //# bytes in program data segment
|
||||
long bsize; //# bytes in program bss segment
|
||||
long ssize; //# bytes in symbol table
|
||||
long stksize; //initial stack size
|
||||
long entry; //entry point
|
||||
int rlbflg; //relocation bits suppressed flag
|
||||
};
|
||||
.fi
|
||||
.ad
|
||||
.sp
|
||||
.in -5
|
||||
The second header format is used when noncontiguous text, data,
|
||||
and bss segments are specified to the loader using the -T, -D,
|
||||
and -B flags.
|
||||
This header begins with the identifying number
|
||||
601B hex and contains 18 words in the following format:
|
||||
.sp
|
||||
.in +5
|
||||
.nf
|
||||
.na
|
||||
struct hdr {
|
||||
int magic; //c.out magic number = 601B hex
|
||||
long tsize; //# bytes in program text segment
|
||||
long dsize; //# bytes in program data segment
|
||||
long bsize; //# bytes in program bss segment
|
||||
long ssize; //# bytes in symbol table
|
||||
long stksize; //initial stack size
|
||||
long entry; //entry point--address of text segment
|
||||
int rlbflg; //relocation bits suppressed flag
|
||||
long dstart; //address of data segment
|
||||
long bstart; //address of bss segment
|
||||
};
|
||||
.fi
|
||||
.ad
|
||||
.sp
|
||||
.in -5
|
||||
The sizes of each segment are in bytes but are even.
|
||||
The size of the header is not included in any of the other sizes.
|
||||
.sp
|
||||
When a file produced by the loader is loaded into memory for execution,
|
||||
three logical segments are set up:
|
||||
the text segment, the data segment
|
||||
(with uninitialized data,
|
||||
which starts off as all 0, following initialized),
|
||||
and a stack.
|
||||
The text segment begins at the address contained in "entry"
|
||||
in the core image; the header is not loaded.
|
||||
If the magic number (word 0) is 601A hex, it indicates that the text
|
||||
segment is not to be write-protected and shared,
|
||||
so the data segment is immediately contiguous
|
||||
with the text segment.
|
||||
If the magic number is 601C hex, it indicates that the text segment is
|
||||
to be write protected and shared and that the beginning of the data
|
||||
segment is at the first 2K byte boundary beyond the text segment.
|
||||
If the magic number is 601D hex, it indicates that the text segment and
|
||||
the data segment are both loaded with virtual addresses beginning
|
||||
at 0 (I and D split).
|
||||
If the magic number is 601E hex, it indicates that the text segment is
|
||||
to be write protected and shared and that the beginning of the data
|
||||
segment is at the first 4K byte boundary beyond the text segment.
|
||||
.sp
|
||||
The symbol table consists of 7-word entries.
|
||||
The first four words contain the ASCII name of the symbol, null-padded.
|
||||
The next word is a flag indicating the type of symbol.
|
||||
The following values are possible:
|
||||
.sp
|
||||
.in +5
|
||||
.nf
|
||||
.na
|
||||
0100000 defined
|
||||
0040000 equated
|
||||
0020000 global - entry or external
|
||||
0010000 equated register
|
||||
0004000 external reference
|
||||
0002000 DATA based relocatable
|
||||
0001000 TEXT based relocatable
|
||||
0000400 BSS based relocatable
|
||||
.in -5
|
||||
.fi
|
||||
.ad
|
||||
.sp
|
||||
These values are bit flags which may be or'ed together to indicate
|
||||
completely a symbol type such as 0122000 for a defined global data
|
||||
segment relocatable symbol.
|
||||
.sp
|
||||
The last two words (long) of a symbol table
|
||||
entry contain the value of the symbol.
|
||||
.sp
|
||||
If the symbol's type is undefined external,
|
||||
and the value field is non-zero,
|
||||
the symbol is interpreted by the loader
|
||||
ld
|
||||
as the name of a common region
|
||||
whose size is indicated by the value of the symbol.
|
||||
.sp
|
||||
The value of a word in the text or data portions which is not
|
||||
a reference to an undefined external symbol
|
||||
is exactly that value which will appear in memory
|
||||
when the file is executed.
|
||||
If a word in the text or data portion
|
||||
involves a reference to an undefined external symbol,
|
||||
as indicated by the relocation bits for that word,
|
||||
then the value of the word as stored in the file
|
||||
is an offset from the associated external symbol.
|
||||
When the file is processed by the
|
||||
loader and the external symbol becomes
|
||||
defined, the value of the symbol will
|
||||
be added into the word in the file.
|
||||
.sp
|
||||
If relocation information is present, it amounts to one word per
|
||||
word of program text or initialized data.
|
||||
There is no relocation information if the "suppress relocation"
|
||||
flag in the header is on.
|
||||
.sp
|
||||
Bits 2-0 of a relocation word indicate the segment referred
|
||||
to by the text or data word associated with the relocation word:
|
||||
.sp
|
||||
.nf
|
||||
.na
|
||||
.in +5
|
||||
00 indicates the reference is absolute
|
||||
01 indicates the reference is data segment relocatable
|
||||
02 indicates the reference is text segment relocatable
|
||||
03 indicates the reference is bss segment relocatable
|
||||
04 indicates the reference is to an undefined external symbol
|
||||
05 indicates the reference is to the upper word of a long
|
||||
07 indicates the absolute first word of an instruction
|
||||
.fi
|
||||
.ad
|
||||
.in -5
|
||||
.sp
|
||||
The remainder of the relocation word (bits 15-3)
|
||||
contains a symbol number in the case of external
|
||||
references, and is unused otherwise.
|
||||
The first symbol is numbered 0, the second 1, etc.
|
||||
.sa "SEE ALSO"
|
||||
as68 (cmnd), ld68 (cmnd)
|
||||
387
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/fp.rno
Normal file
387
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/fp.rno
Normal file
@@ -0,0 +1,387 @@
|
||||
.ps 55,65
|
||||
.title CP/M-68K C Floating Point Routines
|
||||
.subtitle ATOF
|
||||
.page
|
||||
.hl 1;ATOF Routine
|
||||
Synopsis:
|
||||
.bl 1
|
||||
.nofill
|
||||
FLOAT atof();
|
||||
FLOAT rval;
|
||||
BYTE *string;
|
||||
.
|
||||
.
|
||||
.
|
||||
rval = atof(string);
|
||||
.bl 1
|
||||
.fill
|
||||
^&atof\& converts a floating point number from ASCII string format to a
|
||||
^&float\& data type. The input string takes the form:
|
||||
.bl 1
|
||||
[-]ddddd.ddd[e[-]dd]
|
||||
.bl 1
|
||||
where the leading sign and exponent fields are optional. Each "d" is a decimal
|
||||
digit. The string may contain leading blanks but may not contain embedded
|
||||
blanks. Conversion stops at the first character which does not correspond
|
||||
to the format described above.
|
||||
.bl 1
|
||||
Notes:
|
||||
.bl 1
|
||||
There is no overflow detection, nor is there any way to determine how many
|
||||
digits were processed.
|
||||
.subtitle ceil
|
||||
.page
|
||||
.hl 1;ceil Routine
|
||||
Synopsis:
|
||||
.bl 1
|
||||
.nofill
|
||||
DOUBLE ceil();
|
||||
DOUBLE arg;
|
||||
DOUBLE retval;
|
||||
.
|
||||
.
|
||||
.
|
||||
retval = ceil(arg);
|
||||
.bl 1
|
||||
.fill
|
||||
The ^&ceil\& function returns the smallest integer (as a double precision
|
||||
floating point number) which is not smaller than the argument. For example,
|
||||
^&ceil(1.5)\& returns 2.0.
|
||||
.bl 1
|
||||
Notes:
|
||||
.bl 1
|
||||
.subtitle etoa
|
||||
.page
|
||||
.hl 1;etoa Routine
|
||||
Synopsis:
|
||||
.bl 1
|
||||
.nofill
|
||||
FLOAT fval;
|
||||
BYTE *etoa();
|
||||
BYTE *buf;
|
||||
WORD prec;
|
||||
BYTE *retval;
|
||||
.
|
||||
.
|
||||
.
|
||||
|
||||
retval = etoa(fval,buf,prec);
|
||||
.bl 1
|
||||
.fill
|
||||
The ^&etoa\& routine converts a floating point number to an ASCII string.
|
||||
The output string has the format:
|
||||
.bl 1
|
||||
[-]d.ddddde[-]dd
|
||||
.bl 1
|
||||
Where each "d" is a decimal digit. The string is terminated by a null (zero)
|
||||
byte.
|
||||
.bl 1
|
||||
^&etoa\& returns the address of the converted buffer, "buf". The "fval"
|
||||
argument is the floating point value to be converted. "prec" is the number
|
||||
of digits to appear to the right of the decimal point.
|
||||
.bl 1
|
||||
Notes:
|
||||
.bl 1
|
||||
.subtitle fabs
|
||||
.page
|
||||
.hl 1;fabs Routine
|
||||
Synopsis:
|
||||
.bl 1
|
||||
.nofill
|
||||
FLOAT fabs();
|
||||
FLOAT fval;
|
||||
FLOAT retval;
|
||||
.
|
||||
.
|
||||
.
|
||||
retval = fabs(fval);
|
||||
.bl 1
|
||||
.fill
|
||||
The ^&fabs\& routine returns the absolute value of a floating point number.
|
||||
.bl 1
|
||||
Notes:
|
||||
.bl 1
|
||||
.subtitle floor
|
||||
.page
|
||||
.hl 1;floor Routine
|
||||
Synopsis:
|
||||
.bl 1
|
||||
.nofill
|
||||
DOUBLE floor();
|
||||
DOUBLE fval;
|
||||
DOUBLE rval;
|
||||
.
|
||||
.
|
||||
.
|
||||
rval = floor(fval);
|
||||
.bl 1
|
||||
.fill
|
||||
The ^&floor\& routine returns the largest integer (as a double precision
|
||||
floating point number) which is not greater than the argument to ^&floor\&.
|
||||
For example, ^&floor(1.5)\& returns 1.0.
|
||||
.bl 1
|
||||
Notes:
|
||||
.bl 1
|
||||
.subtitle fmod
|
||||
.page
|
||||
.hl 1;fmod Routine
|
||||
Synopsis:
|
||||
.bl 1
|
||||
.nofill
|
||||
DOUBLE fmod();
|
||||
DOUBLE x;
|
||||
DOUBLE y;
|
||||
DOUBLE rval;
|
||||
.
|
||||
.
|
||||
.
|
||||
rval = fmod(x,y);
|
||||
.bl 1
|
||||
.fill
|
||||
The ^&fmod\& routine returns the floating point modulus of its two arguments.
|
||||
The modulus "rval" of the two numbers "x" and "y" is a number such that:
|
||||
.bl 1
|
||||
.nofill
|
||||
x = iy + rval
|
||||
-and-
|
||||
0 <= rval <= y.
|
||||
.bl 1
|
||||
.fill
|
||||
"i" in this case is an integer value obtained by dividing y by x.
|
||||
.bl 1
|
||||
Notes:
|
||||
.bl 1
|
||||
.subtitle cos
|
||||
.page
|
||||
.hl 1;cos Routine
|
||||
Synopsis:
|
||||
.bl 1
|
||||
.nofill
|
||||
DOUBLE cos();
|
||||
DOUBLE fval;
|
||||
DOUBLE rval;
|
||||
.
|
||||
.
|
||||
.
|
||||
rval = cos(fval);
|
||||
.bl 1
|
||||
.fill
|
||||
The ^&cos\& routine returns the cosine of the supplied argument, which must
|
||||
be expressed in radians.
|
||||
.bl 1
|
||||
Notes:
|
||||
.bl 1
|
||||
The best precision is obtained with numbers which are less than two pi.
|
||||
.subtitle exp
|
||||
.page
|
||||
.hl 1;exp Routine
|
||||
Synopsis:
|
||||
.bl 1
|
||||
.nofill
|
||||
DOUBLE exp();
|
||||
DOUBLE fval;
|
||||
DOUBLE rval;
|
||||
.
|
||||
.
|
||||
.
|
||||
rval = exp(fval);
|
||||
.bl 1
|
||||
.fill
|
||||
The ^&exp\& routine returns the exponential function (e**x) of the supplied
|
||||
argument.
|
||||
.bl 1
|
||||
Notes:
|
||||
.bl 1
|
||||
.subtitle log
|
||||
.page
|
||||
.hl 1;log Routine
|
||||
Synopsis:
|
||||
.bl 1
|
||||
.nofill
|
||||
DOUBLE log();
|
||||
DOUBLE fval;
|
||||
DOUBLE rval;
|
||||
.
|
||||
.
|
||||
.
|
||||
rval = log(fval);
|
||||
.bl 1
|
||||
.fill
|
||||
The ^&log\& routine returns the natural logarithm of the supplied argument.
|
||||
(A natural logarithm is sometimes called "log base e").
|
||||
.bl 1
|
||||
Notes:
|
||||
.bl 1
|
||||
.subtitle pow
|
||||
.page
|
||||
.hl 1;pow Routine
|
||||
Synopsis:
|
||||
.bl 1
|
||||
.nofill
|
||||
DOUBLE pow();
|
||||
DOUBLE x,y;
|
||||
DOUBLE rval;
|
||||
.
|
||||
.
|
||||
.
|
||||
rval = pow(x,y);
|
||||
.bl 1
|
||||
.fill
|
||||
The ^&pow\& routine returns x to the power y, sometimes written as x**y.
|
||||
.bl 1
|
||||
Notes:
|
||||
.bl 1
|
||||
.subtitle sin
|
||||
.page
|
||||
.hl 1;sin Routine
|
||||
Synopsis:
|
||||
.bl 1
|
||||
.nofill
|
||||
DOUBLE sin();
|
||||
DOUBLE fval;
|
||||
DOUBLE rval;
|
||||
.
|
||||
.
|
||||
.
|
||||
rval = sin(fval);
|
||||
.bl 1
|
||||
.fill
|
||||
The ^&sin\& routine returns the sine of the supplied argument, which must
|
||||
be in units of radians.
|
||||
.bl 1
|
||||
Notes:
|
||||
.bl 1
|
||||
The best precision is obtained with arguments which are less than two pi.
|
||||
.subtitle sin
|
||||
.page
|
||||
.hl 1;tan Routine
|
||||
Synopsis:
|
||||
.bl 1
|
||||
.nofill
|
||||
DOUBLE tan();
|
||||
DOUBLE fval;
|
||||
DOUBLE rval;
|
||||
.
|
||||
.
|
||||
.
|
||||
rval = tan(fval);
|
||||
.bl 1
|
||||
.fill
|
||||
The ^&tan\& routine returns the tangent of the supplied argument, which must
|
||||
be in units of radians.
|
||||
.bl 1
|
||||
Notes:
|
||||
.bl 1
|
||||
The best precision is obtained with arguments which are less than two pi.
|
||||
.subtitle sqrt
|
||||
.page
|
||||
.hl 1;sqrt Routine
|
||||
Synopsis:
|
||||
.bl 1
|
||||
.nofill
|
||||
DOUBLE sqrt();
|
||||
DOUBLE fval;
|
||||
DOUBLE rval;
|
||||
.
|
||||
.
|
||||
.
|
||||
rval = sqrt(fval);
|
||||
.bl 1
|
||||
.fill
|
||||
The ^&sqrt\& routine returns the square root of the supplied argument.
|
||||
.bl 1
|
||||
Notes:
|
||||
.bl 1
|
||||
The absolute value of the argument is used in computing the square root. There
|
||||
is no explicit error return if the argument is negative.
|
||||
.subtitle ftoa
|
||||
.page
|
||||
.hl 1;ftoa Routine
|
||||
Synopsis:
|
||||
.bl 1
|
||||
.nofill
|
||||
BYTE *ftoa();
|
||||
FLOAT fval;
|
||||
BYTE *buf;
|
||||
WORD prec;
|
||||
BYTE *rval;
|
||||
.
|
||||
.
|
||||
.
|
||||
rval = ftoa(fval,buf,prec);
|
||||
.bl 1
|
||||
.fill
|
||||
The ^&ftoa\& routine converts the floating point number "fval" to an ASCII
|
||||
string starting at the address specified by "buf". "prec" determines the
|
||||
number of digits to the right of the decimal point.
|
||||
^&ftoa\& returns the "buf" address.
|
||||
.bl 1
|
||||
Notes:
|
||||
.bl 1
|
||||
The prec specifier is constrained to the range 0-9.
|
||||
.subtitle atan
|
||||
.page
|
||||
.hl 1;atan Routine
|
||||
.bl 1
|
||||
.nofill
|
||||
Synopsis:
|
||||
.bl 1
|
||||
DOUBLE atan();
|
||||
DOUBLE fval;
|
||||
DOUBLE rval;
|
||||
.
|
||||
.
|
||||
.
|
||||
rval = atan(fval)
|
||||
.bl 1
|
||||
.fill
|
||||
Routine ^&atan\& returns the arctangent of the floating point number supplied
|
||||
as the "fval" argument.
|
||||
.bl 1
|
||||
Notes:
|
||||
.bl 1
|
||||
.subtitle sinh
|
||||
.page
|
||||
.hl 1;sinh Routine
|
||||
.bl 1
|
||||
.nofill
|
||||
Synopsis:
|
||||
.bl 1
|
||||
DOUBLE sinh();
|
||||
DOUBLE fval;
|
||||
DOUBLE rval;
|
||||
.
|
||||
.
|
||||
.
|
||||
rval = sinh(fval)
|
||||
.bl 1
|
||||
.fill
|
||||
Routine ^&sinh\& returns the hyperbolic sine of the single floating
|
||||
point argument.
|
||||
.bl 1
|
||||
Notes:
|
||||
.bl 1
|
||||
^&sinh(x)\& is evaluated as (e**x - e**(-x))/2.
|
||||
.subtitle tanh
|
||||
.page
|
||||
.hl 1;tanh Routine
|
||||
.bl 1
|
||||
.nofill
|
||||
Synopsis:
|
||||
.bl 1
|
||||
DOUBLE tanh();
|
||||
DOUBLE fval;
|
||||
DOUBLE rval;
|
||||
.
|
||||
.
|
||||
.
|
||||
rval = tanh(fval)
|
||||
.bl 1
|
||||
.fill
|
||||
Routine ^&tanh\& returns the hyperbolic tangent of the single floating
|
||||
point argument.
|
||||
.bl 1
|
||||
Notes:
|
||||
.bl 1
|
||||
^&tanh(x)\& is evaluated as cosh(x) / sinh(x).
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
.ll 64
|
||||
.po 8
|
||||
.in 0
|
||||
.so Sectioname
|
||||
@@ -0,0 +1,55 @@
|
||||
.ps 55,65
|
||||
.title CP/M-68K Manual Additions
|
||||
.c
|
||||
C Language Manual
|
||||
.c
|
||||
-----------------
|
||||
.bl 1
|
||||
.hl 1;Wild Cards (Before section 1.6, page 1-5)
|
||||
Strings containing the characters "*" and "?" will be treated as wild carded
|
||||
filenames. The C runtime startup routine scans the directory and expands
|
||||
each wild-carded filename into a list of filenames which match the
|
||||
specification. You can pass a string containing "*" or "?" characters to the
|
||||
C program by enclosing it in double or single quote characters. This technique
|
||||
may also be used to pass argument strings containing embedded blanks to a C
|
||||
program as a single element of argv[].
|
||||
.hl 1;Appending with redirection (Before "end of section 1" page 1-7).
|
||||
You can add information to the end of an existing file by specifying
|
||||
">>filename". The standard output from the program thus invoked will appear
|
||||
after the original contents of the file.
|
||||
.hl 1;Compiling floating point programs (before 1.2)
|
||||
To link programs which use floating point, use "clinkf" in place of "clink".
|
||||
This procedure uses Motorola FFP floating point, which is the fastest. To
|
||||
use IEEE format floating point, use "ce" to compile and "clinke" to link.
|
||||
.bl 1
|
||||
.c
|
||||
Programmer's Guide
|
||||
.c
|
||||
------------------
|
||||
.bl 1
|
||||
.hl 1;FIND command
|
||||
Add a section for the FIND command, which has the following syntax:
|
||||
.bl 1
|
||||
FIND string file1 file2 file3
|
||||
.bl 1
|
||||
This command locates and prints all occurances of the specified "string" in
|
||||
the files listed. FIND also takes wildcards. For instance, the command:
|
||||
.bl 1
|
||||
FIND WORD B:*.C C:*.H
|
||||
.bl 1
|
||||
Locates the string "word" in all files with a filetype of ".C" on drive
|
||||
"B:" and all files which have a filetype of ".H" on drive "B:".
|
||||
The search string is case-insensitive. (I.E., WORD matches "WORD", "word",
|
||||
and "WoRd").
|
||||
.hl 1;Linker
|
||||
Add the description of LINK-68 from the CBASIC manual as a new command.
|
||||
Note -- This is in ^&addition\& to the existing LO68 command.
|
||||
Some work is needed on the section on overlays. We actually support load
|
||||
on call overlays from C and assembler, but the existing doc does not
|
||||
explain how to do this.
|
||||
Mention in the LO68 documentation that this utility
|
||||
now accepts wild-carded filenames.
|
||||
.hl 1;Assembler
|
||||
The assembler (AS68) now has a new command line option. "-T" causes the
|
||||
assembler to accept 68010 opcodes. Mention that the default location for the
|
||||
symbol table is now user 0 on the current drive.
|
||||
95
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/mdef
Normal file
95
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/mdef
Normal file
@@ -0,0 +1,95 @@
|
||||
.de lp
|
||||
.in +5
|
||||
.ti -5
|
||||
..
|
||||
.de pr
|
||||
.bp 1
|
||||
.sp 2
|
||||
PROGRAM
|
||||
.br
|
||||
.in +5
|
||||
..
|
||||
.de us
|
||||
.sp
|
||||
.ti -5
|
||||
USAGE
|
||||
.br
|
||||
..
|
||||
.de fn
|
||||
.sp
|
||||
.ti -5
|
||||
FUNCTION
|
||||
.br
|
||||
..
|
||||
.de fl
|
||||
.sp
|
||||
.ti -5
|
||||
FILES
|
||||
.br
|
||||
..
|
||||
.de dg
|
||||
.sp
|
||||
.ti -5
|
||||
DIAGNOSTICS
|
||||
.br
|
||||
..
|
||||
.de sa
|
||||
.sp
|
||||
.ti -5
|
||||
SEE ALSO
|
||||
.br
|
||||
..
|
||||
.de bg
|
||||
.sp
|
||||
.ti -5
|
||||
BUGS
|
||||
.br
|
||||
..
|
||||
.de n
|
||||
.bp 1
|
||||
.sp
|
||||
NAME
|
||||
.in +5
|
||||
.br
|
||||
..
|
||||
.de d
|
||||
.sp
|
||||
.ti -5
|
||||
DESCRIPTION
|
||||
.br
|
||||
..
|
||||
.de ex
|
||||
.sp
|
||||
.ti -5
|
||||
EXTRAS
|
||||
.br
|
||||
..
|
||||
.de ai
|
||||
.sp
|
||||
.ti -5
|
||||
.fi
|
||||
ASSEMBLY INTERFACE
|
||||
.br
|
||||
.nf
|
||||
..
|
||||
.de cs
|
||||
.sp
|
||||
.ti -5
|
||||
CALLING SEQUENCE
|
||||
.br
|
||||
..
|
||||
.de sy
|
||||
.sp
|
||||
.ti -5
|
||||
SYNOPSIS
|
||||
.br
|
||||
..
|
||||
.de it
|
||||
\&'\\$1'
|
||||
..
|
||||
.de rt
|
||||
.sp
|
||||
.ti -5
|
||||
RETURN VALUES
|
||||
.br
|
||||
..
|
||||
@@ -0,0 +1,198 @@
|
||||
as68 - assembler for the Motorola 68000 The REGULUS assembler
|
||||
'as' is designed to be used in conjunction with the other RE-
|
||||
GULUS standard language processing tools: c68 and lo68. The
|
||||
language implemented is primarily as is described in any of the
|
||||
standard 68000 assembler manuals, with a few enhancements to
|
||||
make it accept some of the more standard assembler mnemonics.
|
||||
It will attempt to optimize instructions to take advantage of
|
||||
certain 68000 instructions (for example the add quick instruc-
|
||||
tion).
|
||||
|
||||
The following instructions are recoginized to aid the assembly
|
||||
language programmer by making the assembly language more regu-
|
||||
lar: clr.x An (where x is l,b, or w) is allowed and will actual-
|
||||
ly generate a suba.x An,An instruction; add, sub, cmp with an A
|
||||
register source/destination are allowed and generate adda, suba,
|
||||
cmpa; add, and, cmp, eor, or, sub are allowed with immediate
|
||||
first operands and actually generate addi, andi, cmpi, eori,
|
||||
ori, subi instructions if the second operand is not register
|
||||
direct; any shift instruction with no shift count specified as-
|
||||
sumes a shift count of one (ie. "asl r1" is equivalent to "asl
|
||||
#1,r1"); the mnemonics 'inc' and 'dec' are also recognized and
|
||||
are functionally equivilent to "addq 1" or "subq 1". Several
|
||||
mnemonics have been added to the standard set of condition code
|
||||
instructions: 'bt' maps to 'bra', 'bhs' maps to 'bhis', 'bnz'
|
||||
maps to 'bne', 'bze' maps to 'beq', 'dbhs' maps to 'dbhi',
|
||||
'dblo' maps to 'dbcs', 'dbnz' maps to 'dbne', 'dbze' maps to
|
||||
'dbeq', 'shs' maps to 'scc', 'slo' maps to 'scc', 'snz' maps to
|
||||
'sne', and 'sze' maps to 'seq'.
|
||||
|
||||
Several optimizations take place. All branch instructions gen-
|
||||
erate short relative branches where possible, including forward
|
||||
references. 'jsr' instructions are changed to 'bsr' instruc-
|
||||
tions if the resulting 'bsr' is shorter than the 'jsr'. 'move',
|
||||
'add', 'sub' mnemonics will actually generate 'moveq', 'addq',
|
||||
and 'suba' instructions where possible. If a 'move' instruction
|
||||
rather than a 'moveq' instruction is desired (affecting only
|
||||
lower byte or word of D register), the size attribute must be
|
||||
explicitly coded ie. move.b or move.w. The assembler will
|
||||
change any move or move.l to moveq if possible.
|
||||
|
||||
All labels must terminate with a ':', unless they start in
|
||||
column 1. Registers may be referenced as r0 - r15, R0 - R15, D0
|
||||
- D7, d0 - d7, A0 - A7, or a0-a7. Registers R8 - R15 are the
|
||||
same as A0 - A7. Numbers are interpreted as decimal. Hexide-
|
||||
cimal may be specified by preceding the number by a dollar sign
|
||||
($) and numbers which begin with a preceeding zero (0) are as-
|
||||
sumed to be octal.
|
||||
|
||||
REGULUS assembler directives can be specified in upper and/or
|
||||
lower case characters and may be preceded by an optional dot
|
||||
(.). The following directives have been implemented:
|
||||
|
||||
text
|
||||
data
|
||||
bss
|
||||
These three directives instruct the assembler to
|
||||
change the assembler base segment to the text, data,
|
||||
or bss segment respectively. Each assembly starts in
|
||||
the text segment. It is illegal to assemble instruc-
|
||||
tions or data into the bss segment. Symbols may be
|
||||
defined and storage may be reserved using the .ds
|
||||
directive in the bss segment.
|
||||
|
||||
section #
|
||||
This directive is used to define a base segment like
|
||||
the .bss, .data and .text directives discussed above.
|
||||
The sections can be numbered 0 to 15 inclusive. Sec-
|
||||
tion 14 maps to data, section 15 is bss and all the
|
||||
others are text sections.
|
||||
|
||||
globl name[,name...]
|
||||
xdef name[,name...]
|
||||
xref name[,name...]
|
||||
These directives make the name(s) external. If they
|
||||
are defined in the current assembly, this statement
|
||||
makes these names available to other routines during a
|
||||
load by lo68. If these names are not defined in the
|
||||
current assembly, they become undefined external
|
||||
references and lo68 will link them to external values
|
||||
of the same name in other routines. Specifying the -u
|
||||
flag will force the assembler to make all undefined
|
||||
names external.
|
||||
|
||||
comm name,expression
|
||||
This directive defines a named block common area.
|
||||
When several routines are linked together with lo68,
|
||||
all block common areas with the same name are loaded
|
||||
at the same address. The size of this block common
|
||||
storage area is the largest value of the expression
|
||||
part of all 'comm' directives with the same name. No
|
||||
error message is produced if the areas are of dif-
|
||||
ferent sizes.
|
||||
|
||||
even
|
||||
If the location counter is odd, it is incremented by
|
||||
one so that the next instruction or data field will
|
||||
begin on an even memory boundary.
|
||||
|
||||
The relocation counter may be manipulated with a
|
||||
statement like:
|
||||
*=expr
|
||||
Care should be exercised when using this facility.
|
||||
The expression may only move the relocation counter
|
||||
forward. The unused space is filled with zeroes in
|
||||
the text or data segments and is simply not assigned
|
||||
in the bss segment. This facility requires the assem-
|
||||
bler to not allow comment lines which begin with "*=".
|
||||
Comments beginning with "* =" are allowed.
|
||||
|
||||
org expression
|
||||
This directive is used to change the program counter
|
||||
to the specified address. The expression must not
|
||||
contain any external references and must be computable
|
||||
at the time of assembly.
|
||||
|
||||
ds[.x] operand
|
||||
This is the directive used to define storage. Storage
|
||||
can be defined in bytes, words or long words depending
|
||||
upon the extension specified ('b', 'w', 'l' where word
|
||||
is the default). The memory is not initialized, just
|
||||
reserved. Word or long defined storage will be
|
||||
aligned on a word boundary.
|
||||
|
||||
comline expression
|
||||
This directive is identical to the 'ds.b' instruction.
|
||||
The specified argument must be a constant expression.
|
||||
|
||||
equ expression
|
||||
set expression
|
||||
Currently 'set' and 'equ' are implemented exactly the
|
||||
same. These directives are used to assign a value to
|
||||
the specified label. This non-optional label may not
|
||||
be redefined elsewhere in the program. It can then be
|
||||
used anywhere that a constant is required and will be
|
||||
evaluated to the specified value.
|
||||
|
||||
end
|
||||
The 'end' directive specifies the end of the assembler
|
||||
text. It is not required for appropriate assembly.
|
||||
If it is not at the end of the text an error will be
|
||||
reported.
|
||||
|
||||
offset expression
|
||||
This directive creates a dummy storage section using
|
||||
the 'ds' directive. No code generating instructions
|
||||
may occur. It is terminated by a 'section', 'data',
|
||||
'bss', 'text' or 'end'. The offset table begins at
|
||||
the address specified in the expression. The 'set',
|
||||
'equ', 'reg', 'xref', 'xdef', 'globl', 'offset', and
|
||||
any conditional directive may appear inside.
|
||||
|
||||
dcb[.x] size,value
|
||||
Just like the dc.b command. Defines a constant block
|
||||
of the specified size of bytes, words or longs.
|
||||
|
||||
reg reglist
|
||||
This directive builds a register mask which can be
|
||||
used by the movem instruction. One or more registers
|
||||
can be listed in increasing order of the form : 'R?[-
|
||||
R?[/R?[-R?...]...]]'. Where R? can be replaced by
|
||||
A0-A7, D0-D7 and R0-R15. The register list might look
|
||||
like : A2-A4/A7/D1/D3-D5. The registers may also be
|
||||
designated separated by commas (eg. A1,A2,D5,D7).
|
||||
|
||||
Conditional assembly directives can have any level of nesting.
|
||||
The following conditional assembler directives have been imple-
|
||||
mented:
|
||||
|
||||
ifeq expression
|
||||
ifne expression
|
||||
ifle expression
|
||||
iflt expression
|
||||
ifge expression
|
||||
ifgt expression
|
||||
The expression is tested against zero (with ifeq:
|
||||
equal, ifne: not equal, ifle: less or equal, iflt:
|
||||
less than, ifge: greater or equal, ifgt: greater) and
|
||||
if it is evaluated true then the code enclosed is as-
|
||||
sembled, otherwise the code is ignored until the
|
||||
matching endc is found.
|
||||
|
||||
ifc 'string1','string2'
|
||||
ifnc 'string1','string2'
|
||||
The two strings are compared. The 'c' condition is
|
||||
true if they are exactly the same, the 'nc' condition
|
||||
is true if they do not match.
|
||||
|
||||
endc
|
||||
Signifies the end of the code to be conditionally as-
|
||||
sembled.
|
||||
|
||||
ASCII string constants may be enclosed in single quotes (ie.
|
||||
'ABCD') or in double quotes (ie. "ac14").
|
||||
|
||||
Several directives are recognized, but ignored: 'mask2', 'idnt',
|
||||
'ttl', 'opt', and 'page'.
|
||||
|
||||
as68(cmnd)
|
||||
@@ -0,0 +1,222 @@
|
||||
.de zi
|
||||
.sp
|
||||
.ti -5
|
||||
..
|
||||
.de zb
|
||||
.br
|
||||
.ti -5
|
||||
..
|
||||
.so macro
|
||||
.he 'AS68''AS68'
|
||||
.n NAME as
|
||||
as68 - assembler for the Motorola 68000
|
||||
.fn FUNCTION
|
||||
The REGULUS assembler 'as' is designed to be used in conjunction with
|
||||
the other REGULUS standard language processing tools: c68 and lo68. The
|
||||
language implemented is primarily as is described in any of the standard
|
||||
68000 assembler manuals, with a few enhancements to make it accept
|
||||
some of the more standard assembler mnemonics. It will attempt to
|
||||
optimize instructions to take advantage of certain 68000 instructions
|
||||
\&(for example the add quick instruction).
|
||||
.sp
|
||||
The following instructions are recoginized to aid the assembly language
|
||||
programmer by making the assembly language more regular: clr.x An (where
|
||||
x is l,b, or w) is allowed and will actually generate a suba.x An,An
|
||||
instruction; add, sub, cmp with an A register source/destination are
|
||||
allowed and generate adda, suba, cmpa; add, and, cmp, eor, or, sub are
|
||||
allowed with immediate first operands and actually generate addi, andi,
|
||||
cmpi, eori, ori, subi instructions if the second operand is not register
|
||||
direct; any shift instruction with no shift count specified assumes a
|
||||
shift count of one (ie. "asl r1" is equivalent to "asl #1,r1"); the
|
||||
mnemonics 'inc' and 'dec' are also recognized and are functionally
|
||||
equivilent to "addq 1" or "subq 1".
|
||||
Several mnemonics have been added to the standard set of condition code
|
||||
instructions: 'bt' maps to 'bra', 'bhs' maps to 'bhis', 'bnz' maps to 'bne',
|
||||
\&'bze' maps to 'beq', 'dbhs' maps to 'dbhi', 'dblo' maps to 'dbcs',
|
||||
\&'dbnz' maps to 'dbne', 'dbze' maps to 'dbeq', 'shs' maps to 'scc',
|
||||
\&'slo' maps to 'scc', 'snz' maps to 'sne', and 'sze' maps to 'seq'.
|
||||
.sp
|
||||
Several optimizations take place. All branch instructions generate
|
||||
short relative branches where possible, including forward references.
|
||||
\&'jsr' instructions are changed to 'bsr' instructions if the resulting
|
||||
\&'bsr' is shorter than the 'jsr'. 'move', 'add', 'sub' mnemonics will
|
||||
actually generate 'moveq', 'addq', and 'suba' instructions where possible.
|
||||
If a 'move' instruction rather than a 'moveq' instruction is desired (affecting
|
||||
only lower byte or word of D register), the size attribute must be
|
||||
explicitly coded ie. move.b or move.w. The assembler will change any
|
||||
move or move.l to moveq if possible.
|
||||
.sp
|
||||
All labels must terminate with a ':', unless they start in column 1.
|
||||
Registers may be referenced as r0 - r15, R0 - R15, D0 - D7, d0 - d7,
|
||||
A0 - A7, or a0-a7. Registers R8 - R15 are the same as A0 - A7.
|
||||
Numbers are interpreted as decimal. Hexidecimal may be specified
|
||||
by preceding the number by a dollar sign ($) and numbers which
|
||||
begin with a preceeding zero (0) are assumed to be octal.
|
||||
.sp
|
||||
REGULUS assembler directives can be specified in upper and/or lower
|
||||
case characters and may be preceded by an optional dot (.).
|
||||
The following directives have been implemented:
|
||||
.in +10
|
||||
.zi
|
||||
text
|
||||
.zb
|
||||
data
|
||||
.zb
|
||||
bss
|
||||
.br
|
||||
These three directives instruct the assembler to change the assembler
|
||||
base segment to the text, data, or bss segment respectively. Each
|
||||
assembly starts in the text segment. It is illegal to assemble
|
||||
instructions or data into the bss segment. Symbols may be defined and
|
||||
storage may be reserved using the .ds directive in the bss segment.
|
||||
.zi
|
||||
section #
|
||||
.br
|
||||
This directive is used to define a base segment like the .bss, .data
|
||||
and .text directives discussed above. The sections can be numbered
|
||||
0 to 15 inclusive. Section 14 maps to data, section 15 is bss and
|
||||
all the others are text sections.
|
||||
.zi
|
||||
globl name[,name...]
|
||||
.zb
|
||||
xdef name[,name...]
|
||||
.zb
|
||||
xref name[,name...]
|
||||
.br
|
||||
These directives make the name(s) external. If they are defined in
|
||||
the current assembly, this statement makes these names available to
|
||||
other routines during a load by lo68. If these names are not defined
|
||||
in the current assembly, they become undefined external references
|
||||
and lo68 will link them to external values of the same name in other
|
||||
routines. Specifying the -u flag will force the assembler to make all
|
||||
undefined names external.
|
||||
.zi
|
||||
comm name,expression
|
||||
.br
|
||||
This directive defines a named block common area. When several routines
|
||||
are linked together with lo68, all block common areas with the same name
|
||||
are loaded at the same address. The size of this block common storage
|
||||
area is the largest value of the expression part of all 'comm' directives
|
||||
with the same name. No error message is produced if the areas are of
|
||||
different sizes.
|
||||
.zi
|
||||
even
|
||||
.br
|
||||
If the location counter is odd, it is incremented by one so that the
|
||||
next instruction or data field will begin on an even memory boundary.
|
||||
.sp
|
||||
The relocation counter may be manipulated with a statement like:
|
||||
.br
|
||||
.ti +10
|
||||
*=expr
|
||||
.br
|
||||
Care should be exercised when using this facility.
|
||||
The expression may only move the relocation counter forward.
|
||||
The unused space is filled
|
||||
with zeroes in the text or data segments and is simply not assigned in
|
||||
the bss segment.
|
||||
This facility requires the assembler to not allow comment lines which
|
||||
begin with "*=".
|
||||
Comments beginning with "* =" are allowed.
|
||||
.zi
|
||||
org expression
|
||||
.br
|
||||
This directive is used to change the program counter to the specified
|
||||
address. The expression must not contain any external references and
|
||||
must be computable at the time of assembly.
|
||||
.zi
|
||||
ds[.x] operand
|
||||
.br
|
||||
This is the directive used to define storage. Storage can be defined
|
||||
in bytes, words or long words depending upon the extension specified
|
||||
\&('b', 'w', 'l' where word is the default). The memory is not initialized,
|
||||
just reserved. Word or long defined storage will be aligned on a word
|
||||
boundary.
|
||||
.zi
|
||||
comline expression
|
||||
.br
|
||||
This directive is identical to the 'ds.b' instruction. The specified
|
||||
argument must be a constant expression.
|
||||
.zi
|
||||
equ expression
|
||||
.zb
|
||||
set expression
|
||||
.br
|
||||
Currently 'set' and 'equ' are implemented exactly the same. These directives
|
||||
are used to assign a value to the specified label. This non-optional label
|
||||
may not be redefined elsewhere in the program. It can then be used anywhere
|
||||
that a constant is required and will be evaluated to the specified value.
|
||||
.zi
|
||||
end
|
||||
.br
|
||||
The 'end' directive specifies the end of the assembler text. It is not
|
||||
required for appropriate assembly. If it is not at the end of the text
|
||||
an error will be reported.
|
||||
.zi
|
||||
offset expression
|
||||
.br
|
||||
This directive creates a dummy storage section using the 'ds' directive.
|
||||
No code generating instructions may occur. It is terminated by
|
||||
a 'section', 'data', 'bss', 'text' or 'end'. The offset table begins
|
||||
at the address specified in the expression. The 'set', 'equ', 'reg',
|
||||
\&'xref', 'xdef', 'globl', 'offset', and any conditional directive may
|
||||
appear inside.
|
||||
.zi
|
||||
dcb[.x] size,value
|
||||
.br
|
||||
Just like the dc.b command. Defines a constant block of the specified size
|
||||
of bytes, words or longs.
|
||||
.zi
|
||||
reg reglist
|
||||
.br
|
||||
This directive builds a register mask which can be used by the
|
||||
movem instruction. One or more registers can be listed in
|
||||
increasing order of the form : 'R?[-R?[/R?[-R?...]...]]'.
|
||||
Where R? can be replaced by A0-A7, D0-D7 and R0-R15. The
|
||||
register list might look like : A2-A4/A7/D1/D3-D5.
|
||||
The registers may also be designated separated by
|
||||
commas (eg. A1,A2,D5,D7).
|
||||
.sp
|
||||
.in -10
|
||||
Conditional assembly directives can have any level of nesting.
|
||||
The following conditional assembler directives have been implemented:
|
||||
.in +10
|
||||
.zi
|
||||
ifeq expression
|
||||
.zb
|
||||
ifne expression
|
||||
.zb
|
||||
ifle expression
|
||||
.zb
|
||||
iflt expression
|
||||
.zb
|
||||
ifge expression
|
||||
.zb
|
||||
ifgt expression
|
||||
.br
|
||||
The expression is tested against zero (with ifeq: equal, ifne: not equal,
|
||||
ifle: less or equal, iflt: less than, ifge: greater or equal,
|
||||
ifgt: greater) and if it is evaluated true then
|
||||
the code enclosed is assembled, otherwise the code is ignored until
|
||||
the matching endc is found.
|
||||
.zi
|
||||
ifc 'string1','string2'
|
||||
.zb
|
||||
ifnc 'string1','string2'
|
||||
.br
|
||||
The two strings are compared. The 'c' condition is true if they are
|
||||
exactly the same, the 'nc' condition is true if they do not match.
|
||||
.zi
|
||||
endc
|
||||
.br
|
||||
Signifies the end of the code to be conditionally assembled.
|
||||
.sp
|
||||
.in -10
|
||||
ASCII string constants may be enclosed in single quotes (ie. 'ABCD') or
|
||||
in double quotes (ie. "ac14").
|
||||
.sp
|
||||
Several directives are recognized, but ignored: 'mask2', 'idnt', 'ttl',
|
||||
\& 'opt', and 'page'.
|
||||
.sp
|
||||
.sa SEE ALSO
|
||||
as68(cmnd)
|
||||
@@ -0,0 +1,54 @@
|
||||
.so macro
|
||||
.he 'FLOAT''FLOAT'
|
||||
.n NAME
|
||||
float - floating point number formats
|
||||
.d DESCRIPTION
|
||||
.ti +5
|
||||
Regulus supports two formats of single precision floating point numbers.
|
||||
They are the Motorola 'Fast Floating Point' and the 'IEEE standard'.
|
||||
Both types are stored in 32-bit entities. They are not compatible.
|
||||
.sp
|
||||
.ti +5
|
||||
The FFP format consists of a 24 bit mantissa, 1 bit of sign, and
|
||||
7 bits of exponent. The exponent is stored in it's two's complement
|
||||
form.
|
||||
.sp
|
||||
.na
|
||||
.nf
|
||||
.in +3
|
||||
[ | | | | | | | ~~~~ | | | | | | | | | | | | | | | | ]
|
||||
|------------ Mantissa --------------|S|---- Exp ----|
|
||||
.in -3
|
||||
.fi
|
||||
.ad
|
||||
.sp
|
||||
The IEEE format consists of 1 sign bit, 8 bits of exponent, and 23
|
||||
bits of mantissa. The exponent is store in it's Excess 127 format.
|
||||
.sp
|
||||
.na
|
||||
.nf
|
||||
.in +3
|
||||
[ | | | | | | | | | | | | | | | ~~~~ | | | | | | | | ]
|
||||
|S|----- Exp -----|---------- Mantissa --------------|
|
||||
.in -3
|
||||
.fi
|
||||
.ad
|
||||
.sp
|
||||
The floating point numbers represented by the IEEE format are :
|
||||
(-1)^S * 1.F * 2^E, the FFP floating point numbers are of the form :
|
||||
(-1)^S * 0.F * 2^E.
|
||||
.sp
|
||||
.ti +5
|
||||
The IEEE format will be used if the -e flag is given to the compiler
|
||||
or if the -lE flag is given to the loader. The FFP format will be
|
||||
used if the -f flag is given to the compiler or if the -lF flag is
|
||||
given to the loader. These flags cause floating point constants of
|
||||
the appropriate flavor to be generated and the appropriate library
|
||||
to be loaded.
|
||||
.sp
|
||||
.ti +5
|
||||
The IEEE floating point values lose some precision due to the fact that
|
||||
calculations use the fast floating point routines, and a translation to
|
||||
and from the FFP format.
|
||||
.sa SEE ALSO
|
||||
cc(cmnd), lo(cmnd)
|
||||
@@ -0,0 +1,66 @@
|
||||
float - floating point number formats
|
||||
Regulus supports two formats of single precision floating
|
||||
point numbers. They are the Motorola 'Fast Floating Point' and
|
||||
the 'IEEE standard'. Both types are stored in 32-bit entities.
|
||||
They are not compatible.
|
||||
|
||||
The FFP format consists of a 24 bit mantissa, 1 bit of
|
||||
sign, and 7 bits of exponent. The exponent is stored in it's
|
||||
two's complement form.
|
||||
|
||||
[ | | | | | | | ~~~~ | | | | | | | | | | | | | | | | ]
|
||||
|------------ Mantissa --------------|S|---- Exp ----|
|
||||
|
||||
The IEEE format consists of 1 sign bit, 8 bits of exponent, and
|
||||
23 bits of mantissa. The exponent is store in it's Excess 127
|
||||
format.
|
||||
|
||||
[ | | | | | | | | | | | | | | | ~~~~ | | | | | | | | ]
|
||||
|S|----- Exp -----|---------- Mantissa --------------|
|
||||
|
||||
The floating point numbers represented by the IEEE format are :
|
||||
(-1)^S * 1.F * 2^E, the FFP floating point numbers are of the
|
||||
form : (-1)^S * 0.F * 2^E.
|
||||
|
||||
The IEEE format will be used if the -e flag is given to the
|
||||
compiler or if the -lE flag is given to the loader. The FFP
|
||||
format will be used if the -f flag is given to the compiler or
|
||||
if the -lF flag is given to the loader. These flags cause
|
||||
floating point constants of the appropriate flavor to be gen-
|
||||
erated and the appropriate library to be loaded.
|
||||
|
||||
The IEEE floating point values lose some precision due to
|
||||
the fact that calculations use the fast floating point routines,
|
||||
and a translation to and from the FFP format. cc(cmnd),
|
||||
lo(cmnd)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
.fo 'REGULUS Reference Manual'- % -'MISC'
|
||||
118
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/new4.0
Normal file
118
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/new4.0
Normal file
@@ -0,0 +1,118 @@
|
||||
.he "C68 version 4.0"Change Log"Page %"
|
||||
.de bg
|
||||
.sp
|
||||
.in +5
|
||||
..
|
||||
.de eg
|
||||
.sp
|
||||
.in -5
|
||||
..
|
||||
1. Temp files generated in the current directory
|
||||
.bg
|
||||
In generating all other files into the current directory the temp files
|
||||
also were generated there.
|
||||
.eg
|
||||
2. Floating Point flags
|
||||
.bg
|
||||
Added the -e and -f flags for specification of the IEEE or FFP floating
|
||||
point packages (constant evaluations and libraries).
|
||||
.eg
|
||||
3. Optimization flag
|
||||
.bg
|
||||
Recognize the -O optimization flag and ignore it.
|
||||
.eg
|
||||
4. Compatibility flags
|
||||
.bg
|
||||
Added the -3, -5, -6, -7 flags for system 3, system 5, version 6 and
|
||||
version 7. Adds an include file on the search list, as well as a
|
||||
default library.
|
||||
.eg
|
||||
5. include file error messages
|
||||
.bg
|
||||
Added explicit line number and file name's within the error messages if
|
||||
processing an include file.
|
||||
.eg
|
||||
6. Symbol Table overflow
|
||||
.bg
|
||||
Added clearing of the symbol table between compiles (c68 *.c).
|
||||
.eg
|
||||
7. Preprocessor error status
|
||||
.bg
|
||||
If error's occurred in the preprocessor pass the exit status wasn't
|
||||
reflecting it.
|
||||
.eg
|
||||
8. Structure assignments
|
||||
.bg
|
||||
One structure may be assigned to another provided that the one on
|
||||
the right is smaller than or equal to the left one in size.
|
||||
.eg
|
||||
9. Don't generate .globl's for external functions
|
||||
.bg
|
||||
Don't automatically generate .globl's for external functions, avoids
|
||||
automatically loading routines which may never be used (like stdio).
|
||||
.eg
|
||||
10. Sizeof as array size specification
|
||||
.bg
|
||||
Recursive call to 'getdecl' caused the size specified using sizeof
|
||||
to be lost.
|
||||
.eg
|
||||
11. Procedure/function name as identifier
|
||||
.bg
|
||||
Generated "tst.l #_ident" for "if (ident) ;" where ident is a procedure
|
||||
or function name. Changed this to generate as true instead.
|
||||
.eg
|
||||
12. Outgoto macro
|
||||
.bg
|
||||
Made the outgoto procedure a macro, requires it's single parameter to
|
||||
be a constant.
|
||||
.eg
|
||||
13. Typedef of forward referenced structures
|
||||
.bg
|
||||
The dimension table pointer of a typedefed forward referenced structure
|
||||
was being initialized incorrectly.
|
||||
.eg
|
||||
14. Structure assignments
|
||||
.bg
|
||||
One structure may be assigned to another provided that the one on
|
||||
the right is smaller than or equal to the left one in size.
|
||||
.eg
|
||||
15. Floating point
|
||||
.bg
|
||||
Floating point handling including constants, conversions and operations
|
||||
added.
|
||||
.eg
|
||||
16. Pop stack instruction
|
||||
.bg
|
||||
The popstack instruction of 1..8 was turned into an addq.w which only
|
||||
affected half of the sp register. The "add #d,sp" has been replaced
|
||||
by either "addq.l #d,sp" or "adda.l #d,sp".
|
||||
.eg
|
||||
17. Optimization eqmult, eqdiv, eqmod
|
||||
.bg
|
||||
Generated a new code skeleton entry to deal with register integer mults,
|
||||
divs, and mods (eg. register int i; i =* 34;).
|
||||
.eg
|
||||
18. Return of 0L
|
||||
.bg
|
||||
Code skeletons generated a clr R0 regardless of operand type.
|
||||
.eg
|
||||
19. Prefix ++, -- problems with bytes
|
||||
.bg
|
||||
The code skeletons for fr_eqop were a total mess, particularly for
|
||||
the left hand side being a character.
|
||||
Rewrote all fr_eqop and fr_eqmult code skeletons to handle these cases.
|
||||
Unfortunately rcgen also gets into the act turning all =+, =-, =&, =| and
|
||||
pre++, pre-- compiled for register into compiled for effect then returning
|
||||
the left hand side symbol.
|
||||
This is probably OK for word and long LHS but for byte it results in
|
||||
lost precision.
|
||||
Changed rcgen to check for CHAR LHS and not to compile for effect if so.
|
||||
.eg
|
||||
20. Long eq_shift int
|
||||
.bg
|
||||
Bad code was generated for long's left shifted by integer values.
|
||||
.eg
|
||||
21. Pointer to structure comparisons to integers
|
||||
.bg
|
||||
Previously the integer value was being multiplied by the size of the
|
||||
structure in words.
|
||||
BIN
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/new4.1
Normal file
BIN
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/new4.1
Normal file
Binary file not shown.
82
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/new4.2
Normal file
82
CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/new4.2
Normal file
@@ -0,0 +1,82 @@
|
||||
|
||||
|
||||
V4.2 C68 Changes
|
||||
|
||||
Enhancements
|
||||
- Block Declarations now supported.
|
||||
|
||||
- Local initializations now supported.
|
||||
|
||||
- Structure Bit field initializations now supported.
|
||||
|
||||
- Preprocessor is now a separate pass and may be called manually.
|
||||
|
||||
- Support of the '-C' preprocessor flag.
|
||||
|
||||
- Support of the '-g' flag for use with the symbolic debugger.
|
||||
|
||||
- The '-L' flag which forces all externally addressed variables to 32
|
||||
bit addresses is now the default, the '-a' flag may be used to force
|
||||
them to 16 bit addresses.
|
||||
|
||||
- The assembler now handles the new mnemonics required by the 68010.
|
||||
|
||||
- All compiler error messages designate the source file in which the
|
||||
problem occured as well as the line number.
|
||||
|
||||
- All compiler error messages are written to the standard error device.
|
||||
|
||||
- Addition of warning messages for possibly erraneous or unportable
|
||||
constructs.
|
||||
|
||||
Bug Fixes
|
||||
- Local, global, and block variables with the same names are now allowed
|
||||
as well as subroutines with the same names as labels.
|
||||
|
||||
- Character constant array subscripting (problem only in 4.1 release).
|
||||
|
||||
- Structure initializations are now handled properly (including bit
|
||||
fields and arrays).
|
||||
|
||||
- Sizeof works properly on all combinations of arrays and structures.
|
||||
|
||||
- Complex conditional expression of the form (--regi != -1 && expression)
|
||||
generates the correct code now (problem only in 4.0 and 4.1 releases).
|
||||
|
||||
- Structure assignments of structures larger then 22 bytes now works
|
||||
properly.
|
||||
|
||||
- -Idir no longer requires a terminating slash.
|
||||
|
||||
- Floating point operations of the form "if (fp)" where fp is a float
|
||||
now generates the proper code.
|
||||
|
||||
- Floating point constants no longer require a digit to precede the
|
||||
decimal point.
|
||||
|
||||
- Pre/post increment/decrement on floats now generates the proper code
|
||||
in all cases, equal-op operations on floats now work propely in all
|
||||
cases. (in particular if the floating point value is a structure
|
||||
member).
|
||||
|
||||
_ Long expression cast as int destined for stack will always be past
|
||||
as an int.
|
||||
|
||||
- Long constants as array indices will not be turned into 16-bit
|
||||
displacement values.
|
||||
|
||||
- All octal and hex constants which fit into 16 bits as unsigned values
|
||||
will be treated as integer constants.
|
||||
|
||||
Known Deficiencies
|
||||
- Unsigned long not supported. (system III unix)
|
||||
|
||||
- Unsigned char not supported. (system III unix)
|
||||
|
||||
- Void type unimplemented. (system III unix)
|
||||
|
||||
- Enum type unimplemented. (system III unix)
|
||||
|
||||
- Functions can not return structures. (system III unix)
|
||||
|
||||
- You can't pass structures as arguments. (system III unix)
|
||||
@@ -0,0 +1 @@
|
||||
.fo 'REGULUS Reference Manual'- % -'SUBS'
|
||||
@@ -0,0 +1,29 @@
|
||||
.so macro
|
||||
.he 'ATOF''ATOF'
|
||||
.n NAME
|
||||
atof - ascii to floating point conversion
|
||||
.sy SYNOPSIS
|
||||
.nf
|
||||
#include <math.h>
|
||||
|
||||
double
|
||||
atof(s)
|
||||
char *s;
|
||||
.fi
|
||||
.d DESCRIPTION
|
||||
\&'atof' converts an ascii string into it's floating point representation,
|
||||
where the string is of the format :
|
||||
.sp
|
||||
.nf
|
||||
.ti +5
|
||||
{sign}{digits}{'.'}{digits}{E}{sign}{digits}
|
||||
.fi
|
||||
.sp
|
||||
Both signs and the exponent string is optional. The decimal point is
|
||||
optional, but may appear at any point in the digit string.
|
||||
The single precision result is returned.
|
||||
.fl FILES
|
||||
math.h - routine declaration
|
||||
.sa SEE ALSO
|
||||
etoa(subs), ftoa(subs), atol(subs)
|
||||
.dg DIAGNOSTICS
|
||||
@@ -0,0 +1,18 @@
|
||||
.so macro
|
||||
.he 'CEIL''CEIL'
|
||||
.n CEIL
|
||||
ceil - floating point ceiling function
|
||||
.sy SYNOPSIS
|
||||
.nf
|
||||
#include <math.h>
|
||||
|
||||
double ceil(d)
|
||||
double d;
|
||||
.fi
|
||||
.d DESCRIPTION
|
||||
\&'ceil' returns the smallest integer (as a double precision
|
||||
number) not less than x.
|
||||
.fl FILES
|
||||
math.h - declaration include file
|
||||
.sa SEE ALSO
|
||||
floor(subs)
|
||||
@@ -0,0 +1,27 @@
|
||||
.so macro
|
||||
.he 'ETOA''ETOA'
|
||||
.n etoa
|
||||
etoa - floating point exponential to ascii
|
||||
.sy SYNOPSIS
|
||||
.nf
|
||||
#include <math.h>
|
||||
|
||||
char *
|
||||
etoa(fp,buf,prec)
|
||||
float fp;
|
||||
char *buf;
|
||||
int prec;
|
||||
.fi
|
||||
.d DESCRIPTION
|
||||
\&'etoa' converts a float into it's ascii exponential representation.
|
||||
Where fp is a floating point number, buf is the buffer in
|
||||
which to return the string, and
|
||||
prec is the precision of the decimal places.
|
||||
If the precision is specified to be zero or negative then the default
|
||||
precision of six decimal places will be used.
|
||||
A pointer to the beginning of buf is returned.
|
||||
.fl FILES
|
||||
math.h - routine declaration
|
||||
.sa SEE ALSO
|
||||
ftoa(subs), atoi(subs), atol(subs), itoa(subs)
|
||||
.dg DIAGNOSTICS
|
||||
@@ -0,0 +1,17 @@
|
||||
.so macro
|
||||
.he 'FABS''FABS'
|
||||
.n FABS
|
||||
fabs - floating point absolute
|
||||
.sy SYNOPSIS
|
||||
.nf
|
||||
#include <math.h>
|
||||
|
||||
double
|
||||
fabs(d)
|
||||
double d;
|
||||
.fi
|
||||
.d DESCRIPTION
|
||||
\&'fabs' returns the absolute value of a floating point number.
|
||||
.fl FILES
|
||||
math.h - declaration include file
|
||||
.sa SEE ALSO
|
||||
@@ -0,0 +1,18 @@
|
||||
.so macro
|
||||
.he 'FLOOR''FLOOR'
|
||||
.n FLOOR
|
||||
floor - floating point floor function
|
||||
.sy SYNOPSIS
|
||||
.nf
|
||||
#include <math.h>
|
||||
|
||||
double floor(d)
|
||||
double d;
|
||||
.fi
|
||||
.d DESCRIPTION
|
||||
\&'floor' returns the largest integer (as a double precision
|
||||
number) not greater than x.
|
||||
.fl FILES
|
||||
math.h - declaration include file
|
||||
.sa SEE ALSO
|
||||
ceil(subs)
|
||||
@@ -0,0 +1,16 @@
|
||||
.so macro
|
||||
.he 'FMOD''FMOD'
|
||||
.n FMOD
|
||||
fmod - floating point remainder function
|
||||
.sy SYNOPSIS
|
||||
.nf
|
||||
#include <math.h>
|
||||
|
||||
double fmod(x,y)
|
||||
double x,y;
|
||||
.fi
|
||||
.d DESCRIPTION
|
||||
\&'fmod' returns the remainder when x is divided by y.
|
||||
.fl FILES
|
||||
math.h - declaration include file
|
||||
.sa SEE ALSO
|
||||
@@ -0,0 +1,28 @@
|
||||
.so macro
|
||||
.he 'FTOA''FTOA'
|
||||
.n NAME
|
||||
ftoa - floating point to ascii conversion
|
||||
.sy SYNOPSIS
|
||||
.nf
|
||||
#include <math.h>
|
||||
|
||||
char *
|
||||
ftoa(fp,buf,prec)
|
||||
float fp;
|
||||
char *buf;
|
||||
int prec;
|
||||
.fi
|
||||
.d DESCRIPTION
|
||||
\&'ftoa' converts a float into it's ascii representation.
|
||||
Where fp is a floating point number, buf is the buffer in
|
||||
which to return the string, and
|
||||
prec is the precision of the decimal places.
|
||||
If the specified precision is zero then no decimal point will be
|
||||
printed. If the precision is negative then the default precision
|
||||
\&(6) will be used.
|
||||
A pointer to the beginning of buf is returned.
|
||||
.fl FILES
|
||||
math.h - routine declaration
|
||||
.sa SEE ALSO
|
||||
etoa(subs), atoi(subs), atol(subs), itoa(subs)
|
||||
.dg DIAGNOSTICS
|
||||
@@ -0,0 +1,17 @@
|
||||
.th GETCHAR
|
||||
.sh NAME
|
||||
getchar \*- read character
|
||||
.sh SYNOPSIS
|
||||
.ft B
|
||||
int getchar( )
|
||||
.br
|
||||
.ft R
|
||||
.sh DESCRIPTION
|
||||
Getchar reads records from the standard input (VERSAdos file #5)
|
||||
into a buffer and returns these characters one per call to the
|
||||
user. Getchar assumes that it is reading ASCII records. It
|
||||
places a '\\n' character on the end of each record, and translates
|
||||
the VERSAdos tab character (any negative character) into a '\\t'.
|
||||
Getchar returns a negative number for EOF or read error.
|
||||
Since all VERSAdos I/O is record I/O, getchar must be buffered,
|
||||
and thus is not any less efficient than getc.
|
||||
@@ -0,0 +1,89 @@
|
||||
.so macro
|
||||
.he 'PRINTF''PRINTF'
|
||||
.n NAME PRINTF
|
||||
printf - formatted print
|
||||
.sy SYNOPSIS
|
||||
printf(plist);
|
||||
char *plist;
|
||||
.d DESCRIPTION
|
||||
\&'printf' takes the input string and interprets various formatting
|
||||
commands and outputs the results to the standard output device.
|
||||
There are two types of items in the input string: characters which
|
||||
are copied literally and format statements which work on strings,
|
||||
characters and numerics.
|
||||
.sp
|
||||
The string takes the form of a literal string with embedded format
|
||||
statements and the various arguments on which the format statements
|
||||
act: printf("...",arg1,arg2...).
|
||||
All format statements are
|
||||
preceded by a percent sign and terminated by one of the conversion
|
||||
characters.
|
||||
Between the percent sign and the conversion characters
|
||||
are optional symbols which adjust the standard formats.
|
||||
.sp
|
||||
The format statement consists of a contiguous group of characters.
|
||||
A minus sign '-' may follow the percent sign to designate that the
|
||||
item is to be left justified.
|
||||
A decimal number designating the field width may optionally be specified.
|
||||
If the item is larger than the specified width it will be printed as is.
|
||||
If the item is smaller,
|
||||
the item will be padded with spaces.
|
||||
If the first digit of the specified width is a '0' then the item
|
||||
will be padded with zero's instead of spaces.
|
||||
If the item is a string or
|
||||
a floating point number a second field preceded by a period '.'
|
||||
may be specified.
|
||||
The second width field specifies the number of
|
||||
digits to the right of the decimal point in the case of a floating
|
||||
point and the maximum number of characters to be printed in the
|
||||
case of a string.
|
||||
.sp
|
||||
The last item of a format statement describes the item we are
|
||||
formatting.
|
||||
They are 'c', 'd', 'e', 'f', 'u', 'o', 's', and 'x'.
|
||||
.sp
|
||||
.in +6
|
||||
.ti -7
|
||||
\ 'c'\ \ \ The argument to be printed is a single character.
|
||||
.sp
|
||||
.ti -7
|
||||
\ 's'\ \ \ The argument is a string or character pointer.
|
||||
All characters will be printed unless a maximum width field is in force.
|
||||
.sp
|
||||
.ti -7
|
||||
\ 'd'\ \ \ The argument is a decimal numeric.
|
||||
.sp
|
||||
.ti -7
|
||||
\ 'o'\ \ \ The argument is a octal numeric.
|
||||
.sp
|
||||
.ti -7
|
||||
\ 'x'\ \ \ The argument is a hexidecimal numeric.
|
||||
.sp
|
||||
.ti -7
|
||||
\ 'u'\ \ \ The argument will be interpreted as an unsigned decimal
|
||||
integer in the range 0 to 65535.
|
||||
.sp
|
||||
.ti -7
|
||||
\ 'f'\ \ \ The argument is either a floating point or double precision
|
||||
number.
|
||||
It will be of the form: an optional minus sign, digits,
|
||||
a decimal point, and more digits.
|
||||
If no second width field has
|
||||
been specified there will be six digits to the right of the decimal point.
|
||||
.sp
|
||||
.ti -7
|
||||
\ 'e'\ \ \ The argument is to be printed in scientific notation and is
|
||||
either a floating point or double precision number.
|
||||
The format is
|
||||
exactly like the 'f' format except that only one digit is to the
|
||||
right of the decimal point and a two digit exponent is specified after
|
||||
the number.
|
||||
.sp
|
||||
Format descriptors 'd', 'o', 'x', and 'u' may optionally be preceeded
|
||||
by a 'l' character to specify that the argument to be printed is a
|
||||
long rather than an integer.
|
||||
.sp
|
||||
Any other character following a percent sign will be taken as a
|
||||
literal and will itself be printed.
|
||||
In this way you can print a percent sign or a double quote.
|
||||
.sp
|
||||
@@ -0,0 +1,25 @@
|
||||
.th PUTCHAR
|
||||
.sh NAME
|
||||
putchar - write a character
|
||||
.sh SYNOPSIS
|
||||
.ft B
|
||||
int getchar(c)
|
||||
.br
|
||||
char c;
|
||||
.ft R
|
||||
.sh DESCRIPTION
|
||||
Putchar writes one character to the standard output (VERSAdos file #6).
|
||||
Putchar assumes it is writting ASCII characters and buffers all
|
||||
characters until a '\\n' is received. Then the '\\n' is stripped
|
||||
from the buffer and the record is written. Tab characters are left
|
||||
as '\\t' -- they are not translated into the VERSAdos convention
|
||||
of a negative number. Putchar returns the character received for
|
||||
success and returns a negative integer for failure.
|
||||
|
||||
Putchar may aso be used to write ASCII characters to a file other than
|
||||
the standard output. If the external variable named fout is set to
|
||||
any valid file descriptor, then putchar writes to that file rather
|
||||
than the standard output. The routine named flush which writes
|
||||
any characters in the putchar output buffer may be called to
|
||||
force a write; however, writes occur automatically at the end
|
||||
of each record ('\\n' delimiter).
|
||||
Reference in New Issue
Block a user