This machine code program can almost instantly change everything on the screen to inverse video. If your computer has 4K or more RAM, the entire screen, including the bottom two lines, reverse. With less memory, only printed characters and spaces to their left change; the rest of the screen remains white.
To use this program, enter:
10 DIM I$(29)
20 FOR N=2 TO 29
30 INPUT X
40 PRINT (STR$ X+" ")( TO 4)
50 LET I$(N)=CHR$ X
60 NEXT N
SYNTACTIC SUM: 5428, 8K ROM
RUN, then enter these numbers left to right and top to bottom:
42 12 64 237 91 16 64 1 118 128 126 185 40 2 128 119 35 124 186 32 245 125 187 32 241 38 0 201
You can now delete the program lines. Call the routine with:
LET I$(1)=STR$ USR (PEEK 16402+256*PEEK 16403+1)
Enter this program to see the routine work. Don’t RUN it! Use GOTO 10 to avoid wiping out variable I$ that holds your MC.
10 LIST
20 LIST
30 LIST
40 PAUSE 60
50 LET I$(1)=STR$ USR (PEEK 16402+256*PEEK 16403+1)
60 GOTO 40
SYNTACTIC SUM: 6134, 8K ROM
Try this again without a RAM pack to see the difference.
You can store machine code in a string with any MC program that does not print characters to the screen. Note that it doesn’t use the first byte.
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.