1 | GEMDOS Functions
|
---|
2 | ----------------
|
---|
3 |
|
---|
4 | 0x12 WORD Cauxis() Check status of standard AUX: input
|
---|
5 | 0x03 WORD Cauxin() Read character from standard AUX: input
|
---|
6 |
|
---|
7 | 0x13 WORD Cauxos() Check status of standard AUX: output
|
---|
8 | 0x04 void Cauxout(c) Write character to standard AUX: output
|
---|
9 |
|
---|
10 | 0x0B WORD Cconis() Check status of standard input
|
---|
11 | 0x01 LONG Cconin() Read character from standard input
|
---|
12 | 0x08 LONG Cnecin() Read character from standard input, no echo
|
---|
13 | 0x07 LONG Crawcin() Raw input from standard input
|
---|
14 | 0x0A void Cconrs(buf) Read edited string from standard input
|
---|
15 |
|
---|
16 | 0x10 WORD Cconos() Check status of standard output
|
---|
17 | 0x02 void Cconout(c) Write character to standard output
|
---|
18 | 0x09 void Cconws(str) Write string to standard output
|
---|
19 |
|
---|
20 | 0x06 LONG Crawio(w) Raw I/O to standard input/output
|
---|
21 |
|
---|
22 | 0x11 WORD Cprnos() Check status of standard PRN:
|
---|
23 | 0x05 void Cprnout(c) Write character to standard PRN:
|
---|
24 |
|
---|
25 | 0x19 WORD Dgetdrv() Get default drive
|
---|
26 | 0x0E LONG Dsetdrv(drv) Set default drive
|
---|
27 | 0x36 void Dfree(buf, drv) Get drive free space
|
---|
28 |
|
---|
29 | 0x47 void Dgetpath(buf, drv) Get current directory
|
---|
30 | 0x3B WORD Dsetpath(path) Set current directory
|
---|
31 | 0x39 WORD Dcreate(pathname) Create directory
|
---|
32 | 0x3A WORD Ddelete(pathname) Delete directory
|
---|
33 | 0x43 WORD Fattrib(fname, wf, atr) Get / set file attributes
|
---|
34 | 0x57 void Fdatime(handle, time, wf) Get / set file timestamp
|
---|
35 |
|
---|
36 | 0x3C WORD Fcreate(fname, atr) Create file
|
---|
37 | 0x41 WORD Fdelete(fname) Delete file
|
---|
38 | 0x3D WORD Fopen(fname, mode) Open file
|
---|
39 | 0x3E WORD Fclose(handle) Close file
|
---|
40 | 0x56 WORD Frename(0, old, new) Rename file
|
---|
41 |
|
---|
42 | 0x45 WORD Fdup(handle) Duplicate file handle
|
---|
43 | 0x46 WORD Fforce(stdh, nostdh) Force file handle
|
---|
44 |
|
---|
45 | 0x2F LONG Fgetdta() Get disk transfer address
|
---|
46 | 0x1A void Fsetdta(addr) Set disk transfer address
|
---|
47 | 0x4E WORD Fsfirst(fspec, atr) Search first
|
---|
48 | 0x4F WORD Fsnext() Search next
|
---|
49 |
|
---|
50 | 0x42 LONG Fseek(offset, handle, mode) Seek file pointer
|
---|
51 | 0x3F LONG Fread(handle, count, buffer) Read from file
|
---|
52 | 0x40 LONG Fwrite(handle, count, buffer) Write to file
|
---|
53 | |
---|
54 |
|
---|
55 | 0x48 LONG Malloc(amount) Allocate memory
|
---|
56 | 0x49 WORD Mfree(saddr) Release memory
|
---|
57 | 0x4A WORD Mshrink(0, block, newsize) Shrink size of allocated block
|
---|
58 |
|
---|
59 | 0x4B WORD Pexec(mode, ptr1, ptr2, ptr3) Load / execute process
|
---|
60 | 0x4C void Pterm(retcode) Terminate process with specified exit code
|
---|
61 | 0x00 void Pterm0() Terminate process with exit code of 0
|
---|
62 | 0x31 void Ptermres(keepcnt, retcode) Terminate and stay resident
|
---|
63 |
|
---|
64 | 0x20 LONG Super(stack) Get / set / inquire supervisor mode
|
---|
65 |
|
---|
66 | 0x30 WORD Sversion() Get version number
|
---|
67 |
|
---|
68 | 0x2A WORD Tgetdate() Get date
|
---|
69 | 0x2B WORD Tsetdate(date) Set date
|
---|
70 |
|
---|
71 | 0x2C WORD Tgettime() Get time
|
---|
72 | 0x2D WORD Tsettime() Set time
|
---|
73 | |
---|
74 |
|
---|
75 | BIOS Error Codes (-1 .. -31)
|
---|
76 | -----------------------------
|
---|
77 |
|
---|
78 | E_OK 0 No error
|
---|
79 |
|
---|
80 | ERROR -1 Error
|
---|
81 | EDRVNR -2 Drive not ready
|
---|
82 | EUNCMD -3 Unknown command
|
---|
83 | E_CRC -4 CRC error
|
---|
84 | EBADRQ -5 Bad request
|
---|
85 | E_SEEK -6 Seek error
|
---|
86 | EMEDIA -7 Unknown media
|
---|
87 | ESECNF -8 Sector not found
|
---|
88 | EPAPER -9 Out of paper
|
---|
89 | EWRITF -10 Write fault
|
---|
90 | EREADF -11 Read fault
|
---|
91 | -12 -unused-
|
---|
92 | EWRPRO -13 Write protect error
|
---|
93 | E_CHNG -14 Media change detected
|
---|
94 | EUNDEV -15 Unknown device
|
---|
95 | EBADSF -16 Bad sectors on format
|
---|
96 | EOTHER -17 Insert other disk (request)
|
---|
97 |
|
---|
98 | GEMDOS Error Codes (-32 .. -127)
|
---|
99 | ---------------------------------
|
---|
100 |
|
---|
101 | EINVFN -32 Invalid function number
|
---|
102 | EFILNF -33 File not found
|
---|
103 | EPTHNF -34 Path not found
|
---|
104 | ENHNDL -35 Handle pool exhausted
|
---|
105 | EACCDN -36 Access denied
|
---|
106 | EIHNDL -37 Invalid handle
|
---|
107 |
|
---|
108 | ENSMEM -39 Insufficient memory
|
---|
109 | EIMBA -40 Invalid memory block address
|
---|
110 |
|
---|
111 | EDRIVE -46 Invalid drive specification
|
---|
112 | ENMFIL -47 No more files
|
---|
113 |
|
---|
114 | ERANGE -64 Range error
|
---|
115 | EINTRN -65 GEMDOS internal error
|
---|
116 | EPLFMT -66 Invalid executable file format
|
---|
117 | EGSBF -67 Memory block growth failure
|
---|
118 | |
---|
119 |
|
---|
120 | GEMDOS Date Format
|
---|
121 | ------------------
|
---|
122 |
|
---|
123 | 15:9 years since 1980
|
---|
124 | 8:5 month (1..12)
|
---|
125 | 4:0 day (1..31)
|
---|
126 |
|
---|
127 | GEMDOS Time Format
|
---|
128 | ------------------
|
---|
129 |
|
---|
130 | 15:11 hour (0..23)
|
---|
131 | 10:5 minute (0..59)
|
---|
132 | 4..0 second / 2 (0..29)
|
---|
133 |
|
---|
134 | GEMDOS Drive Free Space Format
|
---|
135 | ------------------------------
|
---|
136 |
|
---|
137 | +0 number of free clusters
|
---|
138 | +4 total number of clusters
|
---|
139 | +8 sector size (in bytes)
|
---|
140 | +12 cluster size (in sectors)
|
---|
141 |
|
---|
142 | GEMDOS File Attributes
|
---|
143 | ----------------------
|
---|
144 |
|
---|
145 | 0x01 read only
|
---|
146 | 0x02 hidden
|
---|
147 | 0x04 system
|
---|
148 | 0x08 volume label
|
---|
149 | 0x10 subdirectory
|
---|
150 | 0x20 archive
|
---|
151 |
|
---|
152 | GEMDOS File Search DTA Format
|
---|
153 | -----------------------------
|
---|
154 |
|
---|
155 | +0 .. +20 BYTE reserved
|
---|
156 | +21 BYTE attribute byte
|
---|
157 | +22 .. +23 WORD time stamp
|
---|
158 | +24 .. +25 WORD date stamp
|
---|
159 | +26 .. +29 LONG file size
|
---|
160 | +30 .. +43 BYTE file name + extension (null terminated)
|
---|
161 | |
---|
162 |
|
---|
163 | GEMDOS File Open Modes
|
---|
164 | ----------------------
|
---|
165 |
|
---|
166 | 0 read only
|
---|
167 | 1 write only
|
---|
168 | 2 read / write
|
---|
169 |
|
---|
170 | GEMDOS Seek Modes
|
---|
171 | -----------------
|
---|
172 |
|
---|
173 | 0 from beginning of file
|
---|
174 | 1 from current position
|
---|
175 | 2 from end of file
|
---|