From: cl1 <charles.w.lambert@gmail.com>
Subject: Re: updating a hardware cursor with assembly and ada
Date: Thu, 6 Mar 2008 09:51:37 -0800 (PST)
Date: 2008-03-06T09:51:37-08:00 [thread overview]
Message-ID: <b3eb9519-e99d-4de0-8ca6-f7dfbda0a441@e31g2000hse.googlegroups.com> (raw)
In-Reply-To: 47d0293c$0$21937$9b4e6d93@newsspool2.arcor-online.net
On Mar 6, 11:26 am, Georg Bauhaus <rm.tsoh-plus.nicif-
bauh...@maps.futureapps.de> wrote:
> cl1 schrieb:
>
> > unsigned char outportb (unsigned short _port, unsigned char _data)
> > {
> > __asm__ __volatile__ ("outb %1, %0" : : "dN" (_port), "a" (_data));
> > }
> > -----------------------------------------------------------------------------
> > procedure Update_Cursor (Console : Video_Console) is
> > procedure OutportB (Port : Natural; Data : Natural);
>
> Does type Natural match C type unsigned short on your system?
If it didn't, what problem would this pose?
> (Just a guess.) Maybe Interfaces.Unsigned_N is better choice.
I have no runtime (this is os development code). I don't know if i can
use the Interfaces packages in gnat with out it. I tried to implement
Unsigned_16 with out the operations and the compiler complained about
not having primitive operations defined on the part where i was doing
Data : Unsigned_16 := Console.Column * 80 + Console.Row; even when
Column and Row were of type Unsigned_16;
>
>
>
> > pragma Import(C, OutportB, "outportB");- Hide quoted text -
>
> - Show quoted text -
next prev parent reply other threads:[~2008-03-06 17:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-06 17:07 updating a hardware cursor with assembly and ada cl1
2008-03-06 17:26 ` Georg Bauhaus
2008-03-06 17:51 ` cl1 [this message]
2008-03-06 21:31 ` Adam Beneschan
2008-03-06 19:39 ` Jeffrey R. Carter
2008-03-06 20:08 ` Gautier
2008-03-06 20:14 ` Gautier
2008-03-06 22:54 ` Ludovic Brenta
2008-03-07 15:26 ` cl1
2008-03-07 19:01 ` cl1
2008-03-07 20:16 ` Ludovic Brenta
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox