Introduction

 

1.1 What is AMPC?

AMPC is an Integrated Development Environment (IDE) for the C programming language, which generates Java byte-code for rapid development of applications. The resulting application software will be able to run on any JVM enabled device.

AMPC is based upon American National Standards Institute C (ANSI C), X3.159-1989. This allows users of AMPC to develop software using the standard C programming language and run the executables on JVM enabled devices requiring no knowledge of the Java language.

Examples of JVM enabled devices are PDAs, cell-phones, game consoles and desktop systems.

The Java class file generated by AMPC is in full conformance with Sun's Java Virtual Machine Specification Second Edition (Java 2 Platform)

AMPC follows the ANSI C standard, and supports the run-time library for C applications.

AMPC is available for the following platforms:

 

1.2 System Requirements

Before installing AMPC, please make sure that your computer meets the following minimum requirements:

 

1.2.1 Linux OS Platform

 

1.2.2 Mac OS X Platform

 

1.2.3 Microsoft Windows Platform

 

1.3 Installation

 

1.3.1 Linux OS x86 Platform

Note: All files and packages have been pre-compiled using glibc version 2.3.2 on Intel x86 machine.

 

1.3.2 Mac OS X Platform

Note: All files and packages have been pre-compiled on MacOS X 10.4 (Tiger), Macintosh Power PC G4 machine.

 

1.3.3 Microsoft Windows Platform

 

1.4 Restrictions and Notes

  1. All scalar data types are 1 word long. They are "char", "short", "int", "long", "long long", "float", "double", ...
  2. JNI (JVM Native Interface) for AMPC is also supported. An example is given in the directory "ampc_jni".
  3. Goto statements across functions or blocks not allowed.
  4. fork() followed by exec() functionality is implemented differently. Here's an example of how to use it:
    #include <stdio.h>
    main()
    { char *cmd;
      cmd = "ls -l";
      INT_java("invokestatic _J_RunIt/fork_and_exec", "S", "V", STR1(cmd));
    }

  5. Memory size models for stack and heap are FEMTO, PICO, NANO, MICRO, TINY, SMALL, MEDIUM, LARGE, and HUGE. They are 0.25 meg, 0.5 meg, 1 meg, 2 megs, 4 megs, 8 megs, 16 megs, 20 megs, and 32 megs respectively. TINY model (4 megs) is the default.
  6. The JVM limits each function/method to occupy at most 64KB of binary code space. Any function/method that is bigger than that will be caught by the JVM and execution is halted.
  7. It is encouraged that the source file names to have only characters that are valid C identifier characters. This is to avoid the possibility of the Jasmin assembler not being able to parse file names used in function calls (method invocations) due to the existence of non-identifier character(s).
  8. Please set the "classpath" when running the "RUN" command (that invokes the JVM interpreter) using the "-cp" to include the location of the application being executed followed by the current location, followed by the location LOCAL_CLASSFILES, and followed by any other location you wish to include in the classpath. Alternatively, you may set the environment variable CLASSPATH for this purpose.
    Example: %RUN -cp myapps/hello:/usr/local/lib/acc2jvm/LOCAL_CLASSFILES:. helloworld

 

1.5 Trademark Information

© 2007 Axiomatic Solutions Sdn. Bhd,
Valid license from Axiomatic Solutions Sdn. Bhd is required for possession, use, or copying. Axiomatic Solutions Sdn. Bhd shall be not be liable for technical or editorial errors or omissions contained herein. The information in this document is provided "as is" without warranty of any kind and is subject to change without notice. All other product names mentioned herein may be trademarks of their respective companies.

 

1.6 Disclaimer of Warranty

This software is provided by Axiomatic Solutions Sdn Bhd "AS IS" and any expressed or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the company be liable for any direct, indirect, incidental, special, exemplary or consequential damages (including but not limited to, procurement of substitute goods or services, loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in anyway out of the use of this software, even if advised of the possibility of such damage.

Licensee acknowledges that Licensed Software may contain errors and is not designed or intended for use in the design, construction, operation or maintenance of any nuclear facility ("High Risk Activities"). Axiomatic disclaims any expressed or implied warranties of fitness for such uses. Licensee represents and warrants to Axiomatic that it will not use, distribute or license the Licensed Software for High Risk Activities.

 

1.7 Limitation of Liability

Licensee acknowledges that the Licensed Software may have defects or deficiencies which cannot or will not be corrected by Axiomatic. Licensee will hold Axiomatic harmless from any claims based on Licensee's use of the Licensed Software for any purpose and from any claims that later versions or releases of any Licensed Software furnished to Licensee are incompatible with the Licensed Software provide to Licensee under this Agreement.

Licensee shall have the sole responsibility to protect adequately and backup Licensee's data and/or equipment used in connection with the Licensed Software. Licensee shall not claim against Axiomatic for lost data, re-run time, inaccurate output, work delays or lost profits resulting from Licensee's use of the Licensed Software.

To the extent not prohibited by law, in no event will Axiomatic be liable for any indirect, punitive, special, incidental or consequential damage in connection with or arising out of this Agreement (including loss of business, revenues, profits, use, data or other economic advantage), however it arises, whether for breach of in tort, even if the other party