Amstrad DDI-1 manual Disc Files Dir, Load, Save, KEYBOARD, Joystick buttonp, Keyp

Models: DDI-1

1 103
Download 103 pages 20.5 Kb
Page 77
Image 77

4.10.12DISC FILES:

dir

(directory) Outputs a list of Dr. Logo file names on the default or specified disc; accepts wild-cards.

?dir

[STARTUP STARS PATTERNS] ?dir "b:

[AVERAGE TOOLS ADDRESSES] ?dir "??AR????

[STARTUP STARS]

load

Reads the input-named file from the disc into the workspace.

?Load "myfile ?Load "b:shapes

save

Writes the contents of the workspace to the input-named disc file.

?save "shapes

4.10.13KEYBOARD, JOYSTICK: buttonp

(button pressed) Outputs TRUE if the button on the specified joystick is down; numbers 0 or 1 identify the two possible paddles.

?to fire >Label "loop

>if (buttonp 0)[pr[fire 0!]] >if (buttonp 1)[pr[fire 1!]] >go "Loop

>end

The position of the joystick is tested by paddle.

keyp

Outputs TRUE if a character has been typed at the keyboard and is waiting to be read.

?to inkey

>if keyp [op rc][op "] >end

Chapter 4.19

AMSTRAD Disc Drive & Interface DDI-1 Manual

Page 77
Image 77
Amstrad DDI-1 manual Disc Files Dir, Load, Save, KEYBOARD, Joystick buttonp, Keyp