From: Frank Kotler <fbkotler@comcast.net>
To: linux-assembly@vger.kernel.org
Subject: Re: GAS colorr pixel problem
Date: Wed, 22 Nov 2006 18:06:28 -0500 [thread overview]
Message-ID: <4564D7F4.6080507@comcast.net> (raw)
In-Reply-To: <4564B541.2080704@lnxscene.org>
Jean-Yves Lamoureux wrote:
> A D wrote:
>
>>> Jean-Yves Lamoureux wrote:
>>> gas is just an assembler. You can do whatever you want with an
>>> assembler, as every single executed bit on your processor is the
>>> output of an assembler (ok purists, I just simplified).
>>> "Filling a rectangle" means nothing. You have to draw something that
>>> will be interpreted as a bunch of pixels having the sahpe of a
>>> rectangle. You can do that in ascii (libcaca for example,
>>> http://libcaca.zoy.org ), or in graphic mode (SVGAlib, old as hell
>>> but works on most PC cards, without X), X11 (which itself has dozen
>>> of low (xlib) and high (sdl, ptc, gtk, qt, whatever) level libraries
>>> to do that).
>>>
>>> I suggest you to learn how to call C-like functions (pushing
>>> arguments, calling function), how to work with memory (lea, syscalls,
>>> brk, etc), then to use something like SDL for example, which does
>>> most of the work for you.
>>
>>
>> Thanks to all for your input. I guess it would be really difficult to
>> color pixels in assembly language. Can anyone tell me what steps are
>> involved in that(color pixels in assembly)? Just for my knowledge.
>> Thanks.
>>
>
> http://www.google.com/codesearch?q=show:GtRjeWKEOlc:2P9VXd642nk:3e2ZV6Tu0vo&sa=N&ct=rd&cs_p=http://allergy.alrj.org/Code/xtest.tgz&cs_f=xtest/PTC4k.asm
>
>
> May seem hard to understand, it is a "complete" graphical library in
> asm, using xlib. That's not the easiest way, but hey, you wanna learn !
>
> (Wrote by me yeaaaars ago, when I was a young padawan, rewritten from
> scratch by a friend later)
Very nice! I hadn't seen that one. Thanks!!!
Other possible ways to plot a pixel... If you enable the "frame buffer
device" at bootup ("vga=769" or somesuch), you can open "/dev/fb0" and
write to it (need root access). This is fairly easy, but requires that
the user enable the device.
Richard Cooper/PJ (you still around?) wrote a thing called "softer",
which acquires access to the ports, and does vga (yuck) graphics by
diddling the ports. I find this quite impressive, but it isn't a
"Beginner Project"!!! *Using* softer from your own code - as it's
intended - is fairly easy. (so easy that Richard provide examples in
Perl!!!)
Even crazier, I'm in the midst of an experiment to use the X windows
system without using Xlib - int 80h only. It's in a very early stage,
but "seems to work".
This is assembly language! We can do anything that *can* be done, and
usually several different ways. The "right" way to do it - "The Unix
Way" - is to use the library(s). But there are options, if you want to
see "what we can get away with".
Any examples I could provide would be in Nasm syntax. Mostly easy enough
to "translate" to Gas. More Nasm examples (glut, SDL, etc.) can be found
in the "files" section of the !Yahoo! group
http://groups.yahoo.com/group/linux-nasm-users
I don't suppose I could interest you in any hot stock tips? :)
Best,
Frank
next prev parent reply other threads:[~2006-11-22 23:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <BAY22-F18087E5BEE37FFA472DDD5F5E30@phx.gbl>
2006-11-22 20:38 ` GAS colorr pixel problem Jean-Yves Lamoureux
2006-11-22 21:08 ` A D
2006-11-22 22:45 ` Robert Plantz
2006-11-22 23:06 ` Frank Kotler [this message]
2006-11-22 20:35 A D
2006-11-22 20:59 ` Claudio Fontana
-- strict thread matches above, loose matches on Subject: below --
2006-11-22 18:54 A D
2006-11-22 19:33 ` Robert Plantz
2006-11-22 19:44 ` Markus Rechberger
2006-11-22 19:49 ` Jean-Yves Lamoureux
2006-11-22 19:42 ` Jean-Yves Lamoureux
2006-12-31 18:43 ` Hendrik Visage
2007-01-01 2:36 ` Claudio Fontana
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4564D7F4.6080507@comcast.net \
--to=fbkotler@comcast.net \
--cc=linux-assembly@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).