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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [fp/] [implementation/] [mmix/] [sort.mms] - Blame information for rev 320

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

Line No. Rev Author Line
1 15 hellwig
          LOC   Data_Segment
2
x0        GREG  @
3
X0        IS    @
4
N         IS    100
5
 
6
j         IS    $0
7
m         IS    $1
8
kk        IS    $2
9
xk        IS    $3
10
t         IS    $255
11
          LOC   #100
12
Maximum   SL    kk,$0,3
13
          LDO   m,x0,kk
14
          JMP   ChangeJ
15
Loop      LDO   xk,x0,kk
16
          CMP   t,xk,m
17
          PBNP  t,DecreaseK
18
ChangeM   SET   m,xk
19
ChangeJ   SR    j,kk,3
20
DecreaseK SUB   kk,kk,8
21
          PBP   kk,Loop
22
          POP   2,0
23
 
24
Main      GETA  t,9F
25
          TRAP  0,Fread,StdIn
26
          SET   $0,N<<3
27
1H        SR    $2,$0,3
28
          PUSHJ 1,Maximum
29
          LDO   $3,x0,$0
30
          SL    $2,$2,3
31
          STO   $1,x0,$0
32
          STO   $3,x0,$2
33
          SUB   $0,$0,1<<3
34
          PBNZ  $0,1B
35
          GETA  t,9F
36
          TRAP  0,Fwrite,StdOut
37
          TRAP  0,Halt,0
38
9H        OCTA  X0+1<<3,N<<3
39
 
40
 

powered by: WebSVN 2.1.0

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