Author Topic: total newbie question - how to start  (Read 3469 times)

nobody

  • Guest
total newbie question - how to start
« on: December 31, 2004, 11:19:58 AM »
Hi, im a newbie to NASM. I tryed a simply program, this what i got.

; name: setpos.asm
; command line fasmw setpos.asm -o setpos.exe
extern SetCursorPos
push word [100]
push word [100]
call SetCursorPos

help...! :-s
best regards

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2379
  • Country: us
Re: total newbie question - how to start
« Reply #1 on: December 31, 2004, 04:10:11 PM »
Is there a question about Nasm in there somewhere??? If all else fails, you might try the Friendly Manual... (Nasm manual or Fasm manual, depending on which you're actually using)

Best,
Frank

nobody

  • Guest
Re: total newbie question - how to start
« Reply #2 on: December 31, 2004, 04:43:19 PM »
i change from FASM to NASM, so i know the basic stuff about asm, ps i just need a few example on how to do API calls in NASM, please give me a few. And i will try teach myself it...
ps can't remember if its dword or word, but i find out when i get the first example to work

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2379
  • Country: us
Re: total newbie question - how to start
« Reply #3 on: December 31, 2004, 05:10:09 PM »
Okay... parameters to a Windows API are almost always dword... "push dword [100]" will attempt to push the contents of memory at "100", which will probably cause an access violation - you probably want just "push dword 100"...

I would suggest joining the Yahoo "win32-nasm-users" group - http://groups.yahoo.com/group/win32-nasm-users - in the "files" section, you'll find a number of examples, ranging from simple to more complex... and can get questions answered, too. I personally don't know much Windows programming (*my* examples are the "simple" ones :)

Best,
Frank