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, 17.05.2012, 01:25

Sorry guys, I'm little bit loosing in your high-tech discussion. Just asking if I have to modify something in cm's code? I checked in BOCHS and on real PC too.

NEW_INT13H:                     ;INT XX do PUSHF, clear IF,TF, PUSH CS,IP (6B)
        PUSHF                   ;store flags (2B)
        CMP     DL,ROMDISK_DRIVE;related to our diskdisku?
        JE      @NEW_INT13H_HUB ;if yes continue below else
        POPF                    ;restore flags (2B)
        INT     OLD_INT13H      ;call old INT 13h handler
        PUSH    BP              ;store BP (2B)
        MOV     BP,SP           ;set BP to current SP
        PUSH    AX              ;store AX (2B)
        LAHF                    ;load flags[7:0] to AH that was returned by old INT 13h handler
        MOV     [BP+6],AH       ;replace previously saved flags[7:0] of INT caller on stack by current flags (SS is implicit)
        POP     AX              ;restore AX (2B)
        POP     BP              ;restore BP (2B)
        IRET                    ;return from ISR, do POP IP,CS,F (6B)

---
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