delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/03/16/01:02:07

From: "Ken Jenkins" <ken DOT jen AT adelphia DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Real Mode function doesn't work
Lines: 57
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: <w0Uca.2458$z_3.1177321@news1.news.adelphia.net>
Date: Sun, 16 Mar 2003 05:33:16 GMT
NNTP-Posting-Host: 68.64.172.34
X-Complaints-To: abuse AT adelphia DOT net
X-Trace: news1.news.adelphia.net 1047792796 68.64.172.34 (Sun, 16 Mar 2003 00:33:16 EST)
NNTP-Posting-Date: Sun, 16 Mar 2003 00:33:16 EST
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

A lot of people have already helped me, and yes I did read all of section 18
of the FAQ, but I still can't figure this out...

#include <dpmi.h>

#include <go32.h>

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);

    __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.es = (__tb >> 4);

    output.x.bp = (__tb & 0x0f);

    __dpmi_int (0x10, (& output));

};

int main (void)
{

    display_string (10, 10, 7, 1);

    return 0;

};

Any help would be greatly appreciated...


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019