News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

how to write negative float value in MASM?

Started by supercoollee, May 07, 2010, 08:40:48 AM

Previous topic - Next topic

dedndave

Quotei find INVOKE functionname, FP8(1.0), FP8(0.0), FP8(-1.0)  can't help the situation when a function PROTO is like this:
function PROTO :dword,:dword,:dword,:dword,:dword,:dword

that's because you are using 4-byte floats   :bg
try this, instead...

INVOKE functionname, FP4(1.0), FP4(0.0), FP4(-1.0)

Farabi

Put this above all of your include file.


literal_double macro lit_double:vararg
local local_double

.data
local_double real8 lit_double

.code
exitm <local_double>
endm

literal_float MACRO lit_float:VARARG
LOCAL local_float
.data
local_float real4 lit_float
.code
EXITM <local_float>
ENDM

CFLT MACRO lit_float:VARARG
EXITM <literal_float(lit_float)>
ENDM


CDBL macro lit_double:vararg
exitm <literal_double(lit_double)>
endm


This is how do you use it

invoke glVertex3f,CFLT(1.0),0,0
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

GregL


joemc

just use directx.  I have switched myself. mostly because AutoCAD did. Whats good enough for them is good enough for me.

supercoollee

is there some extra requirements for using directx instead of opengl?
currently i only have MASM32 package downloaded from Hutch's site. this IDE is simple and lightweight and doesn't mess with my system. i like this kind of environment.  :thumbu
in fact, what i need is just an IDE which helps me create a standalone software, i don't need much fancy stuff, i don't like softwares which are 1GB in size.  :snooty:

Farabi

Quote from: supercoollee on May 09, 2010, 03:10:24 AM
is there some extra requirements for using directx instead of opengl?
currently i only have MASM32 package downloaded from Hutch's site. this IDE is simple and lightweight and doesn't mess with my system. i like this kind of environment.  :thumbu
in fact, what i need is just an IDE which helps me create a standalone software, i don't need much fancy stuff, i don't like softwares which are 1GB in size.  :snooty:


Try using RadAsm.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"