Author Topic: Bug Easycode struct problem BITMAPFILEHEADER  (Read 2066 times)

costycnc

  • Regular Member
  • *
  • Posts: 3
Bug Easycode struct problem BITMAPFILEHEADER
« 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 !

ToutEnMasm

  • Member
  • *****
  • Posts: 1190
    • EditMasm
Re: Bug Easycode struct problem BITMAPFILEHEADER
« Reply #1 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 !
Fa is a musical note to play with CL

rsala

  • Moderator
  • Member
  • *****
  • Posts: 266
    • Easy Code
Re: Bug Easycode struct problem BITMAPFILEHEADER
« Reply #2 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
EC coder

costycnc

  • Regular Member
  • *
  • Posts: 3
Re: Bug Easycode struct problem BITMAPFILEHEADER
« Reply #3 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
and result:
https://www.youtube.com/watch?v=AyWREB7ZoZA
Thanks again!

rsala

  • Moderator
  • Member
  • *****
  • Posts: 266
    • Easy Code
Re: Bug Easycode struct problem BITMAPFILEHEADER
« Reply #4 on: November 14, 2014, 08:56:38 AM »
Hi costycnc,

Thanks for your kind words about Easy Code!

Regards.
EC coder

dedndave

  • Member
  • *****
  • Posts: 8789
  • Still using Abacus 2.0
    • DednDave
Re: Bug Easycode struct problem BITMAPFILEHEADER
« Reply #5 on: November 15, 2014, 01:34:50 AM »
nice project  :t