13.07.2015 Views

apple-pascal-1.3-manual

apple-pascal-1.3-manual

apple-pascal-1.3-manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Program Unit Required! The Program Unit APPLES TUFF must bepresent in an accessible library at the time a program using any of theseI/O operations is compiled or executed:KEYPRESS PADDLE BUTTON NOTEYou must also write the declaration USES APPLESTUFF; just after theprogram heading. APPLESTUFF is originally supplied in the fileSYSTEM.LIBRARY. The USES declaration is further described inChapter 12; libraries are discussed in Chapter 13.Screen ControlsApple Pascal provides four screen control characters to turn the cursor onand off and to make the entire display inversed (black on white):Screen Action ASCII Code Program StatementMake cursor visible 5 WRITE (CHR(5));Make cursor invisible 6 WRITE (CHR(6));Turn inverse video on 15 WRITE (CHR(15));Turn inverse video off 14 WRITE (CHR(l 4));When using these characters, observe these limitations and cautions:o ASCII codes 5 and 6 do not work on the original Apple Ile (without the65C02 processor) when executing in SO-column mode.o These controls may have unpredictable results with some non-AppleSO-column text cards.o You must remember to restore them to normal (cursor visible, inversevideo off) before exiting your program. Pascal will not do it for you.The GOTOXY ProcedureThe procedure GOTOXY sends the cursor to a specific position on thescreen. It is writtenGOTOXY (XCOORD, YCOORD);where XCOORD and YCOORD are expressions with integer values. XCOORDgives the horizontal coordinate of the cursor destination; it must be in therange 0 .. 79. YCOORD gives the vertical coordinate of the cursor destination;it must be in the range 0 .. 23. The upper left corner of the screen hascoordinates 0,0.III-266Chapter 16: Miscellaneous Information

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

Saved successfully!

Ooh no, something went wrong!