Author Topic: Graphic Programming  (Read 11669 times)

nobody

  • Guest
Graphic Programming
« on: August 18, 2008, 06:40:31 AM »
Hello,

First, scuse my poor english ;)

So, I want make graphic programm on linux (Gnome & KDE) with nasm.
I have already made graphic programming with Masm32 on Windows, but i don't know how to make that on linux?
Have you some advice or tuto?

Thanks!

nobody

  • Guest
Re: Graphic Programming
« Reply #1 on: August 18, 2008, 03:56:42 PM »
Funny you should mention it! :)

Jeff Owens, author of the "AsmIde" suite of tools, has started a tutorial on Xwindows graphics programming:

http://linuxasmtools.net/x/

It's just a start (or should I say "_start"? :) but it may help you get going. As you know (or will soon learn), there's a shortage of information about doing *anything* in Linux "in assembly language". Most documentation assumes C. We have to mentally "translate" to asm. If you strip the "x/" off the above link, you'll find Jeff's tools, including "AsmRef". Covers system calls, signals, error numbers... A gem!!!

(I personally don't like an IDE, and I like to avoid using other people's libraries, so I haven't used Jeff's stuff much. I've "been meaning" to check it out further. Looks like some good stuff! If you try it, let us know how it goes!)

Jeff's Yahoo group - DesktopLinuxAsm - would be the place to discuss this. The "linux-nasm-users" Yahoo group has some Xwindows examples and links (some "portable" Linux/Windows examples from Numit_or!!!). There are a couple of "enthusiasts" who post to news:alt.lang.asm too.

If you're a recent "graduate" to Linux and/or Nasm, you may want to get "oriented" with some console programs before you tackle Xwindows. The fundamental difference is that in Windows, graphics is an integral part of "the API". In Linux, there's practically *no* support for graphics in the kernel (framebuffer device excepted). Xwindows is a separate "app" running as a "server". We communicate with it by sending/receiving data via a socket. The "usual" way is to call Xlib functions to take care of the ugly details. Xlib itself is fairly "raw", so it's "usual" to actually use a "helper" library - gtk+, GL, etc. - to actually "do" anything. At this point, there isn't much advantage to using asm. A series of library calls is a series of library calls, no matter what the language.

We do have the option of opening a socket to the Xwindows server, and handling all the "housekeeping" details ourselves. So far, this has not proven any faster or "better" than just calling the library... but it's virtually "unexplored territory" (AFAIK).

So you really have to do Xwindows in asm because you "like" to. That said, let's discuss it further! What do you want to do, and how far can you get?

Best,
Frank

nobody

  • Guest
Re: Graphic Programming
« Reply #2 on: August 18, 2008, 09:20:03 PM »
Hi!

I wrote some GTK+ samples that you can compile, using nasm or yasm, and
run in Windows or Linux.

http://mipagina.cantv.net/numator/gtk/

Possibly, these samples can be useful for you. Only can run in x86
(32 bits) machines.

greetings!
nmt

nobody

  • Guest
Re: Graphic Programming
« Reply #3 on: August 19, 2008, 01:53:27 AM »
Thanks a lot !!!
I think that's going to allow me to begin well!
I'll post some codes to know what you say about it!

;)