TS2068 Utilities

Authors

Pub Details

Date

Pages

BASIC Terms

First these are machine code programs I got from ZX Computing Magazine and in fact all five programs came from the magazine.

The first will break a machine code program that got lost in a loop. The keyboard is scanned by using the interrupt and if break is pressed then it returns to Basic. The program was written by Ray Reeves who amended an earlier program by A. Vellacott.

   1 REM M/C break Mk2
10 CLEAR 65278: RESTORE : FOR a=65279 TO 65322: READ b: POKE a, b: NEXT a
20 DATA 1,255,245,205,84,31,48,4,241, 195,56,0,241,62,2,205,1,2,2,1,6,24,205 ,217,13,193,205,43,45,205,227,45,237,86,255,195,3,19,62,254,237,71,237,94,201

Please note this program will print the break address in the upper right hand corner of the screen.

The second program is a program that will ignore the break command. It was written by R. Glavas. To use the program RANDOMIZE USR 50000. Save is SAVE “????”CODE 50000,42. This only disables the BREAK. Regular halts will still work.

   1 REM break ignore 10 CLEAR 49999: RESTORE : FOR a=50000 TO 50041: READ b: POKE a,b: NEXT a
20 DATA 59,59,225,17,15,0,25,235,42, 61,92,115,35,114,201,59,59,33,58,92,126,254,20,40,9,254,12,40,5,51,51,195,3, 19,54,255,35,203,254,195,125,27
100 Rem example
110 LET l=USR 50000
120 PRINT "Try Break !"
130 FOR f=1 TO 21: PRINT AT f,0; INK f/4;f
140 CIRCLE 128-f*2,88,f*3: NEXT f
150 STOP

The third and fourth programs are called Inverter and Wrap around. They were written by John Fryc.

    1 REM inverter
5 CLEAR 40000: INPUT "Enter storage address for INVERTER code "; start
10 FOR x=start TO start+18: READ a: POKE x, a: NEXT x
15 SAVE "inverter"code start,19
20 DATA 33,0,64,6,24,197,6,0,126,238,
255,119,35,16,249,193,16,243,201

Inverter changes the screen attributes without affecting the graphics or text present on the screen.

    1 REM Wrap around
5 CLEAR 40000: INPUT "Enter storage address for WRAP AROUND code"; start
10 FOR x=start TO start+24: READ a : POKE x, a: NEXT x
15 SAVE "wraparound"CODE start, 25
20 DATA 6,192,17,0,64,213,225,35,197, 1,31,0,26,237,176,43,119,0,35,35,19,193,
16,240,201

Wrap around scrolls the screen lines to the left by a character space. The left hand column being wrapped around and reappearing in the right hand column.

The fifth program is to flip a screen either horizontal or vertically.

   10 REM Horizontal flip
20 FOR f=50000 to 1e9: READ a: IF a<> 999 THEN POKE f,a: NEXT I
30 DATA 33,0,64,17,0,200,1,0,27,237,176
40 DATA 33,0,200,78,6,8,203,17,31,16, 251,119,35,124,254,224,32,241
50 DATA 33,255,90,17,0,224,6,6,197,6, 128,26,119,43,19,16,-6,19,3,16,-12
60 DATA 33,255,87,17,0,200,6,48,197,6, 128,26,119,43,19,16,-6.193,16,-12,201,999
100 REM Vertical flip
110 FOR f=50100 TO 1e9: READ a: IF a<> 999 THEN POKE f,a: NEXT f
120 DATA 33,0,64,17,0,200,1,0,27,237,176
130 DATA 33,0,200,78,6,8,203,17,31,16, 251,119,35,124,254,224,32,241
140 DATA 33,0,200,6,216,197,84,93,6,32, 126,245,35,16,-5,98,107,6,32,241,119, 35,16,-5,193,16,-22
150 DATA 17,0,64,33,0,200,1,0,27,237,
176,201,999
200 PRINT AT 10,10; "DEMO": FOR i=1 TO 100: PRINT AT RND*21, RND*30; INK RND*7 ; "X": NEXT i
220 PRINT #0; AT 1,0; INVERSE 1; "Horizo ntal flip": RANDOMIZE USR 50000
230 PAUSE 0
240 PRINT #0; AT 0,0; INVERSE 1; "Vertical flip": RANDOMIZE USR 50100
250 PAUSE 0: GO TO 220

Products

 

Media

 

Image Gallery

Source Code

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

Scroll to Top