The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: munair001 on March 08, 2006, 01:33:58 PM

Title: My programs don't work
Post by: munair001 on March 08, 2006, 01:33:58 PM
Hello friends,
   Thanks for ur response.

I have MASM version 8.2. Yesterday, I had written my first program in MASM to just add two numbers.
But, When I executed it the computer shows an error roport.  Tell, why this happens
Title: Re: My programs don't work
Post by: Shantanu Gadgil on March 08, 2006, 01:49:26 PM
No to rant, but there _should_ be a better way of expressing yourself. :)

Having said that...please post minimal code of you might be trying to do. :)

Also...as a side note...please check up how others are also posting their questions. Don't make the moderators keeping directing new members to the guidleines :)

Helps them/us to answer the questions quickly :)
Title: Re: My programs don't work
Post by: PBrennick on March 08, 2006, 02:43:09 PM
shantanu_gadgil,
I seem to see what you are describing as happening a lot lately.  :U

munair001,
It is because you have an error...  None of us can help you unless you help us help you.  I am fairly good at helping others (as a lot of the members are) but I must say thank you to the implied compliment that we can, also, read minds.  Thank you.

Paul
Title: Re: My programs don't work
Post by: Mark Jones on March 08, 2006, 05:43:50 PM
Hehehehe... Paul you're so funny! :lol
Title: Re: My programs don't work
Post by: P1 on March 08, 2006, 06:36:16 PM
munair001,

Welcome a Board !!!     :U

Forum 'Search' is your friend, along with Google.     :wink

Please be kind to us, as we can not read your mind or your error from over the internet.  And if we could, I assure you, we would be enjoying our new found wealth differently than what we are doing now.    :dance:

Regards,  P1  :8)
Title: Re: My programs don't work
Post by: Tedd on March 08, 2006, 06:50:28 PM
Don't listen to them, they're just trying to be funny ::)
It's obviously a problem with the philangies, so you'll need to modify the shminkapuckle until it becomes munxificated and then it should work okay :U
Or, if that doesn't solve the problem, try posting the offending code here and we'll point you in the right direction :wink
("it doesn't work" doesn't provide much information)
Title: Re: My programs don't work
Post by: Shantanu Gadgil on March 08, 2006, 07:19:56 PM
Hey...listen up...everybody. Now that this post has been moved into the "Campus" no more ragging the new guy!

The first page has this quote about the Campus area...
Quote
A protected forum where programmers learning assembler can ask questions in a sensible and safe atmosphere without being harassed or insulted.

We should follow the rules!!!  :8) So what say guys...!?!?!
Title: Re: My programs don't work
Post by: P1 on March 08, 2006, 09:13:43 PM
Quote from: shantanu_gadgil on March 08, 2006, 07:19:56 PM
Hey...listen up...everybody. Now that this post has been moved into the "Campus" no more ragging the new guy!
We should follow the rules!!!  :8) So what say guys...!?!?!
Thanks for noticing!

Regards,  P1  :8)
Title: Re: My programs don't work
Post by: hutch-- on March 09, 2006, 12:20:04 PM
All of these things are fine but until the new member shares his secret with us, there is no way of responding to his question.
Title: Re: My programs don't work
Post by: munair001 on March 09, 2006, 01:47:42 PM
Hey Guys, I have not understood ,What u all r talking about?

My Code is:

.code
.start
call main
exit

main proc
mov eax,100
mov ebx,200
add eax,ebx
print chr$(eax)
end startp
end
:dazzled: :dance: :clap: :dance: :cheekygreen: :bdg ::)
Title: Re: My programs don't work
Post by: munair001 on March 09, 2006, 02:00:08 PM
Quote from: munair001 on March 09, 2006, 01:47:42 PMI am not pleased with the response. I have been degraded. But, Still If i am not so skilled like you. Please don't make a fool of me.
Hey Guys, I have not understood ,What u all r talking about?

My Code is:

.code
.start
call main
exit

main proc
mov eax,100
mov ebx,200
add eax,ebx
print chr$(eax)
end startp
end
:dazzled: :dance: :clap: :dance: :cheekygreen: :bdg ::)
Title: Re: My programs don't work
Post by: hutch-- on March 09, 2006, 02:09:57 PM
try something like this,


      .486
      .model flat, stdcall
      option casemap :none   ; case sensitive

;     include files
;     ~~~~~~~~~~~~~
      include \masm32\include\windows.inc
      include \masm32\include\masm32.inc
      include \masm32\include\gdi32.inc
      include \masm32\include\user32.inc
      include \masm32\include\kernel32.inc
      include \masm32\include\Comctl32.inc
      include \masm32\include\comdlg32.inc
      include \masm32\include\shell32.inc
      include \masm32\include\oleaut32.inc
      include \masm32\macros\macros.asm

;     libraries
;     ~~~~~~~~~
      includelib \masm32\lib\masm32.lib
      includelib \masm32\lib\gdi32.lib
      includelib \masm32\lib\user32.lib
      includelib \masm32\lib\kernel32.lib
      includelib \masm32\lib\Comctl32.lib
      includelib \masm32\lib\comdlg32.lib
      includelib \masm32\lib\shell32.lib
      includelib \masm32\lib\oleaut32.lib


.code

    start:    ; this is a start LABEL, not an operator
call main
exit           ; exit in masm32 is a macro for ExitProcess()

main proc
  mov eax,100
  mov ebx,200
  add eax,ebx
  print chr$(eax)  ; 2 macros, you need macros.asm to make them work
  ret                  ; << was missing
main endp

end start          ; must match the start label