[SDL] Using SDL in assembler (GoAsm, x86)
James Eibisch
jeibisch at idc.com
Thu Nov 21 00:27:07 PST 2002
Thanks for the replies. I seem a bit stuck at the moment though. I tried to go
the route Neil suggested of looking at a C compiler's output. I installed
cygwin but failed to install SDL on it (tarred and ./configured it ok, but make
went into an endless loop). As Cygwin seems much more complicated than I need
for now, any suggestions for a simple, small, standalone C compiler I could use
just to see its output when calling SDL?
Alternatively, what I would rather do is just read some documentation on calling
SDL from assembler, and not touch C at all (surely some people must do this?).
Following Neil's and Atrix' suggestions, this is what I have so far:
MOV EAX,20h ;value of SDL_INIT_VIDEO gleaned from SDL.h
PUSH EAX
CALL SDL_Init
results in "xxx has generated errors and will be closed by Windows"
Removing the PUSH removes the crash but I'm not sure if the call succeeded or
not. After the call, SDL_Init has changed 3 registers:
EAX = 0
EBX = unchanged
ECX = 12FFE0h
EDX = 0
EDI = unchanged
ESI = unchanged
So I need to find out exactly what SDL_Init is setting the registers to, and
then go on from there. A nice PDF manual or a friendly person who has been
through all this already would be heaven :-)
James
More information about the SDL
mailing list