home *** CD-ROM | disk | FTP | other *** search
- unit ASL;
-
- INTERFACE
- uses Exec, Graphics, Utility, Workbench;
-
-
- type
- pFileRequester = ^tFileRequester;
- tFileRequester = record
- rf_Reserved1: pointer;
- rf_File: pshortint;
- rf_Dir: pshortint;
- rf_Reserved2: long;
- rf_Reserved3: byte;
- rf_Reserved4: byte;
- rf_Reserved5: pointer;
- rf_LeftEdge: integer;
- rf_TopEdge: integer;
- rf_Width: integer;
- rf_Height: integer;
- rf_Reserved6: integer;
- rf_NumArgs: longint;
- rf_ArgList: pWBArg;
- rf_UserData: pointer;
- rf_Reserved7: pointer;
- rf_Reserved8: pointer;
- rf_Pat: pshortint;
- end;
-
- pFontRequester = ^tFontRequester;
- tFontRequester = record
- fo_Reserved1: array [0..1] of pointer;
- fo_Attr: tTextAttr;
- fo_FrontPen: byte;
- fo_BackPen: byte;
- fo_DrawMode: byte;
- fo_UserData: pointer;
- end;
-
-
-
- var
- ASLBase: pLibrary;
-
-
- const
- ASL_Dir = $80080009;
- ASL_FontName = $8008000A;
- ASL_MinHeight = $80080010;
- ASL_MaxHeight = $80080011;
- FILB_PATGAD = 0;
- ASL_HookFunc = $80080007;
- ASL_FontFlags = $8008000D;
- FILF_PATGAD = 1;
- ASL_CancelText = $80080013;
- ASL_ModeList = $80080015;
- FILB_MULTISELECT = 3;
- ASL_Height = $80080006;
- ASL_FontHeight = $8008000B;
- FILF_MULTISELECT = 8;
- FILB_DOWILDFUNC = 7;
- ASL_FrontPen = $8008000E;
- ASL_Width = $80080005;
- FILF_DOWILDFUNC = $80;
- FONB_DOWILDFUNC = 7;
- FONB_FIXEDWIDTH = 4;
- FONF_DOWILDFUNC = $80;
- FONF_FIXEDWIDTH = $10;
- FONB_BACKCOLOR = 1;
- ASL_FileRequest = 0;
- ASL_Dummy = $80080000;
- FONF_BACKCOLOR = 2;
- ASL_Window = $80080002;
- ASL_Pattern = $8008000A;
- LIBRARIES_ASL_H = 1;
- FILB_DOMSGFUNC = 6;
- FIL1B_NOFILES = 0;
- FILF_DOMSGFUNC = $40;
- FIL1F_NOFILES = 1;
- FONB_FRONTCOLOR = 0;
- ASL_ExtFlags1 = $80080016;
- FONB_DOMSGFUNC = 6;
- FONF_FRONTCOLOR = 1;
- ASL_FontRequest = 1;
- ASL_FontStyles = $8008000C;
- FONF_DOMSGFUNC = $40;
- FONB_STYLES = 2;
- AslName = 'asl.library';
- FONF_STYLES = 4;
- FILB_NEWIDCMP = 4;
- ASL_BackPen = $8008000F;
- FILF_NEWIDCMP = $10;
- FONB_DRAWMODE = 3;
- FILB_SAVE = 5;
- ASL_LeftEdge = $80080003;
- FONB_NEWIDCMP = 5;
- FONF_DRAWMODE = 8;
- FILF_SAVE = $20;
- FONF_NEWIDCMP = $20;
- ASL_OKText = $80080012;
- FIL1B_MATCHDIRS = 1;
- ASL_TopEdge = $80080004;
- FIL1F_MATCHDIRS = 2;
- ASL_Hail = $80080001;
- ASL_File = $80080008;
- ASL_FuncFlags = $80080014;
-
-
- function AllocFileRequest: pFileRequester;
- procedure FreeFileRequest (fileReq: pFileRequester);
- function RequestFile (fileReq: pFileRequester): boolean;
- function AllocAslRequest
- (reqType: long;
- tagList: pTagItem): pointer;
-
- procedure FreeAslRequest (requester: pointer);
- function AslRequest
- (requester: pointer;
- tagList: pTagItem): boolean;
-
-
-
- IMPLEMENTATION
- function AllocFileRequest; xassembler;
- asm
- move.l a6,-(sp)
- move.l AslBase,a6
- jsr -$1E(a6)
- move.l d0,8(sp)
- move.l (sp)+,a6
- end;
-
- procedure FreeFileRequest; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l AslBase,a6
- jsr -$24(a6)
- move.l (sp)+,a6
- end;
-
- function RequestFile; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l AslBase,a6
- jsr -$2A(a6)
- tst.l d0
- sne d0
- neg.b d0
- move.b d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- function AllocAslRequest; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a0
- move.l (a6)+,d0
- move.l AslBase,a6
- jsr -$30(a6)
- move.l d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- procedure FreeAslRequest; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l AslBase,a6
- jsr -$36(a6)
- move.l (sp)+,a6
- end;
-
- function AslRequest; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l AslBase,a6
- jsr -$3C(a6)
- tst.l d0
- sne d0
- neg.b d0
- move.b d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- end.
-