News:

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

Simple help ~

Started by hack004, January 23, 2009, 08:47:24 AM

Previous topic - Next topic

hack004

I would like to ask Intel Assembly language programming in the first code compiler Why not? However, the compiler through the connection: There are 2 error detection prompted `What is the reason?   ::) :red

code:

TITLE Add and Subtract              (AddSub.asm)

; This program adds and subtracts 32-bit integers.
; Last update: 06/01/2006

INCLUDE Irvine32.inc

.code
main PROC

   mov   eax,10000h      ; EAX = 10000h
   add   eax,40000h      ; EAX = 50000h
   sub   eax,20000h      ; EAX = 30000h
   call   DumpRegs

   exit
main ENDP
END main

vanjast

Can you post the errors that are detected...

Farabi

This irvine guys seems very famous is it?
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

MichaelW

It works for me, assembled and linked with this batch file:

\masm32\bin\ml /c /coff addsub.asm
pause
\masm32\bin\Link addsub.obj irvine32.lib \masm32\lib\kernel32.lib /SUBSYSTEM:CONSOLE
pause
addsub
pause



C:\masm32\My\Irvine32>\masm32\bin\ml /c /coff addsub.asm
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997.  All rights reserved.

Assembling: addsub.asm

C:\masm32\My\Irvine32>pause
Press any key to continue . . .

C:\masm32\My\Irvine32>\masm32\bin\Link addsub.obj irvine32.lib \masm32\lib\kerne
l32.lib /SUBSYSTEM:CONSOLE
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.


C:\masm32\My\Irvine32>pause
Press any key to continue . . .

C:\masm32\My\Irvine32>addsub

  EAX=00030000  EBX=7FFDF000  ECX=00000101  EDX=FFFFFFFF
  ESI=00000000  EDI=00000000  EBP=0012FFF0  ESP=0012FFC4
  EIP=00401014  EFL=00000206  CF=0  SF=0  ZF=0  OF=0


C:\masm32\My\Irvine32>pause
Press any key to continue . . .

eschew obfuscation