www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/26/02:16:16

From: Kais Dukes <kais DOT dukes AT ic DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: How can I call interrupt 0x5C?
Date: Wed, 25 Aug 1999 18:37:00 +0100
Organization: Imperial College of Science Technology anddd Medicine
Lines: 96
Message-ID: <37C429BC.E9737C29@ic.ac.uk>
NNTP-Posting-Host: yaw.ma.ic.ac.uk
Mime-Version: 1.0
X-Mailer: Mozilla 4.61 [en] (WinNT; I)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

--------------6614006F07E869F018BA48E8
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi everyone ...

PLEASE help me with my problem, because its been bugging me for ages.
Im trying to code a NetBIOS game using DJGPP/ALLEGRO. I am told
in a book that I need to call interrupt INT 5Ch, with ES:BX pointing to
my NCB structure. After reading the FAQ (section 18.2) I guessed that
I dont need to put the BX bit in?

Anyway, here's some 16-bit code a friend gave me that works on my old
Turbo-C 16-bit compiler ...

nbexec ( NCB *zncb ){
    union REGS inregs , outregs ;
    struct SREGS segregs;
    segregs.es  = FP_SEG ( zncb );
    inregs.x.bx = FP_OFF ( zncb );
    int86x ( 0x5c , &inregs , &outregs , &segregs );
    return ( outregs.h.al );
}

And here's my port THAT DOESNT WORK! (IT JUST CRASHES :)

int net_exec(NCB *ncb){
    union REGS inregs,outregs;
    inregs.w.bx=ncb;
    int86(0x5c,&inregs,&outregs);
    return(outregs.h.al);
}

I'm sure that you experts could help me out here ... and its only a few
lines of code ... SO PLEASE SOMEONE HELP ME!

I'm told to put my pointer into ES:BX and then call INT 5Ch, and the
result is returned in AL.
But I dont know how :(

PLEASE HELP!

Thanks in advance!

Kais Dukes
Majestic-12 Games

http://members.tripod.com/majestictwelve


--------------6614006F07E869F018BA48E8
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi everyone ...
<p>PLEASE help me with my problem, because its been bugging me for ages.
<br>Im trying to code a NetBIOS game using DJGPP/ALLEGRO. I am told
<br>in a book that I need to call interrupt INT 5Ch, with ES:BX pointing
to
<br>my NCB structure. After reading the FAQ (section 18.2) I guessed that
<br>I dont need to put the BX bit in?
<p>Anyway, here's some 16-bit code a friend gave me that works on my old
<br>Turbo-C 16-bit compiler ...
<p><tt>nbexec ( NCB *zncb ){</tt>
<br><tt>&nbsp;&nbsp;&nbsp; union REGS inregs , outregs ;</tt>
<br><tt>&nbsp;&nbsp;&nbsp; struct SREGS segregs;</tt>
<br><tt>&nbsp;&nbsp;&nbsp; segregs.es&nbsp; = FP_SEG ( zncb );</tt>
<br><tt>&nbsp;&nbsp;&nbsp; inregs.x.bx = FP_OFF ( zncb );</tt>
<br><tt>&nbsp;&nbsp;&nbsp; int86x ( 0x5c , &amp;inregs , &amp;outregs ,
&amp;segregs );</tt>
<br><tt>&nbsp;&nbsp;&nbsp; return ( outregs.h.al );</tt>
<br><tt>}</tt><tt></tt>
<p>And here's my port THAT DOESNT WORK! (IT JUST CRASHES :)
<p><tt>int net_exec(NCB *ncb){</tt>
<br><tt>&nbsp;&nbsp;&nbsp; union REGS inregs,outregs;</tt>
<br><tt>&nbsp;&nbsp;&nbsp; inregs.w.bx=ncb;</tt>
<br><tt>&nbsp;&nbsp;&nbsp; int86(0x5c,&amp;inregs,&amp;outregs);</tt>
<br><tt>&nbsp;&nbsp;&nbsp; return(outregs.h.al);</tt>
<br><tt>}</tt>
<p>I'm sure that you experts could help me out here ... and its only a
few lines of code ... SO PLEASE SOMEONE HELP ME!
<p>I'm told to put my pointer into ES:BX and then call INT 5Ch, and the
result is returned in AL.
<br>But I dont know how :(
<p>PLEASE HELP!
<p>Thanks in advance!
<p>Kais Dukes
<br>Majestic-12 Games
<p><A HREF="http://members.tripod.com/majestictwelve">http://members.tripod.com/majestictwelve</A>
<br>&nbsp;</html>

--------------6614006F07E869F018BA48E8--

- Raw text -


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