Setting a pixel on the screen

View: New views
11 Messages — Rating Filter:   Alert me  

Setting a pixel on the screen

by Jason Kemp-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Good evening all,

I have been attempting to set a pixel on the screen to white.  Please
show me what I am doing wrong:

: ohno show black screen ffff 400 400 1024 * + 2* 1e80000 + ! keyboard ;

Only the ffff and the 1e80000 are in hex.  The screen is 1024x768,
16-bit, VESA 117h.

Thanks,
Jason



---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@...
For additional commands, e-mail: colorforth-help@...
Main web page - http://www.colorforth.com


Re: Setting a pixel on the screen

by Ray St. Marie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, May 20, 2008 at 4:41 PM, Jason Kemp <jason.kemp@...> wrote:

> Good evening all,
>
> I have been attempting to set a pixel on the screen to white.  Please show
> me what I am doing wrong:
>
> : ohno show black screen ffff 400 400 1024 * + 2* 1e80000 + ! keyboard ;
>
> Only the ffff and the 1e80000 are in hex.  The screen is 1024x768, 16-bit,
> VESA 117h.
>
> Thanks,
> Jason
>

Hi Jason,

Have you considered setting the color to white? I suppose that is what
you are doing with all what you have there but...

I use the included BOX or LINE for such things.
For instantce:

pixlin blue 350 350 at 0 1 line 350 351 at 0 1 line ;
pixbox white 400 400 at 402 402 box ;
ok show blank pixlin pixbox keyboard ;

( current block number ) load ok

should see two white pix on the screen.

To use box : set AT at the position and then feed box the lower right
corner of the box boundry.

To use line : set AT at the position and then feed line the "how many
pixels left of x ( an offset left of x ) and the length of the line.

Charles Childers of Retroforth fame, and the gracious host of
colorforthray.info is in the throws of developing a community site for
colorforth that will make it easier for me and whom ever, to share the
actual block code with the world.

When he's finished, I'll share my paper on using colorforth-IBL (
Icons boxes and lines ) , in other words the included graphics set.
I've drawn a few interesting things just by combining line with
for/next loops to make all sorts of shapes shy of curves.

Chuckbot is done entirely with icons and boxes.

As to making curves, well circles really, I'll disect Howerd Oakfords
work in cfdos# where # is 1 thru 4.


Of course this doesn't address what you really want to do, which is to
edit the framebuffer directly. I can not see a reason why you can't.
Also, being able to edit a graphics card directly ( which I believe
Chuck is doing to display his tre-D images of his chips) would be cool
also. The hints as to how to do this is in the kernel section at the
labels marked for LINE and BOX. Icons uses box to do everything.

The PNG appy does do like you have done above:

1024 * + 2* 1e80000 +
 IS the definition of AT. So you are not very far off.

Are you sure your colors are right. I was thinking that white was
ffffff but if you are using a system that doesn't included the 5:6:5
routine then white is ffff. You might try to make the pixel big first,
as I have done above so as to locate it on the screen. I had a real
hard time finding one pixel even on my 36" diag monitor. ( well it's
only 800x600 rendering 1024x768 ( doesn't work for the native, in that
case I have to use my 19in and I hot swap them often, but I can force
it down in windows with out lossage) )

At this point i'm thinking your code should have worked.

:-) your mail-age may vary.

Ray, half asleep and outie

--
Raymond St. Marie ii,
colorforthray.info

---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@...
For additional commands, e-mail: colorforth-help@...
Main web page - http://www.colorforth.com


Re: Setting a pixel on the screen

by Ray St. Marie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, May 21, 2008 at 12:37 AM, Ray St. Marie <ray.stmarie@...> wrote:

> On Tue, May 20, 2008 at 4:41 PM, Jason Kemp <jason.kemp@...> wrote:
>> Good evening all,
>>
>> I have been attempting to set a pixel on the screen to white.  Please show
>> me what I am doing wrong:
>>
>> : ohno show black screen ffff 400 400 1024 * + 2* 1e80000 + ! keyboard ;
>>
>> Only the ffff and the 1e80000 are in hex.  The screen is 1024x768, 16-bit,
>> VESA 117h.
>

D'oh you did say 4117vesa. so yes your whites are ffff as well you know.

This makes me wonder about shareing code between colorforthers. We are
branching the ( was block 30 with colors on it and in the new it is
26) colors and code for one system will not work for the other with
out re-writeing.

This could all be repaired if the 16bit systems used the 5:6:5 routine
to make the colors conguent between all systems.

This is a kernel routine and makes the 32bit color patterns in
old30/new26 block work in systems that use 16bit color information.

This issue won't come to a head until we begin really sharing code by
upload/download to the colorforth systems rather the re-writes.

Ray
(someone hit the snooze)


--
Raymond St. Marie ii,
colorforthray.info

---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@...
For additional commands, e-mail: colorforth-help@...
Main web page - http://www.colorforth.com


Re: Setting a pixel on the screen

by Ray St. Marie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

rethinking my previous post to this question...
Hi Jason,
Ray here

On Tue, May 20, 2008 at 4:41 PM, Jason Kemp <jason.kemp@...> wrote:

> Good evening all,
>
> I have been attempting to set a pixel on the screen to white.  Please show
> me what I am doing wrong:
>
> : ohno show black screen ffff 400 400 1024 * + 2* 1e80000 + ! keyboard ;>
> Only the ffff and the 1e80000 are in hex.  The screen is 1024x768, 16-bit,
> VESA 117h.
>
> Thanks,
> Jason
>

Jason, have you tried the word color after ffff, to set the color, as in...

: ohno show black screen ffff COLOR 400 400 1024 * + 2* 1e80000 + ! keyboard ;

I happened to be looking in an old source and reading the word SWITCH.
In the top of the word we see an example of writeing to AGP before
switching to keyboard.

Karig has a nice look at it :

http://www.karig.net/os/cf/g.htm

Halfway down the page. All of the rest of that page are examples of
'emit'ing pixels to the page.

Good luck with this, Jason. Please keep me in the loop, your
experiments, as I'd like to try them out as well. :-)

All the best,
Ray

--
Raymond St. Marie ii,
colorforthray.info

---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@...
For additional commands, e-mail: colorforth-help@...
Main web page - http://www.colorforth.com


Re: Setting a pixel on the screen

by Jason Kemp-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Ray,

Thanks for all the encouragement.  I cracked it on Friday and was
intending to reply, but I'm trying not to touch the computer over the
weekends now and Monday was a bank holiday too!

: pixel show black screen ffff 400 400 1024 * + 2* 1e80000 + 2/ 2/ !
keyboard ;

It needs a 2/ 2/ because ! multiplies the address it is given by 4.  
This must be something to do with addressing doublewords as opposed to
bytes--I'm sure it's something quite obvious to most but it's taking me
a long time to build up a picture of what's going on here.  Are
addresses in colorforth stored as the count of doublewords rather than a
true address?

Jason




Ray St. Marie said the following on 27/05/2008 20:23:

> rethinking my previous post to this question...
> Hi Jason,
> Ray here
>
> On Tue, May 20, 2008 at 4:41 PM, Jason Kemp <jason.kemp@...> wrote:
>  
>> Good evening all,
>>
>> I have been attempting to set a pixel on the screen to white.  Please show
>> me what I am doing wrong:
>>
>> : ohno show black screen ffff 400 400 1024 * + 2* 1e80000 + ! keyboard ;>
>> Only the ffff and the 1e80000 are in hex.  The screen is 1024x768, 16-bit,
>> VESA 117h.
>>
>> Thanks,
>> Jason
>>
>>    
>
> Jason, have you tried the word color after ffff, to set the color, as in...
>
> : ohno show black screen ffff COLOR 400 400 1024 * + 2* 1e80000 + ! keyboard ;
>
> I happened to be looking in an old source and reading the word SWITCH.
> In the top of the word we see an example of writeing to AGP before
> switching to keyboard.
>
> Karig has a nice look at it :
>
> http://www.karig.net/os/cf/g.htm
>
> Halfway down the page. All of the rest of that page are examples of
> 'emit'ing pixels to the page.
>
> Good luck with this, Jason. Please keep me in the loop, your
> experiments, as I'd like to try them out as well. :-)
>
> All the best,
> Ray
>
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@...
For additional commands, e-mail: colorforth-help@...
Main web page - http://www.colorforth.com


Re: Setting a pixel on the screen

by Jason Kemp-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

...And that's not right because ! stores a double word and I only want a
word (16 bit colour).

Block 34 (icons) has !w which stores a 16 bit word to a byte address.  
That's what I need instead of 2/ 2/ !

Also, on http://www.colorforth.com/forth.html it is stated "Data are
addressed as 32-bit words, not bytes."  I'm not fully clear on how this
works so I need to look harder.

Jason Kemp said the following on 28/05/2008 11:27:

> Hi Ray,
>
> Thanks for all the encouragement.  I cracked it on Friday and was
> intending to reply, but I'm trying not to touch the computer over the
> weekends now and Monday was a bank holiday too!
>
> : pixel show black screen ffff 400 400 1024 * + 2* 1e80000 + 2/ 2/ !
> keyboard ;
>
> It needs a 2/ 2/ because ! multiplies the address it is given by 4.  
> This must be something to do with addressing doublewords as opposed to
> bytes--I'm sure it's something quite obvious to most but it's taking
> me a long time to build up a picture of what's going on here.  Are
> addresses in colorforth stored as the count of doublewords rather than
> a true address?
>
> Jason
>
>
>
>
> Ray St. Marie said the following on 27/05/2008 20:23:
>> rethinking my previous post to this question...
>> Hi Jason,
>> Ray here
>>
>> On Tue, May 20, 2008 at 4:41 PM, Jason Kemp
>> <jason.kemp@...> wrote:
>>  
>>> Good evening all,
>>>
>>> I have been attempting to set a pixel on the screen to white.  
>>> Please show
>>> me what I am doing wrong:
>>>
>>> : ohno show black screen ffff 400 400 1024 * + 2* 1e80000 + !
>>> keyboard ;>
>>> Only the ffff and the 1e80000 are in hex.  The screen is 1024x768,
>>> 16-bit,
>>> VESA 117h.
>>>
>>> Thanks,
>>> Jason
>>>
>>>    
>>
>> Jason, have you tried the word color after ffff, to set the color, as
>> in...
>>
>> : ohno show black screen ffff COLOR 400 400 1024 * + 2* 1e80000 + !
>> keyboard ;
>>
>> I happened to be looking in an old source and reading the word SWITCH.
>> In the top of the word we see an example of writeing to AGP before
>> switching to keyboard.
>>
>> Karig has a nice look at it :
>>
>> http://www.karig.net/os/cf/g.htm
>>
>> Halfway down the page. All of the rest of that page are examples of
>> 'emit'ing pixels to the page.
>>
>> Good luck with this, Jason. Please keep me in the loop, your
>> experiments, as I'd like to try them out as well. :-)
>>
>> All the best,
>> Ray
>>
>>  
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: colorforth-unsubscribe@...
> For additional commands, e-mail: colorforth-help@...
> Main web page - http://www.colorforth.com
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@...
For additional commands, e-mail: colorforth-help@...
Main web page - http://www.colorforth.com


Re: Setting a pixel on the screen

by Ray St. Marie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ya, gosh, how many programs do I use this! Several! It's funny cuz
i've never not done it. It's Byte addressing, Please notice that you
are just setting things up with the 2 leftshifts so that the
definitions for ! and @ which include the definition   a,  ( defined
as 2* 2* ) which will return you back to word addressing. I suppose
this is for Chuck and for ease of use.

Your guess is better then mine. :-)

On Wed, May 28, 2008 at 7:01 AM, Jason Kemp <jason.kemp@...> wrote:

> ...And that's not right because ! stores a double word and I only want a
> word (16 bit colour).
>
> Block 34 (icons) has !w which stores a 16 bit word to a byte address.
>  That's what I need instead of 2/ 2/ !
>
> Also, on http://www.colorforth.com/forth.html it is stated "Data are
> addressed as 32-bit words, not bytes."  I'm not fully clear on how this
> works so I need to look harder.
>
> Jason Kemp said the following on 28/05/2008 11:27:
>>
>> Hi Ray,
>>
>> Thanks for all the encouragement.  I cracked it on Friday and was
>> intending to reply, but I'm trying not to touch the computer over the
>> weekends now and Monday was a bank holiday too!
>>
>> : pixel show black screen ffff 400 400 1024 * + 2* 1e80000 + 2/ 2/ !
>> keyboard ;
>>
>> It needs a 2/ 2/ because ! multiplies the address it is given by 4.  This
>> must be something to do with addressing doublewords as opposed to bytes--I'm
>> sure it's something quite obvious to most but it's taking me a long time to
>> build up a picture of what's going on here.  Are addresses in colorforth
>> stored as the count of doublewords rather than a true address?
>>
>> Jason
>>
>>
>>
>>
>> Ray St. Marie said the following on 27/05/2008 20:23:
>>>
>>> rethinking my previous post to this question...
>>> Hi Jason,
>>> Ray here
>>>
>>> On Tue, May 20, 2008 at 4:41 PM, Jason Kemp <jason.kemp@...>
>>> wrote:
>>>
>>>>
>>>> Good evening all,
>>>>
>>>> I have been attempting to set a pixel on the screen to white.  Please
>>>> show
>>>> me what I am doing wrong:
>>>>
>>>> : ohno show black screen ffff 400 400 1024 * + 2* 1e80000 + ! keyboard
>>>> ;>
>>>> Only the ffff and the 1e80000 are in hex.  The screen is 1024x768,
>>>> 16-bit,
>>>> VESA 117h.
>>>>
>>>> Thanks,
>>>> Jason
>>>>
>>>>
>>>
>>> Jason, have you tried the word color after ffff, to set the color, as
>>> in...
>>>
>>> : ohno show black screen ffff COLOR 400 400 1024 * + 2* 1e80000 + !
>>> keyboard ;
>>>
>>> I happened to be looking in an old source and reading the word SWITCH.
>>> In the top of the word we see an example of writeing to AGP before
>>> switching to keyboard.
>>>
>>> Karig has a nice look at it :
>>>
>>> http://www.karig.net/os/cf/g.htm
>>>
>>> Halfway down the page. All of the rest of that page are examples of
>>> 'emit'ing pixels to the page.
>>>
>>> Good luck with this, Jason. Please keep me in the loop, your
>>> experiments, as I'd like to try them out as well. :-)
>>>
>>> All the best,
>>> Ray
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: colorforth-unsubscribe@...
>> For additional commands, e-mail: colorforth-help@...
>> Main web page - http://www.colorforth.com
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: colorforth-unsubscribe@...
> For additional commands, e-mail: colorforth-help@...
> Main web page - http://www.colorforth.com
>
>



--
Raymond St. Marie ii,
colorforthray.info

---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@...
For additional commands, e-mail: colorforth-help@...
Main web page - http://www.colorforth.com


Re: Setting a pixel on the screen

by Ray St. Marie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

or word and double word. sorry.

On Wed, May 28, 2008 at 7:09 AM, Ray St. Marie <ray.stmarie@...> wrote:

> Ya, gosh, how many programs do I use this! Several! It's funny cuz
> i've never not done it. It's Byte addressing, Please notice that you
> are just setting things up with the 2 leftshifts so that the
> definitions for ! and @ which include the definition   a,  ( defined
> as 2* 2* ) which will return you back to word addressing. I suppose
> this is for Chuck and for ease of use.
>
> Your guess is better then mine. :-)
>
> On Wed, May 28, 2008 at 7:01 AM, Jason Kemp <jason.kemp@...> wrote:
>> ...And that's not right because ! stores a double word and I only want a
>> word (16 bit colour).
>>
>> Block 34 (icons) has !w which stores a 16 bit word to a byte address.
>>  That's what I need instead of 2/ 2/ !
>>
>> Also, on http://www.colorforth.com/forth.html it is stated "Data are
>> addressed as 32-bit words, not bytes."  I'm not fully clear on how this
>> works so I need to look harder.
>>
>> Jason Kemp said the following on 28/05/2008 11:27:
>>>
>>> Hi Ray,
>>>
>>> Thanks for all the encouragement.  I cracked it on Friday and was
>>> intending to reply, but I'm trying not to touch the computer over the
>>> weekends now and Monday was a bank holiday too!
>>>
>>> : pixel show black screen ffff 400 400 1024 * + 2* 1e80000 + 2/ 2/ !
>>> keyboard ;
>>>
>>> It needs a 2/ 2/ because ! multiplies the address it is given by 4.  This
>>> must be something to do with addressing doublewords as opposed to bytes--I'm
>>> sure it's something quite obvious to most but it's taking me a long time to
>>> build up a picture of what's going on here.  Are addresses in colorforth
>>> stored as the count of doublewords rather than a true address?
>>>
>>> Jason
>>>
>>>
>>>
>>>
>>> Ray St. Marie said the following on 27/05/2008 20:23:
>>>>
>>>> rethinking my previous post to this question...
>>>> Hi Jason,
>>>> Ray here
>>>>
>>>> On Tue, May 20, 2008 at 4:41 PM, Jason Kemp <jason.kemp@...>
>>>> wrote:
>>>>
>>>>>
>>>>> Good evening all,
>>>>>
>>>>> I have been attempting to set a pixel on the screen to white.  Please
>>>>> show
>>>>> me what I am doing wrong:
>>>>>
>>>>> : ohno show black screen ffff 400 400 1024 * + 2* 1e80000 + ! keyboard
>>>>> ;>
>>>>> Only the ffff and the 1e80000 are in hex.  The screen is 1024x768,
>>>>> 16-bit,
>>>>> VESA 117h.
>>>>>
>>>>> Thanks,
>>>>> Jason
>>>>>
>>>>>
>>>>
>>>> Jason, have you tried the word color after ffff, to set the color, as
>>>> in...
>>>>
>>>> : ohno show black screen ffff COLOR 400 400 1024 * + 2* 1e80000 + !
>>>> keyboard ;
>>>>
>>>> I happened to be looking in an old source and reading the word SWITCH.
>>>> In the top of the word we see an example of writeing to AGP before
>>>> switching to keyboard.
>>>>
>>>> Karig has a nice look at it :
>>>>
>>>> http://www.karig.net/os/cf/g.htm
>>>>
>>>> Halfway down the page. All of the rest of that page are examples of
>>>> 'emit'ing pixels to the page.
>>>>
>>>> Good luck with this, Jason. Please keep me in the loop, your
>>>> experiments, as I'd like to try them out as well. :-)
>>>>
>>>> All the best,
>>>> Ray
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: colorforth-unsubscribe@...
>>> For additional commands, e-mail: colorforth-help@...
>>> Main web page - http://www.colorforth.com
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: colorforth-unsubscribe@...
>> For additional commands, e-mail: colorforth-help@...
>> Main web page - http://www.colorforth.com
>>
>>
>
>
>
> --
> Raymond St. Marie ii,
> colorforthray.info
>



--
Raymond St. Marie ii,
colorforthray.info

---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@...
For additional commands, e-mail: colorforth-help@...
Main web page - http://www.colorforth.com


Re: Setting a pixel on the screen

by Ray St. Marie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In several colorforth proggies you'll see the word "addr" defined as
2/ 2/ and sometimes with a + behind as in " 2/ 2/ + " .

Also sometimes you see the word

: array pop 2/ 2/ ;

I suppose this reduces the terms to something that is workable in the
editor environment.

But, it's just as you've said in your previous posts, indeed
word\dword address conversions.

On Wed, May 28, 2008 at 7:15 AM, Ray St. Marie <ray.stmarie@...> wrote:

> or word and double word. sorry.
>
> On Wed, May 28, 2008 at 7:09 AM, Ray St. Marie <ray.stmarie@...> wrote:
>> Ya, gosh, how many programs do I use this! Several! It's funny cuz
>> i've never not done it. It's Byte addressing, Please notice that you
>> are just setting things up with the 2 leftshifts so that the
>> definitions for ! and @ which include the definition   a,  ( defined
>> as 2* 2* ) which will return you back to word addressing. I suppose
>> this is for Chuck and for ease of use.
>>
>> Your guess is better then mine. :-)
>>
>> On Wed, May 28, 2008 at 7:01 AM, Jason Kemp <jason.kemp@...> wrote:
>>> ...And that's not right because ! stores a double word and I only want a
>>> word (16 bit colour).
>>>
>>> Block 34 (icons) has !w which stores a 16 bit word to a byte address.
>>>  That's what I need instead of 2/ 2/ !
>>>
>>> Also, on http://www.colorforth.com/forth.html it is stated "Data are
>>> addressed as 32-bit words, not bytes."  I'm not fully clear on how this
>>> works so I need to look harder.
>>>
>>> Jason Kemp said the following on 28/05/2008 11:27:
>>>>
>>>> Hi Ray,
>>>>
>>>> Thanks for all the encouragement.  I cracked it on Friday and was
>>>> intending to reply, but I'm trying not to touch the computer over the
>>>> weekends now and Monday was a bank holiday too!
>>>>
>>>> : pixel show black screen ffff 400 400 1024 * + 2* 1e80000 + 2/ 2/ !
>>>> keyboard ;
>>>>
>>>> It needs a 2/ 2/ because ! multiplies the address it is given by 4.  This
>>>> must be something to do with addressing doublewords as opposed to bytes--I'm
>>>> sure it's something quite obvious to most but it's taking me a long time to
>>>> build up a picture of what's going on here.  Are addresses in colorforth
>>>> stored as the count of doublewords rather than a true address?
>>>>
>>>> Jason
>>>>
>>>>
>>>>
>>>>
>>>> Ray St. Marie said the following on 27/05/2008 20:23:
>>>>>
>>>>> rethinking my previous post to this question...
>>>>> Hi Jason,
>>>>> Ray here
>>>>>
>>>>> On Tue, May 20, 2008 at 4:41 PM, Jason Kemp <jason.kemp@...>
>>>>> wrote:
>>>>>
>>>>>>
>>>>>> Good evening all,
>>>>>>
>>>>>> I have been attempting to set a pixel on the screen to white.  Please
>>>>>> show
>>>>>> me what I am doing wrong:
>>>>>>
>>>>>> : ohno show black screen ffff 400 400 1024 * + 2* 1e80000 + ! keyboard
>>>>>> ;>
>>>>>> Only the ffff and the 1e80000 are in hex.  The screen is 1024x768,
>>>>>> 16-bit,
>>>>>> VESA 117h.
>>>>>>
>>>>>> Thanks,
>>>>>> Jason
>>>>>>
>>>>>>
>>>>>
>>>>> Jason, have you tried the word color after ffff, to set the color, as
>>>>> in...
>>>>>
>>>>> : ohno show black screen ffff COLOR 400 400 1024 * + 2* 1e80000 + !
>>>>> keyboard ;
>>>>>
>>>>> I happened to be looking in an old source and reading the word SWITCH.
>>>>> In the top of the word we see an example of writeing to AGP before
>>>>> switching to keyboard.
>>>>>
>>>>> Karig has a nice look at it :
>>>>>
>>>>> http://www.karig.net/os/cf/g.htm
>>>>>
>>>>> Halfway down the page. All of the rest of that page are examples of
>>>>> 'emit'ing pixels to the page.
>>>>>
>>>>> Good luck with this, Jason. Please keep me in the loop, your
>>>>> experiments, as I'd like to try them out as well. :-)
>>>>>
>>>>> All the best,
>>>>> Ray
>>>>>
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: colorforth-unsubscribe@...
>>>> For additional commands, e-mail: colorforth-help@...
>>>> Main web page - http://www.colorforth.com
>>>>
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: colorforth-unsubscribe@...
>>> For additional commands, e-mail: colorforth-help@...
>>> Main web page - http://www.colorforth.com
>>>
>>>
>>
>>
>>
>> --
>> Raymond St. Marie ii,
>> colorforthray.info
>>
>
>
>
> --
> Raymond St. Marie ii,
> colorforthray.info
>



--
Raymond St. Marie ii,
colorforthray.info

---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@...
For additional commands, e-mail: colorforth-help@...
Main web page - http://www.colorforth.com


Re: Setting a pixel on the screen

by Ray St. Marie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Heck I wanted to add that...

Also found in many cF programs are definitions in a proggy block for
something where a perfectly good analog is already defined in the
macros.

As a for-instance, we'll use the example you gave where in ICONS we
find that there is a definition for !w or w!, store word is the
upshot. Nothing like it in the current macros, but we can still get to
words using the @ and ! with the 2 2/'s. There's another good one.
Several progies have a definition for variable number of 2/'s called
2/s. These, should they prove useful, should find there way to the
main macro blocks, so that they are only loaded the one time, and not
with every new application.

Really, what's the difference in such an large environment...
Ray :-)

On Wed, May 28, 2008 at 7:31 AM, Ray St. Marie <ray.stmarie@...> wrote:

> In several colorforth proggies you'll see the word "addr" defined as
> 2/ 2/ and sometimes with a + behind as in " 2/ 2/ + " .
>
> Also sometimes you see the word
>
> : array pop 2/ 2/ ;
>
> I suppose this reduces the terms to something that is workable in the
> editor environment.
>
> But, it's just as you've said in your previous posts, indeed
> word\dword address conversions.
>
> On Wed, May 28, 2008 at 7:15 AM, Ray St. Marie <ray.stmarie@...> wrote:
>> or word and double word. sorry.
>>
>> On Wed, May 28, 2008 at 7:09 AM, Ray St. Marie <ray.stmarie@...> wrote:
>>> Ya, gosh, how many programs do I use this! Several! It's funny cuz
>>> i've never not done it. It's Byte addressing, Please notice that you
>>> are just setting things up with the 2 leftshifts so that the
>>> definitions for ! and @ which include the definition   a,  ( defined
>>> as 2* 2* ) which will return you back to word addressing. I suppose
>>> this is for Chuck and for ease of use.
>>>
>>> Your guess is better then mine. :-)
>>>
>>> On Wed, May 28, 2008 at 7:01 AM, Jason Kemp <jason.kemp@...> wrote:
>>>> ...And that's not right because ! stores a double word and I only want a
>>>> word (16 bit colour).
>>>>
>>>> Block 34 (icons) has !w which stores a 16 bit word to a byte address.
>>>>  That's what I need instead of 2/ 2/ !
>>>>
>>>> Also, on http://www.colorforth.com/forth.html it is stated "Data are
>>>> addressed as 32-bit words, not bytes."  I'm not fully clear on how this
>>>> works so I need to look harder.
>>>>
>>>> Jason Kemp said the following on 28/05/2008 11:27:
>>>>>
>>>>> Hi Ray,
>>>>>
>>>>> Thanks for all the encouragement.  I cracked it on Friday and was
>>>>> intending to reply, but I'm trying not to touch the computer over the
>>>>> weekends now and Monday was a bank holiday too!
>>>>>
>>>>> : pixel show black screen ffff 400 400 1024 * + 2* 1e80000 + 2/ 2/ !
>>>>> keyboard ;
>>>>>
>>>>> It needs a 2/ 2/ because ! multiplies the address it is given by 4.  This
>>>>> must be something to do with addressing doublewords as opposed to bytes--I'm
>>>>> sure it's something quite obvious to most but it's taking me a long time to
>>>>> build up a picture of what's going on here.  Are addresses in colorforth
>>>>> stored as the count of doublewords rather than a true address?
>>>>>
>>>>> Jason
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Ray St. Marie said the following on 27/05/2008 20:23:
>>>>>>
>>>>>> rethinking my previous post to this question...
>>>>>> Hi Jason,
>>>>>> Ray here
>>>>>>
>>>>>> On Tue, May 20, 2008 at 4:41 PM, Jason Kemp <jason.kemp@...>
>>>>>> wrote:
>>>>>>
>>>>>>>
>>>>>>> Good evening all,
>>>>>>>
>>>>>>> I have been attempting to set a pixel on the screen to white.  Please
>>>>>>> show
>>>>>>> me what I am doing wrong:
>>>>>>>
>>>>>>> : ohno show black screen ffff 400 400 1024 * + 2* 1e80000 + ! keyboard
>>>>>>> ;>
>>>>>>> Only the ffff and the 1e80000 are in hex.  The screen is 1024x768,
>>>>>>> 16-bit,
>>>>>>> VESA 117h.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Jason
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> Jason, have you tried the word color after ffff, to set the color, as
>>>>>> in...
>>>>>>
>>>>>> : ohno show black screen ffff COLOR 400 400 1024 * + 2* 1e80000 + !
>>>>>> keyboard ;
>>>>>>
>>>>>> I happened to be looking in an old source and reading the word SWITCH.
>>>>>> In the top of the word we see an example of writeing to AGP before
>>>>>> switching to keyboard.
>>>>>>
>>>>>> Karig has a nice look at it :
>>>>>>
>>>>>> http://www.karig.net/os/cf/g.htm
>>>>>>
>>>>>> Halfway down the page. All of the rest of that page are examples of
>>>>>> 'emit'ing pixels to the page.
>>>>>>
>>>>>> Good luck with this, Jason. Please keep me in the loop, your
>>>>>> experiments, as I'd like to try them out as well. :-)
>>>>>>
>>>>>> All the best,
>>>>>> Ray
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: colorforth-unsubscribe@...
>>>>> For additional commands, e-mail: colorforth-help@...
>>>>> Main web page - http://www.colorforth.com
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: colorforth-unsubscribe@...
>>>> For additional commands, e-mail: colorforth-help@...
>>>> Main web page - http://www.colorforth.com
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Raymond St. Marie ii,
>>> colorforthray.info
>>>
>>
>>
>>
>> --
>> Raymond St. Marie ii,
>> colorforthray.info
>>
>
>
>
> --
> Raymond St. Marie ii,
> colorforthray.info
>



--
Raymond St. Marie ii,
colorforthray.info

---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@...
For additional commands, e-mail: colorforth-help@...
Main web page - http://www.colorforth.com


Re: Setting a pixel on the screen

by Jason Kemp-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Ray,

That makes sense:  that it is just for "ease of use".  I could see how
it was working but couldn't work out the reason--I just assumed I was
missing something.

Jason

Ray St. Marie said the following on 28/05/2008 14:15:

> or word and double word. sorry.
>
> On Wed, May 28, 2008 at 7:09 AM, Ray St. Marie <ray.stmarie@...> wrote:
>  
>> Ya, gosh, how many programs do I use this! Several! It's funny cuz
>> i've never not done it. It's Byte addressing, Please notice that you
>> are just setting things up with the 2 leftshifts so that the
>> definitions for ! and @ which include the definition   a,  ( defined
>> as 2* 2* ) which will return you back to word addressing. I suppose
>> this is for Chuck and for ease of use.
>>
>> Your guess is better then mine. :-)
>>    
>


---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@...
For additional commands, e-mail: colorforth-help@...
Main web page - http://www.colorforth.com