Re: [colorforth] XcolorForth crashes on read or write to frame buffer.
- Subject: Re: [colorforth] XcolorForth crashes on read or write to frame buffer.
- From: Mark Slicker <maslicke@xxxxxxxxxxx>
- Date: Sat, 1 Nov 2003 01:33:31 -0500 (EST)
'frame' returns a byte address, ! writes to a word address. You need
to divide by 4 if you wish to use @ or ! . Also you may
want to define a word '2!' two write two bytes to a byte address.
macro
: 2! [a!] $28966 3, [drop] ; forth
The frame buffer is 16-bits per pixel in a 5:6:5 format.
On Fri, 31 Oct 2003, Samuel A. Falvo II wrote:
> I'm trying to plot some points to the display, and unfortunately, any
> write to the frame buffer segfaults the executable. It also appears
> that reading from the framebuffer also causes a crash.
>
> Here is my code (in punctuated form):
>
> : px over ! 4 + ;
> : r $FF0000 px ;
> : g $FF00 px ;
> : b $FF px ;
> : rgb [ frame ] r g b ; rgb
>
> (Note: [ XYZ ] indicates that XYZ is yellow.)
>
> Any ideas as to why this is happening?
>
> Thanks for the help.
>
> --
> Samuel A. Falvo II
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
> For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
> Main web page - http://www.colorforth.com
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com