*** 32 bit C compiler, flat memory, FASM output ***
In TRDOS 386, STDIN/STDOUT/STDERR (can be used but) are not used in
same meanings.. SYSSTDIO system call is used instead of SYSREAD/SYSWRITE
system calls with file handles 0,1,2 for STDIN/STDOUT/STDERR.
In 'stdio.h' header file, STDIN,STDOUT and STDERR
file handles are set to -1 (not 0,1,2 as in other systems).
This is a signature that directs code to SYSSTDIO system call
(for putc, getc) instead of SYSREAD/SYSWRITE (fputc, fgetc) system calls.
(You can see it in 'OSFUNC.ASM' file)
SYSSTDIO system call can be used to redirect STDIN and STDOUT to a file.
(But this is not a subject for SCC here.)
FASM (flat assembler) is used to assemble SCC source code.
Use scc without a file name -without an argument- to see options.
Label numbers may need to be changed later by using NOTEPAD
or a similar text editor.
Note: 'include' files and a header file
-for setting '_main' function, entry point- is needed.
SCC output file must be included to TRDOS 386 compatible ASM file.
(There are samples in this SCC repository.)
PRG extension means TRDOS 386 flat image binary/executable
file (like as a .BIN file or similar to MSDOS .COM files but startup address
is 0 not 100h). (TRDOS 386 PRG file size + BSS limit is virtually 4GB-4MB.)
Erdogan Tan - September 2024