13.07.2015 Views

apple-pascal-1.3-manual

apple-pascal-1.3-manual

apple-pascal-1.3-manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Game InputApple Pascal provides the function PADDLE to read inputs from theApple II GAME connector. It is written with one parameter:PADDLE (SELECT)where SELECT MOD 4 is an integer expression with a value of 0, 1, 2, or 3,representing the four hand control inputs on the GAME connector. PADDLEreturns an integer in the range 0 .. 255, representing the position of theselected hand control.Apple Key and Button InputsThe function BUTTON reads the 6 and • keys; it also reads the 0 and 1buttons on the Apple hand controls. It is written with one parameter:BUTTON (SELECT)where SELECT is an integer expression with a value of 0 to represent the 6key (or hand control button 0), or 1 to represent the ~ key (or hand controlbutton 1). BUTTON returns a boolean value; TRUE while the key or buttonis pressed, FALSE otherwise.The Audio OutputApple Pascal provides one procedure for creating clicks or musical toneswith the built-in speaker. The NOTE procedure is writtenNOTE (PITCH, DURATION)where PITCH is an integer expression with a value in the range 0 .. 50 andDURATION is an integer expression with a value in the range 0 .. 255. APITCH of 0 is silent; PITCH values of 2 through 48 produce anapproximately tempered chromatic scale with sharps and flats. DURATIONvalues represent arbitrary (but equal) time units during which the note issounded.NOTE (1,1) produces a single click.The following statement, for example, produces a chromatic octave:FOR N := 12 TO 24 DO NOTE CN, 10fD;Miscellaneous 1/0 InformationIll-269

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!