[SDL] Using SDL in assembler (GoAsm, x86)
James Eibisch
jeibisch at idc.com
Sun Nov 17 10:03:00 PST 2002
Dear all,
I am new to SDL and have read the docs, but am not clear on how to use it from
assembly programs. At the moment I'm re-teaching (so I'm quite rusty on a lot of
things!) myself x86 code under Windows 2000, but I would like to be as
independent as possible from Windows -- i.e. I would prefer to write console or
full-screen programs, not windowed ones.
If we take the call SDL_Init, in C you would write something like:
if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO)==-1) {
error occured...
But what should you do in assembler? Should I push SDL_INIT_VIDEO to the stack
and then call SDL_Init? Where is the return error code stored?
Also, I can't see a list of constants like SDL_INIT_VIDEO in the docs. How
should I use them given that I have to assemble before I've linked?
Thanks for any help,
James
More information about the SDL
mailing list