Annotation of MiNT/src/purec/osbind.h, revision 1.1

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: 
        !           375: /****** Tos *************************************************************/
        !           376: 
        !           377: 
        !           378: 
        !           379: void    Pterm0( void );
        !           380: 
        !           381: long    Cconin( void );
        !           382: 
        !           383: void    Cconout( int c );
        !           384: 
        !           385: int     Cauxin( void );
        !           386: 
        !           387: void    Cauxout( int c );
        !           388: 
        !           389: int     Cprnout( int c );
        !           390: 
        !           391: long    Crawio( int w );
        !           392: 
        !           393: long    Crawcin( void );
        !           394: 
        !           395: long    Cnecin( void );
        !           396: 
        !           397: int     Cconws( const char *buf );
        !           398: 
        !           399: void    Cconrs( LINE *buf );
        !           400: 
        !           401: int     Cconis( void );
        !           402: 
        !           403: long    Dsetdrv( int drv );
        !           404: 
        !           405: int     Cconos( void );
        !           406: 
        !           407: int     Cprnos( void );
        !           408: 
        !           409: int     Cauxis( void );
        !           410: 
        !           411: int     Cauxos( void );
        !           412: 
        !           413: int     Dgetdrv( void );
        !           414: 
        !           415: void    Fsetdta( void *buf );
        !           416: 
        !           417: long    Super( void *stack );
        !           418: 
        !           419: unsigned int  Tgetdate( void );
        !           420: 
        !           421: unsigned int Tsetdate( unsigned int date );
        !           422: 
        !           423: unsigned int  Tgettime( void );
        !           424: 
        !           425: unsigned int  Tsettime( unsigned int time );
        !           426: 
        !           427: DTA     *Fgetdta( void );
        !           428: 
        !           429: int     Sversion( void );
        !           430: 
        !           431: void    Ptermres( long keepcnt, int retcode );
        !           432: 
        !           433: int     Dfree( long *buf, int driveno );
        !           434: 
        !           435: int     Dcreate( const char *path );
        !           436: 
        !           437: int     Ddelete( const char *path );
        !           438: 
        !           439: int     Dsetpath( const char *path );
        !           440: 
        !           441: long    Fcreate( const char *filename, int attr );
        !           442: 
        !           443: long    Fopen( const char *filename, int mode );
        !           444: 
        !           445: int     Fclose( int handle );
        !           446: 
        !           447: long    Fread( int handle, long count, void *buf );
        !           448: 
        !           449: long    Fwrite( int handle, long count, void *buf );
        !           450: 
        !           451: int     Fdelete( const char *filename );
        !           452: 
        !           453: long    Fseek( long offset, int handle, int seekmode );
        !           454: 
        !           455: int     Fattrib( const char *filename, int wflag, int attrib );
        !           456: 
        !           457: long    Fdup( int handle );
        !           458: 
        !           459: long    Fforce( int stch, int nonstdh );
        !           460: 
        !           461: int     Dgetpath( char *path, int driveno );
        !           462: 
        !           463: long    Malloc( long number );
        !           464: 
        !           465: int     Mfree( void *block );
        !           466: 
        !           467: int     Mshrink( int zero, void *block, long newsiz );
        !           468: 
        !           469: long    Pexec( int mode, char *ptr1, void *ptr2, void *ptr3 );
        !           470: 
        !           471: void    Pterm( int retcode );
        !           472: 
        !           473: int     Fsfirst( const char *filename, int attr );
        !           474: 
        !           475: int     Fsnext( void );
        !           476: 
        !           477: int     Frename( int zero, const char *oldname, const char *newname );
        !           478: 
        !           479: int     Fdatime( short *timeptr, int handle, int wflag );
        !           480: 
        !           481: 
        !           482: 
        !           483: /****** TOS 030 Gemdos Extension ****************************************/
        !           484: 
        !           485: 
        !           486: 
        !           487: long    Mxalloc( long number, int mode );
        !           488: 
        !           489: long    Maddalt( void *start, long size );
        !           490: 
        !           491: 
        !           492: 
        !           493: /****** Network Gemdos Extension ****************************************/
        !           494: 
        !           495: 
        !           496: 
        !           497: long   Flock( int handle, int mode, long start, long length );
        !           498: 
        !           499: 
        !           500: 
        !           501: /****** Bios ************************************************************/
        !           502: 
        !           503: 
        !           504: 
        !           505: void    Getmpb( MPB *ptr );
        !           506: 
        !           507: int     Bconstat( int dev );
        !           508: 
        !           509: long    Bconin( int dev );
        !           510: 
        !           511: long    Bconout( int dev, int c );
        !           512: 
        !           513: long    Rwabs( int rwflag, void *buf, int cnt, int recnr, int dev );
        !           514: 
        !           515: void    (*Setexc( int number, long *exchdlr));
        !           516: 
        !           517: long    Tickcal( void );
        !           518: 
        !           519: BPB     *Getbpb( int dev );
        !           520: 
        !           521: long    Bcostat( int dev );
        !           522: 
        !           523: long    Mediach( int dev );
        !           524: 
        !           525: long    Drvmap( void );
        !           526: 
        !           527: long    Kbshift( int mode );
        !           528: 
        !           529: 
        !           530: 
        !           531: 
        !           532: 
        !           533: /****** XBios ***********************************************************/
        !           534: 
        !           535: 
        !           536: 
        !           537: void    Initmous( int type, char *par, void *mousevec);
        !           538: 
        !           539: void    *Ssbrk( int count );
        !           540: 
        !           541: void    *Physbase( void );
        !           542: 
        !           543: void    *Logbase( void );
        !           544: 
        !           545: int     Getrez( void );
        !           546: 
        !           547: void    Setscreen( void *laddr, void *paddr, int rez );
        !           548: 
        !           549: void    Setpalette( void *pallptr );
        !           550: 
        !           551: int     Setcolor( int colornum, int color );
        !           552: 
        !           553: int     Floprd( void *buf, long filler, int devno, int sectno,
        !           554: 
        !           555:                int trackno, int sideno, int count );
        !           556: 
        !           557: int     Flopwr( void *buf, long filler, int devno, int sectno,
        !           558: 
        !           559:                int trackno, int sideno, int count );
        !           560: 
        !           561: int     Flopfmt( void *buf, long filler, int devno, int spt, int trackno,
        !           562: 
        !           563:                 int sideno, int interlv, long magic, int virgin );
        !           564: 
        !           565: void    Midiws( int cnt, void *ptr );
        !           566: 
        !           567: void    Mfpint( int erno, void (*vector)() );
        !           568: 
        !           569: IOREC   *Iorec( int dev );
        !           570: 
        !           571: long    Rsconf( int baud, int ctr, int ucr, int rsr, int tsr, int scr );
        !           572: 
        !           573: KEYTAB  *Keytbl( void *unshift, void *shift, void *capslock );
        !           574: 
        !           575: long    Random( void );
        !           576: 
        !           577: void    Protobt( void *buf, long serialno, int disktype, int execflag );
        !           578: 
        !           579: int     Flopver( void *buf, long filler, int devno, int sectno,
        !           580: 
        !           581:                 int trackno, int sideno, int count );
        !           582: 
        !           583: void    Scrdmp( void );
        !           584: 
        !           585: int     Cursconf( int func, int rate );
        !           586: 
        !           587: void    Settime( unsigned long time );
        !           588: 
        !           589: unsigned long  Gettime( void );
        !           590: 
        !           591: void    Bioskeys( void );
        !           592: 
        !           593: void    Ikbdws( int count, void *ptr );
        !           594: 
        !           595: void    Jdisint( int number );
        !           596: 
        !           597: void    Jenabint( int number );
        !           598: 
        !           599: char    Giaccess( char data, int regno );
        !           600: 
        !           601: void    Offgibit( int bitno );
        !           602: 
        !           603: void    Ongibit( int bitno );
        !           604: 
        !           605: void    Xbtimer( int timer, int control, int data, void (*vector)() );
        !           606: 
        !           607: void    *Dosound( void *buf );
        !           608: 
        !           609: int     Setprt( int config );
        !           610: 
        !           611: KBDVBASE *Kbdvbase( void );
        !           612: 
        !           613: int     Kbrate( int initial, int repeat );
        !           614: 
        !           615: void    Prtblk( PBDEF *par );
        !           616: 
        !           617: void    Vsync( void );
        !           618: 
        !           619: long    Supexec( long (*func)() );
        !           620: 
        !           621: void    Puntaes( void );
        !           622: 
        !           623: int     Floprate( int devno, int newrate );
        !           624: 
        !           625: int     Blitmode( int mode );
        !           626: 
        !           627: 
        !           628: 
        !           629: /* TOS030 XBios */
        !           630: 
        !           631: int     DMAread( long sector, int count, void *buffer, int devno );
        !           632: 
        !           633: int     DMAwrite( long sector, int count, void *buffer, int devno );
        !           634: 
        !           635: int     NVMaccess( int opcode, int start, int count, void *buffer );
        !           636: 
        !           637: long    Bconmap( int devno );
        !           638: 
        !           639: int     Esetshift( int shftMode );
        !           640: 
        !           641: int     Egetshift( void );
        !           642: 
        !           643: int     EsetBank( int bankNum );
        !           644: 
        !           645: int     EsetColor( int colorNum, int color );
        !           646: 
        !           647: void    EsetPalette( int colorNum, int count, int *palettePtr );
        !           648: 
        !           649: void    EgetPalette( int colorNum, int count, int *palettePtr );
        !           650: 
        !           651: int     EsetGray( int swtch );
        !           652: 
        !           653: int     EsetSmear( int swtch );
        !           654: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.