delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/13/02:33:38

Xref: news2.mv.net alt.msdos.programmer:13469 comp.os.msdos.apps:8464 comp.os.msdos.desqview:3711 comp.os.msdos.djgpp:5935 comp.os.msdos.misc:35160 comp.os.msdos.programmer:26485
From: "Romano Signorelli" <tecnim2 AT gefran DOT it>
Newsgroups: alt.msdos.programmer,comp.msdos.programmer,comp.os.msdos.apps,comp.os.msdos.desqview,comp.os.msdos.djgpp,comp.os.msdos.misc,comp.os.msdos.programmer
Subject: Is there any DPMI16 programmers out there?
Date: Fri, 12 Jul 1996 08:44:49 +0200
Organization: Gefran S.p.A.
Lines: 78
Message-ID: <01bb6fbd.9f2ab960$6fe8b8c2@uiemurs.gefran.it>
NNTP-Posting-Host: uiemurs.gefran.it
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I'm working with Borland BC 4.5 and Powerpack in DPMI16
Here are some specific comments about my problem.

- I have a p-mode interrupt C function (handled with service 205h)
- When i call a p-mode (not interrupt) C function from the interrupt, DS
doesn't appear like i expect it.

TD observations:
- Standard p-mode C functions seems to assign DS=SS every time, in the
standard entry-header.

- It seems that the compiler assume DS=SS for all my program (although
i've unchecked the relative compiler option). This is a function
entry-header dump:

mov    ax,ss
nop
inc    bp
push   bp
mov    bp,sp
push   ds
mov    ds,ax

- Instead, interrupt p-mode C function, in the entry-header, load
DS with a constant value and SS is unpredicable. This is a dump:
 push   ax
 push   bx
 push   cx
 push   dx
 push   es
 push   ds
 push   si
 push   di
 push   bp
 mov    bp,0C07
 mov    ds,bp
 mov    bp,sp

where 0C07 is a constant number equal to my data segment
(preloaded runtime loader at startup)

Like you can see, SS in the interrupt function is unpredicable and, 
performing a call to the standard procedure,
force DS to be loaded with the actual SS value... and it CRASH!

I can't believe that the problem is so hard to resolve.
This is the first time i program DPMI16 interrupts and i, probably, make
some mistake.

Second problem:
I've tried various solutions to handle the interrupt and i've found some
problems. Deeply: may i intercept the p-mode interrupt with service 205h
or must i
intercept the r-mode interrupt also (201h service)? If so, how can i
redirect the r-mode interrupt to the p-mode function (i've tried the
callback but it seem to work not very well).

Foot note: the purpose is to redirect the timer interrupt 8 and the UARTS
interrupt.

Thanks in advance.
If you can not help me, please e-mail me some interesting DPMI resource
addresses in internet (i've found NOTHING!). Powerpack manual seems to be
a ZIPPED DPMI reference.

-- 
Regards from Romano Signorelli
Software research and development division

Gefran S.p.A. <http://www.gefran.it>
Electronics and instrumentation for industry automation
via Statale Sebina, 74
25050 Provaglio d'Iseo (BS)
Italy

Phone +39-30-98881
Fax: +39-30-9839063

- Raw text -


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