Browse Source

amunits: syscallified amsgbox and amigautils

git-svn-id: trunk@28673 -
Károly Balogh 11 years ago
parent
commit
11c6d3df9c

+ 3 - 39
packages/amunits/src/utilunits/amigautils.pas

@@ -80,45 +80,9 @@ Type
 
 
 {$PACKRECORDS 2}
 {$PACKRECORDS 2}
 
 
-FUNCTION Examine(lock : LONGINT; fileInfoBlock : pFileInfoBlock) : BOOLEAN;
-BEGIN
-  ASM
-    MOVE.L  A6,-(A7)
-    MOVE.L  lock,D1
-    MOVE.L  fileInfoBlock,D2
-    MOVEA.L _DOSBase,A6
-    JSR -102(A6)
-    MOVEA.L (A7)+,A6
-    TST.L   D0
-    BEQ.B   @end
-    MOVEQ   #1,D0
-    @end: MOVE.B  D0,@RESULT
-  END;
-END;
-
-FUNCTION Lock(name : pCHAR; type_ : LONGINT) : LONGINT;
-BEGIN
-  ASM
-    MOVE.L  A6,-(A7)
-    MOVE.L  name,D1
-    MOVE.L  type_,D2
-    MOVEA.L _DOSBase,A6
-    JSR -084(A6)
-    MOVEA.L (A7)+,A6
-    MOVE.L  D0,@RESULT
-  END;
-END;
-
-PROCEDURE UnLock(lock : LONGINT);
-BEGIN
-  ASM
-    MOVE.L  A6,-(A7)
-    MOVE.L  lock,D1
-    MOVEA.L _DOSBase,A6
-    JSR -090(A6)
-    MOVEA.L (A7)+,A6
-  END;
-END;
+FUNCTION Examine(lock : LONGINT location 'd1'; fileInfoBlock : pFileInfoBlock location 'd2') : BOOLEAN; syscall _DOSBase 102;
+FUNCTION Lock(name : pCHAR location 'd1'; type_ : LONGINT location 'd2') : LONGINT; syscall _DOSBase 084;
+PROCEDURE UnLock(lock : LONGINT location 'd1'); syscall _DOSBase 090;
 
 
 FUNCTION PCharCopy(s: PChar; thepos , len : Longint): PChar;
 FUNCTION PCharCopy(s: PChar; thepos , len : Longint): PChar;
 VAR
 VAR

+ 3 - 19
packages/amunits/src/utilunits/amsgbox.pas

@@ -21,11 +21,7 @@
 
 
     [email protected] Nils Sjoholm
     [email protected] Nils Sjoholm
 }
 }
-
-{$I useamigasmartlink.inc}
-{$ifdef use_amiga_smartlink}
-    {$smartlink on}
-{$endif use_amiga_smartlink}
+{$PACKRECORDS 2}
 
 
 unit AMsgBox;
 unit AMsgBox;
 
 
@@ -49,20 +45,8 @@ type
     es_GadgetFormat : pchar;   { 'printf' style formatting string   }
     es_GadgetFormat : pchar;   { 'printf' style formatting string   }
    END;
    END;
 
 
-FUNCTION EasyRequestArgs(window : pointer; easyStruct : pEasyStruct; idcmpPtr : longint; args : POINTER) : LONGINT;
-BEGIN
-  ASM
-    MOVE.L  A6,-(A7)
-    MOVEA.L window,A0
-    MOVEA.L easyStruct,A1
-    MOVEA.L idcmpPtr,A2
-    MOVEA.L args,A3
-    MOVEA.L _IntuitionBase,A6
-    JSR -588(A6)
-    MOVEA.L (A7)+,A6
-    MOVE.L  D0,@RESULT
-  END;
-END;
+
+FUNCTION EasyRequestArgs(window : pointer location 'a0'; easyStruct : pEasyStruct location 'a1'; idcmpPtr : longint location 'a2'; args : POINTER location 'a3') : LONGINT; syscall _IntuitionBase 588;
 
 
 FUNCTION MessageBox(tit,txt,gad:string) : LONGint;
 FUNCTION MessageBox(tit,txt,gad:string) : LONGint;
 begin
 begin