x86 - Assembly coding with masm32 -


in assembly coding, working masm32.

how can put value variable, not defiened @ .data segment, local decleration?
thous:

.486                                     .model flat, stdcall                     option casemap :none                      include \masm32\include\windows.inc      include \masm32\macros\macros.asm         include \masm32\include\masm32.inc include \masm32\include\gdi32.inc include \masm32\include\user32.inc include \masm32\include\kernel32.inc  includelib \masm32\lib\masm32.lib includelib \masm32\lib\gdi32.lib includelib \masm32\lib\user32.lib includelib \masm32\lib\kernel32.lib   .data    .code    start:    call main   exit    main proc    local dewit:dword  mov dewit, 0 print dewit    ret    main endp    end start 

i tried this:

mov dewit, 0   

it didnt work. however, code:

mov dewit, input("enter number")   

did put value it.

anybody?

** local decleration can in procedure

since using masm32 if trying print out 32-bit value try doing way str$:

print str$(dewit) 

this converts 32-bit value @ memory location dewit string, , string printed on console. work immediate value well:

print str$(100) 

and register:

print str$(eax) 

you can use $ustr if wish print unsigned value.

these macros described in high level macro comes masm32 sdk


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -