June 21, 1999 Ver 1.0
Author:M.Ozawa
List function calling sequence
int GetLstSize( int no );
function
- parameter
return value
List Line number(Nothing or Error is 0)
int GetLstOBCD( int no, int line, OBCD *data );
function
- parameter
- no List no(1~20 / 0:Ans)
- line Set line number(1~255).
- *data pointer for OBCDdata.
return value
sample program
#include <stdio.h>
#include "apstat.h"
#define FIG 9
void main( void )
{
int i,j,line;
OBCD bcd;
if ( (line=GetLstSize(1)) != 0 ){
for ( i=1; i<=line; i++ ){
printf(List1 line%d :");
if ( (ret=GetLstOBCD(1,i,&bcd)) != NORM ){
printf( ERROR No%d",ret);
} else {
for (j=0; j<FIG; j++ )
printf("%02x",bcd.dat[i]);
}
printf("\n");
}
}
}
Execution result
example data

List1 line1 : 10217400000000
List1 line2 : 10217450000000
LIst1 line3 : 10217500000000
int SetLstOBCD( int no, int line, OBCD *data );
function
- parameter
- no List no(1~20 / 0:Ans)
- line Set line number(1~255).
- *data pointer for OBCDdata.
return value
sample program
#include "apstat.h"
void main( void )
{
int i,j,line;
OBCD bcd;
if ( (line=GetLstSize(1)) != 0 ){
if ( (ret=GetLstOBCD(1,1,&bcd)) != NORM ){
printf( ERROR No%d",ret);
} else {
if ( bcd.dat[0] != 0 ){ //0check
// sign conversion
switch ( bcd.dat[0]&0xf0 ){
case 0x00 :
bcd.dat[0] = (bcd.dat[0]&0x0f) | 0x50;
break;
case 0x10 :
bcd.dat[0] = (bcd.dat[0]&0x0f) | 0x60;
break;
case 0x50 :
bcd.dat[0] &= 0x0f;
break;
case 0x60 :
bcd.dat[0] = (bcd.dat[0]&0x0f) | 0x10;
break;
}
if ( (ret=SetLstOBCD(1,1,&bcd)) != NORM )
printf( ERROR No%d",ret);
}
}
}
}
Execution result
---> 
int MakeLst( int no, int line );
function
Make list Area. ( Data is all 0 )
If already list Area exists, then this Area is cleared and new Area is made.
- parameter
- no List no(1~20 / 0:Ans)
- line Make line number(1~255).
return value
sample program
#include <stdio.h>
#include "apstat.h"
void main( void )
{
int err;
if ( (err=MakeLst(1,2)) != NORM )
printf("List Make ERROR : Error No.%d\n",err);
if ( (err=MakeLst(2,4)) != NORM )
printf("List Make ERROR : Error No.%d\n",err);
}
Execution result
-----> 
void DelLst( int no );
function
- parameter
return value
sample program
#include "apstat.h"
void main( void )
{
}
Execution result
-----> 