blob: fc443a8c2733daaa6fe9eb7477c1826d1c017c07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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");
}
|