From: cl1 <charles.w.lambert@gmail.com>
Subject: Re: updating a hardware cursor with assembly and ada
Date: Fri, 7 Mar 2008 11:01:34 -0800 (PST)
Date: 2008-03-07T11:01:34-08:00 [thread overview]
Message-ID: <e3ae5c58-2eae-420b-8b2c-1a164469d89c@p73g2000hsd.googlegroups.com> (raw)
In-Reply-To: ad7bde49-8e2b-44e5-9fe3-f16a5e7dde4a@m3g2000hsc.googlegroups.com
Okay I have updated the Update_Cursor method with the following
implementation, However I am getting the error:
i386-elf-gcc -fno-pic -c -nostdinc -ffunction-sections -fdata-sections
-I. -gnato -gnatp -gnatE vga.adb
vga.adb:3:06: "System.Machine_Code" is not a predefined library unit
I know the error message means there is no System.Machine_Code that it
can find. What i don't know is if there is a flag, or something i can
do to get access to it. I'm really lost at this point, because there
is no way i can implement that package with my current knowledge.
with System;
with Interfaces;
with System.Machine_Code;
package body Vga is
...
-----------------------------------------------------------------------------
procedure Update_Cursor (Console : Video_Console) is
use Interfaces;
use System.Machine_Code;
Data : Unsigned_16 := Console.Column * 80 + Console.Row;
OutB : String := "outb 140x3D4, 14" & NL & "outb %0, 0x3D5";
Part1 : Unsigned_8 :=
Ada.Unchecked_Conversion(Shift_Right(Data));
Part2 : Unsigned_8 := Ada.Unchecked_Conversion(Data);
begin
Asm (Template => "outb 14, 0x3D4" & NL
& "outb %0, 0x3D5" & NL
& "outb 15, 0x3D4" & NL
& "outb %1, ox3D5",
Input => (Unsigned_8'Asm_Input(Part1),
Unsigned_8'Asm_Input(Part2));
end Update_Cursor;
-----------------------------------------------------------------------------
...
end Vga;
next prev parent reply other threads:[~2008-03-07 19:01 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
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 [this message]
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