flat assembler
Message board for the users of flat assembler.
Index
> Main > Assume... |
Author |
|
edfed 04 Dec 2010, 17:09
mov eax,[ebx+ListStruct.Prev]
|
|||
04 Dec 2010, 17:09 |
|
MercuryKnight 04 Dec 2010, 17:14
I could do that, but that is not what I want to do. struct works, as I had already done that when I commented out the two lines and added that one in to make sure it was assume and not struct, as struct.inc was modified in the last package.
|
|||
04 Dec 2010, 17:14 |
|
edfed 04 Dec 2010, 17:18
Code: virtual at ebx ListStruct 1,2 end virtual mov eax,[ebx.Prev] ;eax=1 can something like that work? |
|||
04 Dec 2010, 17:18 |
|
MercuryKnight 04 Dec 2010, 17:22
Code: flat assembler version 1.69.27 (1295447 kilobytes memory) test.asm [14]: ListStruct 1,2 struct.inc [153] ListStruct [6]: ..field = $ error: invalid value. nope, don't work... |
|||
04 Dec 2010, 17:22 |
|
edfed 04 Dec 2010, 17:29
Sorry
|
|||
04 Dec 2010, 17:29 |
|
MHajduk 04 Dec 2010, 19:42
MercuryKnight, you may try something like this:
Code: include 'macro\struct.inc' struct ListStruct Prev rd 1 Next rd 1 ends use32 StartX: virtual at ebx tmp ListStruct end virtual mov ebx, ListElement mov eax, [tmp.Prev] ret align 4 ListElement ListStruct |
|||
04 Dec 2010, 19:42 |
|
MercuryKnight 04 Dec 2010, 20:51
Found it! It was in the define@struct macro. I compared it with my old file and as it turned out, there was one change made in it that broke assume: local ..base
This is the current fragment within define@struct (since I tend to format the include files for improved readability, you can do a quick search for ..base within your files) Code: struc name value \\{ \\local \\..base <-- here match any, fields@struct \\\{ fields@struct equ fields@struct,.,name,<values> \\\} match , fields@struct \\\{ label \\..base <-- here forward <snip> common label . at \\..base <-- and here \\\} \\} I just removed ..base and restored this part back to what it was when I downloaded 1.68 a few months ago. Code: struc name value \\{ match any, fields@struct \\\{ fields@struct equ fields@struct,.,name,<values> \\\} match , fields@struct \\\{ label . <-- here forward <snip> common <-- and here \\\} \\} So far I am not sure why this change was made, anybody knows? This is the only change I've made, and everything I've compiled so far works without any erroors. PS: I am also using 1.69.27 right now, that is the only changes made to the include files (apart from the formatting) |
|||
04 Dec 2010, 20:51 |
|
Tomasz Grysztar 04 Dec 2010, 22:11
This change in "struct" macro was done in order to make a proper locals context when the structure is defined (it was discussed in some other thread). The "assume" macro has not been updated to work correctly with this new version of "struct", however it is very minor modification that fixes the problem.
Just replace this line: Code: match =reg, def \\\{ define def \\\} Code: match =reg =at label, def \\\{ define def \\\} I will upload the updated package in a few minutes. |
|||
04 Dec 2010, 22:11 |
|
MercuryKnight 05 Dec 2010, 04:53
Ahhhhh that does it lol. I reinserted the three lines back into the file and made the modification in the assume macros, no errors. Thanks Tomasz!
|
|||
05 Dec 2010, 04:53 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.