Masm32 SDK description, downloads and other helpful links

Main Menu

Glu in windows 10 64 bits compiled with UASM

Started by TouEnMasm, October 27, 2020, 08:06:19 PM

Previous topic - Next topic


This one is a translated demo from msdn
I have let c++ (/FA) do the math labor.

There is some modifies of the original:

bSetupPixelFormat PROC FRAME hdc:HDC
invoke memset,addr pfd,0,sizeof pfd ;init of structure for good colors

invoke Sleep,10 ;Slow a little rotations

latitude GLdouble 0       ;instead of GLfloat to be conform with proto
longitude GLdouble 0
latinc GLdouble 0
longinc GLdouble 0

Fa is a musical note to play with CL


This one is the same code as upper except he use  basic macros for real manipulations.
All macros had been verify by "C language /FA".
The macros works with DWORD,QWORD,REAL4,REAL8
That is enough to use the crt math fonctions here without too many trouble.
Here the list.
   -------------- FOR all real4 or real8 ,dword or qword -----------------------
   REEL4,REEL8 return NomVar
   MOVR             MOVR near_plane,3.0       ;
   ADDRR             movsd longinc,ADDRR (longinc,reel805) or movsd longinc,ADDRR (longinc,0.5)
   SUBRR                 //     SUBRR //
   DIVRR,MULRR    movsd moins,MULRR(aradius,REEL8(-1.0))
   convert Integer to Real,Convert Real to Integer
   CONVERTIR,CONVERTRI          QWORD to real8 or real4        DWORD to REAL4 or REAL 8 ,...........
            movsd rhauteur,CONVERTR(hauteur,1)      ;1 increase or Decrease ,0 same size

Fa is a musical note to play with CL