delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/09/03:20:05

From: eggbrains AT aol DOT com (Egg brains)
Newsgroups: comp.os.msdos.djgpp
Subject: [Q] Using __DPMI_SET_DESCRIPTOR...
Date: 7 Aug 1997 23:07:00 GMT
Lines: 24
Message-ID: <19970807230701.TAA21105@ladder02.news.aol.com>
NNTP-Posting-Host: ladder02.news.aol.com
Organization: AOL http://www.aol.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

i got this code (not mine)...
it is supposed to access 64KB of text-mode video memory at `0xB800:0000',
(courtesy of Bill Currie)

  static char selectorData[8] = {
    0xff, 0xff, 0x00, 0x80,
    0x0b, 0xf3, 0x40, 0x00
  };
    int screenSelector = __dpmi_allocate_ldt_descriptors (1);
    if (__dpmi_set_descriptor (screenSelector, selectorData) < 0)
      abort ();
    return screenSelector;

i can't fugure out how to set up my own ram editor thingy... like
A000:0000 w/ a 256k limit...  yes, i looked it up in the help & faq and
every thing, but i can't see
how he got  64 and/or B800:0000 out of the numbers he used in his
selectorData... i tried convertying them to decimal and binary, but still
can't get it...


Paul

Thanx for all your help.

- Raw text -


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