Board index » cppbuilder » Mouse driver copyright msg printing question...?

Mouse driver copyright msg printing question...?


2005-09-20 02:55:29 PM
cppbuilder85
/*
mouseprac.c, winxp, tc3.0/bc5.02
microsoft mouse driver interrupt
int 33h func 004dh->return pointer to copyright string
reg at call: ax=004dh
return reg : es:di ->copyright msg "*** This is Copyright 1983 Microsoft"
I am having problem printing this copyright msg using es:di combination
other it is easy to
get and print values from single registers,
how can this be done.
*/
#include <conio.h>
#include <dos.h>
int main()
{
union REGS regs;
struct SREGS sregs;
clrscr();
regs.x.ax=0x004d; // func num
segread(&sregs);//seg reg read func
int86x(0x33, ®s, ®s, &sregs);
printf("%s",regs.x.di);// this doesnt printf copyright msg.
getch();
return (0);
}
 
 

Re:Mouse driver copyright msg printing question...?

mujeebrm wrote:
Quote
int86x(0x33, ®s, ®s, &sregs);

printf("%s",regs.x.di);// this doesnt printf copyright msg.
far char *c = MK_FP( es, di );
printf( "%Fs", c );
 

Re:Mouse driver copyright msg printing question...?

Hi Bob Gonder,
I did it and got this :
Windows NT MS-DOS subsystem Mouse Driver??????????????????????.
??#u?.??#.??#
????#?PS????3???? ??[X?.??#
why does it print other futile chars? and plz shade some light on MK_FP
function.
thanx,
mujeebrm.
u wrote:
Quote
far char *c = MK_FP( es, di );
printf( "%Fs", c );


 

{smallsort}