with BitsAKD, -- KeybAKD, MemoAKD, PortAKD, ScrnAKD, System; package body IntrAKD is ---------------------------------------------------------------------- -- Copyright (C) 1994 David Wallace Croft. All rights reserved. ---------------------------------------------------------------------- procedure PIC_8259 ( PIC_Level: in PIC_Level_Type; On: in boolean ) is ---------------------------------------------------------------------- begin if On then PortAKD.Out_Byte ( PortAKD.Port_8259_OCW1, BitsAKD.Clear_Bits ( PortAKD.In_Byte ( PortAKD.Port_8259_OCW1 ), 2 ** integer ( PIC_Level ) ) ); else PortAKD.Out_Byte ( PortAKD.Port_8259_OCW1, BitsAKD.Set_Bits ( PortAKD.In_Byte ( PortAKD.Port_8259_OCW1 ), 2 ** integer ( PIC_Level ) ) ); end if; end PIC_8259; procedure PIC_8259_EOI is ---------------------------------------------------------------------- -- Sends the 8259 Programmable Interrupt Controller (PIC) the -- End of Interrupt signal (EOI). ---------------------------------------------------------------------- EOI: constant := 16#20#; begin PortAKD.Out_Byte ( PortAKD.Port_8259_OCW2, EOI ); end PIC_8259_EOI; procedure PIC_8259_EOI ( PIC_Level: in PIC_Level_Type ) is ---------------------------------------------------------------------- -- Sends the 8259 Programmable Interrupt Controller (PIC) a specific -- End of Interrupt signal (EOI). ---------------------------------------------------------------------- EOI_Specific: constant := 2#001100000#; begin PortAKD.Out_Byte ( PortAKD.Port_8259_OCW2, EOI_Specific + Pic_Level_Type'pos ( PIC_Level ) ); end PIC_8259_EOI; function PIC_8259_OCW2 return BitsAKD.Byte_Type is ---------------------------------------------------------------------- begin return PortAKD.In_Byte ( PortAKD.Port_8259_OCW2 ); end PIC_8259_OCW2; procedure PIC_8259_OCW2 ( Mode: in BitsAKD.Byte_Type ) is ---------------------------------------------------------------------- begin PortAKD.Out_Byte ( PortAKD.Port_8259_OCW2, Mode ); end PIC_8259_OCW2; procedure PIC_8259_Show is ---------------------------------------------------------------------- begin ScrnAKD.Put_Line ( "PIC 8259 OCW1: " & BitsAKD.Byte_Type'image ( PortAKD.In_Byte ( PortAKD.Port_8259_OCW1 ) ) & ' ' ); ScrnAKD.Put_Line ( "PIC 8259 OCW2: " & BitsAKD.Byte_Type'image ( PortAKD.In_Byte ( PortAKD.Port_8259_OCW2 ) ) & ' ' ); end PIC_8259_Show; procedure Vector_Show ( Int: in Int_Type ) is ---------------------------------------------------------------------- Vector_Index: System.Address; begin for Vector_Index in ( ( integer ( Int ) * 4 ) + 0 )..( ( integer ( Int ) * 4 ) + 3 ) loop ScrnAKD.Put_Line ( MemoAKD.Peek ( System.Address ( Vector_Index ) ) ); end loop; end Vector_Show; ---------------------------------------------------------------------- ---------------------------------------------------------------------- end IntrAKD;