
Create an application by using W-PsDOS library only
  (wbios library, lcdbios library, psdos library)

 There is a sample program of this format in "..\RupSDK\sample1".
In this case, events such as alarm are ignored.  When an application is terminated, Filer handles the events.

[Points when you create an application]

(1)Type and Size
  char type  ,unsigned char type  -> 1 byte ( 8bit)
  short type ,unsigned short type -> 2 byte (16bit)
  int type   ,unsigned int type   -> 2 byte (16bit)
  long type  ,unsigned long type  -> 4 byte (32bit)

  float type       -> 4 byte (32bit)
  double type      -> 8 byte (64bit)
  long double type -> 8 byte (64bit)

(2)Cautions when you use the standard libraries
  When you use the GNU standard libraries such as sprintf, sin, cos and etc., the file size become larger.  You should be careful about the file size.
          sprintf -> additional 20KB, sin -> additional 5KB

(3)Drawing process in the interruption routine
  The buzzer sound is interrupted while the drawing process is running within the interruption routine.  In order to void this problem, you can use the user event feature.


 Example: When you generate an event by using 64Hz timer routine "Interrupt",
    you can use 64Hz interruption process within the button process routine.

    #define EVENTREGSTER *(char *)0xf080 /* defined in rupsys.h */

    /********* Timer Routine ********/
    void Interrupt(void) {
        /* write the event register */
        EVENTREGSTER = 32;
    }

    /*********  Main Routine  *********/
     :
    while(1) {
        btn = bi_getbtn();        /* wait for button and event */
        if (btn&0x8000) {
            /* event generation */
            if (btn&0x00FF==32) {
                /* drawing process */
                /* drawing process */
            }
        }
    }
     :

   Please refer to <wbiosLibManu(c).txt> bi_getbtn.



Create an application that uses Filer features by onHand/RuputerAPI libraries

There is a sample program of this format in "..\RupSDK\sample2" and after.


[onHand/RuputerAPI libraries]
You can use onHand/RuputerAPI functions by including rupsys.h to a source file.

For more information, refer to <rupsysLibManu(c).txt>.


[Reference of Filer system resource]
You can assess to the Filer resource by including rupsys.h to the source file.  For more information, refer to <08_SystemMemory.txt>.

The Filer resource can be referred by  SYTEMCTL structure *pSystemCtl.



Exception Handling
Since onHand/Ruputer has the limited amount of battery and flash memory capacity, you should be aware the following points.  Some of these are not considered seriously when an application for PC is developed.

(1)You should set Write-protect to a flash memory when a battery voltage becomes low.  There is higher risk that writing to a flash memory damages the file when the voltage is low.
  The low voltage detection is done by flash access function and other communication related functions.
  In addition, you can judge the status by using onHand/RuputerAPI function CheckVol(). 

(2)If you write data to a flash memory even if there is not enough space in the flash memory, the transferred data may be terminated.

(3)If the battery rear cover is opened while an application is running, Filer requests a user to terminate the application.  In this case, you should terminate the application immediately.  After the termination of the application, Filer stops the system.



Cautions
User application can refer to the values of the following Filer resources.  However, the setting values must not be changed.
 1.System file   B:\system\system.ini
 2.Filer resource *pSystemCtl->RupDefine (onHand/Ruputer system definition structure area)

Please be careful.

===============================================================================
 Copyright (c) 1998-1999.  Seiko Instruments Inc.  All rights reserved. 
===============================================================================
