SL>The program worked until i load something in memory. I modified it a bit
SL>but still bug. The keyboard interrupt didn't respond correctly after its
SL>execution. Take a look on what i added. nothing fancy and should work
t??
SL>NewTck PROC
SL> pusha
SL> pusha
You don't need the extra pusha, since the first one will save the
registers. Anyway I've found the "big" problem, change the second pusha
into a PUSH ES.
SL> cmp byte ptr es:[bx],00h
SL> jnz short Exit
SL> popa
SL> pusha
Again the pop/push are extras which aren't needed, remove those two lines
entirely.
SL>Exit:
SL> popa ;pop all registers
SL> popa
Same thing again, but now change the first popa into a POP ES. Now try the
program, it should work now, or atleast no crash.
[ie:
pusha
push ES
...
pop ES
popa]
Why? Well, I just doubled checked the PUSHA instruction and it ONLY saves
the following registers: AX,BX,CX,DX,SP,BP,SI,DI
You note that ES isn't among them. Since you modified it within the
handler, you must save this as a seperate PUSH ES call. The same thing goes
with popa, so you must use a seperate POP ES to restore ES.
Shreddies! :?
Denis Boyles
* OLX 2.1 TD * Chicken heads are the chief food of captive alligators.
--- Maximus/2 3.01
---------------
* Origin: Frog Hollow Port Moody BC 604-469-0264/0284 (1:153/290)
|