mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 16:09:25 +02:00
amunits: syscall-ified realtime. this was the last unit in coreunits to be cleaned from the old asm wrappers.
git-svn-id: trunk@32664 -
This commit is contained in:
parent
6c4fab174e
commit
bc455adc23
@ -34,11 +34,7 @@
|
|||||||
nils.sjoholm@mailbox.swipnet.se
|
nils.sjoholm@mailbox.swipnet.se
|
||||||
}
|
}
|
||||||
|
|
||||||
{$I useamigasmartlink.inc}
|
{$PACKRECORDS 2}
|
||||||
{$ifdef use_amiga_smartlink}
|
|
||||||
{$smartlink on}
|
|
||||||
{$endif use_amiga_smartlink}
|
|
||||||
|
|
||||||
UNIT realtime;
|
UNIT realtime;
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
@ -241,16 +237,17 @@ VAR RealTimeBase : pRealTimeBase;
|
|||||||
const
|
const
|
||||||
REALTIMENAME : PChar = 'realtime.library';
|
REALTIMENAME : PChar = 'realtime.library';
|
||||||
|
|
||||||
FUNCTION CreatePlayerA(const tagList : pTagItem) : pPlayer;
|
FUNCTION CreatePlayerA(const tagList : pTagItem location 'a0') : pPlayer; syscall RealTimeBase 042;
|
||||||
PROCEDURE DeletePlayer(player : pPlayer);
|
PROCEDURE DeletePlayer(player : pPlayer location 'a0'); syscall RealTimeBase 048;
|
||||||
FUNCTION ExternalSync(player : pPlayer; minTime : LONGINT; maxTime : LONGINT) : BOOLEAN;
|
FUNCTION ExternalSync(player : pPlayer location 'a0'; minTime : LONGINT location 'd0'; maxTime : LONGINT location 'd1') : WordBool; syscall RealTimeBase 066;
|
||||||
FUNCTION FindConductor(const name : pCHAR) : pConductor;
|
FUNCTION FindConductor(const name : pCHAR location 'a0') : pConductor; syscall RealTimeBase 078;
|
||||||
FUNCTION GetPlayerAttrsA(const player : pPlayer;const tagList : pTagItem) : ULONG;
|
FUNCTION GetPlayerAttrsA(const player : pPlayer location 'a0'; const tagList : pTagItem location 'a1') : ULONG; syscall RealTimeBase 084;
|
||||||
FUNCTION LockRealTime(lockType : ULONG) : POINTER;
|
FUNCTION LockRealTime(lockType : ULONG location 'd0') : POINTER; syscall RealTimeBase 030;
|
||||||
FUNCTION NextConductor(const previousConductor : pConductor) : pConductor;
|
FUNCTION NextConductor(const previousConductor : pConductor location 'a0') : pConductor; syscall RealTimeBase 072;
|
||||||
FUNCTION SetConductorState(player : pPlayer; state : ULONG; time : LONGINT) : LONGINT;
|
FUNCTION SetConductorState(player : pPlayer location 'a0'; state : ULONG location 'd0'; time : LONGINT location 'd1') : LONGINT; syscall RealTimeBase 060;
|
||||||
FUNCTION SetPlayerAttrsA(player : pPlayer;const tagList : pTagItem) : BOOLEAN;
|
FUNCTION SetPlayerAttrsA(player : pPlayer location 'a0'; const tagList : pTagItem location 'a1') : WordBool; syscall RealTimeBase 054;
|
||||||
PROCEDURE UnlockRealTime(lock : POINTER);
|
PROCEDURE UnlockRealTime(lock : POINTER location 'a0'); syscall RealTimeBase 036;
|
||||||
|
|
||||||
|
|
||||||
{You can remove this include and use a define instead}
|
{You can remove this include and use a define instead}
|
||||||
{$I useautoopenlib.inc}
|
{$I useautoopenlib.inc}
|
||||||
@ -268,136 +265,6 @@ IMPLEMENTATION
|
|||||||
uses amsgbox;
|
uses amsgbox;
|
||||||
{$endif dont_use_openlib}
|
{$endif dont_use_openlib}
|
||||||
|
|
||||||
FUNCTION CreatePlayerA(const tagList : pTagItem) : pPlayer;
|
|
||||||
BEGIN
|
|
||||||
ASM
|
|
||||||
MOVE.L A6,-(A7)
|
|
||||||
MOVEA.L tagList,A0
|
|
||||||
MOVEA.L RealTimeBase,A6
|
|
||||||
JSR -042(A6)
|
|
||||||
MOVEA.L (A7)+,A6
|
|
||||||
MOVE.L D0,@RESULT
|
|
||||||
END;
|
|
||||||
END;
|
|
||||||
|
|
||||||
PROCEDURE DeletePlayer(player : pPlayer);
|
|
||||||
BEGIN
|
|
||||||
ASM
|
|
||||||
MOVE.L A6,-(A7)
|
|
||||||
MOVEA.L player,A0
|
|
||||||
MOVEA.L RealTimeBase,A6
|
|
||||||
JSR -048(A6)
|
|
||||||
MOVEA.L (A7)+,A6
|
|
||||||
END;
|
|
||||||
END;
|
|
||||||
|
|
||||||
FUNCTION ExternalSync(player : pPlayer; minTime : LONGINT; maxTime : LONGINT) : BOOLEAN;
|
|
||||||
BEGIN
|
|
||||||
ASM
|
|
||||||
MOVE.L A6,-(A7)
|
|
||||||
MOVEA.L player,A0
|
|
||||||
MOVE.L minTime,D0
|
|
||||||
MOVE.L maxTime,D1
|
|
||||||
MOVEA.L RealTimeBase,A6
|
|
||||||
JSR -066(A6)
|
|
||||||
MOVEA.L (A7)+,A6
|
|
||||||
TST.W D0
|
|
||||||
BEQ.B @end
|
|
||||||
MOVEQ #1,D0
|
|
||||||
@end: MOVE.B D0,@RESULT
|
|
||||||
END;
|
|
||||||
END;
|
|
||||||
|
|
||||||
FUNCTION FindConductor(const name : pCHAR) : pConductor;
|
|
||||||
BEGIN
|
|
||||||
ASM
|
|
||||||
MOVE.L A6,-(A7)
|
|
||||||
MOVEA.L name,A0
|
|
||||||
MOVEA.L RealTimeBase,A6
|
|
||||||
JSR -078(A6)
|
|
||||||
MOVEA.L (A7)+,A6
|
|
||||||
MOVE.L D0,@RESULT
|
|
||||||
END;
|
|
||||||
END;
|
|
||||||
|
|
||||||
FUNCTION GetPlayerAttrsA(const player : pPlayer;const tagList : pTagItem) : ULONG;
|
|
||||||
BEGIN
|
|
||||||
ASM
|
|
||||||
MOVE.L A6,-(A7)
|
|
||||||
MOVEA.L player,A0
|
|
||||||
MOVEA.L tagList,A1
|
|
||||||
MOVEA.L RealTimeBase,A6
|
|
||||||
JSR -084(A6)
|
|
||||||
MOVEA.L (A7)+,A6
|
|
||||||
MOVE.L D0,@RESULT
|
|
||||||
END;
|
|
||||||
END;
|
|
||||||
|
|
||||||
FUNCTION LockRealTime(lockType : ULONG) : POINTER;
|
|
||||||
BEGIN
|
|
||||||
ASM
|
|
||||||
MOVE.L A6,-(A7)
|
|
||||||
MOVE.L lockType,D0
|
|
||||||
MOVEA.L RealTimeBase,A6
|
|
||||||
JSR -030(A6)
|
|
||||||
MOVEA.L (A7)+,A6
|
|
||||||
MOVE.L D0,@RESULT
|
|
||||||
END;
|
|
||||||
END;
|
|
||||||
|
|
||||||
FUNCTION NextConductor(const previousConductor : pConductor) : pConductor;
|
|
||||||
BEGIN
|
|
||||||
ASM
|
|
||||||
MOVE.L A6,-(A7)
|
|
||||||
MOVEA.L previousConductor,A0
|
|
||||||
MOVEA.L RealTimeBase,A6
|
|
||||||
JSR -072(A6)
|
|
||||||
MOVEA.L (A7)+,A6
|
|
||||||
MOVE.L D0,@RESULT
|
|
||||||
END;
|
|
||||||
END;
|
|
||||||
|
|
||||||
FUNCTION SetConductorState(player : pPlayer; state : ULONG; time : LONGINT) : LONGINT;
|
|
||||||
BEGIN
|
|
||||||
ASM
|
|
||||||
MOVE.L A6,-(A7)
|
|
||||||
MOVEA.L player,A0
|
|
||||||
MOVE.L state,D0
|
|
||||||
MOVE.L time,D1
|
|
||||||
MOVEA.L RealTimeBase,A6
|
|
||||||
JSR -060(A6)
|
|
||||||
MOVEA.L (A7)+,A6
|
|
||||||
MOVE.L D0,@RESULT
|
|
||||||
END;
|
|
||||||
END;
|
|
||||||
|
|
||||||
FUNCTION SetPlayerAttrsA(player : pPlayer;const tagList : pTagItem) : BOOLEAN;
|
|
||||||
BEGIN
|
|
||||||
ASM
|
|
||||||
MOVE.L A6,-(A7)
|
|
||||||
MOVEA.L player,A0
|
|
||||||
MOVEA.L tagList,A1
|
|
||||||
MOVEA.L RealTimeBase,A6
|
|
||||||
JSR -054(A6)
|
|
||||||
MOVEA.L (A7)+,A6
|
|
||||||
TST.W D0
|
|
||||||
BEQ.B @end
|
|
||||||
MOVEQ #1,D0
|
|
||||||
@end: MOVE.B D0,@RESULT
|
|
||||||
END;
|
|
||||||
END;
|
|
||||||
|
|
||||||
PROCEDURE UnlockRealTime(lock : POINTER);
|
|
||||||
BEGIN
|
|
||||||
ASM
|
|
||||||
MOVE.L A6,-(A7)
|
|
||||||
MOVEA.L lock,A0
|
|
||||||
MOVEA.L RealTimeBase,A6
|
|
||||||
JSR -036(A6)
|
|
||||||
MOVEA.L (A7)+,A6
|
|
||||||
END;
|
|
||||||
END;
|
|
||||||
|
|
||||||
const
|
const
|
||||||
{ Change VERSION and LIBVERSION to proper values }
|
{ Change VERSION and LIBVERSION to proper values }
|
||||||
|
|
||||||
@ -481,6 +348,3 @@ begin
|
|||||||
|
|
||||||
|
|
||||||
END. (* UNIT REALTIME *)
|
END. (* UNIT REALTIME *)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user