10 PRINT CHR$(205.5+RND(1)); : GOTO 10
-
- Vic 20 Amateur
- Posts: 54
- Joined: Sat May 20, 2006 12:11 pm
- Website: https://www.youtube.com/watch?v=NX1bTh8DqNQ
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
I am not sure who of you had noticed this book "10 PRINT CHR$(205.5+RND(1)); : GOTO 10", which is roughly 300 pages about a single (!) line of code..
You can download it here: http://10print.org/
Whilst the book is primarily about the Commodore 64 and has an ostentatiously academic overtone, some of the sections are fun to browse through:
- the code (which also nicely runs on the VIC-20) and its variations in other 8bit BASIC dialects
- a lengthy section on BASIC and its background
- why the code is hard to write for an Atari VCS
- some 6502 machine code
What do you make of it?
You can download it here: http://10print.org/
Whilst the book is primarily about the Commodore 64 and has an ostentatiously academic overtone, some of the sections are fun to browse through:
- the code (which also nicely runs on the VIC-20) and its variations in other 8bit BASIC dialects
- a lengthy section on BASIC and its background
- why the code is hard to write for an Atari VCS
- some 6502 machine code
What do you make of it?
The output looks a lot prettier on a Vic-20.
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
I laughed when I saw this a few days ago.
The code is only slightly modified version of a 3 or 4 line program right out of the VIC-20 user manual.
As memory serves the program was called "Random Maze" and it actually used a random statement to generate a 0 or a 1. Then it used two IF statements to decide which CHR$ to print. At least, that is how I remember it. And yes, it looks better on the VIC-20 than the C64 due to the differences in the font.
The code is only slightly modified version of a 3 or 4 line program right out of the VIC-20 user manual.
As memory serves the program was called "Random Maze" and it actually used a random statement to generate a 0 or a 1. Then it used two IF statements to decide which CHR$ to print. At least, that is how I remember it. And yes, it looks better on the VIC-20 than the C64 due to the differences in the font.
They made the whole character set thicker on the c64. Probably to "hide" some of the artifacts from using higher resolution. (As discussed here: http://sleepingelephant.com/ipw-web/bul ... 7&start=15 ). There are actually duplicate characters in the c64 character set because of this. Lines on different positions on the vic-20/pet ends up as same position thicker line on the c64.orion70 wrote:I wonder why the diagonal characters in C64 do not merge - 3D mazes look awful!
Last edited by Boray on Wed Dec 05, 2012 2:06 pm, edited 1 time in total.
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
-
- Vic 20 Amateur
- Posts: 54
- Joined: Sat May 20, 2006 12:11 pm
- Website: https://www.youtube.com/watch?v=NX1bTh8DqNQ
Someone could probably write a 600 page book about a single dot as well.
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
- Kweepa
- Vic 20 Scientist
- Posts: 1315
- Joined: Fri Jan 04, 2008 5:11 pm
- Location: Austin, Texas
- Occupation: Game maker
Well, the code is just a kicking off point for a bunch of discussions about programming, mazes, etc.
It goes off the rails a bit in my opinion when discussing the 2600 port of the line - although I appreciate that they were geeky enough to do a 2600 port, I feel that it's there mostly because they like the 2600 and not because it's relevant to the discussion.
600 pages about a dot? No problem. A discussion of displaying a dot on various computers and display devices. There you go.
It goes off the rails a bit in my opinion when discussing the 2600 port of the line - although I appreciate that they were geeky enough to do a 2600 port, I feel that it's there mostly because they like the 2600 and not because it's relevant to the discussion.
600 pages about a dot? No problem. A discussion of displaying a dot on various computers and display devices. There you go.
I created a somewhat faster routine and actually creates more interesting patterns.
Code: Select all
10 A=162
20 PRINT CHR$(205+PEEK(A)AND1));:GOTO 20
?SYNTAXadric22 wrote:I created a somewhat faster routine and actually creates more interesting patterns.
Code: Select all
10 A=162 20 PRINT CHR$(205+PEEK(A)AND1));:GOTO 20
ERROR IN 20
READY.
Ray..
- Mayhem
- High Bidder
- Posts: 3028
- Joined: Mon May 24, 2004 7:03 am
- Website: http://www.mayhem64.co.uk
- Location: London
How about this one then?
Code: Select all
0 print"{clr}M";:fort=1to126:print"MNMM";:next
1 goto1
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)