Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libgloss/sparc/test.c')
-rw-r--r--libgloss/sparc/test.c69
1 files changed, 69 insertions, 0 deletions
diff --git a/libgloss/sparc/test.c b/libgloss/sparc/test.c
new file mode 100644
index 000000000..fc443a8c2
--- /dev/null
+++ b/libgloss/sparc/test.c
@@ -0,0 +1,69 @@
+#include "debug.h"
+
+char hextab[] = "0123456789abcdef";
+
+int
+foo(arg)
+ int arg;
+{
+ return arg+1;
+}
+
+int
+fact (i)
+ int i;
+{
+ if (i == 1)
+ return 1;
+ else
+ return i * fact ( i - 1);
+}
+
+main()
+{
+ unsigned char c;
+ int num;
+ char foo[100];
+
+#if 0
+ set_debug_level(2);
+
+ cache_on();
+#endif
+
+ set_debug_traps();
+ breakpoint();
+
+ print("Got to here\r\n");
+
+ while (1) {
+ c = inbyte();
+ if (c == 'c')
+ break;
+
+ if (c == 'd') {
+ set_debug_traps();
+ breakpoint();
+ break;
+ }
+
+ print("echo ");
+ outbyte(c);
+ print("\r\n");
+ }
+
+ print("Hello world\r\n");
+
+ while (1) {
+ c = inbyte();
+
+ if ((c & 0x7f) == 4)
+ break;
+
+ print("Char is ");
+ outbyte (c);
+ print("\r\n");
+ }
+
+ print("I escaped!\r\n");
+}