[Coco] Example basic code for screen grid

haywire666 at aol.com haywire666 at aol.com
Thu Feb 23 23:38:52 EST 2012


Andrew, yes it works. Thats almost exactly what I need but I need no white outline around the grid and 
I need about 1/4 of the squares as you have here. Like it needs to be about 1/4 of the squares and bigger.


I'll play with this and see what I can do. Thanks so much thats pretty impressive you did that from memory!

Also, Can I get this to be black bordered instead of white bordered?


Thanks so much for a fantastic program!


This is for an idea I have for home automation using the coco. The screen will be attached to a board that sits in front of
the monitor and has photocells. To turn something on, the square on the screen corresponding to each photocell can be turned
on (white) or off (black)


Any help getting this program to be black bordered and larger squares would be great appreciated! I think 64 squares total on 
the screen would be all I can get with the size or average small photocells. I really want to get this to work I'm sure I can build all the 
photocell circuits but the software side, I've been away from coco too long!

Steven



-----Original Message-----
From: Bill <cwgordon at carolina.rr.com>
To: 'CoCoList for Color Computer Enthusiasts' <coco at maltedmedia.com>
Sent: Thu, Feb 23, 2012 11:01 pm
Subject: Re: [Coco] Example basic code for screen grid


I ran it on VCC, and it works fine.

-----Original Message-----
From: coco-bounces at maltedmedia.com [mailto:coco-bounces at maltedmedia.com] On
Behalf Of Andrew
Sent: Thursday, February 23, 2012 10:41 PM
To: coco at maltedmedia.com
Subject: Re: [Coco] Example basic code for screen grid

Ok - this is going completely from memory, plus a little help from the 
CoCo 3 Extended Basic manual - but it should give you a start:

10 PMODE 4,1
20 PCLS
30 SCREEN 1,1
40 FOR Y=0 TO 191 STEP 8
50 FOR X=0 TO 255 STEP 8
60 REM LINE(X,Y)-(X+8,Y+8),PSET,BF: REM FILLED WITH WHITE
70 REM LINE(X,Y)-(X+8,Y+8),PRESET,BF: REM FILLED WITH BLACK
80 LINE(X,Y)-(X+8,Y+8),PSET,B: REM UNFILLED (WHITE GRID)
90 NEXT X
100 NEXT Y
110 GOTO 110

I don't know if it works; I don't have an emulator or my machine set 
up... :(

Andrew L. Ayers
Glendale, Arizona


On 02/23/2012 12:54 PM, coco-request at maltedmedia.com wrote:
> Message: 10
> Date: Thu, 23 Feb 2012 14:34:40 -0500 (EST)
> From:haywire666 at aol.com
> Subject: [Coco] Example basic code for screen grid.
> To:coco at maltedmedia.com
> Message-ID:<8CEC079522B4E51-E74-563D4 at webmail-d100.sysops.aol.com>
> Content-Type: text/plain; charset="us-ascii"
>
> I need some example code in basic for coloring the screen black, then
creating a grid of sorts where I can turn
> some parts of the screen white or back to black...
>
>
> Ideally this should work on a coco1,2, or 3 because I may just use a coco2
for this hardware project of sorts.
>
>
> I've been away from cocos for very long, so I'm still struggling to get
what I want, which would be small squares
> on a grid of sorts turning from black to white. I need to control the dots
on the grid individually. They would all normally be
> black but white would be "on" for my purposes.
>
>
> Any suggestions of advice, I'm all ears... Ideally, I'd like a grid with
24 or so squares I could turn from black to white and vice versa.
>
>
> Best regards,
>
> Steven

--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco


--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco

 



More information about the Coco mailing list