File : s-textio-avrtest.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;
33
34 package body System.Text_IO is
35
36 STDIO : Character;
37 for STDIO'Address use 16#52#;
38 -- IO port in the simulator for console output
39
40 ---------
41 -- Get --
42 ---------
43
44 function Get return Character is
45 begin
46 -- Will never be called.
47 raise Program_Error;
48 return ASCII.NUL;
49 end Get;
50
51 ----------------
52 -- Initialize --
53 ----------------
54
55 procedure Initialize is
56 begin
57 Initialized := True;
58 end Initialize;
59
60 -----------------
61 -- Is_Rx_Ready --
62 -----------------
63
64 function Is_Rx_Ready return Boolean is
65 begin
66 return False;
67 end Is_Rx_Ready;
68
69 -----------------
70 -- Is_Tx_Ready --
71 -----------------
72
73 function Is_Tx_Ready return Boolean is
74 begin
75 return True;
76 end Is_Tx_Ready;
77
78 ---------
79 -- Put --
80 ---------
81
82 procedure Put (C : Character) is
83 use System.Machine_Code;
84 begin
85 -- STDIO := Item;
86 Asm ("out 0x32,%0", Inputs => Character'Asm_Input ("r", C),
87 Volatile => True);
88 end Put;
89
90 ----------------------------
91 -- Use_Cr_Lf_For_New_Line --
92 ----------------------------
93
94 function Use_Cr_Lf_For_New_Line return Boolean is
95 begin
96 return False;
97 end Use_Cr_Lf_For_New_Line;
98 end System.Text_IO;