Re: Pro*C problem.

From: David Criswell <dcriswel_at_oracle.uucp>
Date: 4 Aug 93 19:25:02 GMT
Message-ID: <1993Aug4.192502.10370_at_oracle.us.oracle.com>


In article <CB8AEs.L3z_at_hkuxb.hku.hk> h9112654_at_hkusub (Edward P.C. Yuen) writes:
>
>Hi all,
>
> I am currently developing a database application using Pro*C 1.3,
>Microsoft C 6.0 and Oracle 6.0 for PC, and connect to a database in Sun
>Server. I ran into a problem that the library in protected mode does not
>contain the functions like _settextposition and _clearscreen.

Exactly true. There is no protected mode version of graphics.lib. This is a great candidate for an enhancement request, and I urge you to log this with Oracle's Worldwide Support.

>As they are
>absent, I tried to write them myself using interrupts. May be due to my
>poor knowledge in protected mode programming, it always gives me error
>messages of protection exception.

Just off the top of my head (ie, I haven't actually tried this, and I probably won't until there's sufficient demand for it):

void _clearscreen (void)
{

        printf ("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); /*Yes it's sleazy but it works- use 25 \n's */ }

void _settextposition (unsigned char Row, unsigned char Column)

_asm 	{
	mov ah,2	;Fnc 2 - set video cursor
	mov bh,1	;BH=video page
	mov dh, Row
	mov dl, Column
	int 10h
	}

In _settextposition I'm assuming that the compiler provides the stack frame logic, which may or may not be true. I'd also save ds and es, just to be safe.

> Can anyone out there point me the right direction in solving the
>problem?
>
> Suggestion can be e-mail to the address : h9112654_at_hkusub.hku.hk
> Thanx in advance.
>
>Best wishes,
> Edward Yuen
> University of Hong Kong
> Dept of Computer Science

Dave Criswell
Oracle Corporation
I don't speak for them. If I did I'd have moved that cursor in a much more portable way. Received on Wed Aug 04 1993 - 21:25:02 CEST

Original text of this message