From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6e0a529082576354 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!e31g2000hse.googlegroups.com!not-for-mail From: cl1 Newsgroups: comp.lang.ada Subject: Re: updating a hardware cursor with assembly and ada Date: Thu, 6 Mar 2008 09:51:37 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <47d0293c$0$21937$9b4e6d93@newsspool2.arcor-online.net> NNTP-Posting-Host: 12.171.189.254 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1204825898 8648 127.0.0.1 (6 Mar 2008 17:51:38 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 6 Mar 2008 17:51:38 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e31g2000hse.googlegroups.com; posting-host=12.171.189.254; posting-account=cLBcWgoAAADtU-UF8ntHRvRGRduXdrAf User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20199 Date: 2008-03-06T09:51:37-08:00 List-Id: On Mar 6, 11:26=A0am, Georg Bauhaus wrote: > cl1 schrieb: > > > unsigned char outportb (unsigned short _port, unsigned char _data) > > { > > =A0__asm__ __volatile__ ("outb %1, %0" : : "dN" (_port), "a" (_data)); > > } > > ------------------------------------------------------------------------= ---=AD-- > > =A0 procedure Update_Cursor (Console : Video_Console) is > > =A0 =A0 =A0procedure 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 :=3D Console.Column * 80 + Console.Row; even when Column and Row were of type Unsigned_16; > > > > > =A0 =A0 =A0pragma Import(C, OutportB, "outportB");- Hide quoted text - > > - Show quoted text -