flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
shutdownall 03 Sep 2014, 19:29
No there is no difference.
Could even be: Code: tst dd 1 dd 1000000 dd 100000 dd 10000 dd 1000 dd 100 dd 10 Last edited by shutdownall on 03 Sep 2014, 21:29; edited 1 time in total |
|||
![]() |
|
fasmnewbie 03 Sep 2014, 20:05
shutdownall
Ok. But I get different answer in EAX. Is it something about the addressing of proc locals? Code: format pe console include 'win32axp.inc' ;include 'dbg32.inc' call tester invoke system,"pause>null" invoke exit,0 proc tester locals val dd 31h,32h,33h ;displays whatever dd 34h,35h,36h ;val dd 31h,32h,33h,\ ;displays 34h. Correct ; 34h,35h,36h endl mov eax,[val+12] ;prtreg@ eax ret endp data import library msvcrt,'msvcrt.dll' import msvcrt,\ system,'system',exit,'exit',\ putchar,'putchar',getchar,'getchar' end data On the contrary, the first set of "val" works outside locals. |
|||
![]() |
|
revolution 03 Sep 2014, 23:00
The locals macro won't initialise the values for unnamed data declarations. Outside of a proc definition the dd functions normally.
|
|||
![]() |
|
typedef 04 Sep 2014, 05:20
Code: locals frac db 0 ;marker 1 bytes both db 0 ;marker 2 bytes big db 0 ;marker 3 bytes small db 0 ;marker 4 bytes large db 0 ;marker <-------------------- orphaned byte num dd 0 ;integral part num2 dd 0 ;fraction part idx dd 0 ;for small ndx dd 1 ;For big and large exponent dd 0 mantissa dd 0.0 copy dd 0.0 y dd 10.0 ;divisor/multiplier tst dd 1,1000000,100000,\ ;<------ here 10000,1000,100,10 endl You might want to at least WORD align the stack there. |
|||
![]() |
|
fasmnewbie 04 Sep 2014, 08:14
revolution wrote: The locals macro won't initialise the values for unnamed data declarations. Outside of a proc definition the dd functions normally. |
|||
![]() |
|
fasmnewbie 04 Sep 2014, 08:21
typedef wrote:
That's a great tip. Now my proc behaves as expected when I test it into some big test loop. Thanks guru. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.