Home
projects
TRS-80 software I wrote
Zeta BBS
Utilities
Printer Utils
Patches
Operating Systems
Library of C
Languages
Include files
Hardware
Games
FORTRAN Programs
File Utils
Disk Utils
Comms Programs
CMD File Utils
BASIC Programs
University assignments
fidonet-packet-handlers
Your donation gives me time
to develop more cool free stuff
|
Nick Andrew - TRS-80 - Include files
TRS-80 Include (ASM) files
This directory contains various ASM files which I used in many
source packages, to define common constants or provide useful
functions. In some cases I had
several different versions of each file, and I have tried to combine
them to produce a "latest and greatest" of each.
The source files are:
- ascii.asm
- ASCII character abbreviations (CR, LF, etc)
- asctime.asm
- A function usable by a C program to convert the current
date/time into the format 'dd mmm yy hh:mm:ss'.
- call.asm
- This is the "Small C arithmetic and logical library". I didn't
write it, but I probably made some changes to it. It seems essential
to get some of my programs going, so it is included here.
- debug.asm
- A function and a macro to assist in debugging the Small C
compiler output. Apart from porting the J.E. Hendrix Small C compiler
to TRS-80, I modified it to improve its handling for some data types.
Debug would print the function name to the screen and then delay a bit
to give me time to read the name.
- debugf.asm
- Very similar to debug.asm, with a much smaller delay.
- doscalls.asm
- This file gave symbolic names to the constant addresses used
by DOS to open and close files, etc. as well as commonly occurring
error codes and some differences between Model 1 and Model 3.
- external.asm
- This was a definition of how my system used high memory locations
in the region 0xFE00 through 0xFFFF. A lot of this is specific to the
Zeta BBS (see trs80-zeta-bbs package) but it also might be used by
the programs which manipulated my 256 Kbyte paged memory subsystem.
- filename.asm
- Some functions for manipulating filenames.
- fread.asm
- fread() function callable from C.
- ftell.asm
- ftell() function callable from C.
- gettime.asm
- Functions for getting the year/month/day/hour/minute/second
callable from C.
- libc.asm
- Standard I-O library for Small C.
In addition to defining some symbolic constants, the following
C functions were implemented:
fileno(), putchar(), fputc(), getc(), fgets(), fread(), fgetc(),
fputs(), exit(), strcpy(), fclose(), fopen(), feof(), fflush(),
fseek(), rewind(), brk() and FIX_PROG_END.
The following were added as do-nothing functions:
sprintf(), fprintf(), printf().
I seem to recall that Small C used the "wrong" function calling
conventions and so use of varying numbers of arguments in functions
was impossible.
- listalc.asm
- Defines some list manipulation functions.
- malloc.asm
- Implements malloc(), callable from C.
- prognumb.asm
- Some constants to identify individual programs. I'm not
sure why this was needed.
- raw.asm
- Implements raw() and cooked(), callable from C.
- reada.asm
- Reads a line of text from the keyboard, callable from C.
- savepos.asm
- Saves and restores current file position, callable from C.
I don't know why I didn't implement fseek/ftell ... perhaps
because the Small C compiler did not implement the "long"
data type.
- setpos.asm
- Similar to savepos.asm, but enough differences that I thought
it better to release both files.
- unlink.asm
- unlink(), callable from C.
Download
|