source: buchla-68k/orig/DOC/GEMDOS.TXT@ ee49131

Last change on this file since ee49131 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 8 years ago

Imported original source code.

  • Property mode set to 100755
File size: 4.8 KB
Line 
1GEMDOS Functions
2----------------
3
40x12 WORD Cauxis() Check status of standard AUX: input
50x03 WORD Cauxin() Read character from standard AUX: input
6
70x13 WORD Cauxos() Check status of standard AUX: output
80x04 void Cauxout(c) Write character to standard AUX: output
9
100x0B WORD Cconis() Check status of standard input
110x01 LONG Cconin() Read character from standard input
120x08 LONG Cnecin() Read character from standard input, no echo
130x07 LONG Crawcin() Raw input from standard input
140x0A void Cconrs(buf) Read edited string from standard input
15
160x10 WORD Cconos() Check status of standard output
170x02 void Cconout(c) Write character to standard output
180x09 void Cconws(str) Write string to standard output
19
200x06 LONG Crawio(w) Raw I/O to standard input/output
21
220x11 WORD Cprnos() Check status of standard PRN:
230x05 void Cprnout(c) Write character to standard PRN:
24
250x19 WORD Dgetdrv() Get default drive
260x0E LONG Dsetdrv(drv) Set default drive
270x36 void Dfree(buf, drv) Get drive free space
28
290x47 void Dgetpath(buf, drv) Get current directory
300x3B WORD Dsetpath(path) Set current directory
310x39 WORD Dcreate(pathname) Create directory
320x3A WORD Ddelete(pathname) Delete directory
330x43 WORD Fattrib(fname, wf, atr) Get / set file attributes
340x57 void Fdatime(handle, time, wf) Get / set file timestamp
35
360x3C WORD Fcreate(fname, atr) Create file
370x41 WORD Fdelete(fname) Delete file
380x3D WORD Fopen(fname, mode) Open file
390x3E WORD Fclose(handle) Close file
400x56 WORD Frename(0, old, new) Rename file
41
420x45 WORD Fdup(handle) Duplicate file handle
430x46 WORD Fforce(stdh, nostdh) Force file handle
44
450x2F LONG Fgetdta() Get disk transfer address
460x1A void Fsetdta(addr) Set disk transfer address
470x4E WORD Fsfirst(fspec, atr) Search first
480x4F WORD Fsnext() Search next
49
500x42 LONG Fseek(offset, handle, mode) Seek file pointer
510x3F LONG Fread(handle, count, buffer) Read from file
520x40 LONG Fwrite(handle, count, buffer) Write to file
53
54
550x48 LONG Malloc(amount) Allocate memory
560x49 WORD Mfree(saddr) Release memory
570x4A WORD Mshrink(0, block, newsize) Shrink size of allocated block
58
590x4B WORD Pexec(mode, ptr1, ptr2, ptr3) Load / execute process
600x4C void Pterm(retcode) Terminate process with specified exit code
610x00 void Pterm0() Terminate process with exit code of 0
620x31 void Ptermres(keepcnt, retcode) Terminate and stay resident
63
640x20 LONG Super(stack) Get / set / inquire supervisor mode
65
660x30 WORD Sversion() Get version number
67
680x2A WORD Tgetdate() Get date
690x2B WORD Tsetdate(date) Set date
70
710x2C WORD Tgettime() Get time
720x2D WORD Tsettime() Set time
73
74
75BIOS 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
98GEMDOS 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
120GEMDOS Date Format
121------------------
122
123 15:9 years since 1980
124 8:5 month (1..12)
125 4:0 day (1..31)
126
127GEMDOS Time Format
128------------------
129
130 15:11 hour (0..23)
131 10:5 minute (0..59)
132 4..0 second / 2 (0..29)
133
134GEMDOS 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
142GEMDOS 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
152GEMDOS 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
163GEMDOS File Open Modes
164----------------------
165
166 0 read only
167 1 write only
168 2 read / write
169
170GEMDOS Seek Modes
171-----------------
172
173 0 from beginning of file
174 1 from current position
175 2 from end of file
Note: See TracBrowser for help on using the repository browser.