News:

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

Main Menu

Tutorials -

Started by Robertom, August 23, 2012, 05:42:43 AM

Previous topic - Next topic

Robertom

Hi,

Im getting some problem with tutorials. I cant see output on console of  Demo2 and others.
but I tried with a different computer  and it works fine without differences in code


Windows 7 Ultimate 32bit / Masm32 11

any suggestion?
Thanks

jj2007

No such problems on Win7 Pro. Do you use linker option /subsystem:console ?

Robertom

Hi,

I assembled from QuickEditor "Console Assemble and Link" like tutorial says

Ho assemblato da Quickeditor sui entrambi i pc e solo su uno non mi da l'output su console


dedndave

it could be a PATH issue
perhaps one PC has a compiler installed - and the PATH, INCLUDE, or LIB environment variables are different

jj2007

Dave,

apparently the executable is being created but no output, so it must be something different.

Robert,

Did the assembler and/or linker issue any warnings?
Can you open a command prompt, e.g. with Start/Esegui?
If you run the progs from there, what do you see?
Do the demos end with an inkey, so that you can see output before it closes?
Can you see output if in \masm32\tutorial\console\demo2\proc.asm you add the red parts below?

    includelib \masm32\lib\kernel32.lib
    uselib msvcrt

    .code                       ; Tell MASM where the code starts

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

start:                          ; The CODE entry point to the program

    call main                   ; branch to the "main" procedure
    inkey
    exit

Saluti,
Jochen

Robertom

Hi,


The output is redirected to console window so i can see any messages.There are no warnings or any kind of message
but with inkey it works....thanks

unfortunately I dont know which is the difference between the first and second computer.
on the second , the code works without inkey. Im a bit curious but thanks anyway ;)

original:

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

;                 Build this with the "Project" menu using
;                       "Console Assemble and Link"

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

;   Procedures are a fundamental building block of programs that are
;   build directly into the processor using CALL and RET instructions.
;   This shows how simple it is to do in MASM.

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

    .486                                    ; create 32 bit code
    .model flat, stdcall                    ; 32 bit memory model
    option casemap :none                    ; case sensitive

    include \masm32\include\windows.inc     ; always first
    include \masm32\macros\macros.asm       ; MASM support macros

  ; -----------------------------------------------------------------
  ; include files that have MASM format prototypes for function calls
  ; -----------------------------------------------------------------
    include \masm32\include\masm32.inc
    include \masm32\include\gdi32.inc
    include \masm32\include\user32.inc
    include \masm32\include\kernel32.inc

  ; ------------------------------------------------
  ; Library files that have definitions for function
  ; exports and tested reliable prebuilt code.
  ; ------------------------------------------------
    includelib \masm32\lib\masm32.lib
    includelib \masm32\lib\gdi32.lib
    includelib \masm32\lib\user32.lib
    includelib \masm32\lib\kernel32.lib


    .code                       ; Tell MASM where the code starts

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

start:                          ; The CODE entry point to the program

    call main                   ; branch to the "main" procedure
   

    exit

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

main proc

    print chr$("Hi, I am in the 'main' procedure",13,10)

    ret                         ; return to the next instruction after "call"

main endp

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

end start                       ; Tell MASM where the program ends









EDIT:
I have just unistalled and installed again MASM32, now all works without inkey.....