NAR-5620 Series
User
’
s
Manual
51
4.4
GPIO Sample Code
#include <stdio.h>
#include <dos.h>
#include <conio.h>
#include "string.h"
#define VIDEO 0x10
// Vedio ROM BIOS interrupt
unsigned char VerNum[128] = {"Portwell Hans_20050704"};
union REGS regs;
swh_cur(swh_flg)
unsigned char swh_flg;
// 1 : Cursor on, 0 : Cursor off
{
regs.h.ah = 1;
// Function 1 of interrupt 10H : Change cursor size
if (swh_flg)
{
regs.h.ch = 12;
// Starting line no. of cursor
regs.h.cl = 13;
// Ending line no. of cursor
}
else
{
regs.h.ch = 32;
regs.h.cl = 32;
}
int86(VIDEO, ®s, ®s); // Call vedio interrupt
return(1);
}
void display_line(int x,int y,char *str,int color,int bg_color)
{
textcolor(color);