|
|
1.1 root 1: /* Special osbind.h file for MiNT and PureC, see puremint.txt
2:
3: for details */
4:
5:
6:
7: typedef struct /* used by Cconrs */
8:
9: {
10:
11: unsigned char maxlen;
12:
13: unsigned char actuallen;
14:
15: char buffer[255];
16:
17: } LINE;
18:
19:
20:
21:
22:
23: typedef struct /* used by Fsetdta, Fgetdta */
24:
25: {
26:
27: char d_reserved[21];
28:
29: unsigned char d_attrib;
30:
31: unsigned int d_time;
32:
33: unsigned int d_date;
34:
35: unsigned long d_length;
36:
37: char d_fname[14];
38:
39: } DTA;
40:
41:
42:
43: typedef struct baspag /* used by Pexec */
44:
45: {
46:
47: void *p_lowtpa;
48:
49: void *p_hitpa;
50:
51: void *p_tbase;
52:
53: long p_tlen;
54:
55: void *p_dbase;
56:
57: long p_dlen;
58:
59: void *p_bbase;
60:
61: long p_blen;
62:
63: DTA *p_dta;
64:
65: struct baspag *p_parent;
66:
67: long p_resrvd0;
68:
69: char *p_env;
70:
71: char p_stdfh[6];
72:
73: char p_resrvd1;
74:
75: char p_curdrv;
76:
77: long p_resrvd2[18];
78:
79: char p_cmdlin[128];
80:
81: } BASPAG;
82:
83:
84:
85: typedef struct /* used by Getbpb */
86:
87: {
88:
89: int recsiz;
90:
91: int clsiz;
92:
93: int clsizb;
94:
95: int rdlen;
96:
97: int fsiz;
98:
99: int fatrec;
100:
101: int datrec;
102:
103: int numcl;
104:
105: int bflags;
106:
107: } BPB;
108:
109:
110:
111: typedef struct /* used by Iorec */
112:
113: {
114:
115: void *ibuf;
116:
117: int ibufsiz;
118:
119: int ibufhd;
120:
121: int ibuftl;
122:
123: int ibuflow;
124:
125: int ibufhi;
126:
127: } IOREC;
128:
129:
130:
131:
132:
133: typedef struct /* used by Kbdvbase */
134:
135: {
136:
137: void (*kb_midivec)();
138:
139: void (*kb_vkbderr)();
140:
141: void (*kb_vmiderr)();
142:
143: void (*kb_statvec)();
144:
145: void (*kb_mousevec)();
146:
147: void (*kb_clockvec)();
148:
149: void (*kb_joyvec)();
150:
151: void (*kb_midisys)();
152:
153: void (*kb_kbdsys)();
154:
155: } KBDVBASE;
156:
157:
158:
159:
160:
161: typedef struct /* used by Pexec */
162:
163: {
164:
165: unsigned char length;
166:
167: char command_tail[128];
168:
169: } COMMAND;
170:
171:
172:
173:
174:
175: typedef struct /* used by Prtblk */
176:
177: {
178:
179: void *pb_scrptr;
180:
181: int pb_offset;
182:
183: int pb_width;
184:
185: int pb_height;
186:
187: int pb_left;
188:
189: int pb_right;
190:
191: int pb_screz;
192:
193: int pb_prrez;
194:
195: void *pb_colptr;
196:
197: int pb_prtype;
198:
199: int pb_prport;
200:
201: void *pb_mask;
202:
203: } PBDEF;
204:
205:
206:
207:
208:
209: typedef struct /* used by Keytbl */
210:
211: {
212:
213: char *unshift;
214:
215: char *shift;
216:
217: char *capslock;
218:
219: } KEYTAB;
220:
221:
222:
223:
224:
225: typedef struct __md
226:
227: {
228:
229: struct __md *m_link;
230:
231: void *m_start;
232:
233: long m_length;
234:
235: BASPAG *m_own;
236:
237: } MD;
238:
239:
240:
241:
242:
243: typedef struct /* used by Getmpb */
244:
245: {
246:
247: MD *mp_mfl;
248:
249: MD *mp_mal;
250:
251: MD *mp_rover;
252:
253: } MPB;
254:
255:
256:
257: typedef struct
258:
259: {
260:
261: int (*Bconstat) ();
262:
263: long (*Bconin) ();
264:
265: int (*Bcostat) ();
266:
267: void (*Bconout) ();
268:
269: long (*Rsconf) ();
270:
271: IOREC *iorec;
272:
273: } MAPTAB;
274:
275:
276:
277: typedef struct
278:
279: {
280:
281: MAPTAB *maptab;
282:
283: int maptabsize;
284:
285: } BCONMAP;
286:
287:
288:
289: /* system variable _sysbase (0x4F2L) points to next structure */
290:
291: typedef struct _syshdr
292:
293: {
294:
295: unsigned os_entry; /* $00 BRA to reset handler */
296:
297: unsigned os_version; /* $02 TOS version number */
298:
299: void *os_start; /* $04 -> reset handler */
300:
301: struct _syshdr *os_base; /* $08 -> baseof OS */
302:
303: void *os_membot; /* $0c -> end BIOS/GEMDOS/VDI ram usage */
304:
305: void *os_rsv1; /* $10 << unused,reserved >> */
306:
307: long *os_magic; /* $14 -> GEM memoryusage parm. block */
308:
309: long os_gendat; /* $18 Date of system build($MMDDYYYY) */
310:
311: int os_palmode; /* $1c OS configuration bits */
312:
313: int os_gendatg; /* $1e DOS-format date of systembuild */
314:
315: /*
316:
317: The next three fields are only available in TOS versions 1.2 and
318:
319: greater
320:
321: */
322:
323: void *_root; /* $20 -> base of OS pool */
324:
325: long *kbshift; /* $24 -> keyboard shift state variable */
326:
327: BASPAG **_run; /* $28 -> GEMDOS PID of current process */
328:
329: void *p_rsv2; /* $2c << unused, reserved >> */
330:
331: } SYSHDR;
332:
333:
334:
335:
336:
337:
338:
339: /* attributes for Fcreate/Fsfirst/Fsnext: */
340:
341:
342:
343: #define FA_READONLY 0x01
344:
345: #define FA_HIDDEN 0x02
346:
347: #define FA_SYSTEM 0x04
348:
349: #define FA_VOLUME 0x08
350:
351: #define FA_SUBDIR 0x10
352:
353: #define FA_ARCHIVE 0x20
354:
355:
356:
357: /* Fopen modes: */
358:
359:
360:
361: #define FO_READ 0
362:
363: #define FO_WRITE 1
364:
365: #define FO_RW 2
366:
367:
368:
369: extern BASPAG *_BasPag;
370:
371: extern long _PgmSize;
372:
373:
374:
1.1.1.2 ! root 375: long gemdos( void, ... );
! 376:
! 377: long bios( void, ... );
! 378:
! 379: long xbios( void, ... );
! 380:
! 381:
! 382:
1.1 root 383: /****** Tos *************************************************************/
384:
385:
386:
387: void Pterm0( void );
388:
389: long Cconin( void );
390:
391: void Cconout( int c );
392:
393: int Cauxin( void );
394:
395: void Cauxout( int c );
396:
397: int Cprnout( int c );
398:
399: long Crawio( int w );
400:
401: long Crawcin( void );
402:
403: long Cnecin( void );
404:
405: int Cconws( const char *buf );
406:
407: void Cconrs( LINE *buf );
408:
409: int Cconis( void );
410:
411: long Dsetdrv( int drv );
412:
413: int Cconos( void );
414:
415: int Cprnos( void );
416:
417: int Cauxis( void );
418:
419: int Cauxos( void );
420:
421: int Dgetdrv( void );
422:
423: void Fsetdta( void *buf );
424:
425: long Super( void *stack );
426:
427: unsigned int Tgetdate( void );
428:
429: unsigned int Tsetdate( unsigned int date );
430:
431: unsigned int Tgettime( void );
432:
433: unsigned int Tsettime( unsigned int time );
434:
435: DTA *Fgetdta( void );
436:
437: int Sversion( void );
438:
439: void Ptermres( long keepcnt, int retcode );
440:
441: int Dfree( long *buf, int driveno );
442:
443: int Dcreate( const char *path );
444:
445: int Ddelete( const char *path );
446:
447: int Dsetpath( const char *path );
448:
449: long Fcreate( const char *filename, int attr );
450:
451: long Fopen( const char *filename, int mode );
452:
453: int Fclose( int handle );
454:
455: long Fread( int handle, long count, void *buf );
456:
457: long Fwrite( int handle, long count, void *buf );
458:
459: int Fdelete( const char *filename );
460:
461: long Fseek( long offset, int handle, int seekmode );
462:
463: int Fattrib( const char *filename, int wflag, int attrib );
464:
465: long Fdup( int handle );
466:
467: long Fforce( int stch, int nonstdh );
468:
469: int Dgetpath( char *path, int driveno );
470:
471: long Malloc( long number );
472:
473: int Mfree( void *block );
474:
475: int Mshrink( int zero, void *block, long newsiz );
476:
477: long Pexec( int mode, char *ptr1, void *ptr2, void *ptr3 );
478:
479: void Pterm( int retcode );
480:
481: int Fsfirst( const char *filename, int attr );
482:
483: int Fsnext( void );
484:
485: int Frename( int zero, const char *oldname, const char *newname );
486:
487: int Fdatime( short *timeptr, int handle, int wflag );
488:
489:
490:
491: /****** TOS 030 Gemdos Extension ****************************************/
492:
493:
494:
495: long Mxalloc( long number, int mode );
496:
497: long Maddalt( void *start, long size );
498:
499:
500:
501: /****** Network Gemdos Extension ****************************************/
502:
503:
504:
505: long Flock( int handle, int mode, long start, long length );
506:
507:
508:
509: /****** Bios ************************************************************/
510:
511:
512:
513: void Getmpb( MPB *ptr );
514:
515: int Bconstat( int dev );
516:
517: long Bconin( int dev );
518:
519: long Bconout( int dev, int c );
520:
521: long Rwabs( int rwflag, void *buf, int cnt, int recnr, int dev );
522:
523: void (*Setexc( int number, long *exchdlr));
524:
525: long Tickcal( void );
526:
527: BPB *Getbpb( int dev );
528:
529: long Bcostat( int dev );
530:
531: long Mediach( int dev );
532:
533: long Drvmap( void );
534:
535: long Kbshift( int mode );
536:
537:
538:
539:
540:
541: /****** XBios ***********************************************************/
542:
543:
544:
545: void Initmous( int type, char *par, void *mousevec);
546:
547: void *Ssbrk( int count );
548:
549: void *Physbase( void );
550:
551: void *Logbase( void );
552:
553: int Getrez( void );
554:
555: void Setscreen( void *laddr, void *paddr, int rez );
556:
557: void Setpalette( void *pallptr );
558:
559: int Setcolor( int colornum, int color );
560:
561: int Floprd( void *buf, long filler, int devno, int sectno,
562:
563: int trackno, int sideno, int count );
564:
565: int Flopwr( void *buf, long filler, int devno, int sectno,
566:
567: int trackno, int sideno, int count );
568:
569: int Flopfmt( void *buf, long filler, int devno, int spt, int trackno,
570:
571: int sideno, int interlv, long magic, int virgin );
572:
573: void Midiws( int cnt, void *ptr );
574:
575: void Mfpint( int erno, void (*vector)() );
576:
577: IOREC *Iorec( int dev );
578:
579: long Rsconf( int baud, int ctr, int ucr, int rsr, int tsr, int scr );
580:
581: KEYTAB *Keytbl( void *unshift, void *shift, void *capslock );
582:
583: long Random( void );
584:
585: void Protobt( void *buf, long serialno, int disktype, int execflag );
586:
587: int Flopver( void *buf, long filler, int devno, int sectno,
588:
589: int trackno, int sideno, int count );
590:
591: void Scrdmp( void );
592:
593: int Cursconf( int func, int rate );
594:
595: void Settime( unsigned long time );
596:
597: unsigned long Gettime( void );
598:
599: void Bioskeys( void );
600:
601: void Ikbdws( int count, void *ptr );
602:
603: void Jdisint( int number );
604:
605: void Jenabint( int number );
606:
607: char Giaccess( char data, int regno );
608:
609: void Offgibit( int bitno );
610:
611: void Ongibit( int bitno );
612:
613: void Xbtimer( int timer, int control, int data, void (*vector)() );
614:
615: void *Dosound( void *buf );
616:
617: int Setprt( int config );
618:
619: KBDVBASE *Kbdvbase( void );
620:
621: int Kbrate( int initial, int repeat );
622:
623: void Prtblk( PBDEF *par );
624:
625: void Vsync( void );
626:
627: long Supexec( long (*func)() );
628:
629: void Puntaes( void );
630:
631: int Floprate( int devno, int newrate );
632:
633: int Blitmode( int mode );
634:
635:
636:
637: /* TOS030 XBios */
638:
639: int DMAread( long sector, int count, void *buffer, int devno );
640:
641: int DMAwrite( long sector, int count, void *buffer, int devno );
642:
643: int NVMaccess( int opcode, int start, int count, void *buffer );
644:
645: long Bconmap( int devno );
646:
647: int Esetshift( int shftMode );
648:
649: int Egetshift( void );
650:
651: int EsetBank( int bankNum );
652:
653: int EsetColor( int colorNum, int color );
654:
655: void EsetPalette( int colorNum, int count, int *palettePtr );
656:
657: void EgetPalette( int colorNum, int count, int *palettePtr );
658:
659: int EsetGray( int swtch );
660:
661: int EsetSmear( int swtch );
662:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.