PADDLE.I

[Table of Contents]

The PADDLE.I include file resides on the Kyan Pascal 2.x Utilities Disk 1.


  • FUNCTION Paddle(Num: Integer): Integer;
  • FUNCTION Ptrig(Num: Integer): Boolean;


Source Code


FUNCTION Paddle(Num: Integer): Integer;
    BEGIN
       PADDLE:=0;
#A
PADDL0 EQU $270     ;(624)
       LDY #7       ;offset to Num LSB
       LDA (_SP),Y  ;get Num
       TAY
       LDA $270,Y   ;PADDL0 location+?
       LDY #5       ;offset TO PADDLE
       STA (_SP),Y  ;save in PADDLE
#
END;(* Paddle function *)


FUNCTION Ptrig(Num: Integer): Boolean;
    VAR
        TEMP:BOOLEAN;
    BEGIN
#A
PTRIG0 EQU $27C     ;(636)
       LDY #7       ;offset to Num Lo
       LDA (_SP),Y  ;get Num
       TAY
       LDA $27C,Y
       LDY #5       ;offset to TEMP
       STA (_SP),Y  ;save in TEMP
#
(*Atari OS says 0 is TRUE, but Kyan
  Pascal thinks otherwise, so we've
  got to reverse the variable.*)
        PTRIG:=NOT TEMP;
END;(* Ptrig function *)

No comments:

Post a Comment