flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tomasz Grysztar 16 Jan 2006, 09:22
Maybe
Code: virtual at _sample sample ts end virtual |
|||
![]() |
|
vbVeryBeginner 16 Jan 2006, 10:06
hi tomasz,
no luck ![]() Code: include '%fasminc%\win32ax.inc' .code struct ts m1 dd ? m2 dd ? ends _sample ts virtual at _sample sample ts end virtual start: mov [sample.m2],30 invoke ExitProcess,0 .end start the above result testing.exe has encountered a problem and needs to close. We are sorry for the inconvenience. If you were in the middle of ... ... bla bla bla for more information about this error, click here ... |
|||
![]() |
|
Tomasz Grysztar 16 Jan 2006, 10:13
That problem is only because you try to write the not-writeable section (the .code one). Remove ".code" macro to make it use default ".flat" section and it works.
|
|||
![]() |
|
vbVeryBeginner 16 Jan 2006, 10:24
thank you tomasz for your fast reply
![]() thanks :p and sorry for my stupid :p but, why "sample equ _sample" couldn't solve such problem, since when sample equ to _sample, no variable with name "sample" is allowed anymore, and imho, the assembler should know [sample.xval] is equal to [_sample.xval]. :p |
|||
![]() |
|
Tomasz Grysztar 16 Jan 2006, 10:26
This is because the dot is not a special character in fasm, in a sense that is the part of label name as any other character is. So after the "_sample.xval" gets defined, it's the whole entity and assembler cannot know what was it made from - well, you could also define it just this way:
Code: _sample.xval: etc. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.