21 / 28 page
allow you to access the PakI on the companion
disk. Here is a simple program that counts from 1
to 1000 while blinking an LED connected to the
PakI's B4 pin:
i var word
gosub FReset
' reset
fpx=$10
' set B4 to output
gosub IODir
gosub FZeroX
' x=0
gosub FSwap
' x<>y
fpx=1
gosub FLoadInt
' x=1.0
gosub FSwap
' x<>y
so x=0.0, y=1.0
Debug "Start...", CR
for i=1 to 1000
fpx=i//2*$10
gosub IOWrite
' Blink light
gosub FAdd
' x=x+y
fpx=4
gosub FDump
' print it out
next
Debug "End",cr
Here is the same program, but instead of loading 1
as an integer, it loads .5:
i var word
gosub FReset
' reset
fpx=$10
gosub IODir
gosub FZeroX
' x=0
gosub fSwap
' x<>y
fpxhigh=$7e00
' x=.5
fpxlow=0