The MASM Forum

Projects => Easy Code IDE 32/64-bit => Topic started by: costycnc on November 13, 2014, 09:56:43 AM

Title: Bug Easycode struct problem BITMAPFILEHEADER
Post by: costycnc on November 13, 2014, 09:56:43 AM
I see when create a structure first parameter  must be Dword for functioning....
If first parameter is declared word ... this parameter keep 4 octets and write 2 octets
Second parameter is written after 4 octets ... even if the first parameter is declared word

Example:



TEST Struct

Param1 DWord  ?
Param2 DWord  ?

TEST ENDS


Local pertest:TEST

mov pertest.Param1, "AA"
mov pertest.Param2, "BB"

Result of this struct  is : "A","A",0,0,"B","B"  and will be this ... "A","A","B","B"....  right?
Is bug?


Thanks !
Title: Re: Bug Easycode struct problem BITMAPFILEHEADER
Post by: TouEnMasm on November 13, 2014, 06:51:38 PM

Just a problem with the alignment of the stucture

Quote
BITMAPFILEHEADER   STRUCT WORD     ;DEFALIGNMASM
   bfType WORD ?
   bfSize DWORD ?
   bfReserved1 WORD ?
   bfReserved2 WORD ?
   bfOffBits DWORD ?
BITMAPFILEHEADER   

and all must be ok now !
Title: Re: Bug Easycode struct problem BITMAPFILEHEADER
Post by: rsala on November 14, 2014, 05:56:39 AM
Thanks ToutEnMasm!

Hi ostycnc,

The point is that specefied by ToutEnMasm. Easy Code is just the IDE but it does not compile the code since the code is compiled by the Microsfot Macro assembler (the ml.exe file in the Bin folder of tthe MASM32 package).

Regards,

Ramon
Title: Re: Bug Easycode struct problem BITMAPFILEHEADER
Post by: costycnc on November 14, 2014, 06:29:22 AM
Thanks! Grazie mille !
You do not know how many nights lost to resolve this problem. Finally I made a dll in masm32, but when we moved on to win7 this dll that gave me errors.
Easy code is Great !!!
I need operate bitmap image directly in memory because getpixel an setpixel function is very slow in win7.
I hope to make something !
I made this program with Easycode !!! I love Easycode and Masm32 !!!
https://www.youtube.com/watch?v=ucu2LPLf-Vc (https://www.youtube.com/watch?v=ucu2LPLf-Vc)
and result:
https://www.youtube.com/watch?v=AyWREB7ZoZA (https://www.youtube.com/watch?v=AyWREB7ZoZA)
Thanks again!
Title: Re: Bug Easycode struct problem BITMAPFILEHEADER
Post by: rsala on November 14, 2014, 08:56:38 AM
Hi costycnc,

Thanks for your kind words about Easy Code!

Regards.
Title: Re: Bug Easycode struct problem BITMAPFILEHEADER
Post by: dedndave on November 15, 2014, 01:34:50 AM
nice project  :t