From 11c6d3df9cd6bcf739f2f54a0c8b6b193172fddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1roly=20Balogh?= Date: Mon, 15 Sep 2014 22:16:08 +0000 Subject: [PATCH] amunits: syscallified amsgbox and amigautils git-svn-id: trunk@28673 - --- packages/amunits/src/utilunits/amigautils.pas | 42 ++----------------- packages/amunits/src/utilunits/amsgbox.pas | 22 ++-------- 2 files changed, 6 insertions(+), 58 deletions(-) diff --git a/packages/amunits/src/utilunits/amigautils.pas b/packages/amunits/src/utilunits/amigautils.pas index d84b006647..fb3e227143 100644 --- a/packages/amunits/src/utilunits/amigautils.pas +++ b/packages/amunits/src/utilunits/amigautils.pas @@ -80,45 +80,9 @@ Type {$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; VAR diff --git a/packages/amunits/src/utilunits/amsgbox.pas b/packages/amunits/src/utilunits/amsgbox.pas index 867e5b1a28..8249f6937f 100644 --- a/packages/amunits/src/utilunits/amsgbox.pas +++ b/packages/amunits/src/utilunits/amsgbox.pas @@ -21,11 +21,7 @@ nils.sjoholm@mailbox.swipnet.se Nils Sjoholm } - -{$I useamigasmartlink.inc} -{$ifdef use_amiga_smartlink} - {$smartlink on} -{$endif use_amiga_smartlink} +{$PACKRECORDS 2} unit AMsgBox; @@ -49,20 +45,8 @@ type es_GadgetFormat : pchar; { 'printf' style formatting string } 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; begin