OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [i386/] [ts_386ex/] [tools/] [ts_1325_ada/] [i386_ports.adb] - Blame information for rev 609

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
with System.Machine_Code;
2
use System.Machine_Code;
3
 
4
package body I386_Ports is
5
 
6
   procedure Outport (Addr: in Port_Address; Data: in Byte) is
7
   begin
8
      Asm ("movb %0, %%al;" &
9
           "movw %1, %%dx;" &
10
           "outb %%al, %%dx",
11
           No_Output_Operands,
12
           (Byte'Asm_Input ("g", Data),
13
            Port_Address'Asm_Input ("g", Addr)),
14
           Clobber => "al dx",
15
           Volatile => True);
16
   end Outport;
17
 
18
   procedure Inport (Addr: in Port_Address; Data: out Byte) is
19
   begin
20
      Asm ("movw %1, %%dx;"   &
21
           "inb %%dx, %%al;"  &
22
           "movb %%al, %0",
23
           Byte'Asm_Output ("=g", Data),
24
           Port_Address'Asm_Input ("g", Addr),
25
           Clobber => "dx al",
26
           Volatile => True);
27
   end Inport;
28
 
29
end I386_Ports;

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.