Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

indirect far jmp - calling old INT problem (Developers)

posted by RayeR Homepage, CZ, 14.05.2012, 01:19

> Here's a better one I came up with just now. Note that it takes 2 more
> bytes than your last suggestion, but importantly it correctly preserves the
> caller's interrupt flag. It also preserves their trace, direction, and
> overflow flags. Which happen to be the flags stored in the high byte of the
> flag word. Look for yourself:
>
> 1319:0100 55                push    bp
> 1319:0101 89E5              mov     bp, sp
> 1319:0103 50                push    ax
> 1319:0104 9F                lahf
> 1319:0105 886606            mov     [bp+06], ah
> 1319:0108 58                pop     ax
> 1319:0109 5D                pop     bp

Yes you's right. INT disables IF,TF after storing flags so futher INT got this disabled and I passed it disabled. My bad. Now we are passing only LSB of flags so MSB is untouched. I hope that INT13h ISR don't manipulate flags in MSB, AFAIK it uses only CF. Interrupts should be disabled all the time inside ISR until last IRET so another INT shouldn't occur. I didn't know LAHF instruction, just wonder there's no LALF or LAXF... x86 set if full of various exceptions...
Thx for help

---
DOS gives me freedom to unlimited HW access.

 

Complete thread:

Back to the forum
Board view  Mix view
22760 Postings in 2121 Threads, 402 registered users (1 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum