mirror of
https://github.com/VARCem/PTV_Archive.git
synced 2026-09-23 15:34:18 +00:00
TASKING XA Family Cross-Compiler
Example Program FpSIGFPE
1996 Copyright TASKING, Inc.
Document Id: @(#)readme.txt 1.6 12/17/96
----------------------------------------------------------------------
DESCRIPTION
----------------------------------------------------------------------
This small C program demonstrates how to have a SIGFPE signal be passed
on to the application program. It therefore installs a trap handler,
which is invoked on any floating point exception and causes the SIGFPE
signal to be raised. This signal can be intercepted by installing a
so-called signal handler, using the
signal
C library function call.
For more extensive cases, where special actions of any kind on a
floating point exception must be performed, see the fptrap example.
You can use this example module with your application by specifying the
command line argument -DNODEMO to the compiler command. This will
suppress the inclusion of the main function. You can install the
SIGFPE raiser by calling
install_SIGFPE_signal_raiser( );
at the start of your application program.
IMPORTANT: you *must* specify -fptrap to ccxa, in order to link
with the appropriate library.
The output from the application is written to standard output using
Simulated I/O from CrossView. Issue for example
1 sio o screen
to have it written into a window of CrossView.
----------------------------------------------------------------------
BUILDING THIS EXAMPLE FROM THE TASKING EDE
----------------------------------------------------------------------
When using the Tasking EDE you can build this example by loading the
project file fpsigfpe.pjt into the EDE. This project file is configured
to build the example for the 80c51XA and derivatives.
You can load a project file in the EDE using the Project | Open Menu.
After the project is opened you can press the 'make' button to
build the examples. Pressing the debugger button will bring up the
CrossView Simulator with the configuration appropriate to the
selected project file.
----------------------------------------------------------------------
BUILDING THIS EXAMPLE FROM THE COMMAND PROMPT
----------------------------------------------------------------------
The directory of the FpSIGFPE example contains a makefile for building
the absolute file. Make this directory the current working
directory. Ensure that the bin directory of the product is included in
the search path, so that the compiler, assembler, etc. can be
found. Then type:
mkxa
The program is build for the small memory model. The output of the
print statements is done via simulated I/O.
To remove the generated files type:
mkxa clean
You can use the following macro definitions for mkxa:
V set verbose flag of ccxa
LARGE build for large memory model
For example:
mkxa LARGE=
Builds the program for large memory model.
Please run 'mkxa clean' before building the examples for an other
configuration to prevent mixing of different configurations.
-.-.-.-