Hello everyone,

I am very new to masm, especially to fpulib and trying to understand math functions so i wrote this here:
(my hello world for fpu)



.486
.model flat, stdcall
option casemap :none ; case sensitive

; #########################################################################

include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\Fpu.inc

includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\Fpu.lib

; #########################################################################

.data



one db "20",0
two db "21",0

result db 25 dup(0)

.code

start:

invoke FpuFLtoA, ADDR one,ADDR two, ADDR result, SRC1_REAL or SRC2_DIMM

invoke MessageBox, 0, ADDR result, 0, MB_OK

invoke ExitProcess, 0

; #########################################################################

end start



But all i get is an empty messagebox, meaning ADDR result = nothing, not 41
where is the mistake ? (i dont get any error messages from masm either)
:stupid:

and where can i find good beginner examples for asm & math ?
Posted on 2003-08-18 08:53:09 by Ranma_at
.486
.model flat, stdcall
option casemap :none ; case sensitive

; #########################################################################

include windows.inc
include user32.inc
include kernel32.inc
include Fpu.inc

includelib user32.lib
includelib kernel32.lib
includelib Fpu.lib

; #########################################################################

.data

result_0 db 250 dup(?)
result_1 db 250 dup(?)
lpDecimal_0 DD 2
lpDecimal_1 DD 16
my_float_0 REAL10 -27598237975.2535235
my_float_1 REAL10 23578.3333
msg DB 10, 13, 'SRC1_FPU gets number from fpu''s register st(0).', 10, 13, 'FpuFLtoA only looks at lpDecimal if SRC2_DMEM used.', 10, 13, 'Easier to start studying floats with functions in masm32.lib.', 0
.code

start:

finit
fld my_float_0
invoke FpuFLtoA, 0, ADDR lpDecimal_0, ADDR result_0, SRC1_FPU or SRC2_DMEM
invoke FpuFLtoA, ADDR my_float_1, ADDR lpDecimal_1, ADDR result_1, SRC1_REAL
invoke lstrcatA, ADDR result_0, ADDR msg
invoke MessageBox, 0, ADDR result_0, ADDR result_1, MB_OK



invoke ExitProcess, 0

; #########################################################################

end start
Posted on 2003-08-18 10:09:59 by roaknog
I still think the best way to learn fpu is to play with a debugger.

http://www.asmcommunity.net/board/index.php?topic=3532
Posted on 2003-08-18 10:25:00 by roticv
Before you start trying to use the FPU, you should have some basic idea of how the FPU functions. A tutorial is available for on-line consultation at:

http://www.masmforum.com/website/tutorials/fptute/index.html

The entire tutorial was also recently made available for download (either in .html or .chm format) in a previous thread on this board:

http://www.asmcommunity.net/board/index.php?topic=14673

As for the Fpulib, you must read AND understand the description (in the provided HELP file) of the functions you intend to use, along with the required parameters. Also read the section on Design philosophy.

Whenever you don't understand something in those documents, simply ask and we will be glad to provide clarification.

Raymond
Posted on 2003-08-18 11:51:01 by Raymond
Hi roaknog

The file you attached is infected with the mimail.B.Dropper Virus plz remove the file as Quick as possible.
Best Regards
Posted on 2003-08-19 08:32:31 by mistronr1
I have heard of the W32/Mimail@MM Virus but I don't have that. How do I test for the B version? Is it:drive_letter:\WINDOWS\System\WinStart001.EXE -b

I don't have the following files or registry entry. My modem is 28k.

I don't use Outlook Express.

The following files are not created in the Windows folder:

Videodrv.exe (19,824 bytes)
Exe.tmp (20,445 bytes)
Zip.tmp (20,567 bytes)


None of the following registry run key with the value of "VideoDriver" =
drive_letter:\WINNT\videodrv.exe is created to load the worm at startup:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Posted on 2003-08-19 09:22:06 by roaknog
Hi roaknog

you can test you system with :

http://www3.ca.com/virusinfo/virus.aspx?ID=36092

Computer associate provides a free fix, just run the fix and it'll remove the virus.

peace
Posted on 2003-08-19 09:44:39 by mistronr1
hey thanks for the virus then
:eek:
Posted on 2003-08-19 10:05:41 by Ranma_at
I am sorry. Do you have the files:
drive:\WINDOWS\System\WinStart001.EXE
and
drive:\WINDOWS\System\WinStart.EXE

Before I ran the cleaning utility I removed them and the string
drive_letter:\WINDOWS\System\WinStart001.EXE -b
from the registry at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

My result:

Cleaning utility for Win32/Mimail.Worm 1.0.0
Copyright (c) 2003, Computer Associates International, Inc.

Running on Windows XP Professional, build 2600 (Service Pack 1)
Executed on 2003-08-19 10:59h
--------------------------------------------------

Initializing virus scanning engine... ok
--------------------------------------------------
Scanning memory process space...
Scanning all drives on the local system...

--------------------------------------------------

A total of 112922 files were scanned.
Instances of Win32/Mimail virus variants were not found.
Posted on 2003-08-19 10:37:06 by roaknog
Hi Ranma_at

Please don't be to hard on the guy, he was just trying to help.

And to roaknog: I search my whole WINDOWS directory but couldn't find the files, even if I have them I've got a Swedish version of WINDOWS.

Peace
Posted on 2003-08-19 12:38:25 by mistronr1
Good news: my Home PC here is o.k. cause i didnt open the zip here
but my office pc is def. infected -
maybe i get a new one finally
hehe

:grin:

and i dont use msoutlook express anyway
Posted on 2003-08-19 13:02:13 by Ranma_at
Hi again
A new virus was descoverd to day, it's called W32.Welchia.Worm.What it acctually does is save your computer from W32-Blaster virus by cleaning you computer, the it downloads the DCOM RPC patch from M$ Windows Update Web site, install it, and then reboot the computer.
If you don't like it just go to : http://securityresponse.symantec.com/avcenter/venc/data/w32.welchia.worm.html
download a patch & clean your computer.

Now my Question is : is this a "GOOD" virus, or a VIRUS is VIRUS no matter what?!?

peace
Posted on 2003-08-19 13:15:30 by mistronr1