Hello, Frank
I'm working in a 16 bit MS-DOS system and I'm trying when a BIOS int is working. I'm using this procedure:
NewInt10h:
INC BYTE [CS:InBios] ; Increment InBios flag
PUSHF
CALL FAR DWORD [CS:INT10+IsrAnterior]; Call to old Int 10h ISR
; DB 2Eh,0FFh,1Eh,21h,01h ; What previos line must be
DEC BYTE [CS:InBios] ; Decrement InBios flag
IRET
Where InBios is a byte variable that "knows" if BIOS is working.
I've done this program in MASM yet, but I'm stopped in nasm far call to an ISR.
If I do a far call to a far procedure that ends with "RETF", I can use:
PUSH CS
CALL ProcName ; this push IP
[...]
ProcName:
[...]
RETF ; this pop CS:IP
So this work fine. But push cs and call ISR doesn't work with a far call to an ISR.
Before doing a far call to an ISR we need do a PUSHF because IRET do a POPF also.
Thank you