Re: [colorforth] Setting a pixel on the screen
- Subject: Re: [colorforth] Setting a pixel on the screen
- From: Jason Kemp <jason.kemp@xxxxxxxxxxxxxxxx>
- Date: Wed, 28 May 2008 11:27:57 +0100
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@xxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com