a_k_s_h_a_y
Dreaming
guys am creating a text editor !! and now first thing that i am trying to do is write characters into the video buffer which starts at 0XB000000L (obvioulsy colour monitor) !!
first thing i will implement is type and save feature only that too with fixed name....u see am a C newb..
i try to write into video buffer but nothing is displayed the cursor is properly moved coz the second part of the prog works !!
can u tell me where the error ??
here is the code
the cursor properly moves the next position on screen but no char printed which i hit on keyboard !!
plzz help..thank u !
also plzz explain the concept of video buffer and the scan code of keys and ascii code of keys in detail also what is scan code of various keys..and wht about ascii code of F1 ?? ( i did write a prog to print ascii codes...but there obs u cant know which is the one for F1.. )
first thing i will implement is type and save feature only that too with fixed name....u see am a C newb..
i try to write into video buffer but nothing is displayed the cursor is properly moved coz the second part of the prog works !!
can u tell me where the error ??
here is the code
Code:
#include <stdio.h>
#include <dos.h>
main(void)
{
char *vram_start=(char)0xb8000000l;
char *v;
char a[100],scan,ascii;
int i,j,x=0,y=0;
union REGS ii,oo;
v=vram_start+x*160+y*2;
while(1)
{
while(!kbhit());
ii.h.ah=0;
int86(22,&ii,&oo);
scan=oo.h.ah;
*v=scan;
v++;
ascii=oo.h.al;
*v=150;
*v=ascii;
v++;
*v=152;
x++;
ii.h.ah=2;
ii.h.dh=y;
ii.h.dl=x;
ii.h.bh=0;
int86(0x10,&ii,&oo);
}
}
plzz help..thank u !
also plzz explain the concept of video buffer and the scan code of keys and ascii code of keys in detail also what is scan code of various keys..and wht about ascii code of F1 ?? ( i did write a prog to print ascii codes...but there obs u cant know which is the one for F1.. )
Last edited: