home *** CD-ROM | disk | FTP | other *** search
- unit Misc;
-
- INTERFACE
- uses Exec;
-
-
- type
- pMiscResource = ^tMiscResource;
- tMiscResource = record
- mr_Library: tLibrary;
- mr_AllocArray: array [0..3] of long;
- end;
-
-
-
- var
- MiscBase: pMiscResource;
-
-
- const
- MR_SERIALPORT = 0;
- MR_ALLOCMISCRESOURCE = $FFFFFFFA;
- MR_PARALLELBITS = 3;
- MR_FREEMISCRESOURCE = 0;
- MR_PARALLELPORT = 2;
- MISCNAME = 'misc.resource';
- NUMMRTYPES = 4;
- MR_SERIALBITS = 1;
-
-
- function AllocMiscResource
- (unitNum: long;
- name: STRPTR): STRPTR;
-
- procedure FreeMiscResource (unitNum: long);
-
-
- IMPLEMENTATION
- function AllocMiscResource; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,d0
- move.l MiscBase,a6
- jsr -6(a6)
- move.l d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- procedure FreeMiscResource; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),d0
- move.l MiscBase,a6
- jsr -$C(a6)
- move.l (sp)+,a6
- end;
-
- end.
-