Hi Greenhorn,
The code below works fine and eax returns 28h which is the correct result :
.386
.model flat,stdcall
option casemap:none
BITMAPINFOHEADER STRUCT
biSize DWORD ?
biWidth DWORD ?
biHeight DWORD ?
biPlanes WORD ?
biBitCount WORD ?
biCompression DWORD ?
biSizeImage DWORD ?
biXPelsPerMeter DWORD ?
biYPelsPerMeter DWORD ?
biClrUsed DWORD ?
biClrImportant DWORD ?
BITMAPINFOHEADER ENDS
ExitProcess PROTO :DWORD
includelib \PellesC\lib\Win\kernel32.lib
.data
myArray BYTE SIZEOF(BITMAPINFOHEADER) dup(0)
x1 dd 10
.code
start:
mov eax,OFFSET x1 - OFFSET myArray
invoke ExitProcess,0
END start