From: "Ken Jenkins" Newsgroups: comp.os.msdos.djgpp References: <200303150305 DOT h2F35DG11549 AT envy DOT delorie DOT com> Subject: Re: Problems adressing memory variable Lines: 56 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: Date: Sat, 15 Mar 2003 04:40:11 GMT NNTP-Posting-Host: 68.64.172.34 X-Complaints-To: abuse AT adelphia DOT net X-Trace: news1.news.adelphia.net 1047703211 68.64.172.34 (Fri, 14 Mar 2003 23:40:11 EST) NNTP-Posting-Date: Fri, 14 Mar 2003 23:40:11 EST To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Ok, I think I've gotten most of the bugs worked out by now. But the silly thing still won't work... What am I doing wrong this time? #include #include void display_string (unsigned short int x, unsigned short int y, unsigned short int bg_color, unsigned short int text_color) { char * disp_str = "Hello!"; unsigned short int length = 6; // ***************************************************** unsigned short int column = (x - 1); unsigned short int row = (y - 1); dosmemput (disp_str, __tb, (length + 1)); __dpmi_regs output; output.x.ax = 0x1301; output.h.bh = 0x00; output.h.bl = ((text_color << 4) + bg_color); output.x.cx = length; output.h.dl = column; output.h.dh = row; output.x.bp = __tb >> 4; output.x.ss = __tb & 0x0f; __dpmi_int (0x10, (& output)); }; int main (void) { display_string (10, 10, 7, 1); return 0; }; P.S. Thanks for all the help so far