| Author | beginning argument ( Replies received: 1 ) |
| depotenzo |
Posted 24-09-2004 at 14:36   |

Registered on : 09-24-2004
From Italy
Messages : 1
OFF-Line
|
Hi
I have a problem with a new version of Visual Five 5.xx.
Anyone knows a compiler option for activate "over/underflow function control"?
On help I have find:
"To choose the compilation with overflow/underflow control, check the COMPILE>OVER/UNDEFLOW CHECK command from the TOOLS menu. In order to disable this compilation mode uncheck the same command. "
but I dont'have a check box!
Thank you
|
|
|
Profile
Quote
|
| Nino |
Posted 01-10-2004 at 15:11   |


Registered on : 10-01-2002
Messages : 33
OFF-Line
|
Hi,
The Underflow/Overflow functions are not used with the F5XX family.
Now you can use directly the Zero, Sign, Carry flag in the Input Register 38.
Example to check if an overflow is occured:
IsBitSet(_inpReg_38,0)
This will be traslated in three assemblrer instruction:
ldri 32 38
mtest 32 1
jpz xxx
If you want optmize your code, hereafter an example how to define a macro:
//==================================
// To be added into the Macro Block
// of Visual FIVE
//==================================
#define IF_OVERFLOW(label) \
_asm jpz label
#define END_IF_OVERFLOW(label) label:
//==================================
// How to use
//==================================
i=0;
xx = 255;
xx++;
IF_OVERFLOW(aaa)
{
//YourCode
i=1;
}
END_IF_OVERFLOW(aaa)
//======================================
// Translation
//======================================
i=0;
xx = 255;
xx++;
_asm jpz aaa
{
//YourCode
i=1;
}
aaa:
Regards
|
|
|
Profile
Quote
|