[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



GOTO WHERE? 
If you're in the habit of issuing GOTO's or GOSUB's to a Rem-only
line, as in the sample below, insert a colon before the Rem before
using REMOVE.
1000 GOTO 2000
2000 :REM NOTICE THE COLON. 
2010 PRINT "HELLO"
After Rem's are removed, the line will be left with only a colon (":")
following the line number:
1000 GOTO 2000
2000 :
2010 PRINT "HELLO"
Without the colon, the entire line would have been removed and you
would get an ?Undef'd Statement Error when you ran the program.
Actually, it would be more efficient of you to just GOTO the next line
(you would save 6 whole bytes).

AND NOW A WORD FROM OUR SPONSOR
"For the maximum in program compacting, including erased Rem's,
shortened variable names and automatic combining of program lines, use
Beagle's D CODE disk. See our catalog for details."

SUPER.POKE
Install only once: Type "-SUPER.POKE".
New command: &POKE
Function: Allows an easier way to poke a range of memory or a string
of numbers from Applesoft. A demo program resides semi-hidden on the
Big U disk.
Type "-COPYRIGHT. 1985" to see it.

FILL A RANGE OF MEMORY
Syntax: &POKE start: end, value
"start", "end" and "value" can be literal numbers or variables.
10 REM EXAMPLE #1: FILL A LINE
15 FOR X=0 TO 255
20 &POKE 1024:1063,X: NEXT
10 HGR: REM EXAMPLE #2: FILL HI-RES
20 VTAB22: INPUT "NUMBER (0-255):";X
30 &POKE 8192:16384,X: GOTO 20
POKE A STRING OF NUMBERS 
Syntax: &POKE start, value1, value2, etc.
"value 1" and "value2" can be literal numbers or variables. This
routine is useful for replacing lengthy For-Next loops which read Data
statements and Poke in values.
Example: &POKE 1024,193,194,195 prints "ABC" in on
the screen. 1024 is the upper left of the screen. 193, 194 and 195 is
ASCII for "ABC".
And, adapted from Tip Book #7:
10	HGR2: HCOLOR=3: &POKE768,0,0,96,
	173,48,192,136,208,4,198,1,240,8,
	202,208,246,166,0,76,3,3,96
20	HPLOT 0,0: FOR P=1 TO 254 STEP 3:
	&POKE O,P,4: CALL 771: HPLOT TO
	INT (RND(1)*P),.7*P: NEXT