Jump to content

how can NASM code be converted to C?

- - - - -

  • Please log in to reply
1 reply to this topic

#1
RhetoricalRuvim

RhetoricalRuvim

    JavaScript Programmer

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,254 posts
  • Location:C:\Countries\US
EXE (PE branch) files are designed to have symbol import tables, for importing things like functions from external DLLs. I think there might be something similar for other operating systems besides Win32, is there (?).

In any case, my question is, how can this NASM code be converted to C?[noparse]:[/noparse]
extern MessageBoxA 

import MessageBoxA user32.dll 

I know you can just include 'windows.h' for the above code (for C/C++), but what if you had to import functions from your own DLLs?

#2
Ancient Dragon

Ancient Dragon

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 400 posts
It will depend on the compiler. See this for Microsoft compilers
Visit Grandpa's Forums, a social networking forum, with family-oriented arcade games, blogs, discussion forums, and photo albums.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users