Description: 80-Column Text Card: Applesoft Control Codes (11/96) Header: 80-Column Text Card: Applesoft Control Codes (11/96) Article Created: 1 January 1986 Article Reviewed/Updated: 14 November 1996 TOPIC ----------------------------------------------------------- When you write BASIC programs while the 80-Column Text Card is active, there are a number of functions you can use by pressing the CTRL key in conjunction with another key. Functions activated by pressing these two-key combinations are called control character functions. Some control character functions work when you type them in from the keyboard as well as when used within PRINT statements in BASIC programs. DISCUSSION ------------------------------------------------------ Table of Control Character Codes: Key to Notes codes: 1 - Only available when 80-Column Text Card is active 2 - Only works from the keyboard, not in a program 3 - Only works in a program, doesn't work from the keyboard 4 - Not supported under BASIC Apple ASCII Control ASCII IIe Decimal What Character Name Name Code Notes is Executed --------- ---- ---- ---- ----- ------------ CTRL-G BEL bell 7 Produces a 1000 Hz tone for 0.1 second CTRL-H BS backspace 8 Moves cursor position one space to the left; from left edge of window, moves to right end of line above. CTRL-J LF line feed 10 Moves cursor position down to next line in window; scrolls if needed. CTRL-K VT clear EOS 11 1 Clears from cursor position to the end of the window. CTRL-L FF clear 12 1 Moves cursor position to upper- left corner of window and clears window. CTRL-M CR return 13 Moves cursor position to left end of next line in window; scrolls if needed. CTRL-N SO normal 14 1,3 Sets display format normal. CTRL-O SI inverse 15 1,3 Sets display format inverse. CTRL-Q DC1 40-column 17 1,3 Sets display to 40 columns. CTRL-R DC2 80-column 18 1,3 Sets display to 80 columns. CTRL-S DC3 stop list 19 1,2 Stops sending characters to the display until a key is pressed. CTRL-U NAK quit 21 1,3 Deactivates 80-column Text Card, homes cursor, and clears screen. CTRL-V SYN scroll 22 1 Scrolls the display down one line, leaving the cursor in the current position. CTRL-W ETB scroll up 23 1 Scrolls the display up one line, leaving the cursor in the current position. CTRL-Y EM home 25 1 Moves cursor position to upper- left corner of window (but doesn't clear). CTRL-Z SUB clear line 26 1 Clears the line the cursor position is on. CTRL-\ FS forward 28 1 Moves cursor position one space to the right; from right edge window, moves it to left end of line below. CTRL-] GS clear EOL 29 1 Clear line from cursor position to the right edge of the window. CTRL-^ RS gotoXY 30 1,4 Using the next two characters, minus 32, as one-byte X and Y values, moves the cursor postion to CH=X, CV=Y. The Apple 80-Column Card in an Enhanced IIe has some additional features documented in the Programmer's Guide to the Enhanced IIe. Important Information About CTRL-U ================================== A "CHR$(21)" response (Control-U) to a "GET A$" input statement in a BASIC program may disable the 80-column card on an Apple IIGS, Apple IIe, Apple IIc, and Laser 128 (but not an Apple II Plus with Applied Engineering's Viewmaster 80). To halt the CONTROL-U function, the CONTROL-U keystroke needs to be trapped on input. Using the "GET A$" method: 10 GET A$ 20 IF A$ = CHR$(21) THEN A$ = "" :REM traps the CONTROL-U, sets it to blank 30 PRINT A$; 40 GOTO 10 Article Change History: 14 Nov 1996 - Reviewed for technical accuracy, revised formatting. Copyright 1986-96, Apple Computer, Inc. Keywords: