\cr
R	&IS	&\$0	&&Array of Records (\.{OCTAS}).\cr
n	&IS	&\$1	&&Number of Records.	\cr
Bound	&IS	&\$1	&&Reuseing register for $n$.\cr
j	&IS	&\$3	&&Local Variables.\cr
rj	&IS	&\$4\cr
rjj	&IS	&\$5\cr
t	&IS	&\$6\cr
tmp	&IS	&\$7\cr
\cr
BubbleSort	&SUB	&n,n,1; 8ADDU Bound,n,R	&\hfil$2$&\ul{\sl B1.~Initialize \.{Bound}.} \cr
	&JMP	&2F	&\hfil$1$&\cr
3H	&LDO	&rj,Bound,j	&\hfil$A$&\ul{\sl B3.~Compare/exchange $R_j:R_{j+1}$.} \cr
Loop	&ADD	&j,j,8	&\hfil$C$&\cr
	&LDO	&rjj,Bound,j	&\hfil$C$&\cr
	&CMP	&tmp,rj,rjj	&\hfil$C$&$K_j>K_{j+1}$ ?\cr
	&PBNP	&tmp,0F	&\hfil$C+2B$&\cr
	&STO	&rj,Bound,j	&\hfil$B$&Interchange $R_j \leftrightarrow R_{j+1}$.\cr
	&SUB	&t,j,8	&\hfil$B$&$t \is j$\cr
	&STO	&rjj,Bound,t	&\hfil$B$&\cr
	&PBN	&j,Loop	&\hfil$B+2D$&\cr
	&JMP	&4F	&\hfil$D$&\cr
0H	&SET	&rj,rjj	&\hfil$C-B$&\cr
	&PBN	&j,Loop	&\hfil$C-B+2(A-D)$&\cr
4H	&BZ	&t,End	&\hfil$A+2$&\ul{\sl B4.~Any exchanges?} $t\is 0$\cr
	&ADD	&Bound,Bound,t	&\hfil$A-1$&$\.{Bound}\is t$\cr
2H	&SET	&t,0	&\hfil$A$&\ul{\sl B2.~Loop on $j$.} $t\is 0$\cr
	&SUB	&j,R,Bound	&\hfil$A$&$j\is 0$\cr
	&PBN	&j,3B	&\hfil$A$&$j = 0, 1, \ldots ,  \.{Bound}-1$\cr
End	&POP	&0,0	&\cr
