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 ecm Homepage E-mail, Düsseldorf, Germany, 13.05.2012, 23:44
(edited by cm on 13.05.2012, 23:56)

> Hm some magic with rotating saved flags on stack through carry...

Yeah, it rotates the current CF into bit 7 of the caller's flag byte (effectively discarding the original caller's CF saved there, by rotating it into our CF), then rotates just the 8 bits back to put all the flags into the correct locations again, including the returned CF.

> I got some idea how to pass original int 13 flags:

This depends on no interrupts occurring between the add and sub instruction, as it depends on the (unallocated) stack space below ss:sp-> staying unchanged. You might want to at least clear the interrupt flag (right after pushf) to try avoiding that error condition.

And then, like with your other suggestion, this appears to clear the caller's interrupt (and trap) flag, which it shouldn't do either.

> so I temporarly
> use DX to save them and it works. But I must preserve DX too.

Right.

---
l

 

Complete thread:

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