Mail Archives: djgpp/1998/06/11/13:33:33
What do I have to do to run an assembler procedure from C?
I compile assembler code to borland .obj file, then convert
it into .o, link it with main program's .o file and it works,
but _sometimes_ there are some bugs. For example a black
horizontal line appeares on the screen (in a triangle draw
procedure), but _only_ sometimes (ie I run the program - the
bug is visible, I run the program for the second time - there's
no bug)
Maybe I forget to allocate some memory for stack or something...
My program does the following:
1. in c:
data=(char *)malloc(100);
2. in assembler:
selector - _my_ds()
offset - data
it uses the allocated memory (read & write)
...and as I said it works, but sometimes doesn't? Why? Please help me.
PS. Sorry for my english.
-Pawel Kowalski-
-pk AT sonyx DOT ml DOT org- -pk AT tcs DOT uni DOT wroc DOT pl- -p_kowalski AT bbs DOT chip DOT pl-
-http://pk.sonyx.ml.org/-
- Raw text -