April 19th, 2007, 11:42 PM
Join Date: Feb 2006
Time spent in forums: 1 h 26 m 50 sec
Reputation Power: 0
CPU Flags changed, Divid error is taken place.
I'm checking a bug for my program which is running on a 80186 CPU. I found there was a strange issue:
There is a function which send some parameters to a port.
Before write parameter to the port I save CPU flags to stack and disable the interrupt. Flags is resumed after output operation is done. All routine is below. (Mixed asm and C)
, when popf is executed. An exception is occurred.
- Divide error. This bug is very hard to reproduce. So, I'm confused. FLAGs changing can result in interrupt#0?
I had checked specification of CPU, nothing I can find there?
So, anybody have been met this kind of problem?