View Single Post
  #1  
Old 03-17-2021, 01:41
BlackWhite BlackWhite is offline
Friend
 
Join Date: Apr 2013
Posts: 65
Rept. Given: 4
Rept. Rcvd 11 Times in 5 Posts
Thanks Given: 9
Thanks Rcvd at 35 Times in 14 Posts
BlackWhite Reputation: 11
Bochs's source code fix for S-ICE v2.80

The bug resides in source code "cpu/event.cc", and the concerned function is as follows:
void BX_CPU_C::InterruptAcknowledge(void)

This function is responsible for generating a hardware interrupt when the interrupt flag IF is turned on,
but it does not check the mask in port 0x21(master pic) and port 0xA1(slave pic) thus results in generating
unexpected interrupts.

It is the very bug that causes Nu-Mega's DOS version debugger S-ICE to crash when we command P to single step.

It costs me about 9 months to debug Bochs's source code with VS2019's embedded debugger which further
debugs Bochs's enhanced debugger which debugs S-ICE which debugs a sample 16-bit DOS program. Finally
I figure out the bug and get it fixed.

Here I provide in the attachment the fixed version of "cpu/event.cc" and "iodev/pic.h" . Please note that the
modifed part is marked by [%].

https://blog.cnstock.com/UploadFiles...7127770025.zip
Reply With Quote
The Following 4 Users Gave Reputation+1 to BlackWhite For This Useful Post:
b30wulf (04-17-2021), chants (03-17-2021), MarcElBichon (03-17-2021), niculaita (03-17-2021)
The Following 6 Users Say Thank You to BlackWhite For This Useful Post:
an0rma1 (03-23-2021), chants (03-17-2021), N0P (03-23-2021), niculaita (03-17-2021), o_o (03-17-2021), uranus64 (03-17-2021)