DATA Made Easy (PC Magazine Vol 4 No 7 April 2, 1985 User-to-User) The most difficult part of typing in a program with lots of DATA statements is entering the repetitious parts of each line. Set up two functions keys: F9 as "DATA" and F10 as ","+CHR$(9). Then set the cursor/number pad to numeric with the NumLock key and turn on automatic program numbering with the BASIC command AUTO 320 to continue from where you leave off in the program. With your left hand on F9 and F10 and right hand on the number pad, just hit F9, then F10, then the DATA number, then F10 and so on until you reach the last number in each line, and then Enter. Editor's Note: If you do this, write a short BASIC program to redefine your keys (by putting line numbers at the beginning of each line) and save the program. The next time you have to reset your function keys, just run the program. If you do this, add a +CHR$(9)" to the "DATA in the first line to make the output look cleaner. You can enter such DATA statements in WordStar's N (nondocument) mode. To make this easy, create all the line numbers and the DATA words in each with the program DATAGEN.BAS. There's no fancy error trapping, but it works. The nice thing about entering numbers this way is that corrections are much easier than with BASIC's rudimentary editor. 100 'DATAGEN.BAS 110 INPUT "Start with what number? ",S 120 INPUT "End with what number? ",E 130 INPUT "Call the file what? ",N$ 140 OPEN N$ FOR OUTPUT AS #1 150 FOR A=S TO E STEP 10 160 PRINT #1,RIGHT$(STR$(A),LEN(STR$(A))-1);" DATA " 170 NEXT:CLOSE ----------------------------------------------------------------- Reverse Image (PC Magazine Vol 4 No 12 June 11, 1985 User-to-User) While using the graphics DOS 2.1 graphics utility, the printout does not accurately match the image on the screen. The discrepancy is obvious: the printed copy transposes the foreground and background colors. This transposition is fine for text but can make it difficult to see details in a graphics printout. The BASIC subroutine below takes 2 minutes 35 seconds to reverse the colors in interpreted BASIC, and between 3 and 18 seconds -- depending on the program in which it is being used -- when compiled. It works equally well in 40 and 80 column color graphics modes. The subroutine reads each byte in the screen buffer, subtracts its value from 255, and then rewrites the new value to the buffer in place of the old. It uses 255 to convert the image because of the way the screen information is stored in memory. Each byte stores the display information for four pixels in binary format. There are four possible values for each pixel (00, 01, 10 or 11) that determine which of the four possible colors appears on the screen. Each byte, therefore, can have a decimal value between 0 and 255. To reverse the screen color, the value for each pel needs to be converted to its reciprocal -- 00 needs to be changed to 11, 01 to 10, 10 to 01, and 11 to 00. So to reverse the color of each pel, you need to subtract the original number from 255. Editor's Note: This is really XORing each byte. The heart of the BASIC program subroutine is used to create the REVDEMO.BAS demo program. REVDEMO draws 100 mostly filled circles. Then you hit F1 to change the background color and F2 to change the pallette. Hitting F9 sends the program to a revised version of the subroutine; this one is faster, and we've changed most of the hex numbers to their decimal equivalents. Hitting F10 quits. Since the program works by XORing, hitting F9 twice in succession brings the image back to its original colors. This programs runs like lightning when compiled. BASIC subroutine to reverse the colors of a graphics screen: 5 ON KEY(9) GOSUB 50000:KEY(9) ON 49999 GOTO 49999 50000 'Screen reverse subroutine 50010 DEF SEG=&HB800 50020 FOR I=&H0 TO &H1F3F 50030 X=PEEK(I):Y=255-X:POKE I,Y 50040 J=I+&H2000:X=0EEK(J):Y=255-X:POKE J,Y 50050 NEXT I 50060 RETURN REVDEMO.BAS: Demo program to reverse screen colors: 100 'REVDEMO.BAS 110 DEFINT A-Z:SCREEN 1,0:COLOR 0,2:KEY OFF:CLS 120 ON KEY(1) GOSUB 210:KEY(1) ON 'F1 = background 130 ON KEY(2) GOSUB 220:KEY(2) ON 'F2 = palette 140 ON KEY(9) GOSUB 240:KEY(9) ON 'F9 = reverse 150 ON KEY(10) GOSUB 230:KEY(10) ON 'F10 = quit 160 FOR C=1 TO 100 170 P=RND*319:Q=RND*199:R=RND*20:S=(C MOD 3)+1 180 CIRCLE (P,Q),R,S:PAINT (P,Q),S,S 190 NEXT 200 GOTO 200 210 K=(K+1) MOD 16:COLOR K,J:RETURN 220 J=(J+1) MOD 2:COLOR K,J:RETURN 230 END 240 DEF SEG=&HB800 250 FOR I=0 TO 7999 260 POKE I,PEEK(I) XOR 255:POKE I+8192,PEEK(I+8192) XOR 255 270 NEXT:RETURN ----------------------------------------------------------------- Graphics Color Switcher (PC Magazine Vol 4 No 17 Aug 20, 1985 User-to-User) The process described in "Reverse Image" (PC Vol 4 No 12 - above) can be speeded up enormously by GETting the entire screen and PUTting it back at location(0,0) using the XOR option. The REVERSER.BAS demo program (below) will reverse the screen image in about one second in either interpreted or compiled BASIC. The only disadvantage of this method is that the storage array takes up 16,000 bytes of memory. Editor's Note: By repeatedly XORing the image, you can create an interesting movie marquee effect. We adapted the program slightly to show this; hit "A" as soon as the program starts to see it. REVERSER.BAS: 100 'REVERSER.BAS 110 SCREEN 1,0:COLOR 9,0:CLS:KEY OFF:DIM R#(2000):K=9:J=0:Q$=CHR$(34) 120 LOCATE 10,4:PRINT "Hit ";Q$;"A";Q$;" for automatic flipping, or" 130 LOCATE 12,4:PRINT "any other key for manual operation"; 140 I$=INKEY$:IF I$="" THEN 140 ELSE IF I$="a" THEN I$="A" 150 LINE (0,0)-(319,199),3,BF:GET (0,0)-(319,199),R#:CLS 160 LINE (8,8)-(100,70),2,BF:LINE (15,50)-(299,190),3,BF 170 LINE (75,15)-(190,100),3,BF:LINE (85,25)-(180,90),2,BF 180 CIRCLE (245, 60),80,3,,, .8:PAINT(245, 20),3 190 CIRCLE (225,120),60,2,,,1.4:PAINT(225,120),2 200 CIRCLE (125,160),130,2,,,.12:PAINT(125,160),2 210 CIRCLE (125,160),130,3,,,.12:LINE (235,135)-(290,185),1,BF 220 CIRCLE (45,30),20,3:LINE (0,0)-(319,199),0,B:LINE(1,1)-(318,198),0,B 230 LINE(2,2)-(317,197),0,B:LINE(3,3)-(316,196),3,B 240 LINE(4,4)-(315,195),3,B:LINE(5,5)-(314,194),3,B 250 ON KEY(1) GOSUB 380:KEY(1) ON:ON KEY(2) GOSUB 350:KEY(2) ON 260 ON KEY(3) GOSUB 360:KEY(3) ON:ON KEY(10) GOSUB 370:KEY(10) ON 270 LINE(48,64)-(280,128),0,BF:LINE(49,65)-(279,127),3,B 280 LINE(51,67)-(277,125),2,B 290 LOCATE 10,8:PRINT "=== Screen Reverse Demo ===" 300 IF I$<>"A" THEN LOCATE 12,8:PRINT "F1 - Reverse the Screen " 310 LOCATE 13,8:PRINT "F2 - Change Background Color" 320 LOCATE 14,8:PRINT "F3 - Change Palette Color" 330 LOCATE 15,8:PRINT "F10 - End the Demo" 340 IF I$="A" THEN GOSUB 380:GOTO 340 ELSE 340 350 K=(K+1) MOD 16:COLOR K,J:RETURN 360 J=(J+1) MOD 2:COLOR K,J:RETURN 370 CLS:END 380 PUT(0,0),R#,XOR:RETURN ----------------------------------------------------------------- Custom Cursor (PC Magazine Vol 4 No 12 June 11, 1985 User-to-User) The CURSOR.BAS program overlaps the normal cursor with a customized one. The program finds the proper cursor location by using POS() and CSRLIN; it then overlays the new cursor on the old. Editor's Note: We added the animated XOR bouncing feature at the end; why not, as long as you are PUTting and GETting the new cursor image anyway? CURSOR.BAS program to customize the normal cursor in graphics mode (for color monitors only): 100 'CURSOR.BAS -- Russ Brooks 110 DIM CURSOR(20:SCREEN 1,0:KEY OFF:CLS 120 DRAM "BM 1,4U4R2F1G1L2BM 7,6G1L1H1U2E1R1F1" 130 GET (0,0)-(7,7),CURSOR:PRINT "Now type: "; 140 PUT ((POS(0)-1)*8,(CSRLIN-1)*8),CURSOR 150 A$=INKEY$:IF A$=:: THEN 150 160 IF A$<>CHR$(13) THEN PRINT A$;:F$=F$+A$:GOTO 140 170 PRINT:PRINT:PRINT "You typed: ";F$:C=CSRLIN*8 180 FOR A=1 TO 312 190 PUT (A,C),CURSOR,XOR:PUT (A,C),CURSOR,XOR:NEXT 200 C=CSRLIN*8:FOR A=312 TO 1 STEP -1 210 PUT (A,C),CURSOR,XOR:PUT (A,C),CURSOR,XOR:NEXT 220 IF INKEY$="" THEN 180 ----------------------------------------------------------------- Text Mixing (PC Magazine Vol 4 No 12 June 11, 1985 User-to-User) BASIC's graphics screens limit you to using wide text characters in 40-column mode and narrow ones in 80-column mode. However, there is a simple way to confuse BASIC and use both sizes in 80-column graphics mode. To get wide characters in SCREEN 2, type: SCREEN 2 DEF SEG=0 POKE 1097,4 POKE 1098,40 DEF SEG Any PRINT statements used after this will display wide characters. However, there are some cautinos with this trick. First, text written past the 40th column will wrap to the previous line, so don't print past the right margin. Second, when returning control to BASIC with a STOP or END command, make sure you use the correct settings for 80-column text before editing. To restore the settings, type: DEF SEG=0 POKE 1097,6 POKE 1098,80 DEF SEG Finally, don't mix 40-width text with LINE INPUT or INPUT statements. The editing keys such as the backspace will have a problem understanding where the proper cursor position is, which can lead to unpredictable results. The program below uses the above trick to put both widths on the same screen. When using SCREEN 1, the opposite sequence will produce small type, but the results are multicolored and not well suited for easy reading. This tip can help in making graphics displays distinctive. A good use would be in labeling bar or pie charts. BASIC subroutine to put two sizes of text on the same graphics screen: 100 SCREEN 2:OUT 985,2:CLS 110 LOCATE 5,30:PRINT "This is small type." 120 DEF SEG=0:POKE 1097,4:POKE 1098,40:DEF SEG 130 LOCATE 7,12:PRINT "This is large type." 140 DEF SEG=0:POKE 1097,6:POKE 1098,80:DEF SEG 150 LOCATE 9,30:PRINT "And back to small type." ----------------------------------------------------------------- File Moves in BASIC (PC World September 1985 Star-Dot-Star) The BASIC command NAME ...AS ... can be used to move files from one subdirectory to another. This technique replaces the commonly used two-step process of copying a file from the old directory to its new location, then deleting the original file. For example, the BASIC command: NAME "\WP\FILES\SMITH.LTR" AS "\LETTERS\AUG\SMITH.LTR" moves the file SMITH.LTR from the subdirectory \WP\FILES to the \LETTER\AUG subdirectory. BASIC does not allow wild-card characters in the NAME AS command, but you can write a BASIC program using this technique to move groups of files between subdirectories. ----------------------------------------------------------------- Bring 'em Back Alive (PC Magazine Vol 4 No 20 Oct 1, 1985 User-to-User) The BASIC manual explains four ways to use the DELETE command, but ignores a fifth, undocumented way that can erase your entire program with a single flick of the Enter key. If you accidentally type the word DELETE without any line numbers after it and then hit Enter, the program will disappear. Because of this, always use the Escape key to cancel an aborted command rather than the Enter key. Editor's Note: Typing DELETE with no line numbers after it is the same as typing NEW. However, if you do accidentally type either NEW or DELETE and hit Enter, you can reconstruct the program, almost all of which remains in memory. The process, as amplified from its original explanation in PC Magazine Vol 3 No 2 User-to-User, is: 1. Right after you realize what you've done, type: PRINT CHR$(14) and hit Enter. A musical note will appear on the screen. 2. Hit the up-arrow key twice to move the cursor up to the line with the musical note on it and then hit the Ins key. 3. Type the number 1 and then an apostrophe (single-quote) and hit Enter. 4. Pick a new filename and then type either: LIST, "filename" or, alternatively, type: SAVE "filename",a (substituting your new filename between the quotes), which will save the resurrected program as an ASCII file. The first line of your original program will vanish, and you'll find a garbled line somewhere near the beginning and the end, but you can edit these later. Don't fiddle with the first two lines before you save the program, or you'll crash into disk BASIC and lose everything. ----------------------------------------------------------------- Rounding Function (PC Magazine Vol 4 No 20 Oct 1, 1985 User-to-User) In many cases single-precision calculations result in numbers calculated to more places than you want. The FNSIG(X,N) function in the program below allows a number x to be rounded to n significant digits. The procedure is straightforward: You multiply the number by a power of ten, round it to an integer, then divide by the same power of ten. The tick is to find the correct power of ten and avoid problems with negative numbers and zero. FNSIG does this by subtracting the integer of the base 10 log of the number plus 1 from the number of significant digits wanted. Multiplying x by 10 to this power results in a number with n digits ahead of the decimal point. The base 10 log (found by dividing the base e log by 2.302585) will blow up if x is negative or zero. FNSIG fixes this simply by using the absolute value of x. A zero value of x is no problem if a 1 is added when x=0. This is also done in the denominator to avoid a division by zero. The CINT function is not used to round off the number because it is limited to the range -32,768 to 32,767. Adding .5 and using INT gives the same result without CINT's limitation. The FNSIG function works for any x, positive, negative or zero. However, the number of significant digits must be between 1 and 17. - - - - - 100 'Significant digit function 110 CLS 120 DEF FNSIG(X,N)=INT(.5+X*10^(N-1-INT(LOG(ABS(X)-X=0))/2.302585)))/ (10^(N-1-INT(LOG(ABS(X)-(X=0))/2.302585))-(X=0)) 130 INPUT "Enter number to be rounded : ",Y 140 INPUT "Enter number of significant digits : ",Z 150 PRINT FNSIG(Y,Z):GOTO 130 ----------------------------------------------------------------- New BASIC Functions (PC World October 1985 Star-Dot-Star) The MIN function, which returns the lesser of two values supplied, and the MAX function, which returns the greater, are not available in BASIC(A). For example, if you set variable A to 3 and variable B to 7, executing the statement X=MIN(A,B) sets the value of X to 3. The statement X=MAX(A,B) would set X to 7. The twos lines of BASIC shown below are BASIC statements to create user-defined functions for MIN and MAX. Due to the design of the PC's BASIC, the letters FN must precede the name of each function. Also, the lines must be executed before the functions are used, so it's a good idea to put them near the top of your program. 10 DEF FNMIN(A,B)=-B*(BA)-A*(A>B) ----------------------------------------------------------------- Low-Resolution Magic (PC Magazine Vol 4 No 23 Nov 12, 1985 User-to-User) An 80 x 50 screen on the color/graphics board can be produced which is virtually identical to the low-resolution mode. You can enter this "very low resolution" mode with the following BASIC code. To undo it and stop, just hit the Escape key. 100 SCREEN 0,1:WIDTH 40:KEY OFF 110 FOR N=1 TO 4 120 READ I,D 130 OUT &H3D4,I:OUT&H3D5,D 140 NEXT 150 DATA 4,63,6,50,7,56,9,E 160 FOR A=1 TO 7 170 COLOR A 180 PRINT STRING$(40,222); 190 COLOR A+8 200 PRINT STRING$(40,221); 210 NEXT 220 I$=INKEY$:IF I$="" THEN 220 230 IF I$<>CHR$(27) THEN 160 240 SCREEN 0:CLS In this mode the screen displays 50 rows of half-height characters although the color/graphics board thinks it is set up for a 40 x 25 character screen. The attribute byte determines the color of the left and right PELs -- the left PEL is in the low nibble (the right-most 4 bits of a byte), and the right PEL in the high nibble (the left-most 4 bits). Since this uses only 4K bytes of the screen buffer, you can work with as many as 4 screens at any one time. The KALMAKR1.BAS and KALMAKR2.BAS programs produce .COM files that demonstrate this low-resolution mode by creating two kaleidoscopes. Once you've produced the .COM files, you can speed up or slow down the action by hitting F9 and F10 and can exit by hitting any normal key. ----------------------------------------------------------------- Converting BASIC Strings to Uppercase (PC World The Help Screen March 1985) The subroutine in UPPER.BAS (lines 100 through 160) below converts the lowercase letters of X$ into uppercase without changing any other characters or using any string space. You can incorporate this routine into your BASIC programs, assign the string you want converted to the variable X$, and call the routine with a GOSUB. The routine uses a FOR ...NEXT loop to step through each character of X$ one at a time, checking for lowercase characters and converting them to uppercase. Inside the loop the variable ASCIIVALUE is set to the ASCII value of the character currently being checked (line 110). Accordingly, if the current character has an ASCII balue of less than 97, line 120 causes program execution to skip the remainder of the loop and proceed to check the next character of X$. Line 130 does the same if the ASCII value is greater than 122. If the character's ASCII value is between 97 and 122, the character is lowercase, and line 140 replaces it in X$ with one whose ASCII value is 32 less than the current character (that is, the uppercase equivalent). This routine works fine for short strings but offers no input control, such as accepting only numbers or only letters. For that kind of control you need an input routine, not just a case-conversion routine. UPPER.BAS: 10 CLS 20 INPUT "Enter any characters: ",X$ 30 GOSUB 100 40 PRINT x$ 50 END 100 FOR I=1 TO LEN(X$) 110 ASCIIVALUE=ASC(MID$(X$,I,1)) 120 IF ASCIIVALUE<97 THEN 150 130 IF ASCIIVALUE>122 THEN 150 140 MID$(X$,I,1)=CHR$(ASCIIVALUE-32) 150 NEXT 160 RETURN ----------------------------------------------------------------- Random DATA (PC World The Help Screen March 1985) In a BASIC program that requires reading DATA statements in random order, there is no need to READ the data in random order every time you want the data elements mixed. When your program begins, it can READ the data into an array once and then randomly mix the array assignments each time you want them in a new order. MIXEDATA.BAS below demonstrates the necessary routines. As shown in lines 100 through 160, your program must set a variable (TOTAL in this example) to the total number of data elements, DIMension an array (ELEMENT$() in this example) to hold the data elements, seed the random-number generator, and read the data elements into the array. This initialization process is done only once. Any time you want your program to mix the order of the data elements, have it GOSUB to a subroutine such as the one shown in lines 200 through 230 of MIXEDATA.BAS. The routine uses one FOR ...NEXT loop to step backward through the array and SWAP statement to shuffle the order of the array elements in one quick pass. MIXEDATA.BAS: 10 CLS 20 GOSUB 100 30 GOSUB 200 40 GOSUB 300 50 GOSUB 200 60 GOSUB 300 70 END 100 TOTAL=40 110 DIM ELEMENT$(TOTAL) 120 RANDOMIZE VAL(RIGHT$(TIME$,2)) 130 FOR I=1 TO TOTAL 140 READ ELEMENT$(I) 150 NEXT 160 RETURN 200 FOR I=TOTAL TO 2 STEP-1 210 SWAP ELEMENT$(RND*I+.5),ELEMENT$(I) 220 NEXT 230 RETURN 300 FOR I=1 TO TOTAL 310 PRINT USING "\ \";ELEMENT$(I) 320 NEXT 330 PRINT:PRINT 340 RETURN 1000 DATA a,bb,ccc,dddd,e,f,g,h,i,j,k,l 1010 DATA m,n,o,p,q,r,s,t,u,v,w,x,y,z 1020 DATA 1,2,3,4,5,6,7,8,9,0,!,@,#,$ ----------------------------------------------------------------- Easy Unprotection (PC Magazine Vol 4 No 25 Dec 10, 1985 User-to-User) BASIC offers a simple way to "protect" programs by saving them with a ",P" option, which prevents users from listing their contents. However, it doesn't provide a way to unprotect such programs. If you try to list a protected BASIC program and are unable to do so, simply run UNPROT.BAS which will prompt you for the name of the protected program. After UNPROT runs, it will leave the cursor on the third line of the screen, at the beginning of the line "s=18:call s". At this point, simply hit the Enter key (which executes the CALL statement in direct mode), and you'll find that you can then list the formerly protected program. 100 'UNPROT.BAS 110 CLS:PRINT "When this program terminates, "; 120 PRINT "it leaves a short program onscreen." 130 PRINT "Press Enter for it to work, as "; 140 PRINT "it must be done from 'command' mode." 150 INPUT "Enter name of program to unprotect: ",P$ 160 FOR A=1 TO 6:READ B:POKE A+17,B:NEXT 170 PRINT "s=18:call s":LOCATE 3,1:LOAD P$ 180 DATA 48,192,162,100,4,203 Editor's Note: Here's another way to unprotect programs. Get into BASIC and type BSAVE "U",0,1 which creates a 9-byte program on your disk called U.BAS. Then, whenever you load a protected program and get an "Illegal function call" message when you try to list it, type BLOAD "U",1124 and you'll find you can list the program as you can an unprotected program. In both cases, be sure that once you've unprotected a program, you save it the conventional way, without the ",P" option. When using UNPROT.BAS, enter the protected program's entire filename when prompted, including the extension. ----------------------------------------------------------------- Tip on BASIC and the SHELL Command To go to DOS from BASIC, use: PPPP=PEEK(48):PPPPP=PEEK(49) SHELL BREAK ON The variable names are purposely long so as not to conflict with variables in a program. Turn break on when going from BASIC to DOS because BASIC seems to destroy the "break on" command. To return from DOS to BASIC: EXIT CLS POKE 48,PPPP:POKE 49,PPPP The CLS command clears the screen of garbage left over from DOS. The garbage might otherwise produce a syntax error if it's on the same line as the two POKE commands. ----------------------------------------------------------------- Hitting the Break (PC Magazine Vol 4 No 26 Dec 24, 1985 User-to-User) BASIC doesn't provide a documented way to disable Ctrl-Break, but it's easy to do. BREAK.BAS first disables Ctrl-Break in line 190 and then re-enables it in line 210. To use this trick in your own programs, follow these four steps: 1. Set the segment to 0 with DEF SEG=0. 2. Read the four existing Ctrl-Break address bytes at locations 108 to 111 (&H6C through &HCF) into an array called OLD() -- these first two steps are done in line 120. 3. POKE the four values in line 190 into the old address bytes. 4. Reset the segment with DEF SEG. To re-enalbe Ctrl-Break after disabling it, GOSUB to the exact routine in lines 210 to 220. 100 'BREAK.BAS 110 SCREEN 0:WIDTH 80:KEY OFF:LOCATE ,,0:CLS:DEFINT A-Z 120 DEF SEG=0:FOR I=108 TO 111:OLD(I-108)=PEEK(I):NEXT 130 PRINT "Hit '1' to disable Ctrl-Break, '2' to enable it." 140 I$=INKEY$:IF I$="" OR INSTR("12",I$)=0 THEN 140 150 PRINT:ON VAL(I$) GOSUB 190,210 160 PRINT "Now hit Ctrl-Break and watch what happens ...." 170 IF I$="1" THEN PRINT "(Or hit Esc for the main menu.)" 180 IF INKEY$=CHR$(27) THEN PRINT:GOTO 130 ELSE 180 190 POKE 108,83:POKE 109,255:POKE 110,0:POKE 111,240 200 DEF SEG:RETURN 210 DEF SEG=0:FOR I=108 TO 111:POKE I,OLD(I-108):NEXT 220 DEF SEG:RETURN Editor's Note: This works by changing the interrupt vector (address) at the bottom of memory to avoid executing the internal Ctrl-Break routine and then restoring it later. Be careful in experimenting with this; if you disable Ctrl-Break and then enter an endless loop without giving yourself an escape route, you'll have to do a hard reset. So make sure you SAVE any variations before running them. For a complete list of interrupts, look in the Technical Reference manual under "Low Memory Maps" or "Interrupts" (depending on your manual version). Or you can run the following short program to show the interrupts and their addresses (but not their functions): 100 'Displays interrupts 110 DEG SEG=0 120 FOR A=0 TO 156 STEP 4 130 PRINT "INT &H";HEX$(A/4); 140 FOR B=0 TO 3 150 PRINT PEEK(A+B); 160 NEXT:PRINT 170 IF A<>84 THEN 200 180 PRINT "Hit any key." 190 WHILE INKEY$="":WEND 200 NEXT