Re: Setting a pixel on the screen
"Ray St. Marie" <[email protected]> Wed, 28 May 2008 07:15:06 -0600
| Newsgroups | gmane.comp.lang.forth.colorforth |
|---|---|
| Message-ID | <[email protected]> |
or word and double word. sorry. On Wed, May 28, 2008 at 7:09 AM, Ray St. Marie <[email protected]> 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 <[email protected]> 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 <[email protected]> >>>> 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: [email protected] >>> For additional commands, e-mail: [email protected] >>> Main web page - http://www.colorforth.com >>> >>> >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> Main web page - http://www.colorforth.com >> >> > > > > -- > Raymond St. Marie ii, > colorforthray.info > -- Raymond St. Marie ii, colorforthray.info