Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Borland > How to debug in...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 25 Topic 1039 of 1102
Post > Topic >>

How to debug inside the BIOS and/or interrupt?

by Jim Leonard <spamtrap@[EMAIL PROTECTED] > Jul 5, 2007 at 02:45 AM

Some of you may remember me with my 808x questions from a while back.
I've put all that into an audio/video player for an old IBM PC (google
"8088 Corruption" for more info).  I'm now trying to improve the
performance of the player, and running into some very odd things that
I can't figure out and was hoping someone might have some advice on
how to debug my program.

Background: The basic method of operation of the program is to drive a
Sound Blaster off of IRQ 2 (hard drive is IRQ 5), and the SB interrupt
handler pulls video and audio data out of a queue and displays/sounds
them.  In the foreground, the main program is in a loop that
constantly tries to pull data from the hard disk and stuff it into the
queue.  If memory fills up, the main program loop pauses.  If memory
empties, the interrupt handler is told to "do nothing" until memory is
full with video/audio data again.  There is unfortunately some shared
code (memory handling) between the main loop and the interrupt
handler, so I prevent re-entrancy problems by wrapping the shared
pieces in the main disk load loop with CLI/STI.

Currently, only one audio/video chunk is read per disk access, and the
program works.  I tried to optimize it today by having the disk
portion read more than one audio/video chunk at a time.  This
dramatically improves disk performance, but now the program locks up
after a random period of time seemingly INSIDE the INT 21,3f call to
read data from a file handle.  I know this because I stuck various
"printf"s (not really, but you get the idea) before certain sections
of code, and the last thing I can see is the "marker" right before the
disk read.

How can I debug this sort of thing?  I've tried to break the operation
of the program when it hangs in both D86 and Turbo Debugger, but being
on the 8088 there's no hardware virtualization and the machine does
not respond to my keypress.  How did people debug interrupt handlers,
BIOS functions, etc. "back in the day"?

I can provide full source to anyone who's willing to look at it, if it
will help... It's Turbo Pascal 7.0 with inline assembler and highly
commented.  Any advice is appreciated!




 25 Posts in Topic:
How to debug inside the BIOS and/or interrupt?
Jim Leonard <spamtrap  2007-07-05 02:45:50 
Re: How to debug inside the BIOS and/or interrupt?
"Rod Pemberton"  2007-07-05 02:17:27 
Re: How to debug inside the BIOS and/or interrupt?
"Benjamin David Lunt  2007-07-05 15:28:00 
Re: How to debug inside the BIOS and/or interrupt?
NoSpam@[EMAIL PROTECTED]   2007-07-05 12:15:06 
Re: How to debug inside the BIOS and/or interrupt?
HubbleBubble <spamtra  2007-07-05 02:21:48 
Re: How to debug inside the BIOS and/or interrupt?
hartnegg <spamtrap@[EM  2007-07-05 08:11:22 
Re: How to debug inside the BIOS and/or interrupt?
Jim Leonard <spamtrap  2007-07-05 09:04:20 
Re: How to debug inside the BIOS and/or interrupt?
"Rod Pemberton"  2007-07-05 18:33:55 
Re: How to debug inside the BIOS and/or interrupt?
"Wolfgang Kern"  2007-07-06 17:40:44 
Re: How to debug inside the BIOS and/or interrupt?
Jim Leonard <spamtrap  2007-07-05 09:13:45 
Re: How to debug inside the BIOS and/or interrupt?
Jim Leonard <spamtrap  2007-07-05 10:07:22 
Re: How to debug inside the BIOS and/or interrupt?
"Rod Pemberton"  2007-07-05 18:32:16 
Re: How to debug inside the BIOS and/or interrupt?
"Markus.Humm"   2007-07-10 19:37:06 
Re: How to debug inside the BIOS and/or interrupt?
"Jason Burgon"   2007-07-05 22:55:04 
Re: How to debug inside the BIOS and/or interrupt?
Jim Leonard <spamtrap  2007-07-05 10:12:12 
Re: How to debug inside the BIOS and/or interrupt?
Jim Leonard <spamtrap  2007-07-05 14:49:30 
Re: How to debug inside the BIOS and/or interrupt?
Jim Leonard <spamtrap  2007-07-06 02:15:15 
Re: How to debug inside the BIOS and/or interrupt?
Jim Leonard <spamtrap  2007-07-06 03:38:11 
Re: How to debug inside the BIOS and/or interrupt?
NoSpam@[EMAIL PROTECTED]   2007-07-06 12:18:48 
Re: How to debug inside the BIOS and/or interrupt?
ArarghMail707NOSPAM <s  2007-07-06 15:31:57 
Re: How to debug inside the BIOS and/or interrupt?
Jim Leonard <spamtrap  2007-07-06 08:57:39 
Re: How to debug inside the BIOS and/or interrupt?
Jim Leonard <spamtrap  2007-07-06 09:39:13 
Re: How to debug inside the BIOS and/or interrupt?
Jim Leonard <spamtrap  2007-07-11 09:01:39 
Re: How to debug inside the BIOS and/or interrupt?
NoSpam@[EMAIL PROTECTED]   2007-07-12 11:46:55 
Re: How to debug inside the BIOS and/or interrupt?
"Jason Burgon"   2007-07-12 18:28:36 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed May 14 22:33:01 CDT 2008.