Remarks: One-Liners
From Maze
(Difference between revisions)
| Line 1: | Line 1: | ||
| − | One-liners such as 10Print are curt, minimal BASIC programs written to illustrate, represent, and express ideas. Due to their brevity, they must often exploit resources which exist in the underlying platform. For example, 10Print relies on graphical images called PETSCII contained in the ROMs of the Commodore computers. The single line of code itself contains no data pertaining to the curves or pixels comprising the / and \ images. 10Print merely uses the numbers 205.5 and .5 to refer to characters number 205 and 206. Those two numbers are indexes into the "block graphics set" which the 8-bit home computers used to draw simple graphics. This feature, common to the Commodore video display hardware and many other platforms, but not the original Dartmouth BASIC system, kept the program very short. | + | One-liners such as 10 PRINT are curt, minimal BASIC programs written to illustrate, represent, and express ideas. Due to their brevity, they must often exploit resources which exist in the underlying platform. For example, 10 PRINT relies on graphical images called PETSCII contained in the ROMs of the Commodore computers. The single line of code itself contains no data pertaining to the curves or pixels comprising the / and \ images. 10Print merely uses the numbers 205.5 and .5 to refer to characters number 205 and 206. Those two numbers are indexes into the "block graphics set" which the 8-bit home computers used to draw simple graphics. This feature, common to the Commodore video display hardware and many other platforms, but not the original Dartmouth BASIC system, kept the program very short. |
*Icicle Storm | *Icicle Storm | ||
| Line 5: | Line 5: | ||
Block graphics sets - such as the non-typographic / and \ symbols used in 10Print - have collectively allowed a non-alphabetic visual vocabulary to flourish, one capable of representing emotions, stick-figures, space travel, balance sheets, graphical window systems. | Block graphics sets - such as the non-typographic / and \ symbols used in 10Print - have collectively allowed a non-alphabetic visual vocabulary to flourish, one capable of representing emotions, stick-figures, space travel, balance sheets, graphical window systems. | ||
| − | In one-liners, sometimes symbols are interpreted as the subject of the story. For example, in this variation on 10Print, one of the slanted symbols is reinvoked, this time to represent an icicle, an illusion which takes some imagination and relies on the default color scheme of the BASIC environment (light blue ice crystals against a dark, foreboding azure, dusk sky) and a synthetic interpretation of movement: | + | In one-liners, sometimes symbols are interpreted as the subject of the story. For example, in this variation on 10 PRINT, one of the slanted symbols is reinvoked, this time to represent an icicle, an illusion which takes some imagination and relies on the default color scheme of the BASIC environment (light blue ice crystals against a dark, foreboding azure, dusk sky) and a synthetic interpretation of movement: |
10 poke 1024+rnd(1)*1000,78: goto 10 | 10 poke 1024+rnd(1)*1000,78: goto 10 | ||
| Line 31: | Line 31: | ||
*Random SID Tones | *Random SID Tones | ||
| − | As noted elsewhere, the BASIC included with the Commodore 64 included no specific commands such as PLOT and SOUND for controlling the video and sound hardware. As a result, simple sound programs, such as an audio equivalent of 10Print, which plays a juxtaposition of alternating tones balanced evenly between two opposing piano notes is much longer than one line. This is partially because, as seen in line 20, the program must supply or perform its own calculations to create, the additional data pertaining to the desired note. It is not possible, as in the case of 10Print, and other one-liners like Icicle Storm, to supply an index into a reserve of information. | + | As noted elsewhere, the BASIC included with the Commodore 64 included no specific commands such as PLOT and SOUND for controlling the video and sound hardware. As a result, simple sound programs, such as an audio equivalent of 10 PRINT, which plays a juxtaposition of alternating tones balanced evenly between two opposing piano notes is much longer than one line. This is partially because, as seen in line 20, the program must supply or perform its own calculations to create, the additional data pertaining to the desired note. It is not possible, as in the case of 10 PRINT, and other one-liners like Icicle Storm, to supply an index into a reserve of information. |
10 poke 54296,15:poke 54277,190:poke 54278,248 | 10 poke 54296,15:poke 54277,190:poke 54278,248 | ||
| Line 45: | Line 45: | ||
| − | |||
Another way to go about probing the capabilities of complex chips like the Commodore 64's VIC-II and SID registers is to simply write random values to them. IN THE CASE OF THE VIDEO CHIP THIS MAY BE UNSAFE. According to the Programmer's Reference Manual certain values must not be altered, but you may safely try it in an emulator. | Another way to go about probing the capabilities of complex chips like the Commodore 64's VIC-II and SID registers is to simply write random values to them. IN THE CASE OF THE VIDEO CHIP THIS MAY BE UNSAFE. According to the Programmer's Reference Manual certain values must not be altered, but you may safely try it in an emulator. | ||
