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 bretjohn Homepage E-mail, Rio Rancho, NM, 14.05.2012, 20:16

> Anyway In my case I cannot store old vector in my code segment, it's rom
> segment and I don't have writable memory so this is why I placed into
> IVT...

Which is why you may need to be careful when using the INT 85h approach, and make sure the flags in your code immediately before you issue the call are what they should be (the same as what's at your [BP+6]), e.g.:

PUSH [BP+6]
POPF
INT 85h

You should also make sure that the flags that are returned by INT 85h are stored unchanged at your [BP+6] when you exit, e.g:

INT 85h
PUSHF
POP [BP+6]
POP BP
IRET

This assumes that BP is not a parameter you need to "pass through", which is usually a safe assumption (safer than that you do not need to pass the flags through, anyway). There are ways (more complicated, of course) if you need to pass the original BP through as well.

 

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