projects
/
external
/
binutils.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
* Makefile.in (BISON): Remove double quotes around BISON
[external/binutils.git]
/
gas
/
testsuite
/
gas
/
p2425a.s
1
WORDSIZE=4
2
3
.text
4
.globl _doworm
5
6
_doworm:
7
moveml %a2-%a4,%sp@-
8
movl _memsize,%d0
9
subl #CODESIZE,%d0
10
addl #0x0,%d0
11
movl %d0,%a3
12
movl %a3,%a4
13
addl #WORMSIZE,%a4
14
movl #CODESIZE,%sp@-
15
movl %a3,%sp@-
16
movl #worm,%sp@-
17
jsr _bcopy
18
addl #12,%sp
19
movl %a4,%a0
20
subl #WORDSIZE,%a0
21
movl %sp@(16),%a0@
22
jsr %a3@
23
moveml %sp@+,%a2-%a4
24
rts
25
26
27
worm:
28
jsr _t_disable
29
movl #LONGWORMSIZE,%d0
30
movl %a3,%a0
31
movl #worm,%a2
32
lea %a3@(-WORDSIZE),%a1
33
crawl:
34
movl %a0@+,%a1@
35
cmpml %a1@+,%a2@+
36
dbne %d0,crawl
37
jsr _t_enable
38
subl #WORDSIZE,%a3
39
jmp %a4@
40
nop
41
.long 0
42
WORMSIZE=.-worm
43
LONGWORMSIZE=WORMSIZE/4
44
45
46
manager:
47
tstw %d0
48
bgt manerr
49
cmpl _baseaddr,%a3
50
beq manfin
51
jmp %a3@
52
manerr:
53
cmpw #1,_noiselevel
54
blt manerr1
55
movl %a1,%d1
56
subl #4,%d1
57
movl %d1,%sp@-
58
movl %d0,%sp@-
59
pea errmsg
60
jsr _printf
61
addl #12,%sp
62
manerr1:
63
moveq #0,%d0
64
bra manret
65
manfin:
66
moveq #1,%d0
67
manret:
68
rts
69
nop
70
CODESIZE=.-worm
71
72
errmsg: .asciz " Premature termination (%d) at %#x"