Mail Archives: djgpp/1997/11/14/21:45:17
STEVEN S. FALLS wrote in message <346C8822 DOT D3725C8E AT earthlink DOT net>...
>BITS 32
>GLOBAL _SetPix__Fiic
>GLOBAL _SetPixRam__Fiic
>GLOBAL _GetPix__Fii
>GLOBAL _GetPixRam__Fii
>GLOBAL _ClearPg__Fv
>GLOBAL _ClearPgRam__Fv
>GLOBAL _CopyPg__Fv
>GLOBAL _Line__Fiiiic
>EXTERN __go32_info_block
>EXTERN _YTbl
>EXTERN _RamPg
>
>SECTION .text
>_SetPix__Fiic:
> push ebp
> mov edx,[_YTbl]
> mov ebx,[esp+12]
> mov ebx,[edx+ebx*4]
> add ebx,[esp+8]
> mov al,[esp+16]
> mov fs,[__go32_info_block+26]
> add ebx,0A0000h
> mov [fs:ebx],al
> pop ebp
> ret
>_SetPixRam__Fiic:
Some quick suggestions.
Comment your code.
Use Defines for the arguments to the function and reference the stack based
on those. Its easier
to keep track of.
You appear to be pushing and popping EBP for no reason. Looks like you
started with
compiler generated code which had a stack frame setup , and removed a
portion of
it but not all. Remove the push and pop and update the stack references.
- Raw text -