The Great Program Collage

Basic and Machine Language

Moderator: Moderators

User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

The Great Program Collage

Post by Jeff-20 »

Feel free to add a single line to the program collage. Who knows maybe it'll turn out to be a game or something interesting. I have no direction or intentions.

Just try not to crash it. You can add one line only. You may add as many as you like to the whole program, but only one at a time (you can't add two consecutive lines). You cannot alter previous lines unless there's an apparent error. Repost the entire code with your additional line.

Note: Assume this will run on an unexpanded system

Code: Select all

0 DIM A(32), B(12), C, D, A$: S=36878: POKE S,15: X=7680: Q=8: REM DENIAL COLLAGE 2009

[insert your line here]

High Scores, Links, and Jeff's Basic Games page.
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

:D Cool idea!

Code: Select all


0 dim a(32), b(12), c, d, a$: s=36878: poke s,15: x=7680: q=8: rem denial collage 2009
10 poke36879,8:print"{clr home}":forc=200to250:poke36875,c:poke36875,400-c: next:poke36875,0

[insert your line here]
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
User avatar
Mike
Herr VC
Posts: 4843
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Adding a colourful swarm of birds ...

Code: Select all

0 dim a(32), b(12), c, d, a$: s=36878: poke s,15: x=7680: q=8: rem denial collage 2009
10 poke36879,8:print"{clr home}":forc=200to250:poke36875,c:poke36875,400-c: next:poke36875,0
15 fort=1to1000:printmid$("{blk,wht,red,cyn,pur,grn,blu,yel}",int(rnd(1)*8)+1,1)"{shift-u,shift-q,shift-i,shift-j,shift-q,shift-k}";:next
[insert your line here]
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

You guys are far too nice. :D

Code: Select all

0 dim a(32), b(12), c, d, a$: s=36878: poke s,15: x=7680: q=8: rem denial collage 2009
10 poke36879,8:print"{clr home}":forc=200to250:poke36875,c:poke36875,400-c: next:poke36875,0
15 fort=1to1000:printmid$("{blk,wht,red,cyn,pur,grn,blu,yel}",int(rnd(1)*8)+1,1)"{shift-u,shift-q,shift-i,shift-j,shift-q,shift-k}";:next
20 for t=0to23: read v: poke7168+t,v: next: sys 7168: gosub 40: if e=3 then10 

[insert your line here]
hehehe, work with that! :lol:

Also, your line doesn't need to come at the end; you can also insert a line where space is available.
High Scores, Links, and Jeff's Basic Games page.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Code: Select all

0 dim a(32), b(12), c, d, a$: s=36878: poke s,15: x=7680: q=8: rem denial collage 2009
10 poke36879,8:print"{clr home}":forc=200to250:poke36875,c:poke36875,400-c: next:poke36875,0
15 fort=1to1000:printmid$("{blk,wht,red,cyn,pur,grn,blu,yel}",int(rnd(1)*8)+1,1)"{shift-u,shift-q,shift-i,shift-j,shift-q,shift-k}";:next
20 for t=0to23: read v: poke7168+t,v: next: sys 7168: gosub 40: if e=3 then10 

5 data169,127,141,34,145,173,32,145,10,173,17,145,73,255,41,60,176,2,105,2,74,133,254,96

[insert your line here]
You may need to use the abbreviation D + SHIFT-A to enter that line, but it will fit!

Hint for the next contributor: PEEK(254)
Anders Carlsson

Image Image Image Image Image
User avatar
Mike
Herr VC
Posts: 4843
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Code: Select all

0 dim a(32), b(12), c, d, a$: s=36878: poke s,15: x=7680: q=8: rem denial collage 2009 
5 data169,127,141,34,145,173,32,145,10,173,17,145,73,255,41,60,176,2,105,2,74,133,254,96 
10 poke36879,8:print"{clr home}":forc=200to250:poke36875,c:poke36875,400-c: next:poke36875,0 
15 fort=1to1000:printmid$("{blk,wht,red,cyn,pur,grn,blu,yel}",int(rnd(1)*8)+1,1)"{shift-u,shift-q,shift-i,shift-j,shift-q,shift-k}";:next 
20 for t=0to23: read v: poke7168+t,v: next: sys 7168: gosub 40: if e=3 then10 
40 ifq=8thenpoke37154,255:e=peek(254):q=0:return

[insert your line here]
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Code: Select all

0 dim a(32), b(12), c, d, a$: s=36878: poke s,15: x=7680: q=8: rem denial collage 2009 
5 data169,127,141,34,145,173,32,145,10,173,17,145,73,255,41,60,176,2,105,2,74,133,254,96 
10 poke36879,8:print"{clr home}":forc=200to250:poke36875,c:poke36875,400-c: next:poke36875,0 
15 fort=1to1000:printmid$("{blk,wht,red,cyn,pur,grn,blu,yel}",int(rnd(1)*8)+1,1)"{shift-u,shift-q,shift-i,shift-j,shift-q,shift-k}";:next 
20 for t=0to23: read v: poke7168+t,v: next: sys 7168: gosub 40: if e=3 then10
40 ifq=8thenpoke37154,255:e=peek(254):q=0:return

22 d=c+sgn(eand1)-sgn(eand2)*22+sgn(eand4)*22-sgn(eand8):if d>=0 and d<506 then c=d 
[insert your line here]
A discipline question: should the newest line always go at the end, and the next editor gets to sort it into the listing? I think it adds clarity what was added, in particular as I twice injected a line in the middle of others.
Anders Carlsson

Image Image Image Image Image
User avatar
Mike
Herr VC
Posts: 4843
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Code: Select all

0 dim a(32), b(12), c, d, a$: s=36878: poke s,15: x=7680: q=8: rem denial collage 2009 
5 data169,127,141,34,145,173,32,145,10,173,17,145,73,255,41,60,176,2,105,2,74,133,254,96 
10 poke36879,8:print"{clr home}":forc=200to250:poke36875,c:poke36875,400-c: next:poke36875,0 
15 fort=1to1000:printmid$("{blk,wht,red,cyn,pur,grn,blu,yel}",int(rnd(1)*8)+1,1)"{shift-u,shift-q,shift-i,shift-j,shift-q,shift-k}";:next 
20 for t=0to23: read v: poke7168+t,v: next: sys 7168: gosub 40: if e=3 then10
22 d=c+sgn(eand1)-sgn(eand2)*22+sgn(eand4)*22-sgn(eand8):if d>=0 and d<506 then c=d 
40 ifq=8thenpoke37154,255:e=peek(254):q=0:return

27 pokes-2,200:pokes-2,0:ifpeek(x+c)<>81thenpokex+c,36:onint(rnd(1)*3)gosub100,200
[insert your line here]
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

carlsson wrote:A discipline question: should the newest line always go at the end, and the next editor gets to sort it into the listing? I think it adds clarity what was added, in particular as I twice injected a line in the middle of others.
Yep. I can't wait to run this thing! I barely know what's going on now. But I'm just going to keep adding stuff. I encourage all to do the same regardless of your programming confidence. :lol:

Line 15 keeps me from just pasting it into VICE. Also, be sure not to go over the 88 character limit. :)
High Scores, Links, and Jeff's Basic Games page.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Code: Select all

0 dim a(32), b(12), c, d, a$: s=36878: poke s,15: x=7680: q=8: rem denial collage 2009 
5 data169,127,141,34,145,173,32,145,10,173,17,145,73,255,41,60,176,2,105,2,74,133,254,96 
10 poke36879,8:print"{clr home}":forc=200to250:poke36875,c:poke36875,400-c: next:poke36875,0 
15 fort=1to1000:printmid$("{blk,wht,red,cyn,pur,grn,blu,yel}",int(rnd(1)*8)+1,1)"{shift-u,shift-q,shift-i,shift-j,shift-q,shift-k}";:next 
20 for t=0to23: read v: poke7168+t,v: next: sys 7168: gosub 40: if e=3 then10
22 d=c+sgn(eand1)-sgn(eand2)*22+sgn(eand4)*22-sgn(eand8):if d>=0 and d<506 then c=d 
27 pokes-2,200:pokes-2,0:ifpeek(x+c)<>81thenpokex+c,36:onint(rnd(1)*3)gosub100,200
40 ifq=8thenpoke37154,255:e=peek(254):q=0:return

200 d=c-int(c/22)*22:fori=0to22:pokex+d+i*22,160:next
[insert your line here]
If this doesn't turn out as spaghetti code, nothing will! :lol:
Anders Carlsson

Image Image Image Image Image
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

What if two people started writing a new line at the same time? How about this simple ticket/queue system: If you want to add a line to the program, post a reply with just the words "MY TURN". After that, instead of making a new post, just edit that "MY TURN" post into a new post with your new program change. And if you see that someone has posted "MY TURN" before you, then you just have to wait until he is finished. You have to check this before you press the Edit button for your "MY TURN" post.
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

And if you see a "MY TURN" post and want to be the next in line, you can of course just post a "MY TURN" and wait...
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
User avatar
Schema
factor
Posts: 1430
Joined: Tue Mar 23, 2004 7:07 am
Website: http://www.jammingsignal.com
Location: Toronto, Ontario

Post by Schema »

Boray wrote:What if two people started writing a new line at the same time?
You guys should try this using EtherPad or similar: http://etherpad.com/
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

Boray wrote:What if two people started writing a new line at the same time?
As long as the line numbers don't conflict, there shouldn't be a problem. Otherwise, we just change the line number. :lol:

We don't really have a clear goal. I now think we should've kept everything nice and linear. I have little idea what's going on in the code already! haha
High Scores, Links, and Jeff's Basic Games page.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Do you want a summary, approximately what is going on? At least it seems Mike and me are quite on track, although I suppose neither of us have a clue how to bring it all home.
Anders Carlsson

Image Image Image Image Image
Post Reply