News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

call 234?

Started by Parse, December 29, 2004, 02:29:01 PM

Previous topic - Next topic

Parse

hm.. I was just wondering if you do something like


.data
api001 dd (address of an api)

.code
call api001


What does masm replace call api001 with, something like call [ds+0] ??

pbrennick

Assemble it and tell us.

Ghirai

Probably because api001 is the first in your data segment; [ds+0] points to api001.

If it was the n-th in your .data, you would have [ds+n*sizeof(whatever)].
MASM32 Project/RadASM mirror - http://ghirai.com/hutch/mmi.html

evlncrn8

should be call dword ptr [api001] tho otherwise it'd probably crash ;)

Vortex

Parse,

It's the job of the windows loader to locate the adresses of API functions.

Parse

Ok, I figured out what I wanted to do was pretty useless so I found a different, better, way.