-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcrt0.s
More file actions
71 lines (68 loc) · 1.37 KB
/
crt0.s
File metadata and controls
71 lines (68 loc) · 1.37 KB
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
70
71
/ $Header: crt0.s,V 1.3 86/07/22 19:16:10 avg Exp $
/
/ óÔÁÒÔÏ×ÙÊ ÍÏÄÕÌØ óÉ.
/
/ $Log: crt0.s,V $
/ Revision 1.3 86/07/22 19:16:10 avg
/ ÷ÙÂÒÏÛÅÎÁ ×ÏÚÍÏÖÎÏÓÔØ ÉÓÐ. × MSG ÒÕÓÓËÉÈ ÂÕË×, Ô.Ë.
/ ÜÔÏ ÚÁ×ÉÓÉÔ ÏÔ ËÏÄÉÒÏ×ËÉ.
/ ëÒÏÍÅ ÔÏÇÏ, ÂÕË×Á × MSG ÐÒÅÏÂÒÁÚÕÅÔÓÑ × ÍÁÌÅÎØËÕÀ -
/ for the sake of compatibility.
/
/ Revision 1.2 86/05/17 09:42:08 dmitry
/ òÕÓÓËÉÊ ÒÅÖÉÍ ÕÓÔÁÎÁ×ÌÉ×ÁÅÔÓÑ ÐÏ ÌÀÂÏÍÕ ÓÌÏ×Õ,
/ ÎÁÞÉÎÁÀÝÅÍÕÓÑ Ó ÌÀÂÏÊ ÉÚ 4 ÂÕË×:
/ r R Ò ò
/ (ÒÕÓÓËÉÅ)
/
/ Revision 1.1 86/04/20 19:05:13 dmitry
/ ÷ÓÔÁ×ÌÅÎÁ ÏÂÒÁÂÏÔËÁ MSG.
/
.globl _exit
.globl _main
.globl _environ
.globl __ediag
start:
setd
mov 2(sp),r0
clr -2(r0)
mov sp,r0
sub $4,sp
mov 4(sp),(sp)
tst (r0)+
mov r0,2(sp)
1:
tst (r0)+
bne 1b
cmp r0,*2(sp)
blo 1f
tst -(r0)
1:
mov r0,4(sp)
mov r0,_environ
2:
mov (r0)+,r2
beq 2f
mov $msg,r3
mov $4,r4
1:
cmpb (r2)+,(r3)+
bne 2b
sob r4,1b
bisb $40,(r2)
cmpb (r2),$'r
bne 2f
clr __ediag
2:
jsr pc,_main
cmp (sp)+,(sp)+
mov r0,(sp)
jsr pc,*$_exit
sys exit
.bss
_environ:
.=.+2
.data
.=.+2
__ediag: 1
msg: <MSG=>