more explaining please :)

discussion of beeb/electron applications, languages, utils and educational s/w
duikkie
Posts: 2662
Joined: Fri Feb 07, 2014 3:28 pm

more explaining please :)

Postby duikkie » Sat Sep 02, 2017 10:31 am

BBC, Electron:
&0366 Teletext output cursor character
&0367 Font explosion flags, b1=224-255 in RAM, b7=32-63 in RAM
&0368 Font location, characters 32-63
&0369 Font location, characters 64-95
&036A Font location, characters 96-127
&036B Font location, characters 128-159
&036C Font location, characters 160-191
&036D Font location, characters 192-223
&036E Font location, characters 224-225

&036F-&037E Palette for colours 0 to 15
&037F Unused - used by some Shadow RAM systems


if we have

lda #&38
sta &0367
lda #&2b
sta &0369

??? where is b0 ?? where in ram ??
location &369 is 1 byte for char 64..95 ??

User avatar
jgharston
Posts: 2661
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield

Re: more explaining please :)

Postby jgharston » Sat Sep 02, 2017 2:56 pm

duikkie wrote:&0367 Font explosion flags, b1=224-255 in RAM, b7=32-63 in RAM
...
??? where is b0 ?? where in ram ??
There are only seven times 32 printable characters, so only seven bits of the font flag is used. Think of bit 0 as being "CHR$0-31 are in RAM" - but CHR$0-31 are not printable characters, they are control codes.
duikkie wrote:if we have
lda #&38
sta &0367
lda #&2b
sta &0369
location &369 is 1 byte for char 64..95 ??
Yes, you only need one byte to specify the high byte of a page of 256 memory locations. By doing ?&369=&2B you have specified that CHR$64-127 are in RAM at &2Bxx, ie &2B00-&2BFF.
By doing ?&367=&38 you have specified that:
b7=0 CHR$32-63 in ROM
b6=0 CHR$64-95 in ROM
b5=1 CHR$96-127 in RAM
b4=1 CHR$128-159 in RAM
b3=1 CHR$160-191 in RAM
b2=0 CHR$192-223 in ROM
b1=0 CHR$224-255 in ROM
b0=0 ignored
so you have actually specified that CHR$64-127 are in ROM. When you do a VDU 23 in the range 64-127 the ROM font will be copied to RAM at &2Bxx and then redefined by your VDU 23.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

duikkie
Posts: 2662
Joined: Fri Feb 07, 2014 3:28 pm

Re: more explaining please :)

Postby duikkie » Sat Sep 02, 2017 3:38 pm

almost i get it :) but..

why is b7 chr$32-63 was it not locial b7 224,255 ?? b0 for 0-31 vdu , b1 for 32-63 and so on ??

so &0367 is filled with the page number where to find the chr$ in ram oke then


jgharston wrote:
duikkie wrote:&0367 Font explosion flags, b1=224-255 in RAM, b7=32-63 in RAM
...
??? where is b0 ?? where in ram ??
There are only seven times 32 printable characters, so only seven bits of the font flag is used. Think of bit 0 as being "CHR$0-31 are in RAM" - but CHR$0-31 are not printable characters, they are control codes.
duikkie wrote:if we have
lda #&38
sta &0367
lda #&2b
sta &0369
location &369 is 1 byte for char 64..95 ??
Yes, you only need one byte to specify the high byte of a page of 256 memory locations. By doing ?&369=&2B you have specified that CHR$64-127 are in RAM at &2Bxx, ie &2B00-&2BFF.
By doing ?&367=&38 you have specified that:
b7=0 CHR$32-63 in ROM
b6=0 CHR$64-95 in ROM
b5=1 CHR$96-127 in RAM
b4=1 CHR$128-159 in RAM
b3=1 CHR$160-191 in RAM
b2=0 CHR$192-223 in ROM
b1=0 CHR$224-255 in ROM
b0=0 ignored
so you have actually specified that CHR$64-127 are in ROM. When you do a VDU 23 in the range 64-127 the ROM font will be copied to RAM at &2Bxx and then redefined by your VDU 23.

User avatar
jgharston
Posts: 2661
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield

Re: more explaining please :)

Postby jgharston » Sat Sep 02, 2017 6:18 pm

duikkie wrote:almost i get it :) but..
why is b7 chr$32-63 was it not locial b7 224,255 ?? b0 for 0-31 vdu , b1 for 32-63 and so on ??
Probably to save a few bytes in the ROM code. The font bitmap table is the same table as the 4-colour screenmode pixel map.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_


Return to “software: other”

Who is online

Users browsing this forum: No registered users and 2 guests