News for hackers. Stuff that matters.
Re:Ask HN: How to draw a single pixel? by sagacity on Sunday February 20, 2011 @02:11PM (#2242696)
Must you make me jog back such old memories? (Well actually, Thank you :-))

FWIW, this is how we used to do it in BASIC, C and MASM in the good ol' DOS days, back in the 80s; hope it can give you at least some conceptual confirmation + insight:

You wrote:

> activate the so called video mode and not the text mode

Spot on.

> access the memory buffer and modify individual chunks of memory

Spot on again. Unless I'm forgetting something, DOS used to reserve a chunk of RAM (that they called 'lower memory') as video RAM. We used to 'peek' and 'poke' bytes directly to this (at mem segment 0800:0000Hex or something). Of course, that was on CGA display adapters, and under DOS. With today's SVGA and whatnot + Ubuntu, a lot of these specifics would change but I'm afraid I won't be able to help you with all that - been a while (about 2 decades) since I could last indulge into that sort of hacking.

Well, best wishes from an ancient hacker - may you keep at it for as long as you wish to.

There are no comments on this comment yet.