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, 13.05.2012, 04:01
(edited by RayeR on 13.05.2012, 04:19)

> OK I'll rewrite it to call old ISR via INT.

I tried it in BOCHS and I have problem with calling old ISR via INT.
I got error messages when freedos boots and in bochs.log I can see:

00482449844i[BIOS ] int13_harddisk: function 00, unmapped device for ELDL=80
00482456146i[BIOS ] int13_harddisk: function 08, unmapped device for ELDL=80
00482460917i[BIOS ] int13_harddisk: function 00, unmapped device for ELDL=80
00482465680i[BIOS ] int13_harddisk: function 00, unmapped device for ELDL=81
00482470443i[BIOS ] int13_harddisk: function 00, unmapped device for ELDL=82
00482475206i[BIOS ] int13_harddisk: function 00, unmapped device for ELDL=83
...

I still can use "real" drive A: (I emulate B:) so it seems that old ISR is called but something got messed... I modified my code this way:

NEW_INT13H:                     ;INT XX do PUSH F, CLI, PUSH CS,IP (6B) / INT XX provadi PUSH F, CLI, PUSH CS,IP (6B)
        PUSHF                   ;store flags (2B) / uloz flagy (2B)
        CMP     DL,ROMDISK_DRIVE;related to our disk ? / tyka se to naseho disku?
        JE      @NEW_INT13H_HUB ;if yes continue below else / pokud ano, pokracuj nize, jinak
        POPF                    ;restore flags (2B) and / obnov flagy (2B) a

;JMP 0xF000:0xE3FE ; OK (hardcoded BOCHS ISR vector)

;        push ds ; OK (cm's example)
;        push ax
;        mov ax, 0
;        mov ds, ax
;        push bp
;        mov bp, sp
;        mov ax, [OLD_INT13H*4+2]
;        xchg ax, [bp+4]
;        push ax
;        mov ax, [OLD_INT13H*4]
;        xchg ax, [bp+2]
;        pop ds
;        pop bp
;        retf

        INT     85h             ;call old INT 13h handler / zavolej puvodni preruseni INT 13h
        IRET                    ;and return to caller program / a predej rizeni zpet volajicimu programu

@NEW_INT13H_HUB:                ;subfunction hub / rozcestnik podfunkci
...


If I call old ISR by direct far call or via cm's method (longer code than my old) it boots ok without error. What can be wrong?

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

 

Complete thread:

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