Remarks: One-Liners
From Maze
(Difference between revisions)
| Line 3: | Line 3: | ||
Take for example, this one-liner from the April 1985 ''RUN'' (p. 8): | Take for example, this one-liner from the April 1985 ''RUN'' (p. 8): | ||
| − | <blockquote>Sent in from a user named Larson E. Rapp: "When he's not looking, run this on a friend's VIC or C-64. Then get him to type a line or two, and watch the fun as he scrambles for his warranty." | + | <blockquote>Sent in from a user named Larson E. Rapp: "When he's not looking, run this on a friend's VIC or C-64. Then get him to type a line or two, and watch the fun as he scrambles for his warranty."</blockquote> |
| − | 10 poke207,0:poke204,0:wait198,1:geta$: print"{control rvs off}"chr$(asc(a$)+1.1*rnd(0));:goto10</blockquote> | + | <blockquote><code>10 poke207,0:poke204,0:wait198,1:geta$: print"{control rvs off}"chr$(asc(a$)+1.1*rnd(0));:goto10</code></blockquote> |
This program is similar to 10 PRINT in a few ways. It runs in an infinite loop; it also makes use of the CHR$ and RND functions. Rapp's program, however, doesn't do anything obvious when run. After running it, the cursor sits blinking as if one were in the BASIC interpreter. Typing something will (often) cause the typed characters to appear on the screen as would usually be the case, but about one time in eleven, the next character in the PETSCII sequence will appear instead. Once run, this one-liner is actually in control of keyboard input and screen output and replaces BASIC and the KERNAL as the handler of input and output. | This program is similar to 10 PRINT in a few ways. It runs in an infinite loop; it also makes use of the CHR$ and RND functions. Rapp's program, however, doesn't do anything obvious when run. After running it, the cursor sits blinking as if one were in the BASIC interpreter. Typing something will (often) cause the typed characters to appear on the screen as would usually be the case, but about one time in eleven, the next character in the PETSCII sequence will appear instead. Once run, this one-liner is actually in control of keyboard input and screen output and replaces BASIC and the KERNAL as the handler of input and output. | ||
