delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/22/06:20:07

Xref: news-dnh.mv.net comp.os.msdos.djgpp:4595
From: fenric AT clark DOT net (Andrew McCaffrey)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: good 'ol 13h question
Date: 19 Jan 1996 22:28:28 GMT
Organization: Clark Internet Services, Inc.
Lines: 34
Message-ID: <4dp5uc$k3d@clarknet.clark.net>
References: <DL4tDu DOT ALJ AT jade DOT mv DOT net>
NNTP-Posting-Host: explorer.clark.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

DJ Delorie (dj AT delorie DOT com) wrote:
> 
> 
> Something like this (untested):
> 
> #include <dos.h>
> #include <dpmi.h>
> #include <sys/farptr.h>
> 
> main()
> {
>   __dpmi_regs r;
> 
>   r.x.ax = 0x13;
>   __dpmi_int(0x10, &r);
> 
>   _farpokeb(_dos_ds, 0xa000 + 0, 2);
> 
>   getch();
> 
>   r.x.ax = 3;
>   __dpmi_int(0x10, &r);
> }

You have to use 0xa0000 because you need to multiply the address by 16 (I 
forgot the reason though)

-- 
+------------------------Andrew McCaffrey+[fenric AT clark DOT net]------------+
|Doctor: But I don't exist in your world!|"Anybody remotely interesting |
|Brigade-Leader: Then you won't feel the |is mad in one way or another."|
|bullets when we shoot you.              |    - The Seventh Doctor      | 
|       Doctor Who - Inferno (1970)      |                              |
+----------------------------------------+------------------------------+

- Raw text -


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