flat assembler
Message board for the users of flat assembler.

Index > Windows > Converting type definitons...

Author
Thread Post new topic Reply to topic
Escobar



Joined: 20 May 2005
Posts: 2
Escobar
Hi all, I am a newbie in this forum!

I have a question about how to convert C/C++ types to assembler.

I want to convert following type (can be found in <stddef.h>) : ptrdiff_t
It is defined as follows:

The <stddef.h> header defines through typedef:

ptrdiff_t
Signed integral type of the result of subtracting two pointers.


How do I make a 'signed integral type as a result of subtracting two pointers'?

Macros?

I need it in OpenGL1.5 funtion(s) that take arguments of that type.

Thank you in advance Very Happy
Post 20 May 2005, 13:29
View user's profile Send private message Reply with quote
MazeGen



Joined: 06 Oct 2003
Posts: 977
Location: Czechoslovakia
MazeGen
Result of subtracting two pointers is nothing more than signed integer - DWORD on x86-32 architecture, QWORD on x86-64 architecture.
Post 20 May 2005, 14:13
View user's profile Send private message Visit poster's website Reply with quote
Escobar



Joined: 20 May 2005
Posts: 2
Escobar
Thanks for the answer! Very appreciated! Very Happy
I guessed that it would be something like that but wasn't sure.
Thanks again
Post 20 May 2005, 14:33
View user's profile Send private message Reply with quote
MazeGen



Joined: 06 Oct 2003
Posts: 977
Location: Czechoslovakia
MazeGen
Smile

An advantage of non-portable code - you don't have to use a lot of different types.
Post 20 May 2005, 14:39
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.