From: "John S. Fine" Newsgroups: comp.os.msdos.djgpp Subject: Re: Nasm and real-mode ISRs (bimodal) Date: Wed, 28 Jul 1999 11:30:42 -0400 Lines: 36 Message-ID: <379F2222.1A88@erols.com> References: <379739de DOT 5187825 AT news DOT ntplx DOT com> <37987832 DOT ADD AT erols DOT com> <379858cf DOT 153478 AT news DOT ntplx DOT com> <379CC355 DOT D47 AT erols DOT com> <379e685d DOT 1136020 AT news DOT ntplx DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: 5/k8Y7Zg1/QBdnHPDryXkKgJ6yYvHftl6wewlcta3N4= X-Complaints-To: abuse AT rcn DOT com NNTP-Posting-Date: 28 Jul 1999 15:32:50 GMT X-Mailer: Mozilla 3.01 (Win95; U) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Rock wrote: > But I'm not using any lobels in my real-mode ISR. In your first post you had "cs:[128 + keyIndex]". Until now I assumed keyIndex was the label of some sort of data structure within the ISR. Much of what I said was based on that. > ax and bx registers to get the key 'index' in bx, and the key's on/off > status in ah. No labels there, and works fine up to this point. As > soon as I uncomment this instruction > > mov [cs:(REAL_KEY_ISR_SIZE + 4 + bx)], ah If I understand it correctly now, the data structure is accessed without any label and is located directly after the code of the ISR, and REAL_KEY_ISR_SIZE is the size of the code in the ISR. If that is the instruction that triggers the crash then you must consider the ways that it might be wrong. Is REAL_KEY_ISR_SIZE correctly equal to the size of the ISR's code? When you allocated conventional memory for the ISR, did you allocate enough for the code *plus* the data? Does bx have a value that is in range? > install the protected mode ISR, then not only do I have a problem > getting my 'default' DS selector, but that even worse is if it is > called from real-mode, then just about all the selectors are illegal > real-mode segments (except cs and, it looks like, gs). How can I get > all the information I need with just that? I don't remember the answer. I know I have seen it in this newsgroup. I think it is somewhere in the FAQ. -- http://www.erols.com/johnfine/ http://www.geocities.com/SiliconValley/Peaks/8600/