OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

[/] [eco32/] [trunk/] [fp/] [implementation/] [mmix/] [strcpy.mms] - Blame information for rev 54

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 15 hellwig
in IS $2
2
out IS $3
3
r IS $4
4
l IS $5
5
m IS $6
6
t IS $7
7
mm IS $8
8
tt IS $9
9
flip GREG #0102040810204080
10
ones GREG #0101010101010101
11
 
12
       LOC #100
13
StrCpy AND in,$0,#7
14
       SLU in,in,3
15
       AND out,$1,#7
16
       SLU out,out,3
17
       SUB r,out,in
18
       LDOU out,$1,0
19
       SUB $1,$1,$0
20
       NEG m,0,1
21
       SRU m,m,in
22
       LDOU in,$0,0
23
       PUT rM,m
24
       NEG mm,0,1
25
       BN  r,1F
26
       NEG l,64,r
27
       SLU tt,out,r
28
       MUX in,in,tt
29
       BDIF t,ones,in
30
       AND t,t,m
31
       SRU mm,mm,r
32
       PUT rM,mm
33
       JMP 4F
34
1H     NEG l,0,r
35
       INCL r,64
36
       SUB $1,$1,8
37
       SRU out,out,l
38
       MUX in,in,out
39
       BDIF t,ones,in
40
       AND t,t,m
41
       SRU mm,mm,r
42
       PUT rM,mm
43
       PBZ t,2F
44
       JMP 5F
45
3H     MUX out,tt,out
46
       STOU out,$0,$1
47
2H     SLU out,in,l
48
       LDOU in,$0,8
49
       INCL $0,8
50
       BDIF t,ones,in
51
4H     SRU  tt,in,r
52
       PBZ  t,3B
53
       SRU  mm,t,r
54
       MUX  out,tt,out
55
       BNZ  mm,1F
56
       STOU out,$0,$1
57
5H     INCL $0,8
58
       SLU  out,in,l
59
       SLU  mm,t,l
60
1H     LDOU in,$0,$1
61
       MOR  mm,mm,flip
62
       SUBU t,mm,1
63
       ANDN mm,mm,t
64
       MOR  mm,mm,flip
65
       SUBU mm,mm,1
66
       PUT  rM,mm
67
       MUX  in,in,out
68
       STOU in,$0,$1
69
       POP  0
70
 
71
Main   SET $3,#8001
72
0H     SET $0,0
73
       SET $1,#aa
74
1H     STB $1,$0,0
75
       INCL $1,#11
76
       CMP $2,$1,#dd
77
       CSZ $1,$2,#aa
78
       INCL $0,1
79
       CMP  $6,$0,32
80
       PBNZ  $6,1B
81
       SET $0,$3
82
       ADD $2,$3,$5
83
       SET $1,3
84
       JMP 2F
85
1H     STB $1,$0,0
86
       SUB $1,$1,1
87
       CSZ $1,$1,3
88
       INCL $0,1
89
2H     CMP $6,$0,$2
90
       PBNZ $6,1B
91
       SET $1,0
92
       STB $1,$0,0
93
       PUSHJ 2,StrCpy
94
       SET $6,0
95
       JMP  0B
96
% put src address in $3
97
% put dest addr in $4
98
% put string length in $5

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.