From: Kais Dukes 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 Content-Type: multipart/alternative; boundary="------------6614006F07E869F018BA48E8" 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 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--