X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: "Andrew Fairburn" Newsgroups: comp.os.msdos.djgpp Subject: Real mode callbacks + assembler code Date: Tue, 4 Dec 2001 15:18:29 -0000 Organization: University of Durham, Durham, UK Lines: 26 Message-ID: <9uipbl$rse$1@sirius.dur.ac.uk> NNTP-Posting-Host: a-cws224.dur.ac.uk X-Trace: sirius.dur.ac.uk 1007478965 28558 129.234.53.224 (4 Dec 2001 15:16:05 GMT) X-Complaints-To: usenet AT durham DOT ac DOT uk NNTP-Posting-Date: Tue, 4 Dec 2001 15:16:05 +0000 (UTC) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Priority: 3 X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MSMail-Priority: Normal To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com ive been having some problems getting this to work, i think ive managed to get the real mode program to access the correct reflected segment and offset for my protected mode function, but it then crashes without error messages. ive been looking at the callback specification, and the hook written in the example:- cld lodsw ; Get real mode ret IP mov es:[di.RealMode_IP], ax lodsw ; Get real mode ret CS mov es:[di.RealMode_CS], ax lodsw ; Get real mode flags or ax,1 ; St carry flag mov es:[di.RealMode_Flags], ax add es:[di.RealMode_SP], 6 mov es:[di.RealMode_AX], 5 iret as far as i can tell this moves the es:di reg into cs:ip reg. Unfrotunately i cant get this syntax to compile, it tells me there is 'junk' after the es: I need a call back function, similar to this, which also puts 0:0 in the es:di field of the callback data structure, can anyone help??? :) Thanks, andy.