The MASM Forum Archive 2004 to 2012
Welcome, Guest. Please login or register.
January 22, 2018, 06:15:51 PM

Login with username, password and session length
Search:     Advanced search
128553 Posts in 15254 Topics by 684 Members
Latest Member: mottt
* Home Help Search Login Register
 1   General Forums / The Campus / Re: cant run my MASM program  on: May 26, 2012, 08:29:22 AM 
Started by xdc | Last post by xdc
I have reformated my harddrive(deleted files/partitions) ( through windows 7 cd).
Fresh install of windows 7 64-bit, downloaded all updates, visual c++ 2010 express, masm32, oracle virtualbox, notepad++

tried to run a 32 bit masm program, still didn't work. tried it through virtual xp mode, still got the same errors from before the reformat.
tried running it with both 16 - 32 bit programs on both windows 7/virtual xp, I think i even tried 64 bit but still got the same error, etc
I got some error from before about virtualization tech on cpu not being enabled before installing virtual xp, even though virtualbox installed fine, and
when i went to BIOS virtual etc was already enabled, so i installed a patch for virtual xp to make it work 'without it'.

So either I didn't completely wipe my harddrive,
something is wrong in BIOS settings,
im installing something else that could be messing it up,
or masm32 wasnt meant to work on my computer using windows 7 64 bit with virtual xp, etc

I can't program in assembly without masm, etc every documentation i've been reading is using masm, etc 'art of assembly'...


anyway, im thinking about completely wiping the harddrive, and installing Ubuntu 64, or ubuntu server ( been wanting to try out server OS)
I'm getting problems installing ubuntu after the reformat, it wont load through cd, or installing in windows, etc ubuntu server only seems to load through CD
Is there a program I can use to program using masm syntax etc for Ubuntu?

Do you have any suggestions as to what I can do. I've actually tried this on a laptop of mine that has windows 7 64 bit, installed virtual xp, masm32, etc still got the same errors.
Gonna have to try it on another computer of mine to see if its not just my pc(edit just tried on another computer, windows 7 64bit, virtual xp, same errors)

Gonna have to try installing windows xp professional 32bit as another boot option

 2   General Forums / The Campus / Re: FPU - How to test for infinity  on: May 26, 2012, 06:44:15 AM 
Started by RuiLoureiro | Last post by jj2007
I am trying to see why i get Invalid Operation AND the Overflow flag is set

Can you post the executable and tell us the exact condition when the exception happens? I could find out then with Olly.

 3   General Forums / The Campus / Re: FPU - How to test for infinity  on: May 26, 2012, 12:19:19 AM 
Started by RuiLoureiro | Last post by raymond
Thanks for this info Michael. Now I know where to start if I want to handle FPU exceptions myself, and then possibly explain such process in the tutorial.

 4   General Forums / The Campus / Re: FPU - How to test for infinity  on: May 25, 2012, 07:54:43 PM 
Started by RuiLoureiro | Last post by RuiLoureiro
I am trying to see why i get Invalid Operation AND the Overflow flag is set

Previous computation ? No. I call one procedure
but it doesnt set the overflow flag.

And, with or without FCLEX at the end of that procedure
"i get Invalid Operation AND the Overflow flag is set"

 5   General Forums / The Campus / Re: FPU - How to test for infinity  on: May 25, 2012, 07:47:43 PM 
Started by RuiLoureiro | Last post by jj2007
This is not very well worked out or tested, and I didnít get to the infinity test, but itís a start.

Thanks, Michael. When stepping through your code and comparing it to mine, I finally found the reason why mine didn't trigger the exception: because fdiv memzero only sets the zerodivide exception flag - the exception is triggered at the next FPU instruction (and my code had no further FPU instructions).
A simple fstp st is sufficient.

Again, thanks for putting this together - one more lesson learnt BigGrin

 6   General Forums / The Campus / Re: FPU - How to test for infinity  on: May 25, 2012, 10:08:19 AM 
Started by RuiLoureiro | Last post by RuiLoureiro
Well i think you are thinking as if your procedure do the task and you are wrong.

† † 1. This statement is wrong
Quote
So you first get 3^log(2)^-e^+pi = INFINITY which raises the Overflow flag
but not the Invalid Operation flag.

† † † †We should say:
Quote
We compute log(2)^-e^+pi and we get 1162334155587.786
Then, in the next step, when we try to compute 3^1162334155587.786
it raises the Invalid Operation flag
AND the Overflow flag is also set

† † 2. This statement is wrong
Quote
However, the next operation would then become 2^INFINITY,
and THAT raises the Invalid Operation flag.

† † We should say simply† †
Quote
† † We have not NEXT OPERATION

† † Try to understand that i use this basic rule:
† † † † When i get "Invalid Operation" or "Overflow"
† † † † all computations are stoped

† † 3.† We are talking about FPU
Quote
From a strictly math point of view, the actual result of your example is ...

† † † † Well we need a statement like this:

Quote
From a strictly FPU point of view, the actual result of your example ...???

† † 4.† †
Quote
You should have a similar outcome as your example with the following example,
but with the Divide-by-Zero flag being raised instead of the Overflow flag:
2^(3/(log(10)-1)) = 2^INFINITY
† † † † See point 2.
† † † † From a strictly FPU point of view i want to say that i dont know
† † † † what is the result of INFINITY * 0† or INFINITY/INFINITY
† † † † 0/INFINITY etc.

Jochen,
Quote
Olly says the mask bits are all cleared, so in principle it should trigger the exception
† † † † I dont like to follow this way, so dont know why.

EDIT: If you want, i can post the procedure that does it and you
      can analyse it

 7   General Forums / The Campus / Re: How to make a character counter? (Problem with WndProc)  on: May 25, 2012, 06:12:00 AM 
Started by Stas_Rocketman | Last post by Stas_Rocketman
Okay, here I have attached that program... Maybe it will be useful for somebody :)

 8   General Forums / The Campus / Re: FPU - How to test for infinity  on: May 25, 2012, 04:56:30 AM 
Started by RuiLoureiro | Last post by MichaelW
This is not very well worked out or tested, and I didnít get to the infinity test, but itís a start.

 9   General Forums / The Campus / Re: FPU - How to test for infinity  on: May 25, 2012, 01:29:44 AM 
Started by RuiLoureiro | Last post by raymond
Jochen,

You must mean you were trying to get the FPU to generate an interrupt whenever a particular exception is detected.

From my tutorial, in the description of the interupt masks of the Control Word,
Quote
This document will not describe how interrupts are generated and transmitted nor how to respond to such interrupts.

I haven't yet delved into that subject myself. Maybe I should in the near future, if only as an addendum to the tutorial.

 10   General Forums / The Campus / Re: FPU - How to test for infinity  on: May 25, 2012, 12:44:58 AM 
Started by RuiLoureiro | Last post by raymond
Quote
2^3^log(2)^-e^+pi

So you first get 3^log(2)^-e^+pi = INFINITY which raises the Overflow flag but not the Invalid Operation flag.
However, the next operation would then become 2^INFINITY, and THAT raises the Invalid Operation flag.

Remember what I mentioned before?
Quote
You may get an invalid operation if you try to reuse the INFINITY value with other FPU instructions.

If the Invalid Operation flag is raised at the END of a series of operations, I would suggest that the return answer should be INVALID (or UNDEFINED) regardless if the Overflow flag is raised. You should have a similar outcome as your example with the following example, but with the Divide-by-Zero flag being raised instead of the Overflow flag:
2^(3/(log(10)-1)) = 2^INFINITY

From a strictly math point of view, the actual result of your example is NOT infinity although it may be a very VERY VERY large value. Only my example could be considered as being equal to infinity (without the Overflow flag being raised).

Return to the board index.
Powered by MySQL Powered by PHP The MASM Forum Archive 2004 to 2012 | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!