0

After about an hour of banging my head against a wall, I decided to ask you guys about this. I'm coding in assembly using KipIrvine's stuff, and I'm using Visual Studio 2015 on Windows 10 if that helps. Obviously this debug output shouldn't happen, it should run my program instead of just givng a massive unload/load debug menu right? Here is a small section of the debug output:

'ohgodpleasework.exe' (Win32): Loaded 'C:\Users\Algor\Desktop\visualstudio2k15\Project64_VS2015\x64\Debug\ohgodpleasework.exe'. Symbols loaded.
'ohgodpleasework.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Symbols loaded.
'ohgodpleasework.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Symbols loaded.
'ohgodpleasework.exe' (Win32): Unloaded 'C:\Windows\System32\kernel32.dll'
'ohgodpleasework.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Symbols loaded.
'ohgodpleasework.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Symbols loaded.
'ohgodpleasework.exe' (Win32): Unloaded 'C:\Windows\System32\KernelBase.dll'
'ohgodpleasework.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Symbols loaded.
'ohgodpleasework.exe' (Win32): Unloaded 'C:\Windows\System32\KernelBase.dll'

That KernelBase.dll had about 75 of it's own lines, just the same loaded/unloaded lines. And it ended with:

 "The program '[1896] ohgodpleasework.exe' has exited with code 0 (0x0)."

Anyone have this happen before who can provide some insight?

As requested here's the code of what I'm trying to run:

; Use of if statement


INCLUDE C:\Irvine\Irvine32.inc

.data
cost Dword  ?            
revenue Dword  ?


str1 Byte "Enter revenue", 0dh, 0ah, 0
str2 Byte "Enter cost", 0dh, 0ah, 0
str3 Byte "Break Even", 0dh, 0ah, 0
str4 Byte "Profit = ", 0
Str5 Byte "Loss = ", 0


.code
main PROC
    lea edx,str1
    call WriteString
    call ReadDec
    mov  revenue, eax

    lea  edx,str2
    call WriteString
    call ReadDec
    mov  cost, eax

    cmp  revenue, eax
    JE   L1             ;if (revenue== cost)
    JA   L2             ;if else (revenue > cost)
    JB   L3             ;if else (revenue < cost)

    L1:
        lea edx, str3
        call WriteString 
        jmp  Stop
    L2:
        mov  ebx, cost
        mov  eax, revenue

        sub  eax, ebx
        lea  edx, str4
        call WriteString
        call WriteDec
        call crlf
        jmp Stop

    L3:

        mov  ebx, revenue
        mov  eax, cost
        sub  eax, ebx
        lea edx, str5
        call WriteString
        call WriteDec
        call crlf


    Stop:   

    exit
main ENDP

END main
Algorn120
  • 21
  • 4
  • Why do you care? What's the actual problem? – Jester Oct 10 '17 at 15:54
  • @Jester What do you mean? Debugging the program leads to this and the program never launches. Im fairly certain that this debug output isn't a normal thing. – Algorn120 Oct 10 '17 at 16:32
  • 1
    Looks like it launched and completed without error. – Jester Oct 10 '17 at 16:32
  • 2
    Please don't delete questions and then repost them. – Ross Ridge Oct 10 '17 at 16:36
  • hmmm. I guess I must have coded something wrong then. This is my first time trying to use VS to code anything and I just kinda assumed a massive output in the debugger was a bad thing. Guess its time to troubleshoot. Thanks @Jester – Algorn120 Oct 10 '17 at 16:41
  • @RossRidge Sorry, I figured since i wrote it rather ambiguously late at night and no-one really had an idea of what I was asking I'd delete the old one and try to clarify as best I could. – Algorn120 Oct 10 '17 at 16:44
  • 1
    Can you post source code of your program? Maybe the output is correct run, and it just doesn't get into debugger, instead it runs like normal execution. Also post description how you actually compile+run the code, and what do you expect to happen when "debugging" will work. Did you put some breakpoint somewhere, or did you use step-into command instead of "run", etc? – Ped7g Oct 10 '17 at 16:46
  • Make sure your project is set to produce a console program. Also, put a breakpoint on your first instruction. – Jester Oct 10 '17 at 16:50
  • @Ped7g I just updated my post with the code I'm trying to run. I'm in the most basic ASM course my university offers, so please forgive any blatant ignorant mistakes. – Algorn120 Oct 10 '17 at 16:50
  • @Jester A console pops up briefly then immediately closes itself, does that mean it's a console program? And how do I add a breakpoint? I'm sorry for the stupidity in these questions, I'm incredibly new to this. Thanks for answering everything so far, I really appreciate it – Algorn120 Oct 10 '17 at 16:58
  • After everyone's help I'm leaning towards this being operator error instead of a coding thing. Someone was kind enough to run the code a few times on their machine and it worked perfectly, so I'm going uninstall/reinstall Irvine and see if it helps. Thanks to everyone! (Is there a way to mark a question as solved?) – Algorn120 Oct 10 '17 at 17:06
  • 1
    Not without providing an answer to the question. Since the problem seems to have been solved in a way that wouldn't be helpful to anyone else, I'd suggest just deleting the question. However since you've already deleted one downvoted question today this may result you receiving a temporary question ban. – Ross Ridge Oct 10 '17 at 17:33
  • @RossRidge So Should I just leave it up or take the temporary ban? I don't use this site for much other than very newbie questions so if you feel like deleting the post would be better for the community I don't mind the temporary ban. – Algorn120 Oct 10 '17 at 17:47
  • @Algorn120: See https://stackoverflow.com/questions/46394685/debugging-asm-with-visual-studio-register-content-will-not-display for how to use the VS debugger on asm. See also https://stackoverflow.com/tags/x86/info. – Peter Cordes Oct 10 '17 at 21:30
  • @Algorn120, If this issue is resolved, you could share your detailed solution as the answer(not a comment), and then mark it later. See it here: https://stackoverflow.com/tour. But if it was not the real issue, you could delete this case by yourself: https://meta.stackexchange.com/questions/5221/how-does-deleting-work-what-can-cause-a-post-to-be-deleted-and-what-does-that. – Jack Zhai Oct 18 '17 at 02:31

1 Answers1

1

You can control that

(TOOLS)(OPTIONS)(DEBUGGING)(OUTPUT WINDOW)

Module Load Messages

Module Unload Messages

EvilTeach
  • 28,120
  • 21
  • 85
  • 141