inout - #ifndef _inout_ # #define _inout_ char page=0; char...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
#ifndef _inout_ #define _inout_ # char page=0; char attrib=15; char scancode; int x=1,y=3; char priority=0; c const char horiz_line = 'Ä'; const char vert_line = '³'; c // To get the String length in bytes unsigned long int strlen(char *s1) { unsigned long int counter =0; while(*s1) { counter++; s1++; } return counter; } char streq(char *s1,char *s2) { int i=0; if(strlen(s1)==strlen(s2)) { for(;i<strlen(s1);++i) { { return 0; } } return 1; } else if(strlen(s1) > strlen(s2)) { for(;i<strlen(s2)/* & s1[i] != ' '*/;++i) { { return 0; } } if(s2[0]!=0) { return 1; } } return 0; } // To join 2nd string with 1st string void joinstring(char a[50],char b[10]) {
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
int i,j=0; i=(unsigned int) strlen(a); while(b[j]!=0&&j<10) { a[i]=b[j]; i++; j++; } a[i++]= '\\'; a[i++]=0; } // To remove characters from a source string // till an input character is reached from reverse void substring(char a[50],char b) { int l; l=(unsigned int)strlen(a)-2; while(a[l]!=b) { a[l]=0; l--; } } // To specify the attribute of the text void setattrib(int color) { attrib = color; } // To return the color char color(char bg,char fg) { return (bg*16) + fg; } // To reboot OS void mtx_reboot() { asm int 0x19 } // To set the video mode
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/21/2011 for the course ECE 271 taught by Professor Eason,r during the Spring '08 term at University of Maine Orono .

Page1 / 8

inout - #ifndef _inout_ # #define _inout_ char page=0; char...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online