Author Topic: Missing data types in win64.inc  (Read 199 times)

bluedevil

  • Member
  • **
  • Posts: 160
  • Binary Grinder
    • SCTZine
Missing data types in win64.inc
« on: September 08, 2022, 05:33:49 PM »
Hello

MS has declared its base types here: Windows Data Types.

1. Some of the data types weren't included in win64.inc. For example INT. We have UINT, but no INT. I know there is equilavent data types for INT like INT32.

2. There is no HKEY or HGLOBAL. I know i can use HANDLE!

I just wonder, if these data types are not included on purpose or something else?

Thanks.
..Dreams make the future
But the past never lies..
BlueDeviL // SCT
My Code Site:
BlueDeviL Github

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 9763
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Missing data types in win64.inc
« Reply #1 on: September 08, 2022, 05:46:13 PM »
Hi bluedevil,

I intentionally use native data SIZES as they are reliable in assembler, BYTE up to QWORD, then SSE4, AVX and AVX2. What I try to avoid is non referential data NAMES as they mean different data sizes in different Windows versions, 16, 32 and 64 bit versions.

A large number of named data types are #TYPEDEFs to native data sizes, by going directly to the native data sizes, you avoid a step looking for data size errors.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

jj2007

  • Member
  • *****
  • Posts: 12958
  • Assembler is fun ;-)
    • MasmBasic
Re: Missing data types in win64.inc
« Reply #2 on: September 08, 2022, 06:05:53 PM »
MS has declared its base types here: Windows Data Types.

An assembler programmer needs
BYTE/SBYTE
WORD/SWORD
DWORD/SDWORD
QWORD
OWORD

And, of course, he needs to know to what Micros*t's load of crap translates to.

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 9763
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Missing data types in win64.inc
« Reply #3 on: September 08, 2022, 06:42:50 PM »
What the Microsoft list DOES NOT TELL YOU is the data SIZE. Assemblers do not natively handle data NAMES, they are data SIZES based on register sizes.

As far as wanting an INT data type,

INT n/INTO/INT3/INT1—Call to Interrupt Procedure


It cannot be done as INT is an Intel mnemonic.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

bluedevil

  • Member
  • **
  • Posts: 160
  • Binary Grinder
    • SCTZine
Re: Missing data types in win64.inc
« Reply #4 on: September 08, 2022, 06:49:07 PM »
Hi bluedevil,

I intentionally use native data SIZES as they are reliable in assembler, BYTE up to QWORD, then SSE4, AVX and AVX2. What I try to avoid is non referential data NAMES as they mean different data sizes in different Windows versions, 16, 32 and 64 bit versions.

A large number of named data types are #TYPEDEFs to native data sizes, by going directly to the native data sizes, you avoid a step looking for data size errors.

That was the answer for me thank you hutch

MS has declared its base types here: Windows Data Types.

An assembler programmer needs
BYTE/SBYTE
WORD/SWORD
DWORD/SDWORD
QWORD
OWORD

And, of course, he needs to know to what Micros*t's load of crap translates to.

@jj2007 Esattamente  :thumbsup:
..Dreams make the future
But the past never lies..
BlueDeviL // SCT
My Code Site:
BlueDeviL Github