delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/17/06:32:07

From: massarin AT alpha3 DOT cram DOT enel DOT it
Newsgroups: comp.os.msdos.djgpp
Subject: Assembler and C again. HELP !!!
Date: 16 Feb 1998 15:04:27 GMT
Organization: ENEL Ricerca PEA
Lines: 35
Distribution: inet
Message-ID: <6c9khr$asf1@willy.cra.enel.it>
Reply-To: massarin AT alpha3 DOT cram DOT enel DOT it
NNTP-Posting-Host: alpha3.cram.enel.it
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

This is my code. Please help me !!!!!.

/****** CODE ******/

struct drv_struct *_pointer_4_driver;
unsigned int driver_address;
short gbl_sel;

/* load driver address */
/* it's a DOS driver in DOS memory */

r.x.ax = some;
r.x.bx = some;
__dpmi_int(value,&r);

driver_address = (r.x.es << 4) + r.x.di;  /* that's ok */

/* call driver. HOW ????? */

gbl_sel = _dos_ds;
asm volatile ("pushl %es
               movw _gbl_sel,%es
               movl __pointer_4_driver,%esi
               lcall _driver_address
               popl %es"
               );

/****** END CODE ******/

How I call the driver (loaded from DOS) passing it a pointer,to a struct on which
it works, with registers es:di ???. I'm very confused.

Thank all.


- Raw text -


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