[movitz-devel] Writing directly to memory

Pascal Bourguignon pjb at informatimago.com
Wed Jan 3 00:20:44 UTC 2007


M Bealby writes:
> Hey all,
> 
> I am attempting to utilise movitz to learn about low level programming and
> hopefully contribute a few drivers.  One of the things that I am trying to do
> is play around with some VGA programming, mainly because graphics programming
> gives instant satisfaction.
> 
> I have successfully changed video mode to 640x480x16bpp by manipulation of the
> vga register sets, and movitz continues to run (i.e. doesn't crash), as I can
> switch back. :)
> 
> However, I am now stuck when it comes to writing directly to memory.  I want to
> write to the vga memory area (as reported by vga-memory-map) but I couldn't
> work out how to do it.  I attempted using the form (setf (io-port #xa000
> :unsigned-byte16) #x0000), but this failed to write to memory (as reported by a
> subsequent io-port read call)
> 
> Anyone able to give me any hints?

If you want to write to the memory, you don't want to write to an io-port!
Use normal memory accesses.
For example, using (setf muerte::memrange)

Also, it imay be possible to map an array to a given memory address,
so you can access these bytes directly with svref or aref.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"Logiciels libres : nourris au code source sans farine animale."



More information about the movitz-devel mailing list