mirror of
https://github.com/wwarthen/RomWBW.git
synced 2026-02-06 22:43:15 -06:00
Enhanced Hi-Tech C Compiler Files, Issue #521
Added the enhanced Hi-Tech C Compiler components from @Laci1953 to user area 1 of the Hi-Tech Compiler disk images. Co-Authored-By: ladislau szilagyi <87603175+Laci1953@users.noreply.github.com>
This commit is contained in:
@@ -573,7 +573,7 @@ This is a generic ZPM3 adaptation for RomWBW.
|
||||
|
||||
The following files came from from Microcode Consulting. The official
|
||||
distribution files can be found on the Microcode Consulting website at
|
||||
[https://www.microcodeconsulting.com/z80/qpm.htm].
|
||||
<https://www.microcodeconsulting.com/z80/qpm.htm>.
|
||||
Also included in this image are debugz, and linkz frm the same company.
|
||||
|
||||
This disk includes the standard DRI CP/M 2.2 files in addition to the
|
||||
@@ -651,7 +651,7 @@ look a little strange depending on the terminal emulation you are using.
|
||||
|
||||
User area 4 contains a full implementation of the CP/NET 1.2 client
|
||||
provided by Doug Miller. Please refer to
|
||||
[https://github.com/durgadas311/cpnet-z80] for more information,
|
||||
<https://github.com/durgadas311/cpnet-z80> for more information,
|
||||
complete documentation and the latest source code.
|
||||
|
||||
Please refer to the RomWBW User Guide for instructions on installing
|
||||
@@ -979,7 +979,7 @@ The following files are found in
|
||||
| `ZEXDOC.COM` | Z80 Instruction Set Exerciser |
|
||||
|
||||
And The following CPU Tests - Which are probably originally from this source.
|
||||
[https://github.com/raxoft/z80test]
|
||||
<https://github.com/raxoft/z80test>
|
||||
|
||||
| **File** | **Description** |
|
||||
|----------------|---------------------------------------------------------------|
|
||||
@@ -1002,7 +1002,7 @@ including MS-DOS, Apple II DOS 3.3 and PRoDOS, Commodore 64, Macintosh and
|
||||
Amiga. This disk contains the CP/M version of that compiler. A cross-compiler
|
||||
for MS-DOS or Windows XP is also available.
|
||||
|
||||
For full documentation, see [https://www.aztecmuseum.ca]
|
||||
For full documentation, see <https://www.aztecmuseum.ca>
|
||||
The user manual is available in the Doc/Language directory
|
||||
Aztec_C_1.06_User_Manual_Mar84.pdf
|
||||
|
||||
@@ -1048,10 +1048,10 @@ NOTE : The above is incomplete
|
||||
|
||||
The Cowgol 2.0 compiler and related tools.
|
||||
These files were provided by Ladislau Szilagyi and were sourced
|
||||
from his GitHub repository at [https://github.com/Laci1953/Cowgol_on_CP_M].
|
||||
from his GitHub repository at <https://github.com/Laci1953/Cowgol_on_CP_M>.
|
||||
|
||||
The primary distribution site for Cowgol 2.0 is at
|
||||
[https://github.com/davidgiven/cowgol].
|
||||
<https://github.com/davidgiven/cowgol>.
|
||||
The user manual is available in the Doc/Language directory
|
||||
Cowgol Language.pdf
|
||||
|
||||
@@ -1114,12 +1114,12 @@ Zork 1 through 3, Planetfall and Hitchhiker's Guide to the Galaxy.
|
||||
Nemesis and Dungeon Master is a Rogue-like game released in 1981. It is playable
|
||||
on a text terminal using ASCII graphics to represent the dungeon. Only a few
|
||||
thousand copies of the game were ever made, making it very rare. See
|
||||
[http://crpgaddict.blogspot.com/2019/03/game-322-nemesis-1981.html]
|
||||
<http://crpgaddict.blogspot.com/2019/03/game-322-nemesis-1981.html>
|
||||
|
||||
Colossal Cave Adventure is a CP/M port of the 1976 classic game originally
|
||||
written by Will Crowther for the PDP-10 mainframe. See
|
||||
[https://en.wikipedia.org/wiki/Colossal_Cave_Adventure] and
|
||||
[https://if50.substack.com/p/1976-adventure]
|
||||
<https://en.wikipedia.org/wiki/Colossal_Cave_Adventure> and
|
||||
<https://if50.substack.com/p/1976-adventure>
|
||||
|
||||
The following files are found in
|
||||
|
||||
@@ -1144,13 +1144,32 @@ which produce programs for execution in embedded systems
|
||||
without an operating system.
|
||||
|
||||
This is the Mar 21, 2023 update 17 released by Tony Nicholson who currently
|
||||
maintains HI-TECH C at [https://github.com/agn453/HI-TECH-Z80-C]
|
||||
maintains HI-TECH C at <https://github.com/agn453/HI-TECH-Z80-C>
|
||||
|
||||
The manual is available in the Doc/Language directory,
|
||||
HI-TECH Z80 C Compiler Manual.txt
|
||||
|
||||
A good blog post about the HI-TECH C Compiler is available at
|
||||
[https://techtinkering.com/2008/10/22/installing-the-hi-tech-z80-c-compiler-for-cpm]
|
||||
<https://techtinkering.com/2008/10/22/installing-the-hi-tech-z80-c-compiler-for-cpm>
|
||||
|
||||
User area 1 contains another complete copy of the HI-TECH C Compiler.
|
||||
It is identical to the copy in user area 0 except for the following files
|
||||
which were enhanced by Ladislau Szilagyi from his GitHub Repository at
|
||||
<https://github.com/Laci1953/HiTech-C-compiler-enhanced>. The files
|
||||
take advantage of additional banked memory using the RomWBW HBIOS API.
|
||||
As such, they require RomWBW to operate. They should be compatible with
|
||||
all CP/M and compatible operations systems provided in RomWBW.
|
||||
|
||||
The enhanced files are:
|
||||
|
||||
- CGEN.COM
|
||||
- CPP.COM
|
||||
- OPTIM.COM
|
||||
- P1.COM
|
||||
- ZAS.COM (replaced with Z80AS)
|
||||
|
||||
A thread discussing this enhanced version of HI-TECH C is found at
|
||||
<https://groups.google.com/g/rc2014-z80/c/sBCCIpOnnGg>.
|
||||
|
||||
The following files are found in
|
||||
|
||||
@@ -1170,7 +1189,7 @@ NOTE : The above is incomplete
|
||||
The collection of MSX ROMs (2 disks) as provided by Les Bird.
|
||||
These ROMs are "run" by using the
|
||||
appropriate variant of Les' MSX8 ROM loader. You can download the
|
||||
loader binaries from [https://github.com/lesbird/MSX8]. You will need
|
||||
loader binaries from <https://github.com/lesbird/MSX8>. You will need
|
||||
appropriate hardware to run the loader.
|
||||
|
||||
Please review the file ROMLIST.TXT for information on the current
|
||||
@@ -1206,7 +1225,7 @@ The manual can be found in the Docs/Language directory,
|
||||
Turbo_Pascal_Version_3.0_Reference_Manual_1986.pdf
|
||||
|
||||
A good overview of using Turbo Pascal in CP/M is available at
|
||||
[https://techtinkering.com/2013/03/05/turbo-pascal-a-great-choice-for-programming-under-cpm]
|
||||
<https://techtinkering.com/2013/03/05/turbo-pascal-a-great-choice-for-programming-under-cpm>
|
||||
|
||||
The following files are found in
|
||||
|
||||
@@ -1358,10 +1377,10 @@ The manual(s) are available in the Doc/Language directory,
|
||||
* Z80DIS User Manual (1985).pdf
|
||||
|
||||
A run through of using the assembler is available at
|
||||
[https://8bitlabs.ca/Posts/2023/05/20/learning-z80-asm]
|
||||
<https://8bitlabs.ca/Posts/2023/05/20/learning-z80-asm>
|
||||
|
||||
And another shorter, but shows linker usage guide
|
||||
[https://pollmyfinger.wordpress.com/2022/01/10/modular-retro-z80-assembly-language-programming-using-slr-systems-z80asm-and-srlnk/]
|
||||
<https://pollmyfinger.wordpress.com/2022/01/10/modular-retro-z80-assembly-language-programming-using-slr-systems-z80asm-and-srlnk/>
|
||||
|
||||
The following files are found in
|
||||
|
||||
|
||||
@@ -324,6 +324,8 @@ please let me know if I missed you!
|
||||
|
||||
* Les Bird has contributed support for the NABU w/ Option Board
|
||||
|
||||
* Rob Gowin created an online documentation site via MkDocs.
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
## Related Projects
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -24,3 +24,24 @@ support is offered or implied.
|
||||
|
||||
You may use this software for whatever you like, providing you acknowledge
|
||||
that the copyright to this software remains with HI-TECH Software.
|
||||
|
||||
== Enhanced Version ==
|
||||
|
||||
User area 1 contains another complete copy of the HI-TECH C Compiler.
|
||||
It is identical to the copy in user area 0 except for the following files
|
||||
which were enhanced by Ladislau Szilagyi from his GitHub Repository at
|
||||
https://github.com/Laci1953/HiTech-C-compiler-enhanced. The files
|
||||
take advantage of additional banked memory using the RomWBW HBIOS API.
|
||||
As such, they require RomWBW to operate. They should be compatible with
|
||||
all CP/M and compatible operations systems provided in RomWBW.
|
||||
|
||||
The enhanced files are:
|
||||
|
||||
- CGEN.COM
|
||||
- CPP.COM
|
||||
- OPTIM.COM
|
||||
- P1.COM
|
||||
- ZAS.COM (replaced with Z80AS)
|
||||
|
||||
A thread discussing this enhanced version of HI-TECH C is found at
|
||||
https://groups.google.com/g/rc2014-z80/c/sBCCIpOnnGg.
|
||||
|
||||
BIN
Source/Images/d_hitechc/u1/$EXEC.COM
Normal file
BIN
Source/Images/d_hitechc/u1/$EXEC.COM
Normal file
Binary file not shown.
23
Source/Images/d_hitechc/u1/ASSERT.H
Normal file
23
Source/Images/d_hitechc/u1/ASSERT.H
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef _HTC_ASSERT_H
|
||||
#define _HTC_ASSERT_H
|
||||
|
||||
/*
|
||||
* Assertion - use liberally for debugging. Defining NDEBUG
|
||||
* turns assertions off.
|
||||
* assert(exp) where exp is non-zero does nothing, while
|
||||
* assert(exp) where exp evaluates to zero aborts the program
|
||||
* with a message like
|
||||
*
|
||||
* Assertion failed: prog.c line 123: "exp"
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef NDEBUG
|
||||
extern void _fassert(int, char *, char *);
|
||||
#define assert(exp) if(!(exp)) {_fassert(__LINE__, __FILE__, "exp");}
|
||||
#else
|
||||
#define assert(exp)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
BIN
Source/Images/d_hitechc/u1/C.COM
Normal file
BIN
Source/Images/d_hitechc/u1/C.COM
Normal file
Binary file not shown.
BIN
Source/Images/d_hitechc/u1/C309.COM
Normal file
BIN
Source/Images/d_hitechc/u1/C309.COM
Normal file
Binary file not shown.
BIN
Source/Images/d_hitechc/u1/CGEN.COM
Normal file
BIN
Source/Images/d_hitechc/u1/CGEN.COM
Normal file
Binary file not shown.
30
Source/Images/d_hitechc/u1/CONIO.H
Normal file
30
Source/Images/d_hitechc/u1/CONIO.H
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef _HTC_CONIO_H
|
||||
#define _HTC_CONIO_H
|
||||
|
||||
/*
|
||||
* Low-level console I/O functions
|
||||
*/
|
||||
|
||||
#ifndef _STDDEF
|
||||
typedef int ptrdiff_t; /* result type of pointer difference */
|
||||
typedef unsigned size_t; /* type yielded by sizeof */
|
||||
#define _STDDEF
|
||||
#define offsetof(ty, mem) ((int)&(((ty *)0)->mem))
|
||||
#endif _STDDEF
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((void *)0)
|
||||
#endif NULL
|
||||
|
||||
extern int errno; /* system error number */
|
||||
|
||||
extern char getch(void);
|
||||
extern char getche(void);
|
||||
extern void putch(int);
|
||||
extern void ungetch(int);
|
||||
extern int kbhit(void);
|
||||
extern char * cgets(char *);
|
||||
extern void cputs(char *);
|
||||
|
||||
#endif
|
||||
|
||||
215
Source/Images/d_hitechc/u1/CPM.H
Normal file
215
Source/Images/d_hitechc/u1/CPM.H
Normal file
@@ -0,0 +1,215 @@
|
||||
#ifndef _HTC_CPM_H
|
||||
#define _HTC_CPM_H
|
||||
|
||||
/* Header file for CP/M routines for Z-80 C */
|
||||
|
||||
/* get basic definitions */
|
||||
|
||||
#ifndef _STDDEF
|
||||
typedef int ptrdiff_t; /* result type of pointer difference */
|
||||
typedef unsigned size_t; /* type yielded by sizeof */
|
||||
#define _STDDEF
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((void *)0)
|
||||
#endif NULL
|
||||
|
||||
extern int errno; /* system error number */
|
||||
#endif _STDDEF
|
||||
|
||||
/* hitech.h has definitions for uchar, ushort etc */
|
||||
|
||||
#include <hitech.h>
|
||||
#if z80
|
||||
#define MAXFILE 8 /* max number of files open */
|
||||
#else z80
|
||||
#define MAXFILE 15 /* max number of files open */
|
||||
#endif z80
|
||||
#define SECSIZE 128 /* no. of bytes per sector */
|
||||
|
||||
extern struct fcb
|
||||
{
|
||||
uchar dr; /* 0: drive code */
|
||||
char name[8]; /* 1: file name */
|
||||
char ft[3]; /* 9: file type */
|
||||
uchar ex; /* 12: file extent */
|
||||
char fil[2]; /* 13: not used */
|
||||
char rc; /* 15: number of records in present extent */
|
||||
char dm[16]; /* 16: CP/M disk map */
|
||||
char nr; /* 32: next record to read or write */
|
||||
uchar ranrec[3]; /* 35: random record number (24 bit no.) */
|
||||
long rwp; /* 38: read/write pointer in bytes */
|
||||
uchar use; /* 42: use flag */
|
||||
uchar uid; /* 43: user id belonging to this file */
|
||||
long fsize; /* 44: file length in bytes */
|
||||
} _fcb[MAXFILE];
|
||||
|
||||
extern short bdos(int, ...);
|
||||
#define bdoshl bdos
|
||||
#define bdose bdos
|
||||
extern struct fcb* getfcb(void);
|
||||
extern char * fcbname(short i);
|
||||
extern short getuid(void);
|
||||
extern short setuid(short);
|
||||
extern uchar setfcb(struct fcb *, char *);
|
||||
extern char * (*_passwd)(struct fcb *);
|
||||
extern short bios(short fn, ...);
|
||||
#define bios3 bios
|
||||
|
||||
/* flag values in fcb use */
|
||||
|
||||
#define U_READ 1 /* file open for reading */
|
||||
#define U_WRITE 2 /* file open for writing */
|
||||
#define U_RDWR 3 /* open for read and write */
|
||||
#define U_CON 4 /* device is console */
|
||||
#define U_RDR 5 /* device is reader */
|
||||
#define U_PUN 6 /* device is punch */
|
||||
#define U_LST 7 /* list device */
|
||||
#define U_RSX 8 /* PIPEMGR RSX */
|
||||
#define U_ERR 9 /* PIPEMGR stderr channel */
|
||||
|
||||
/* special character values */
|
||||
|
||||
#define CPMETX 032 /* ctrl-Z, CP/M end of file for text */
|
||||
#define CPMRBT 003 /* ctrl-C, reboot CPM */
|
||||
|
||||
/* operating systems */
|
||||
|
||||
#define MPM 0x100 /* bit to test for MP/M */
|
||||
#define CCPM 0x400 /* bit to test for CCP/M */
|
||||
|
||||
#define ISMPM() (bdoshl(CPMVERS)&MPM) /* macro to test for MPM */
|
||||
|
||||
/* what to do after you hit return */
|
||||
|
||||
#define EXIT (*(int (*)())0) /* where to go to reboot CP/M */
|
||||
|
||||
/* BDOS calls etc. */
|
||||
|
||||
#define CPMRCON 1 /* read console */
|
||||
#define CPMWCON 2 /* write console */
|
||||
#define CPMRRDR 3 /* read reader */
|
||||
#define CPMWPUN 4 /* write punch */
|
||||
#define CPMWLST 5 /* write list */
|
||||
#define CPMDCIO 6 /* direct console I/O */
|
||||
#define CPMGIOB 7 /* get I/O byte */
|
||||
#define CPMSIOB 8 /* set I/O byte */
|
||||
#define CPMWCOB 9 /* write console buffered */
|
||||
#define CPMRCOB 10 /* read console buffered */
|
||||
#define CPMICON 11 /* interrogate console ready */
|
||||
#define CPMVERS 12 /* return version number */
|
||||
#define CPMRDS 13 /* reset disk system */
|
||||
#define CPMLGIN 14 /* log in and select disk */
|
||||
#define CPMOPN 15 /* open file */
|
||||
#define CPMCLS 16 /* close file */
|
||||
#define CPMFFST 17 /* find first */
|
||||
#define CPMFNXT 18 /* find next */
|
||||
#define CPMDEL 19 /* delete file */
|
||||
#define CPMREAD 20 /* read next record */
|
||||
#define CPMWRIT 21 /* write next record */
|
||||
#define CPMMAKE 22 /* create file */
|
||||
#define CPMREN 23 /* rename file */
|
||||
#define CPMILOG 24 /* get bit map of logged in disks */
|
||||
#define CPMIDRV 25 /* interrogate drive number */
|
||||
#define CPMSDMA 26 /* set DMA address for i/o */
|
||||
#define CPMGALL 27 /* get allocation vector address */
|
||||
#define CPMWPRD 28 /* write protect disk */
|
||||
#define CPMGROV 29 /* get read-only vector */
|
||||
#define CPMSATT 30 /* set file attributes */
|
||||
#define CPMDPB 31 /* get disk parameter block */
|
||||
#define CPMSUID 32 /* set/get user id */
|
||||
#define CPMRRAN 33 /* read random record */
|
||||
#define CPMWRAN 34 /* write random record */
|
||||
#define CPMCFS 35 /* compute file size */
|
||||
#define CPMSRAN 36 /* set random record */
|
||||
#define CPMRDRV 37 /* reset drive */
|
||||
#define CPMACDV 38 /* MP/M access drive */
|
||||
#define CPMFRDV 39 /* MP/M free drive */
|
||||
#define CPMWRZF 40 /* write random with zero fill */
|
||||
#define CPMTWR 41 /* MP/M test and write record */
|
||||
#define CPMLOKR 42 /* MP/M lock record */
|
||||
#define CPMUNLR 43 /* MP/M unlock record */
|
||||
#define CPMSMSC 44 /* CP/M+ set multi-sector count */
|
||||
#define CPMERRM 45 /* CP/M+ set BDOS error mode */
|
||||
#define CPMDFS 46 /* CP/M+ get disk free space */
|
||||
#define CPMCHN 47 /* CP/M+ chain to program */
|
||||
#define CPMFLSH 48 /* CP/M+ flush buffers */
|
||||
#define CPMGZSD 48 /* ZSDOS get ZSDOS/ZDDOS version */
|
||||
#define CPMSCB 49 /* access CP/M+ system control block */
|
||||
#define CPMBIOS 50 /* CP/M+ direct BIOS call */
|
||||
#define CPMDSEG 51 /* set DMA segment */
|
||||
#define CPMGFTM 54 /* Z80DOS/ZPM3 get file time-stamp */
|
||||
#define CPMSFTM 55 /* Z80DOS/ZPM3 set file time-stamp */
|
||||
#define CPMLDOV 59 /* CP/M+ Load Overlay - requires LOADER RSX */
|
||||
#define CPMRSX 60 /* CP/M+ call RSX */
|
||||
#define CPMLGI 64 /* CP/Net login */
|
||||
#define CPMLGO 65 /* CP/Net logout */
|
||||
#define CPMSMSG 66 /* CP/Net send message */
|
||||
#define CPMRMSG 67 /* CP/Net receive message */
|
||||
#define CPMNETS 68 /* CP/Net get network status */
|
||||
#define CPMGCFT 69 /* CP/Net get configuration table address */
|
||||
#define CPMSCAT 70 /* CP/Net set compatibility attributes */
|
||||
#define CPMGSVC 71 /* CP/Net get server configuration */
|
||||
#define CPMFRBL 98 /* CP/M+ free blocks */
|
||||
#define CPMTRNC 99 /* CP/M+ truncate file */
|
||||
#define CPMSLBL 100 /* CP/M+ set directory label */
|
||||
#define CPMDLD 101 /* CP/M+ get directory label data */
|
||||
#define CPMGFTS 102 /* CP/M+ get file timestamp and password mode */
|
||||
#define CPMWXFC 103 /* CP/M+ write file XFCB */
|
||||
#define CPMSDAT 104 /* CP/M+ set date and time */
|
||||
#define CPMGDAT 105 /* CP/M+ get date and time */
|
||||
#define CPMSPWD 106 /* CP/M+ set default password */
|
||||
#define CPMGSER 107 /* CP/M+ get serial number */
|
||||
#define CPMRCOD 108 /* CP/M+ get/set return code */
|
||||
#define CPMCMOD 109 /* CP/M+ get/set console mode */
|
||||
#define CPMODEL 110 /* CP/M+ get/set output delimiter */
|
||||
#define CPMPBLK 111 /* CP/M+ print block */
|
||||
#define CPMLBLK 112 /* CP/M+ list block */
|
||||
#define CPMPARS 152 /* CP/M+ parse filename */
|
||||
|
||||
/* CP/M BIOS functions. Numbers above 16 pertain to CP/M 3 only. */
|
||||
|
||||
enum BIOSfns
|
||||
{
|
||||
_BOOT = 0,
|
||||
_WBOOT = 1,
|
||||
|
||||
_CONST = 2,
|
||||
_CONIN = 3,
|
||||
_CONOUT = 4,
|
||||
_LIST = 5,
|
||||
_PUNOUT = 6, /* CP/M 2.2 name */
|
||||
_AUXOUT = 6, /* CP/M 3.1 name */
|
||||
_RDRIN = 7, /* CP/M 2.2 name */
|
||||
_AUXIN = 7, /* CP/M 3.1 name */
|
||||
_LISTST = 15,
|
||||
_CONOST = 17,
|
||||
_AUXIST = 18,
|
||||
_AUXOST = 19,
|
||||
|
||||
_DEVTBL = 20,
|
||||
_DEVINI = 21,
|
||||
_DRVTBL = 22,
|
||||
|
||||
_HOME = 8,
|
||||
_SELDSK = 9,
|
||||
_SETTRK = 10,
|
||||
_SETSEC = 11,
|
||||
_SETDMA = 12,
|
||||
_READ = 13,
|
||||
_WRITE = 14,
|
||||
_SECTRN = 16,
|
||||
_MULTIO = 23,
|
||||
_FLUSH = 24,
|
||||
|
||||
_MOVE = 25,
|
||||
_SELMEM = 27,
|
||||
_SETBNK = 28,
|
||||
_XMOVE = 29,
|
||||
|
||||
_TIME = 26,
|
||||
_USERF = 30
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
BIN
Source/Images/d_hitechc/u1/CPP.COM
Normal file
BIN
Source/Images/d_hitechc/u1/CPP.COM
Normal file
Binary file not shown.
BIN
Source/Images/d_hitechc/u1/CREF.COM
Normal file
BIN
Source/Images/d_hitechc/u1/CREF.COM
Normal file
Binary file not shown.
BIN
Source/Images/d_hitechc/u1/CRTCPM.OBJ
Normal file
BIN
Source/Images/d_hitechc/u1/CRTCPM.OBJ
Normal file
Binary file not shown.
41
Source/Images/d_hitechc/u1/CTYPE.H
Normal file
41
Source/Images/d_hitechc/u1/CTYPE.H
Normal file
@@ -0,0 +1,41 @@
|
||||
#ifndef _HTC_CTYPE_H
|
||||
#define _HTC_CTYPE_H
|
||||
|
||||
#define _U 0x01
|
||||
#define _L 0x02
|
||||
#define _N 0x04
|
||||
#define _S 0x08
|
||||
#define _P 0x10
|
||||
#define _C 0x20
|
||||
#define _X 0x40
|
||||
|
||||
extern unsigned char _ctype_[]; /* in libc.lib */
|
||||
|
||||
#define isalpha(c) ((_ctype_+1)[c]&(_U|_L))
|
||||
#define isupper(c) ((_ctype_+1)[c]&_U)
|
||||
#define islower(c) ((_ctype_+1)[c]&_L)
|
||||
#define isdigit(c) ((_ctype_+1)[c]&_N)
|
||||
#define isxdigit(c) ((_ctype_+1)[c]&(_N|_X))
|
||||
#define isspace(c) ((_ctype_+1)[c]&_S)
|
||||
#define ispunct(c) ((_ctype_+1)[c]&_P)
|
||||
#define isalnum(c) ((_ctype_+1)[c]&(_U|_L|_N))
|
||||
#define isprint(c) ((_ctype_+1)[c]&(_P|_U|_L|_N|_S))
|
||||
#define isgraph(c) ((_ctype_+1)[c]&(_P|_U|_L|_N))
|
||||
#define iscntrl(c) ((_ctype_+1)[c]&_C)
|
||||
#define isascii(c) (!((c)&0xFF80))
|
||||
/*--------------------------------------*\
|
||||
| Changed 2014-07-04 (Jon Saxton) |
|
||||
|--------------------------------------|
|
||||
| Original macro definitions |
|
||||
| #define toupper(c) ((c)-'a'+'A') |
|
||||
| #define tolower(c) ((c)-'A'+'a') |
|
||||
|--------------------------------------|
|
||||
| Use functions instead |
|
||||
\*--------------------------------------*/
|
||||
extern int toupper(int); /* in LIBC.LIB */
|
||||
extern int tolower(int); /* in LIBC.LIB */
|
||||
|
||||
#define toascii(c) ((c)&0x7F)
|
||||
|
||||
#endif
|
||||
|
||||
BIN
Source/Images/d_hitechc/u1/DEBUG.COM
Normal file
BIN
Source/Images/d_hitechc/u1/DEBUG.COM
Normal file
Binary file not shown.
BIN
Source/Images/d_hitechc/u1/DRTCPM.OBJ
Normal file
BIN
Source/Images/d_hitechc/u1/DRTCPM.OBJ
Normal file
Binary file not shown.
22
Source/Images/d_hitechc/u1/EXEC.H
Normal file
22
Source/Images/d_hitechc/u1/EXEC.H
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef _HTC_EXEC_H
|
||||
#define _HTC_EXEC_H
|
||||
|
||||
/*
|
||||
* Definitions of the EXEC format
|
||||
*/
|
||||
|
||||
#define EXITIT 0x80
|
||||
#define EXEC 0x81
|
||||
#define IGN_ERR 0x82
|
||||
#define DEF_ERR 0x83
|
||||
#define SKP_ERR 0x84
|
||||
#define TRAP 0x85
|
||||
#define IF_ERR 0x86
|
||||
#define IF_NERR 0x87
|
||||
#define ECHO 0x88
|
||||
#define PRINT 0x89
|
||||
#define RM_FILE 0x8A
|
||||
#define RM_EXIT 0x8B
|
||||
|
||||
#endif
|
||||
|
||||
73
Source/Images/d_hitechc/u1/FLOAT.H
Normal file
73
Source/Images/d_hitechc/u1/FLOAT.H
Normal file
@@ -0,0 +1,73 @@
|
||||
#ifndef _HTC_FLOAT_H
|
||||
#define _HTC_FLOAT_H
|
||||
|
||||
/* Characteristics of floating types */
|
||||
|
||||
#define DBL_RADIX 2 /* radix of exponent for a double */
|
||||
#define DBL_ROUNDS 1 /* doubles round when converted to int */
|
||||
#define FLT_RADIX 2 /* radix of float exponent */
|
||||
#define FLT_ROUNDS 1 /* float also rounds to int */
|
||||
|
||||
#if z80
|
||||
#define FLT_MANT_DIG 24 /* 24 bits in mantissa */
|
||||
#define DBL_MANT_DIG 24 /* ditto for double */
|
||||
#define DBL_MANT_DIG 24 /* ditto long double */
|
||||
#define FLT_EPSILON -1.192093 /* smallest x, x+1.0 != 1.0 */
|
||||
#define DBL_EPSILON -1.192093 /* smallest x, x+1.0 != 1.0 */
|
||||
#define FLT_DIG 6 /* decimal significant digs */
|
||||
#define DBL_DIG 6
|
||||
#define FLT_MIN_EXP -62 /* min binary exponent */
|
||||
#define DBL_MIN_EXP -62
|
||||
#define FLT_MIN 1.084202e-19 /* smallest floating number */
|
||||
#define DBL_MIN 1.084202e-19
|
||||
#define FLT_MIN_10_EXP -18
|
||||
#define DBL_MIN_10_EXP -18
|
||||
#define FLT_MAX_EXP 64 /* max binary exponent */
|
||||
#define DBL_MAX_EXP 64
|
||||
#define FLT_MAX 1.84467e19 /* max floating number */
|
||||
#define DBL_MAX 1.84467e19
|
||||
#define FLT_MAX_10_EXP 19 /* max decimal exponent */
|
||||
#define DBL_MAX_10_EXP 19
|
||||
#endif z80
|
||||
|
||||
#if i8086 || m68k
|
||||
|
||||
/* The 8086 and 68000 use IEEE 32 and 64 bit floats */
|
||||
|
||||
#define FLT_RADIX 2
|
||||
#define FLT_MANT_DIG 24
|
||||
#define FLT_EPSILON 1.19209290e-07
|
||||
#define FLT_DIG 6
|
||||
#define FLT_MIN_EXP -125
|
||||
#define FLT_MIN 1.17549435e-38
|
||||
#define FLT_MIN_10_EXP -37
|
||||
#define FLT_MAX_EXP 128
|
||||
#define FLT_MAX 3.40282347e+38
|
||||
#define FLT_MAX_10_EXP 38
|
||||
#define DBL_MANT_DIG 53
|
||||
#define DBL_EPSILON 2.2204460492503131e-16
|
||||
#define DBL_DIG 15
|
||||
#define DBL_MIN_EXP -1021
|
||||
#define DBL_MIN 2.225073858507201e-308
|
||||
#define DBL_MIN_10_EXP -307
|
||||
#define DBL_MAX_EXP 1024
|
||||
#define DBL_MAX 1.797693134862316e+308
|
||||
#define DBL_MAX_10_EXP 308
|
||||
#endif i8086 || m68k
|
||||
|
||||
|
||||
/* long double equates to double */
|
||||
|
||||
|
||||
#define LDBL_MANT_DIG DBL_MANT_DIG
|
||||
#define LDBL_EPSILON DBL_EPSILON
|
||||
#define LDBL_DIG DBL_DIG
|
||||
#define LDBL_MIN_EXP DBL_MIN_EXP
|
||||
#define LDBL_MIN DBL_MIN
|
||||
#define LDBL_MIN_10_EXP DBL_MIN_10_EXP
|
||||
#define LDBL_MAX_EXP DBL_MAX_EXP
|
||||
#define LDBL_MAX DBL_MAX
|
||||
#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
|
||||
|
||||
#endif
|
||||
|
||||
74
Source/Images/d_hitechc/u1/HITECH.H
Normal file
74
Source/Images/d_hitechc/u1/HITECH.H
Normal file
@@ -0,0 +1,74 @@
|
||||
#ifndef _HTC_HITECH_H
|
||||
#define _HTC_HITECH_H
|
||||
|
||||
/* Standard types for HI-TECH Software code
|
||||
These types may need to be tuned for different
|
||||
machines/compilers. Notes with each one indicate assumptions
|
||||
that should be maintained for each type.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
Turn ANSI on if the compiler supports function prototypes and
|
||||
has the ANSI header files
|
||||
<stdlib.h>
|
||||
<string.h>
|
||||
*/
|
||||
|
||||
#if HI_TECH_C
|
||||
#define ANSI 1
|
||||
#endif HI_TECH_C
|
||||
|
||||
/* shorthand types */
|
||||
|
||||
#define uchar unsigned char
|
||||
#define ulong unsigned long
|
||||
#define ushort unsigned short
|
||||
|
||||
/* useful, tuneable types. Change only if:
|
||||
|
||||
1) compiler does not support type, e.g. unsigned char.
|
||||
2) compiler generates bad code for a particular type.
|
||||
3) a larger type would generate faster code, e.g. byte counters
|
||||
on the 65816 are inefficient code-wise.
|
||||
*/
|
||||
|
||||
#define BOOL unsigned char /* boolean variable. Any integral type
|
||||
will do. */
|
||||
#define FAST char /* fast, small counter. Must permit
|
||||
values -128 to 127 but may be larger. */
|
||||
#define UFAST unsigned char /* fast, small unsigned counter. Must
|
||||
permit values 0-255 at least */
|
||||
#define BYTE unsigned char /* sizeof(BYTE) must == 1 */
|
||||
#define INT_16 short /* signed, >= 16 bits */
|
||||
#define UINT_16 unsigned short /* unsigned, >= 16 bits */
|
||||
#define INT_32 long /* signed, >= 32 bits */
|
||||
#define UINT_32 unsigned long /* unsigned, >= 32 bits */
|
||||
|
||||
|
||||
/* Register variable selectors; REG1 is for things that must go
|
||||
in registers at all costs, REG2 for things that should, REG3 for
|
||||
things that could go in registers if there are any left over.
|
||||
Ordering of declarations will of course come into it too.
|
||||
*/
|
||||
|
||||
#if z80 /* only has one register variable */
|
||||
#define REG1 register
|
||||
#define REG2 auto
|
||||
#define REG3 auto
|
||||
#endif z80
|
||||
|
||||
#if i8086 /* only has two register variable */
|
||||
#define REG1 register
|
||||
#define REG2 register
|
||||
#define REG3 auto
|
||||
#endif i8086
|
||||
|
||||
#if i8096 || m68k /* lots of registers! */
|
||||
#define REG1 register
|
||||
#define REG2 register
|
||||
#define REG3 register
|
||||
#endif i8096 || m68k
|
||||
|
||||
#endif
|
||||
|
||||
BIN
Source/Images/d_hitechc/u1/LIBC.LIB
Normal file
BIN
Source/Images/d_hitechc/u1/LIBC.LIB
Normal file
Binary file not shown.
BIN
Source/Images/d_hitechc/u1/LIBF.LIB
Normal file
BIN
Source/Images/d_hitechc/u1/LIBF.LIB
Normal file
Binary file not shown.
BIN
Source/Images/d_hitechc/u1/LIBOVR.LIB
Normal file
BIN
Source/Images/d_hitechc/u1/LIBOVR.LIB
Normal file
Binary file not shown.
BIN
Source/Images/d_hitechc/u1/LIBR.COM
Normal file
BIN
Source/Images/d_hitechc/u1/LIBR.COM
Normal file
Binary file not shown.
23
Source/Images/d_hitechc/u1/LIMITS.H
Normal file
23
Source/Images/d_hitechc/u1/LIMITS.H
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef _HTC_LIMITS_H
|
||||
#define _HTC_LIMITS_H
|
||||
|
||||
/* Characteristics of integral types */
|
||||
|
||||
#define CHAR_BIT 8 /* bits per char */
|
||||
#define CHAR_MAX 127 /* max value of a char */
|
||||
#define CHAR_MIN -128 /* min value */
|
||||
#define SCHAR_MAX CHAR_MAX /* chars are signed */
|
||||
#define SCHAR_MIN CHAR_MIN
|
||||
#define UCHAR_MAX 255 /* for unsigned chars */
|
||||
#define SHRT_MAX 32767 /* max value of a short */
|
||||
#define SHRT_MIN -32768
|
||||
#define USHRT_MAX 65535 /* unsigned short */
|
||||
#define INT_MAX 32767 /* max for int */
|
||||
#define INT_MIN -32768 /* min for int */
|
||||
#define UINT_MAX 65535 /* unsigned int */
|
||||
#define LONG_MAX 2147483647 /* max value of long */
|
||||
#define LONG_MIN -2147483648 /* min value */
|
||||
#define ULONG_MAX 4294967295 /* unsigned long */
|
||||
|
||||
#endif
|
||||
|
||||
BIN
Source/Images/d_hitechc/u1/LINQ.COM
Normal file
BIN
Source/Images/d_hitechc/u1/LINQ.COM
Normal file
Binary file not shown.
13
Source/Images/d_hitechc/u1/MATH.H
Normal file
13
Source/Images/d_hitechc/u1/MATH.H
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef _HTC_MATH_H
|
||||
#define _HTC_MATH_H
|
||||
|
||||
extern double fabs(double), floor(double), ceil(double), modf(double, double *);
|
||||
extern double sqrt(double), atof(char *);
|
||||
extern double sin(double), cos(double), tan(double);
|
||||
extern double asin(double), acos(double), atan(double), atan2(double, double);
|
||||
extern double frexp(double, int *), ldexp(double, int);
|
||||
extern double log(double), log10(double), pow(double, double), exp(double);
|
||||
extern double sinh(double), cosh(double), tanh(double);
|
||||
|
||||
#endif
|
||||
|
||||
BIN
Source/Images/d_hitechc/u1/NRTCPM.OBJ
Normal file
BIN
Source/Images/d_hitechc/u1/NRTCPM.OBJ
Normal file
Binary file not shown.
BIN
Source/Images/d_hitechc/u1/OBJTOHEX.COM
Normal file
BIN
Source/Images/d_hitechc/u1/OBJTOHEX.COM
Normal file
Binary file not shown.
BIN
Source/Images/d_hitechc/u1/OPTIM.COM
Normal file
BIN
Source/Images/d_hitechc/u1/OPTIM.COM
Normal file
Binary file not shown.
22
Source/Images/d_hitechc/u1/OPTIONS
Normal file
22
Source/Images/d_hitechc/u1/OPTIONS
Normal file
@@ -0,0 +1,22 @@
|
||||
HI-TECH Z80 CP/M C compiler options:
|
||||
|
||||
-A Generate a self-relocating .COM program.
|
||||
-C Generate object code only; don't link.
|
||||
-CR Produce a cross-reference listing e.g. -CRfile.crf
|
||||
-D Define a symbol, e.g. -DDEBUG=1
|
||||
-E Specify executable output filename, e.g. -Efile.com
|
||||
-Ffile Generate a symbol file for debug.com or overlay build (default L.SYM)
|
||||
-H Output help (the OPTIONS file) and exit.
|
||||
-I Specify an include directory, e.g. -I1:B:
|
||||
-L Scan a library, e.g. -LF scans the floating point library.
|
||||
-M Generate a map file, e.g. -Mfile.map
|
||||
-N Use the NRTCPM.OBJ start-up with minimal _getargs().
|
||||
-O Invoke the peephole optimizer (reduced code-size)
|
||||
-OF Invoke the optimizer for speed (Fast)
|
||||
-S Generate assembler code in a .AS file; don't assemble or link.
|
||||
-U Undefine a predefined symbol, e.g. -UDEBUG
|
||||
-V Be verbose during compilation.
|
||||
-W Set warning level, e.g. -w5 or -w-2
|
||||
-X Suppress local symbols in symbol tables.
|
||||
-Y Generate an overlay output file (.OVR file-type)
|
||||
|
||||
6
Source/Images/d_hitechc/u1/OVERLAY.H
Normal file
6
Source/Images/d_hitechc/u1/OVERLAY.H
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef _HTC_OVERLAY_H
|
||||
#define _HTC_OVERLAY_H
|
||||
|
||||
#include <stdint.h>
|
||||
intptr_t ovrload(char *ovr_name,intptr_t args);
|
||||
#endif
|
||||
BIN
Source/Images/d_hitechc/u1/P1.COM
Normal file
BIN
Source/Images/d_hitechc/u1/P1.COM
Normal file
Binary file not shown.
BIN
Source/Images/d_hitechc/u1/RRTCPM.OBJ
Normal file
BIN
Source/Images/d_hitechc/u1/RRTCPM.OBJ
Normal file
Binary file not shown.
24
Source/Images/d_hitechc/u1/SETJMP.H
Normal file
24
Source/Images/d_hitechc/u1/SETJMP.H
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef _HTC_SETJMP_H
|
||||
#define _HTC_SETJMP_H
|
||||
|
||||
#if z80
|
||||
typedef int jmp_buf[4];
|
||||
#endif
|
||||
|
||||
#if i8086
|
||||
typedef int jmp_buf[8];
|
||||
#endif
|
||||
|
||||
#if i8096
|
||||
typedef int jmp_buf[10];
|
||||
#endif
|
||||
|
||||
#if m68k
|
||||
typedef int jmp_buf[10];
|
||||
#endif
|
||||
|
||||
extern int setjmp(jmp_buf);
|
||||
extern void longjmp(jmp_buf, int);
|
||||
|
||||
#endif
|
||||
|
||||
36
Source/Images/d_hitechc/u1/SIGNAL.H
Normal file
36
Source/Images/d_hitechc/u1/SIGNAL.H
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef _HTC_SIGNAL_H
|
||||
#define _HTC_SIGNAL_H
|
||||
|
||||
/*
|
||||
* Signal definitions for CP/M
|
||||
*/
|
||||
#ifdef unix
|
||||
#define NSIG 17
|
||||
#define SIGHUP 1 /* hangup (not used by terminal driver) */
|
||||
#define SIGINT 2 /* interrupt (^C or BREAK) */
|
||||
#define SIGQUIT 3 /* quit (^\) */
|
||||
#define SIGILL 4 /* illegal instruction (not reset when caught) */
|
||||
#define SIGTRAP 5 /* trace trap (not reset when caught) */
|
||||
#define SIGIOT 6 /* IOT instruction */
|
||||
#define SIGEMT 7 /* EMT instruction */
|
||||
#define SIGFPE 8 /* floating point exception */
|
||||
#define SIGKILL 9 /* kill (cannot be caught or ignored) */
|
||||
#define SIGBUS 10 /* bus error */
|
||||
#define SIGSEGV 11 /* segmentation violation */
|
||||
#define SIGSYS 12 /* bad argument to system call */
|
||||
#define SIGPIPE 13 /* write on a pipe with no one to read it */
|
||||
#define SIGALRM 14 /* alarm clock */
|
||||
#define SIGTERM 15 /* software termination signal from kill */
|
||||
#else
|
||||
#define NSIG 1
|
||||
#define SIGINT 1 /* control-C */
|
||||
#endif
|
||||
|
||||
typedef void* signal_t;
|
||||
#define SIG_DFL ((signal_t)0) /* default action is to exit */
|
||||
#define SIG_IGN ((signal_t)1) /* ignore them */
|
||||
|
||||
signal_t signal(int sig, signal_t action);
|
||||
|
||||
#endif
|
||||
|
||||
28
Source/Images/d_hitechc/u1/STAT.H
Normal file
28
Source/Images/d_hitechc/u1/STAT.H
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef _HTC_STAT_H
|
||||
#define _HTC_STAT_H
|
||||
|
||||
struct stat
|
||||
{
|
||||
short st_mode; /* flags */
|
||||
long st_atime; /* access time */
|
||||
long st_mtime; /* modification time */
|
||||
long st_size; /* file size in bytes */
|
||||
};
|
||||
|
||||
/* Flag bits in st_mode */
|
||||
|
||||
#define S_IFMT 0x600 /* type bits */
|
||||
#define S_IFDIR 0x400 /* is a directory */
|
||||
#define S_IFREG 0x200 /* is a regular file */
|
||||
#define S_IREAD 0400 /* file can be read */
|
||||
#define S_IWRITE 0200 /* file can be written */
|
||||
#define S_IEXEC 0100 /* file can be executed */
|
||||
#define S_HIDDEN 0x1000 /* file is hidden */
|
||||
#define S_SYSTEM 0x2000 /* file is marked system */
|
||||
#define S_ARCHIVE 0x4000 /* file has been written to */
|
||||
|
||||
|
||||
extern int stat(char *, struct stat *);
|
||||
|
||||
#endif
|
||||
|
||||
15
Source/Images/d_hitechc/u1/STDARG.H
Normal file
15
Source/Images/d_hitechc/u1/STDARG.H
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef _HTC_STDARG_H
|
||||
#define _HTC_STDARG_H
|
||||
|
||||
/* Macros for accessing variable arguments */
|
||||
|
||||
typedef void * va_list[1];
|
||||
|
||||
#define va_start(ap, parmn) *ap = (char *)&parmn + sizeof parmn
|
||||
|
||||
#define va_arg(ap, type) (*(*(type **)ap)++)
|
||||
|
||||
#define va_end(ap)
|
||||
|
||||
#endif
|
||||
|
||||
18
Source/Images/d_hitechc/u1/STDDEF.H
Normal file
18
Source/Images/d_hitechc/u1/STDDEF.H
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef _HTC_STDDEF_H
|
||||
#define _HTC_STDDEF_H
|
||||
|
||||
#ifndef _STDDEF
|
||||
typedef int ptrdiff_t; /* result type of pointer difference */
|
||||
typedef unsigned size_t; /* type yielded by sizeof */
|
||||
#define _STDDEF
|
||||
#define offsetof(ty, mem) ((int)&(((ty *)0)->mem))
|
||||
#endif _STDDEF
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((void *)0)
|
||||
#endif NULL
|
||||
|
||||
extern int errno; /* system error number */
|
||||
|
||||
#endif
|
||||
|
||||
15
Source/Images/d_hitechc/u1/STDINT.H
Normal file
15
Source/Images/d_hitechc/u1/STDINT.H
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef _HTC_STDINT_H
|
||||
#define _HTC_STDINT_H
|
||||
|
||||
#if z80||i8086||i8096||m68k
|
||||
typedef unsigned char uint8_t;
|
||||
typedef char int8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef short int16_t;
|
||||
typedef unsigned long uint32_t;
|
||||
typedef long int32_t;
|
||||
typedef unsigned short intptr_t;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
115
Source/Images/d_hitechc/u1/STDIO.H
Normal file
115
Source/Images/d_hitechc/u1/STDIO.H
Normal file
@@ -0,0 +1,115 @@
|
||||
#ifndef _HTC_STDIO_H
|
||||
#define _HTC_STDIO_H
|
||||
|
||||
/*
|
||||
* STDIO.H Modified version from Tesseract vol 91
|
||||
*/
|
||||
#if z80
|
||||
#define BUFSIZ 512
|
||||
#define _NFILE 8
|
||||
#else z80
|
||||
#define BUFSIZ 1024
|
||||
#define _NFILE 20
|
||||
#endif z80
|
||||
|
||||
#ifndef FILE
|
||||
#define uchar unsigned char
|
||||
|
||||
extern struct _iobuf
|
||||
{
|
||||
char *_ptr;
|
||||
int _cnt;
|
||||
char *_base;
|
||||
unsigned short _flag;
|
||||
char _file;
|
||||
} _iob[_NFILE];
|
||||
|
||||
#endif FILE
|
||||
|
||||
#ifndef SEEK_SET
|
||||
#define SEEK_SET 0
|
||||
#define SEEK_CUR 1
|
||||
#define SEEK_END 2
|
||||
#endif
|
||||
|
||||
#define _IOREAD 01
|
||||
#define _IOWRT 02
|
||||
#define _IORW 03
|
||||
#define _IONBF 04
|
||||
#define _IOMYBUF 010
|
||||
#define _IOEOF 020
|
||||
#define _IOERR 040
|
||||
#define _IOSTRG 0100
|
||||
#define _IOBINARY 0200
|
||||
/* New flags */
|
||||
#define _IODIRN 01000 /* Set if writing to a R/W file */
|
||||
#define _IOAPPEND 02000 /* Set if in append mode */
|
||||
#define _IOWROTE 04000 /* Write occurred since last seek */
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((void *)0)
|
||||
#endif NULL
|
||||
|
||||
#define FILE struct _iobuf
|
||||
#define EOF (-1)
|
||||
|
||||
#define stdin (&_iob[0])
|
||||
#define stdout (&_iob[1])
|
||||
#define stderr (&_iob[2])
|
||||
#define getchar() getc(stdin)
|
||||
#define putchar(x) putc(x,stdout)
|
||||
|
||||
/*
|
||||
* getc() and putc() must be functions for CP/M to allow the special
|
||||
* handling of '\r', '\n' and '\032'. The same for MSDOS except that
|
||||
* it at least knows the length of a file.
|
||||
*/
|
||||
|
||||
#if UNIX
|
||||
#define getc(p) (--(p)->_cnt>=0?(unsigned)*(p)->_ptr++:_filbuf(p))
|
||||
#define putc(x,p) (--(p)->_cnt>=0?((unsigned)(*(p)->_ptr++=x)):_flsbuf((unsigned)(x),p))
|
||||
#else UNIX
|
||||
#define getc(p) fgetc(p)
|
||||
#define putc(x,p) fputc(x,p)
|
||||
#endif UNIX
|
||||
|
||||
#define feof(p) (((p)->_flag&_IOEOF)!=0)
|
||||
#define ferror(p) (((p)->_flag&_IOERR)!=0)
|
||||
#define fileno(p) ((uchar)p->_file)
|
||||
#define clrerr(p) p->_flag &= ~_IOERR
|
||||
#define clreof(p) p->_flag &= ~_IOEOF
|
||||
|
||||
#define L_tmpnam 34 /* max length of temporary names */
|
||||
#define L_TMPNAM (L_tmpnam) /* max length of temporary names */
|
||||
|
||||
extern int fclose(FILE *);
|
||||
extern int fflush(FILE *);
|
||||
extern int fgetc(FILE *);
|
||||
extern int ungetc(int, FILE *);
|
||||
extern int fputc(int, FILE *);
|
||||
extern int getw(FILE *);
|
||||
extern int putw(int, FILE *);
|
||||
extern char *gets(char *);
|
||||
extern int puts(char *);
|
||||
extern int fputs(char *, FILE *);
|
||||
extern int fread(void *, unsigned, unsigned, FILE *);
|
||||
extern int fwrite(void *, unsigned, unsigned, FILE *);
|
||||
extern int fseek(FILE *, long, int);
|
||||
extern int rewind(FILE *);
|
||||
extern int setbuf(FILE *, char *);
|
||||
extern int printf(char *, ...);
|
||||
extern int fprintf(FILE *, char *, ...);
|
||||
extern int sprintf(char *, char *, ...);
|
||||
extern int scanf(char *, ...);
|
||||
extern int fscanf(FILE *, char *, ...);
|
||||
extern int sscanf(char *, char *, ...);
|
||||
extern int remove(char *);
|
||||
extern FILE *fopen(char *, char *);
|
||||
extern FILE *freopen(char *, char *, FILE *);
|
||||
extern FILE *fdopen(int, char *);
|
||||
extern long ftell(FILE *);
|
||||
extern char *fgets(char *, int, FILE *);
|
||||
extern char *_bufallo(void);
|
||||
|
||||
#endif
|
||||
|
||||
42
Source/Images/d_hitechc/u1/STDLIB.H
Normal file
42
Source/Images/d_hitechc/u1/STDLIB.H
Normal file
@@ -0,0 +1,42 @@
|
||||
#ifndef _HTC_STDLIB_H
|
||||
#define _HTC_STDLIB_H
|
||||
|
||||
/* Standard utility functions */
|
||||
|
||||
#ifndef _STDDEF
|
||||
typedef int ptrdiff_t; /* result type of pointer difference */
|
||||
typedef unsigned size_t; /* type yielded by sizeof */
|
||||
|
||||
#define offsetof(ty, mem) ((int)&(((ty *)0)->mem))
|
||||
|
||||
#define _STDDEF
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((void *)0)
|
||||
#endif NULL
|
||||
|
||||
extern int errno; /* system error number */
|
||||
#endif _STDDEF
|
||||
|
||||
#define RAND_MAX 32767 /* max value returned by rand() */
|
||||
|
||||
extern double atof(char *);
|
||||
extern int atoi(char *);
|
||||
extern long atol(char *);
|
||||
extern int rand(void);
|
||||
extern void srand(unsigned int);
|
||||
extern void *calloc(size_t, size_t);
|
||||
extern void free(void *);
|
||||
extern void *malloc(size_t);
|
||||
extern void *realloc(void *, size_t);
|
||||
extern void abort(void);
|
||||
extern void exit(int);
|
||||
extern char *getenv(char *);
|
||||
extern int system(char *);
|
||||
typedef int (*__qsort_compf)(void *, void *); /* workaround compiler bug */
|
||||
extern void qsort(void *, size_t, size_t, __qsort_compf);
|
||||
extern int abs(int);
|
||||
extern long labs(long);
|
||||
|
||||
#endif
|
||||
|
||||
54
Source/Images/d_hitechc/u1/STRING.H
Normal file
54
Source/Images/d_hitechc/u1/STRING.H
Normal file
@@ -0,0 +1,54 @@
|
||||
#ifndef _HTC_STRING_H
|
||||
#define _HTC_STRING_H
|
||||
|
||||
/* String functions v3.09-4 */
|
||||
|
||||
#ifndef _STDDEF
|
||||
typedef int ptrdiff_t; /* result type of pointer difference */
|
||||
typedef unsigned size_t; /* type yielded by sizeof */
|
||||
#define _STDDEF
|
||||
#define offsetof(ty, mem) ((int)&(((ty *)0)->mem))
|
||||
#endif _STDDEF
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((void *)0)
|
||||
#endif NULL
|
||||
|
||||
extern int errno; /* system error number */
|
||||
|
||||
extern void *memcpy(void *, void *, size_t);
|
||||
extern void *memmove(void *, void *, size_t);
|
||||
extern char *strcpy(char *, char *);
|
||||
extern char *strncpy(char *, char *, size_t);
|
||||
extern char *strcat(char *, char *);
|
||||
extern char *strncat(char *, char *, size_t);
|
||||
extern int memcmp(void *, void *, size_t);
|
||||
extern int strcmp(char *, char *);
|
||||
extern int strcasecmp(char *, char *);
|
||||
#define stricmp strcasecmp
|
||||
extern int strncmp(char *, char *, size_t);
|
||||
extern int strncasecmp(char *, char *, size_t);
|
||||
#define strnicmp strncasecmp
|
||||
/* extern size_t strcoll(char *, size_t, char *); */ /* missing */
|
||||
extern void *memchr(void *, int, size_t);
|
||||
/* extern size_t strcspn(char *, char *); */ /* missing */
|
||||
/* extern char *strpbrk(char *, char *); */ /* missing */
|
||||
/* extern size_t strspn(char *, char *); *//* missing */
|
||||
extern char *strstr(char *, char *);
|
||||
extern char *strtok(char *, char *);
|
||||
extern void *memset(void *, int, size_t);
|
||||
extern char *strerror(int);
|
||||
extern size_t strlen(char *);
|
||||
extern char *strchr(char *, int);
|
||||
/* #define index strchr */ /* these are equivalent */
|
||||
extern char *index(char *, int);
|
||||
extern char *strrchr(char *, int);
|
||||
/* #define rindex *strrchr */ /* these are equivalent */
|
||||
extern char *rindex(char *, int);
|
||||
extern char *strcasestr(char *, char *);
|
||||
#define stristr strcasestr
|
||||
extern char *strncasestr(char *, char *, size_t);
|
||||
#define strnistr strncasestr
|
||||
|
||||
#endif
|
||||
|
||||
BIN
Source/Images/d_hitechc/u1/SYMTOAS.COM
Normal file
BIN
Source/Images/d_hitechc/u1/SYMTOAS.COM
Normal file
Binary file not shown.
39
Source/Images/d_hitechc/u1/SYS.H
Normal file
39
Source/Images/d_hitechc/u1/SYS.H
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef _HTC_SYS_H
|
||||
#define _HTC_SYS_H
|
||||
|
||||
/*
|
||||
* System-dependent functions.
|
||||
*/
|
||||
|
||||
#ifndef _STDDEF
|
||||
typedef int ptrdiff_t; /* result type of pointer difference */
|
||||
typedef unsigned size_t; /* type yielded by sizeof */
|
||||
#define _STDDEF
|
||||
#define offsetof(ty, mem) ((int)&(((ty *)0)->mem))
|
||||
#endif _STDDEF
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((void *)0)
|
||||
#endif NULL
|
||||
|
||||
extern int errno; /* system error number */
|
||||
|
||||
extern int execl(char *, char *, char *, ...);
|
||||
extern int execv(char *, char **);
|
||||
extern int spawnl(char *, char *, char *, ...);
|
||||
extern int spawnv(char *, char **);
|
||||
extern int spawnle(char *, char *, char *, char *, ...);
|
||||
extern int spawnve(char *, char **, char *);
|
||||
extern short getuid(void);
|
||||
extern short setuid(short);
|
||||
extern int chdir(char *);
|
||||
extern int mkdir(char *);
|
||||
extern int rmdir(char *);
|
||||
extern int getcwd(int);
|
||||
extern char **_getargs(char *, char *);
|
||||
extern int _argc_;
|
||||
extern int inp(int);
|
||||
extern void outp(int, int);
|
||||
|
||||
#endif
|
||||
|
||||
44
Source/Images/d_hitechc/u1/TIME.H
Normal file
44
Source/Images/d_hitechc/u1/TIME.H
Normal file
@@ -0,0 +1,44 @@
|
||||
#ifndef _HTC_TIME_H
|
||||
#define _HTC_TIME_H
|
||||
|
||||
/* time.h for HI-TECH C Z80 v3.09-4*/
|
||||
|
||||
#ifndef _HTC_TIME_T
|
||||
|
||||
typedef long time_t; /* for representing times in seconds */
|
||||
struct tm {
|
||||
int tm_sec;
|
||||
int tm_min;
|
||||
int tm_hour;
|
||||
int tm_mday;
|
||||
int tm_mon;
|
||||
int tm_year;
|
||||
int tm_wday;
|
||||
int tm_yday;
|
||||
int tm_isdst;
|
||||
};
|
||||
#define _HTC_TIME_T
|
||||
#endif _HTC_TIME_T
|
||||
|
||||
#ifndef _STDDEF
|
||||
typedef int ptrdiff_t; /* result type of pointer difference */
|
||||
typedef unsigned size_t; /* type yielded by sizeof */
|
||||
#define _STDDEF
|
||||
#define offsetof(ty, mem) ((int)&(((ty *)0)->mem))
|
||||
#endif
|
||||
|
||||
extern int time_zone; /* minutes WESTWARD of Greenwich */
|
||||
/* this value defaults to 0 since with
|
||||
operating systems like MS-DOS there is
|
||||
no time zone information available */
|
||||
|
||||
extern time_t time(time_t *); /* seconds since 00:00:00 Jan 1 1970 */
|
||||
extern char * asctime(struct tm *); /* converts struct tm to ascii time */
|
||||
extern char * ctime(time_t *); /* current local time in ascii form */
|
||||
extern struct tm * gmtime(time_t *); /* Universal time */
|
||||
extern struct tm * localtime(time_t *); /* local time */
|
||||
extern size_t strftime(char *s, size_t maxs, char *f, struct tm *t);
|
||||
extern time_t mktime(struct tm *); /* convert struct tm to time value */
|
||||
|
||||
#endif
|
||||
|
||||
34
Source/Images/d_hitechc/u1/UNIXIO.H
Normal file
34
Source/Images/d_hitechc/u1/UNIXIO.H
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef _HTC_UNIXIO_H
|
||||
#define _HTC_UNIXIO_H
|
||||
|
||||
/*
|
||||
* Declarations for Unix style low-level I/O functions.
|
||||
*/
|
||||
|
||||
#ifndef _STDDEF
|
||||
typedef int ptrdiff_t; /* result type of pointer difference */
|
||||
typedef unsigned size_t; /* type yielded by sizeof */
|
||||
#define _STDDEF
|
||||
#define offsetof(ty, mem) ((int)&(((ty *)0)->mem))
|
||||
#endif _STDDEF
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((void *)0)
|
||||
#endif NULL
|
||||
|
||||
extern int errno; /* system error number */
|
||||
|
||||
extern int open(char *, int);
|
||||
extern int close(int);
|
||||
extern int creat(char *, int);
|
||||
extern int dup(int);
|
||||
extern long lseek(int, long, int);
|
||||
extern int read(int, void *, int);
|
||||
extern int rename(char *, char *);
|
||||
extern int unlink(char *);
|
||||
extern int write(int, void *, int);
|
||||
extern int isatty(int);
|
||||
extern int chmod(char *, int);
|
||||
|
||||
#endif
|
||||
|
||||
BIN
Source/Images/d_hitechc/u1/ZAS.COM
Normal file
BIN
Source/Images/d_hitechc/u1/ZAS.COM
Normal file
Binary file not shown.
Reference in New Issue
Block a user