delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/16/12:08:37

From: "Hammy" <darren AT grayce DOT freeserve DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Memory in DJGPP
Date: Sat, 16 Oct 1999 15:54:14 +0100
Organization: Customer of Planet Online
Lines: 38
Message-ID: <7ua3p5$nlt$1@news8.svr.pol.co.uk>
NNTP-Posting-Host: modem-9.silicon.dialup.pol.co.uk
X-Trace: news8.svr.pol.co.uk 940085861 24253 62.136.6.137 (16 Oct 1999 14:57:41 GMT)
NNTP-Posting-Date: 16 Oct 1999 14:57:41 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

okay, i was looking in the hlp on RHIDE for the memset, and other mem
functions.  Apparently some only allow int size moves and stuff? I thought
you could move anything int he range of 32bits?


Also, what does the __tb mean?  i think it stands for a transfer buffer? but
im nto sure what that actually means, or when to use such a thing.  I
noticed it being used in retreiving the VESA mode info.  You are supposed to
called a interupt and the data is sent to es:di and u should set a stuct to
this.
heres the code:

ModeInfoBlock *get_mode_info(int mode)
{
 static ModeInfoBlock info;
 __dpmi_regs r;

 r.x.ax = 0x4F01;
 r.x.cx = mode;
 r.x.es = __tb / 16;
 r.x.di = 0;
 __dpmi_int(0x10, &r);
 if(r.h.ah) return 0;
 dosmemget(__tb, sizeof(ModeInfoBlock), &info);
 return &info;
}

why do they divide by 16?


I know I have sent another mesaage about this but i didnt ask this int he
same way: whne you have the physical address of the videobuffer, what can
you do with it?





- Raw text -


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