Hi guys,

I have a slight "hello world" problem. It seems to pop up every ten minutes or so (I dont want it to,  it interupts my programs and some programs crash the computer when the hello world message appears.

I used Masm to assemble it. It runs twice.

Here is the .asm code:-

.386
.model flat, stdcall
option casemap:none

include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
include \masm32\include\user32.inc
includelib \masm32\lib\user32.lib

.data

msg db "Hello world!!!", 0
cpt db "MY FIRST PROGRAM!!!", 0

.code
start:

invoke MessageBox, NULL, addr msg, addr cpt, MB_OK + MB_ICONINFORMATION

invoke ExitProcess, NULL

end start



Any idea how to stop it poping up? did I choose a bad choice of first program name? Need any extra details let me know.

Thank you all.

Posted on 2010-09-08 16:31:46 by Assembler_Kev
Do you really provided the correct source? There is no way this program can pop up the message every ten minutes (not even twice!).

Perhaps you accidentally added it somehow in the Windows' task scheduler?

As a test you could change the strings to something very different, then re-assemble and run to see if the new message is popping up constantly.
Posted on 2010-09-08 18:35:57 by LocoDelAssembly
Not much help I'm afraid, but a little note on style: NULL should only be used for pointer values. The argument to ExitProcess is an integer, not a pointer, and thus you should use plain 0 rather than NULL. Doesn't change the generated code in any way, though, it's merely a readability thing.

Other than that, what Loco said.
Posted on 2010-09-09 01:17:37 by f0dder
Please attach the exe.
Posted on 2010-09-09 09:25:58 by ti_mo_n


work.rar


Its all in this work.rar file.

Thanks.
Posted on 2010-09-09 10:08:21 by Assembler_Kev
just spent a good 15 minutes trying to find the website i got the hello world program from but no luck. It was a respectable site, so I cant imagine it being a dodgy program. My processor is x86, not 386 which could be part of the problem but I am unsure how to solve (purge the processor of faulty program). Will I need to (masm) a similar correct .asm in the same file directory to overwrite it?


My computer is dual core, so maybe explains why it runs twice? also I think I might of assembled it twice by accident. (wasnt working so I did it again).

I want to do anything that will get rid of my nusiance program (execpt anything extreme of course).

thanks.
Posted on 2010-09-09 10:34:53 by Assembler_Kev
CPU Disasm
Address   Hex dump          Command                                  Comments
00401000  /.  6A 40         PUSH 40                                  ; /Type = MB_OK|MB_ICONASTERISK|MB_DEFBUTTON1|MB_APPLMODAL
00401002  |.  68 0F304000   PUSH OFFSET start.0040300F               ; |Caption = "MY FIRST PROGRAM!!!"
00401007  |.  68 00304000   PUSH OFFSET start.00403000               ; |Text = "Hello world!!!"
0040100C  |.  6A 00         PUSH 0                                   ; |hOwner = NULL
0040100E  |.  E8 0D000000   CALL <JMP.&user32.MessageBoxA>           ; \USER32.MessageBoxA
00401013  |.  6A 00         PUSH 0                                   ; /ExitCode = 0
00401015  \.  E8 00000000   CALL <JMP.&kernel32.ExitProcess>         ; \KERNEL32.ExitProcess
0040101A   $- FF25 00204000 JMP DWORD PTR DS:[<&kernel32.ExitProcess
00401020   $- FF25 08204000 JMP DWORD PTR DS:[<&user32.MessageBoxA>]
Still no way that the message can be shown even twice.
Posted on 2010-09-09 10:37:19 by LocoDelAssembly
How are you executing the program? Double-clicking on the EXE? Highlighting the icon and pressing the Enter key?

Try switching up how you are interacting with the application and see if that changes anything.
Posted on 2010-09-09 11:02:45 by SpooK
Loco, I dont understand the purpose of your last post please explain.

And I assembled the .asm in command prompt I believe. It just ran automatically after that.


Posted on 2010-09-09 12:03:27 by Assembler_Kev

And I assembled the .asm in command prompt I believe. It just ran automatically after that.


Are you running a batch file?
Posted on 2010-09-09 12:23:14 by SpooK

Loco, I dont understand the purpose of your last post please explain.


It was to clear out any doubts about some injected code that is not visible in the source code (e.g. virus), or just that the executable wasn't really produced from your source. It was interesting mostly for ti_mo_n actually :P But of course it is useful for you too since this tells you that you should look for the problem somewhere else instead of the executable itself.
Posted on 2010-09-09 12:38:19 by LocoDelAssembly


Loco, I dont understand the purpose of your last post please explain.


It was to clear out any doubts about some injected code that is not visible in the source code (e.g. virus), or just that the executable wasn't really produced from your source. It was interesting mostly for ti_mo_n actually :P But of course it is useful for you too since this tells you that you should look for the problem somewhere else instead of the executable itself.


If the popup isnt from this .asm file I am a little miffed, as the popup has the right amount of exclamation marks and everything. I appreciate it is only supposed to pop up once but it don't, just pops up randomly.
Posted on 2010-09-09 17:55:01 by Assembler_Kev
Refer to the Three Billy Goats Gruff.
Posted on 2010-09-09 18:37:10 by Homer

Refer to the Three Billy Goats Gruff.



If the big goat went first they wouldnt have need to make that cr*p up. Whats that got to do with this?

Keep on subject please. I still need help with this.
Posted on 2010-09-12 15:29:11 by Assembler_Kev
Everything about your post reeks of TROLL, however you have the benefit of the doubt
This program cannot cannot start by itself, nor can it execute more than once without intervention by either the user or the system - find out how it is starting up and correct it.

http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx


.
Posted on 2010-09-12 18:19:14 by Homer
To repeat my previous question: are you running a batch file?

If so, is it possible that this batch file is doing more than you realize?
Posted on 2010-09-12 18:32:36 by SpooK
This problem seems to have gone away after a long time. Thank you all that tried to help.
Posted on 2010-12-30 18:51:18 by Assembler_Kev

This problem seems to have gone away after a long time. Thank you all that tried to help.



I wish some of my problems would go way like that too.  ;)
Posted on 2010-12-31 08:01:17 by skywalker