GRAPHICS.I

[Table of Contents]

Include file used to add GRAPHICS procedure to a Pascal program. To incorporate GRAPHICS into a program, copy the GRAPHICS.I file to the same disk that contains the Pascal source code that is attempting to use the GRAPHICS procedure.

The GRAPHICS.I include files resides on the Kyan Pascal 2.x Disk #2. It includes one procedure:

  • procedure GRAPHICS

For an example, see BOUNCE.P.

Source Code


procedure graphics(mode:integer);
begin
#a
 TXA
 PHA
 LDX #$60
 LDA #$0C
 STA $342,X
 JSR $E456
 LDA #>$4000
 STA $2E5
 LDA #<$4000
 STA $2E6
 LDA #>$2000
 STA $E
 LDA #<$2000
 STA $F
 LDX #$60
 LDA #$03 ;OPEN
 STA $342,X
 LDA #>FILEN
 STA $344,X
 LDA #<FILEN
 STA $345,X
 LDY #5
 LDA (_SP),Y
 STA $34B,X
 AND #$F0
 EOR #$10
 ORA #$0C
 STA $34A,X
 JSR $E456
 BPL GR1
 JMP $9406
FILEN DB $53 ;S
 DB $3A ;:
 DB $9B
GR1 PLA
 TAX
#
END;

No comments:

Post a Comment