| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Lnum_1: dw 1 Lnum_2: dw 1 Lstr_0: db "counter line: ",10,0 Lstr_1: db "O ",0 fm3: db "->%s",0 only "->" will be output on the console. mov dword [Lnum_1], 1 mov dword [Lnum_2], 1 @L2: cmp dword [Lnum_1], 4 je @L0 push Lstr_0 push fm3 call _printf add esp, 8 @L3: cmp dword [Lnum_2], 5 je @L1 push Lstr_1 push fm3 call _printf add esp, 8 inc dword [Lnum_2] jmp @L3 @L1: inc dword [Lnum_1] jmp @L2 @L0: ret ;------ What can I do? Thanks for help Jens |
|
#2
| |||
| |||
| Jens Kallup wrote: > Lnum_1: dw 1 > Lnum_2: dw 1 These are "word" (16-bit) variables. You probably want "dd", since you're using them as "dword" (and thus "zero-initialising" your string)... "dw" kind of "sounds like" it should mean "dword", but nooo... "data word". "dd" is "data dword". (ask me how I know about this source of confusion... ![]() Best, Frank |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.