--- /dev/null
+# Convert Declets To Binary Coded Decimal
+
+cdtbcd RA, RS
+
+ do i = 0 to 1
+ n <- i * 32
+ RA[n+0:n+7] <- 0
+ RA[n+8:n+19 ] <- DPD_TO_BCD( (RS)[n+12:n+21] )
+ RA[n+20:n+31] <- DPD_TO_BCD( (RS)[n+22:n+31] )
+
+# Add and Generate Sixes
+
+addg6s RT,RA,RB
+
+ do i = 0 to 15
+ dci <- carry_out(RA[4xi:63] + RB[4xi:63])
+ c <- [dc[0]]*4 || [dc[1]]*4 || ... || [dc[15]]*4
+ RT <- (¬c) & 0x6666_6666_6666_6666
+
+# Convert Binary Coded Decimal To Declets
+
+cbcdtd RA, RS
+
+ do i = 0 to 1
+ n <- i * 32
+ RA[n+0:n+11] <- 0
+ RA[n+12:n+21] <- BCD_TO_DPD( (RS)[n+8:n+19] )
+ RA[n+22:n+31] <- BCD_TO_DPD( (RS)[n+20:n+31] )