http://www.ousob.com --- Legacy Redefined #include <dos.h> #include <extend50.h> #define DEBUG 0 CLIPPER b_schar() { int row = _parni(1); int col = _parni(2); int len = _parni(3); int i; struct charpos{ char ch; char att; }; struct charpos screen; union REGS regs; union REGS iregs; char tmp_string[81]; if( !ISNUM(1) || !ISNUM(2) || !ISNUM(3) ){ _retl(0); } for(i=0; i<len; i++){ regs.h.ah = 0x02; /* go to row & column position */ regs.h.bh = 0; regs.h.dh = row; regs.h.dl = (col+i); int86(0x10,&regs,&regs); iregs.h.ah = 0x08; /* read character and */ iregs.h.bh = 0; /* attribute */ int86(0x10,&iregs,&iregs); screen.ch = iregs.h.al; screen.att = iregs.h.ah; tmp_string[i] = screen.ch; } tmp_string[i] = NULL; _retc(tmp_string); }