flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > misunderstood with stuct |
Author |
|
shism2 08 Nov 2005, 21:32
Try getting rid of the union and see if that works
|
|||
08 Nov 2005, 21:32 |
|
Tomasz Grysztar 08 Nov 2005, 22:20
That was bug in "struct" macro that went unnoticed - thanks for finding it out. Updated the fasmw package with the fixed version.
|
|||
08 Nov 2005, 22:20 |
|
farrier 09 Nov 2005, 07:13
This structure is used to Print an RTF document directly to printer. Using the latest 08 November FASM, the following struct does not pass assembly. Yesterday, it did:
Code: CCHDEVICENAME equ 32 CCHFORMNAME equ 32 DEVMODE struct dmDeviceName db CCHDEVICENAME dup (?) ;0 dmSpecVersion dw ? ;32 dmDriverVersion dw ? ;34 dmSize dw ? ;36 dmDriverExtra dw ? ;38 dmFields dd ? ;+40 union ;+44 struct dmOrientation dw ? dmPaperSize dw ? dmPaperLength dw ? dmPaperWidth dw ? ends dmPosition POINT ends dmScale dw ? ;52 dmCopies dw ? ;+54 dmDefaultSource dw ? ;56 dmPrintQuality dw ? ;58 dmColor dw ? ;60 dmDuplex dw ? ;62 dmYResolution dw ? ;64 dmTTOption dw ? ;66 dmCollate dw ? ;+68 dmFormName db CCHFORMNAME dup (?) dmLogPixels dw ? dmBitsPerPel dd ? dmPelsWidth dd ? dmPelsHeight dd ? dmDisplayFlags dd ? dmDisplayFrequency dd ? dmICMMethod dd ? dmICMIntent dd ? dmMediaType dd ? dmDitherType dd ? dmReserved1 dd ? dmReserved2 dd ? DEVMODE ends Error report: DEVMODE ends \Program Files\fasm\include\macro\masm.inc [9] ends [0]: { match =.,name@struct \{ ends \} } \Program Files\fasm\include\macro/struct.inc [60] ends [6]: make@struct name,fields \Program Files\fasm\include\macro/struct.inc [76] make@struct [9]: match , field \{ make@substruct type,name,sub def \Program Files\fasm\include\macro/struct.inc [120] make@substruct [6]: make@substruct type,name,sub def \Program Files\fasm\include\macro/struct.inc [125] make@substruct [11]: match fields, define \\{ define@\#substruct fields \\} \} } \Program Files\fasm\include\macro/struct.inc [161] define@substruct [1]: virtual at parent#.#name error: undefined symbol. _________________ Some Assembly Required It's a good day to code! U.S.Constitution; Bill of Rights; Amendment 1: ... the right of the people peaceably to assemble, ... The code is dark, and full of errors! |
|||
09 Nov 2005, 07:13 |
|
Tomasz Grysztar 09 Nov 2005, 09:51
Please check it now.
|
|||
09 Nov 2005, 09:51 |
|
Vasilev Vjacheslav 09 Nov 2005, 14:12
thanks for fast fixes, Tomasz, i think it was critical error
this struct also isn't working, it's normal? i mean virtual at structure member Code:
struct IMAGE_SECTION_HEADER
Name rb IMAGE_SIZEOF_SHORT_NAME
misc rb 8
virtual at misc
PhysicalAddress dd ?
VirtualSize dd ?
end virtual
VirtualAddress dd ?
SizeOfRawData dd ?
PointerToRawData dd ?
PointerToRelocations dd ?
PointerToLinenumbers dd ?
NumberOfRelocations dw ?
NumberOfLinenumbers dw ?
Characteristics dd ?
ends
|
|||
09 Nov 2005, 14:12 |
|
farrier 09 Nov 2005, 14:37
Looks great!
Not only does it assemble without error, it runs exactly the way it should. Thanks for your excellent product!!! farrier _________________ Some Assembly Required It's a good day to code! U.S.Constitution; Bill of Rights; Amendment 1: ... the right of the people peaceably to assemble, ... The code is dark, and full of errors! |
|||
09 Nov 2005, 14:37 |
|
Tomasz Grysztar 09 Nov 2005, 15:11
No, you should not use "virtual" inside "struct", only the data definitions, and no other directives etc.
|
|||
09 Nov 2005, 15:11 |
|
Vasilev Vjacheslav 09 Nov 2005, 16:54
ok, thanks
|
|||
09 Nov 2005, 16:54 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.