File : s-textio-angel.adb


   1 ------------------------------------------------------------------------------
   2 --                                                                          --
   3 --                         GNAT RUN-TIME COMPONENTS                         --
   4 --                                                                          --
   5 --                       S Y S T E M . T E X T _ I O                        --
   6 --                                                                          --
   7 --                                 B o d y                                  --
   8 --                                                                          --
   9 --          Copyright (C) 1992-2013, Free Software Foundation, Inc.         --
  10 --                                                                          --
  11 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
  12 -- terms of the  GNU General Public License as published  by the Free Soft- --
  13 -- ware  Foundation;  either version 3,  or (at your option) any later ver- --
  14 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
  15 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
  16 -- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
  17 --                                                                          --
  18 --                                                                          --
  19 --                                                                          --
  20 --                                                                          --
  21 --                                                                          --
  22 -- You should have received a copy of the GNU General Public License and    --
  23 -- a copy of the GCC Runtime Library Exception along with this program;     --
  24 -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
  25 -- <http://www.gnu.org/licenses/>.                                          --
  26 --                                                                          --
  27 -- GNAT was originally developed  by the GNAT team at  New York University. --
  28 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
  29 --                                                                          --
  30 ------------------------------------------------------------------------------
  31 
  32 with System.Machine_Code; use System.Machine_Code;
  33 package body System.Text_IO is
  34 
  35    ----------------
  36    -- Initialize --
  37    ----------------
  38 
  39    procedure Initialize is
  40    begin
  41       Initialized := True;
  42    end Initialize;
  43 
  44    -----------------
  45    -- Is_Tx_Ready --
  46    -----------------
  47 
  48    function Is_Tx_Ready return Boolean is (True);
  49 
  50    ---------
  51    -- Put --
  52    ---------
  53 
  54    procedure Put (C : Character) is
  55    begin
  56       Asm (Template => "mov r0, 3" & ASCII.LF & ASCII.HT
  57                      & "mov r1, %0" & ASCII.LF & ASCII.HT
  58                      & "bkpt 0xab",
  59            Inputs   =>  (Address'Asm_Input ("r", C'Address)),
  60            Volatile => True);
  61    end Put;
  62 
  63    ----------------------------
  64    -- Use_Cr_Lf_For_New_Line --
  65    ----------------------------
  66 
  67    function Use_Cr_Lf_For_New_Line return Boolean is (True);
  68 
  69    -----------------
  70    -- Is_Rx_Ready --
  71    -----------------
  72 
  73    function Is_Rx_Ready return Boolean is (False);
  74 
  75    ---------
  76    -- Get --
  77    ---------
  78 
  79    function Get return Character is (Character'Val (26));
  80 end System.Text_IO;