Tuesday 29 May 2012

what is Extern keyword?

extern keyword in c

Keyword extern is used for declaring extern variables in c. This modifier is used with all data types like int, float, double, array, pointer, structure, function etc.
Important points about extern keyword:
1. It is default storage class of all global variables as well all functions. For example, Analyze following two c code and its output:
(a)
#include <stdio.h>
int i;    //By default it is extern variable
int main(){
    printf("%d",i);
    return 0
}

Monday 28 May 2012

GRAPHIC DISPLAY UNIT


The display unit is an LCD ( FSTN technolodgy ) with 128 x 64 dot matrix with backlighting or 128 * 128 dot matrix as an option.
The contrast is adjusted electronically. The Crypto Processor via its input/output ports directly manages the display device. Possible display features:
- Flashing and reverse video characters
- Cursor display / cursor position read and set-up
- Graphic pixels based library
- Up to 128 user defined characters via a bit map through the same routine as the one used for the printer
- Different font size available (small, medium, big)

Entry Point Of Telium application


Application entry point.
 * This file was automatically generated by IngeDev and must be filled out
 * by the developer.
 *                  
 * Purpose :
 *
 * Each time Manager calls an application, it generates only one service
 * call that reaches your application main with the corresponding service
 * number.
 *
 * List of routines in file :
 * - give_your_domain : Return application domain.
 * - after_reset : Application reset processing.
 * -  is_name : Report application name to Manager.
 * -  is_state : Return application status (initialise or not).
 * -  idle_message : Dedicated to display idle message.
 * -  more_function : Dedicated to navigation menus.
 * -  keyboard_event : Return key pressed.
 * -  state : Print terminal content.
 * -  consult : Print daily totals.
 * -  mcall : Print call schedule.
 * -  is_time_function : Need pheripherals at the next call time_function()
 * -  time_function : Allow automatic execution of periodic functions.
 * -  is_change_init : Conditions for changing manager parameters?
 * -  modif_param : Manager reports parameters changing.
 * -  is_evol_pg : Conditions for application downloading?
 * -  is_delete : Conditions for application deletion?
 * -  file_received : Manager reports parameters file received from LLT.
 * -  message_received : Inter application messaging.
 * -  is_card_specific : Card needs a specific process?
 * -  card_inside : Transaction in progress for a specific card.
 * -  is_for_you_before : Is chip card as an ISO 7816-3?
 * -  is_for_you_after : recognise mag, smc or man card in order to be a candidate.    
 * -  give_interface : Services registration and priority.
 * -  entry : Call by OS for recording services and opening DLL(s).
 */

Sunday 27 May 2012

Introducing Device






Please take note, that it is better if you use Windows XP as your OS.  If you are using other Operating System, I am afraid you will encounter lots of errors because of the advanced security features of these Operating Systems.
This device is based on c Language. So for getting started ,revised your C Concepts.

http://www.gayward-concepts.com/getting-started-with-sagem-eft930s/

Thursday 24 May 2012

Telium Application Bugs

How to get input from telium device??

while( nState !=  STATE_INPUT_END )
    {
        cKey=0;
        reset_buf(pxKbd, _receive_id);
        cKey = getchar();
        switch( cKey )
        {
            case T_VAL:
                nState =  STATE_INPUT_END;
            break;
            case T_CORR:
                if(ch=='P')
                {
                    password[--i]=' ';
                    tcBuf[--iIdx]=' ';
                }
                else
                    tcBuf[--iIdx]=' ';
            break;
            case T_ANN:
                while(iIdx>=0)
                    tcBuf[--iIdx]=' ';
                iIdx++;
                if(ch=='P')
                {
                    while(i>=0)
                        password[--i]=' ';
                    i++;
                }
               
                font_size(8,16);
                putchar('\x1B');
                gotoxy(0,0);
                printf("%s",lbldisplay);
                font_size(6,8);
            break;
            case T_NUM0:
            case T_NUM1:
            case T_NUM2:
            case T_NUM3:
            case T_NUM4:
            case T_NUM5:
            case T_NUM6:
            case T_NUM7:
            case T_NUM8:
            case T_NUM9:
            //case T_POINT:
                if(ch=='P')
                {
                    password[i++]='*';
                    tcBuf[iIdx++]=cKey;
                }
                else
                    tcBuf[iIdx++]=cKey;
               
            break;
        }
        gotoxy(3,3);
        if(ch=='P')
            printf(password);
        else
            printf(tcBuf);
}