Terminal control/Cursor movement: Difference between revisions

Content deleted Content added
Sonia (talk | contribs)
Go solution
Mmphosis (talk | contribs)
Applesoft BASIC
Line 113: Line 113:
150 'bottom right corner; requires knowledge of screen dimensions (80x25 here)
150 'bottom right corner; requires knowledge of screen dimensions (80x25 here)
160 LOCATE 25, 80</lang>
160 LOCATE 25, 80</lang>
==={{header|Applesoft BASIC}}===
80-Column Text Card: Applesoft Control Codes
http://support.apple.com/kb/TA33130

Apple II Family Identification
http://www.umich.edu/~archive/apple2/technotes/tn/misc/TN.MISC.007
<lang ApplesoftBasic>REM APPLE II GS ?
100 DATA56,32,31,254,160,0
110 DATA176,1,136,140,13,3,96
120 FOR I = 768 TO 780
130 READ B: POKE I,B
140 NEXT : CALL 768
150 IF PEEK (781) THEN 190

160 B = PEEK (64435) : T4 = 1

REM APPLE II ?
170 IF B = 56 THEN 200

REM APPLE II PLUS ?
180 IF B = 234 THEN 200

REM NOT 80 COLUMN MODE ?
190 T4 = PEEK (49183) < 128

REM START HERE
200 VTAB 12: HTAB 21
210 PRINT ">"; : UP = -998

REM LEFT
220 PRINT CHR$(8); : GET A$

REM RIGHT
230 IF T4 THEN CALL -1036
240 PRINT CHR$(28); : GET A$

REM UP
250 CALL UP : GET A$

REM DOWN / LINE FEED
260 PRINT CHR$(10); : GET A$

REM BEGINNING OF LINE
300 HTAB 1 : ON T4 GOTO 350
310 IT = PEEK(37)
320 IF IT THEN CALL UP
330 PRINT
340 IF NOT IT THEN CALL UP
350 GET A$

REM END OF LINE
370 HTAB PEEK(33)
380 GET A$

REM TOP LEFT
400 IF T4 THEN VTAB 1 : HTAB 1
410 PRINT CHR$(25); : GET A$

REM BOTTOM RIGHT
420 CALL -1233
430 HTAB PEEK(33)
440 GET A$
</lang>


=={{header|BBC BASIC}}==
=={{header|BBC BASIC}}==