53279 53279 D01F CONSOL (W/R) Used to see if one of the three yellow console buttons has been pressed (not the RESET button!). To clear the register, POKE CONSOL with eight. POKEing any number from zero to eight will cause a click from the speaker. A FOR-NEXT loop that alternately POKEs CONSOL with eight and zero or just zero, since the OS put in an 8 every 1/60 second, will produce a buzz. Values PEEKed will range from zero to seven according to the following table: |Key Value 0 1 2 3 4 5 6 7 | | | +------------------------------------------------------------+ | | |OPTION X X X X | |SELECT X X X X | |START X X X X | | | +------------------------------------------------------------+ Bits 2 0 0 0 0 1 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 1 Where zero means all keys have been pressed, one means OPTION and SELECT have been pressed, etc., to seven, which means no keys have been pressed. CONSOL is updated every stage two VBLANK procedure with the value eight. It is possible to use the console speaker to generate different sounds. Here is one idea based on an article in COMPUTE!, August 1981: 10 GOSUB 1000 20 TEST = USR(1536) 999 END 1000 FOR LOOP = 0 TO 26: READ BYTE: P OKE 1536 + LOOP, BYTE: NEXT LOOP : RETURN 1010 DATA 104,162,255,169,255,141,31, 208,169 1020 DATA 0,160,240,136,208,253,141,3 1,208,160 1030 DATA 240,136,208,253,202,208,233 ,96 To change the tone, you POKE 1547 and 1555 with a higher or