Authors
Publication
Pub Details
Date
Summer 1990
Pages
19-20
BASIC Terms
See all articles from ZX-Appeal Summer 90
In honor of the “October is TS 2068 Month” movement, CATS is happy to present the following collection of tips, aids, and utilities which should prove helpful with any TS 2068 programming. These gems come to us from the archives of TIMELINEZ and SINC TIMES.
POKE 23608, X– For keyboard click (x=1 to 255)POKE 23692,2– Use before every print for automatic scrolling. Works like the scroll command on the 1000/1500.POKE 23692,1– Another way to control the scroll. Scrolls 22 lines, then a key must be pressed for every line.POKE 23658,8– Puts 2068 in CAPS mode.POKE 23658,0– Takes 2068 out of CAPS mode.PAUSE 0– Pause until any key pressed.POKE 23651,X (X=1 to 35)– Time that key must be held down before it repeats. Prefer 10-15 for text.POKE 23652,X (X=1 to 5)– Delay between successive repeats of a key being held down. Use 3 for text.USR 15002– Try this to get out of an infinite input loop without crashing.DIM A$(704): PRINT AT 0,0; OVER 1;PAPER 1;INK 6;A$– Allows you to change paper and ink color without clearing the screenPRINT #1;AT 0,2;"HI": PRINT #2,AT 1,5;"BY": PAUSE 0– Prints on lines 22 and 23.LOAD "" CODE RAND USR 33792– For programs that will not load.LET x=INT(x*10↑y+.5)/10↑y– Use for rounding: x=number to be rounded, y=number of decimal places1 DEF FN r(x,y)=INT(x*10↑y+.5)/10↑y
2 INPUT "Enter a number ";a
3 INPUT "Round off to ? ";b
5 PRINT FN r(a,b)
Sets the defined function to the formula for rounding off. a=number before rounding, b=number of places desired after rounding.INPUT LINE A$– Prevents computer from placing “” on screen when waiting for input. Note: you can’t use “STOP” with this method, but CAP-SHIFT-6 will stop. Bug in the system.PRINT PEEK 23635=256*PEEK 23636– Used to find starting address.PRINT ""– Gives line feed to print statement.RANDOMIZE USR 0– Reset the computerINPUT AT 22,0; AT 10,0; "input value"; a$– Input at any position on screen.1 FOR I=0 TO 21
2 FOR X=0 TO 31
3 LPRINT SCREEN$(I,X)
4 NEXT X
5 NEXT I
Copy screen to printer without using the copy command.OPEN #2– Sends all data normally destined for the screen to the printer.CLOSE #2– Cancels above command.1 LET C=2
2 FOR I=32 TO 255
3 PRINT AT 0,0;""
4 PRINT AT 0,0;CHR$ I
5 IF CODE SCREEN$(0,0)=0 THEN PRINT AT 4,C;CHR$ I;LET C=C+2
6 NEXT I
Lists characters not recognized by the SCREEN$ command.CLEAR 63255– Do this first if you plan to use UDGs in a long BASIC program that will include a video mode change. A bug in the system will allow a long BASIC program to overwrite your UDGs if RAMTOP is not lowered first.POKE 23750,0– If you are using cartridge software that can be stopped by the break key, this will allow you to enter your own BASIC lines in to RAM. To return to the cartridge, POKE 23750, 128.POKE 23693,56– To give a starting INK color.- BASIC starts at 26710 – Your BASIC program starts at this address.
- CAPS SHIFT 3 – Scrolls two screens when listing.
POKE 26711,0– Gives the first program line number 0. POKE 26711,1 to change 0 to 1.POKE 23659,0– To use all 24 lines (making the program unstoppable). POKE 23659,2 resets. Use with INKEY$ input only; INPUT will reset.POKE 26710,255– Use to make lines disappear (makes line number > 9999). POKE 23710,0 will reset.INKorPAPER 9– Gives contrasting base color.- “E” mode/CAPS SHIFT and a color 1-7 – Sets INK color in listing.
- “E” mode/unshifted and a color 1-7 – Sets PAPER color (go back to original color at the end of the line; if not, all lines will be the same color)
1 INPUT "COMMENT";a$;CHR$ 13;"COMMENT";b$
2 PRINT "COMMENT";a$;CHR$ 13;"COMMENT";b$
Example of double inputs.9000 FOR I=1 TO 200
9010 BORDER 1: BORDER 2: BORDER 3: BORDER 4: BORDER 5: BORDER 6: BORDER 0: BORDER 7: PAUSE 1
9020 NEXT I: RETURN
GO SUB 9000 for a striped borderPOKE 23617,236– Used to get a question mark cursor displayed in input statements.PRINT #0;"COMMENT";PAUSE 0– Use to print on line 24