Author Topic: include ??  (Read 5405 times)

Offline ngochuan1st

  • Jr. Member
  • *
  • Posts: 30
include ??
« on: September 24, 2012, 08:00:07 AM »
i don't know how to create include files (.inc), not use "win32.inc"

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: include ??
« Reply #1 on: September 24, 2012, 12:39:52 PM »
Well "%include" just does a "cut and paste", so it has to be valid Nasm syntax, but you could put anything you want in an ".inc" file (doesn't even have to be named ".inc"!) - even code, although it might not be considered "good form". A file like "win32.inc" just defines constants, structures, etc. and probably includes macros you can use freely in your code without having to worry about it. You don't have to use it. "push -11" does the same thing as "push STD_OUTPUT_HANDLE", it's just more "self-documented" to use the defined names.

Best,
Frank


Offline ngochuan1st

  • Jr. Member
  • *
  • Posts: 30
Re: include ??
« Reply #2 on: September 25, 2012, 07:07:44 AM »
Thank you very much  :D