www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/07/21/17:11:04

Xref: news-dnh.mv.net comp.os.msdos.djgpp:1049
Path: news-dnh.mv.net!mv!news.sprintlink.net!jaring.my!techm!kenfoo
From: kenfoo AT techm DOT pl DOT my (Kenneth Foo)
Newsgroups: comp.os.msdos.djgpp
Subject: [Q] Inline functions -- trying to do far call
Date: Fri, 21 Jul 95 08:50:19 GMT
Organization: RDG
Lines: 42
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

Concerning DJGPP 2...

I need something like this..

        __dpmi_paddr SelectorOffset32;

        DoINT(SelectorOffset32);
        //Simulate an interrupt by calling SelectorOffset32 (contains
        //a selector:offset32 pair).

However, I can't seem to do it (through inline assembly).

The assembly code is 'roughly' like this (not exact, because I really don't
fully understand writing inline assembly code).

inline void FarCall(__dpmi_paddr *SelectorOffset32) {
        asm("
        pushf
        lcall (_SelectorOffset32)       //I'm not sure how to put this.
        )
        :
        : "m" SelectorOffset32          //Or this. :)
        :"
        }


I'm really very unsure about that inline assembly code there. DJGPP 2
probably gave some big errors. (ugh!).

Thanks for any help!


PS: The reason for this is because I need to chain an original interrupt
    after hooking to it. I can't use _go32_chain_protected_mode_interrupt
    for some internal reasons. (I'm hooking to int 8h, and changing
    its speed).
--
[]----------------------------------------------------------[]
| Kenneth Foo           Here's the question of the year:     |
| kenfoo AT techm DOT pl DOT my    Why do brains look like intestines?  |
[]----------------------------------------------------------[]

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019