Authors
Publication
Pub Details
Date
Pages
The April 1986 issue of Your Sinclair had an article and a program listing for a feature which provides for a screen black-out if you don’t do anything for a while. It has an adjustable time-out interval of up to 20 minutes.
I found that the program works equally well on the TS2068 and with the Spectrum ROM.
The program works as follows. After a timed interval in which no computer keys are pressed, the screen attributes are moved and stored in upper memory, and the attributes area of memory is filled with zeros, giving a black screen. The border is also blacked out. At the same time a flashing white square located in the lower right-hand corner of the screen is displayed as a reminder.
Whenever a key is touched the screen attributes are restored and presto, the screen reappears.
The code occupies a space of about 1200 bytes of upper RAM. The code itself is only about 120 bytes, however space is required to store the 768 bytes of the screen attributes.
This location has been carefully chosen so that the interrupt mode (IM2) which it uses will not be disturbed by computer peripherals. I checked, and its operation is not affected by the Larken disk system. Also, the code does not affect the user-defined graphics area of memory.
The article mentions that because of the peculiarity of the IM2 interrupt mode only the brave, or maybe the foolhardy, would attempt to relocate it.
The easiest way to use this utility would be to load the Basic each time, and have it POKE the code into place. This allows you to select the time delay interval desired.
If you can settle for a standard time interval then saving the code and reloading it for each use is entirely practical. In this case you would initialize the feature with RAND USR 64967.
To turn off the feature use RAND USR 64994.
Products
Media
Image Gallery
Source Code
1 REM Auto Screen Fade
5 RESTORE
10 CLEAR 64198
1000 FOR i=64967 TO 65023
1010 READ a: POKE i, a
1020 NEXT i
1030 FOR i=65281 TO 65365
1040 READ a: POKE i, a
1050 NEXT i
1060 INPUT "Delay in secs ";s
1070 LET s=s*50: LET t=INT (s/ 256)
1080 POKE 65287, t: POKE 65286, s-256*t
1090 RANDOMIZE USR 64967
1100 PRINT "USR 64994 to switch off"
1110 STOP
2000 DATA 33,0,254,6,0,243
2010 DATA 54,253,35,16,251,54
2020 DATA 253,62,254,237,71,237
2030 DATA 94,251,33,1,0,34
2040 DATA 251,253,201,237,86,201
2050 DATA 255,243,245,229,197,213
2060 DATA 237,91,251,253,205,1
2070 DATA 255,34,251,253,209,193
2080 DATA 225,241,251,201,2,0
2090 DATA 195,229,253
2100 DATA 122,179,40,50,33,232
2110 DATA 3,167,237,82,40,11
2120 DATA 235,35,253,203,1,110
2130 DATA 200,33,1,0,201,33
2140 DATA 0,88,17,199,250,1
2150 DATA 0,3,126,18,54,0
2160 DATA 35,19,11,120,11,36
2170 DATA 245,211,254,62,184,50
2180 DATA 255,90,33,0,0,201
2190 DATA 235,253,203,1,110,200
2200 DATA 33,199,250,17,0,88
2210 DATA 1,0,3,237,176,58
2220 DATA 72,92,230,56,15,15
2230 DATA 15,211,254,33,1,0,201,0,0
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.