News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

School Help

Started by skinnyg, April 08, 2013, 07:41:48 AM

Previous topic - Next topic

skinnyg

Ok..programming not my strong suit...history etc.. anyway... have a program i have to build for class simple to many but headache for me.. We have to add then subtract 16 registers.. this is what i have:

INCLUDE Irvine32.inc

.code

mov ax,70h ; AX = 70h

mov bx,30h  ; bx = 30h

mov cx,10h  ; cx = 40h

sub ax,bx ; AX = 40h

sub ax,cx ; ax = 30h

sub bx,cx ; bx = 20h

call DumpRegs ; display registers

exit
main ENDP
END main

I keep getting this error:   

sub.asm(23): fatal error A1010: unmatched block nesting : main
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\BuildCustomizations\masm.targets(49,5): error MSB3721: The command "ml.exe /c /nologo /Zi /Fo"Debug\sub.obj" /I "c:\irvine" /W3 /errorReport:prompt  /Tasub.asm" exited with code 1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

any help would be greatly appreciated as i learn enough to pass this class..Thanks in advance


jj2007

Quote from: skinnyg on April 08, 2013, 07:41:48 AM
Ok..programming not my strong suit...history etc.. anyway... have a program i have to build for class simple to many but headache for me.. We have to add then subtract 16 registers.. this is what i have:

INCLUDE Irvine32.inc

.code
main proc
mov ax,70h ; AX = 70h

mov bx,30h  ; bx = 30h

mov cx,10h  ; cx = 40h

sub ax,bx ; AX = 40h

sub ax,cx ; ax = 30h

sub bx,cx ; bx = 20h

call DumpRegs ; display registers

exit
main ENDP
END main

I keep getting this error:   

sub.asm(23): fatal error A1010: unmatched block nesting : main
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\BuildCustomizations\masm.targets(49,5): error MSB3721: The command "ml.exe /c /nologo /Zi /Fo"Debug\sub.obj" /I "c:\irvine" /W3 /errorReport:prompt  /Tasub.asm" exited with code 1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

any help would be greatly appreciated as i learn enough to pass this class..Thanks in advance

skinnyg

Ment to tell you Thanks for your help...  :t it was greatly appreciated...

jj2007