[Coco] Example basic code for screen grid

mike delyea mdelyea at gmail.com
Fri Feb 24 13:07:34 EST 2012


The print@ grid is numbered from 0 to 511. So, print at 0 would be the upper
left hand corner of the screen.  Print at 31 would be the upper right of the
screen.  Print at 480 would be the lower left and print at 511 is the lower
right.  I think if you print anything in 511 it will scroll the screen so
I'd avoid using that position - 510 is ok though.  I believe all of the
coco manuals have a map of the grid in the back few pages but its easy
enough to figure out or mark on graph paper.
Thanks to Darren for the screen memory location.  Poking a 32 (32 is a
space) into location 1024 would put a green character in the upper left,
poking 32 into location 1535 would give you the same thing in the lower
right.

10 cls0
20 poke 1024,32: rem space character
30 poke 1535,32: rem space character
40 goto 40: rem keep screen from scrolling

is essentially the same as:

10 cls0
20 print at 0,chr$(32);: rem space character
30 print at 511,chr$(32);: rem space character
40 goto 40: rem hopefully this will keep the screen from scrolling - maybe
not though

Note the use of the semicolon in the second example - this is absolutely
essential for what you want.  try it without the semicolon to see what I
mean.  You can use any of the chr$() characters to light up the screen.  To
see what they are type this in.

10 cls
20 for x=32 to 255
30 print x;" ";chr$(x),
40 next x

You should avoid using characters below 32 as some of them will make your
computer do funny things.

On Fri, Feb 24, 2012 at 8:25 AM, Darren A <mechacoco at gmail.com> wrote:

> On Fri, Feb 24, 2012 at 12:43 AM, mike del yea wrote:
> >
> > ...
> >
> > I'd use the text screen rather than a semigraphics screen because the
> coco
> > 3 can't use the semigraphics screen.
> >
>
> By semigraphics screen, I meant the text screen.  Any byte value
> greater than 127 poked into the text screen uses the semigraphics4
> mode.  And yes, this does work on a CoCo 3.
>
> The screen addresses range from 1024 to 1535.  Poke values of 128 for
> black or 207 for white.  You can also construct larger "graphic"
> strings with CHR$ and/or STRING$ and print them to the screen much
> faster.
>
> Darren
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>



More information about the Coco mailing list