Trailing-Edge
-
PDP-10 Archives
-
steco_19840320_1er_E35
-
10,5676/teco/macros/sixbit.tco
There is 1 other file named sixbit.tco in the archive. Click here to see a list.
!;SIXBIT -- Convert octal argument to SIXBIT, return 6 characters in Q-reg 0!
[1 [2 [3 !;Save argument, registers!
Q1&^O377777777777U2 !;Make sure we have a positive number!
5<Q2&^O77U3 [3 Q2/64U2> !;Get 5 chars from right to left!
Q1"L Q2#32U2' [2 !;Put corrected first char on stack!
.+(ZJ !;Save point and go to end!
6<]1 Q1+32I$> !;Pop 6 chars of stack and insert!
.-6,.X0 .-6,.K !;Move to Q0!
0)J !;Restore point!
]3 ]2 ]1 !;Restore Q-regs!