flat assembler
Message board for the users of flat assembler.

Index > Windows > why invoke gettickcount in opengl demo?

Goto page Previous  1, 2, 3
Author
Thread Post new topic Reply to topic
edfed



Joined: 20 Feb 2006
Posts: 4240
Location: 2018
edfed
Quote:
since x86 allow only 32 bits


that's not a problem, we can manipulate very very large values with multiple operations.

128bits addition:

add [ticks],eax
adc [ticks+4],ebx
adc [ticks+8],ecx
adc [ticks+12],edx


and don't forge MMX and SSE
what i find very sad is the lack of god instruction.

god [ticks],eax
Post 19 Mar 2010, 14:17
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17476
Location: In your JS exploiting you and your system
revolution
Sure, but C only allows one return value in a register. So most programmers would be too lazy to setup an array to get the multi-precision count value unless forced to.
Post 19 Mar 2010, 14:19
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4240
Location: 2018
edfed
but here is fasm forum, if i don't have hallucinations of course.
Post 19 Mar 2010, 15:36
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17476
Location: In your JS exploiting you and your system
revolution
But these functions are written with C program in mind. The OS developers don't make calling standards for asm programmers so returning multiple register values from GetTickCount() ain't gonna happen, ever.
Post 19 Mar 2010, 15:48
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4240
Location: 2018
edfed
C is a limitative pollution in the world of code. like almost all language, because many people can code in C, not the case with asm.
then, many errors can exist in C code, in asm it is less frequent.

C is an old abstraction layer.
asm is the only real layer since the begining, and will never change, evolve, but not change.
Post 21 Mar 2010, 09:15
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:  
Goto page Previous  1, 2, 3

< 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.