10 REM > BLib.Number 1.01 09Aug1988
   20 REM v1.00 09Aug1988 JGH: First version
   30 REM v1.01 12Feb1992 JGH: Added Octal and Binary
   40 REM v1.02 15Sep2009 JGH: Octal and Binary works for &8xxxxxxx
   50 :
   60 REM Number Output Routines
   70 REM ~~~~~~~~~~~~~~~~~~~~~~
   80 :
   90 REM Hexadecimal padded with zeros
  100 DEFFNh0(A%,N%):=RIGHT$("0000000"+STR$~A%,N%)
  110 :
  120 REM Hexadecimal padded with spaces
  130 DEFFNh(A%,N%):=RIGHT$("       "+STR$~A%,N%)
  140 :
  150 REM Decimal padded with zeros
  160 DEFFNd0(A%,N%):=RIGHT$("00000000"+STR$A%,N%)
  170 :
  180 REM Decimal padded with spaces
  190 DEFFNd(A%,N%):=RIGHT$("         "+STR$A%,N%)
  200 :
  210 REM Octal padded with zeros
  220 DEFFNo0(A%,N%):LOCAL A$,B%,L%:IFA%<0:B%=2:A%=A%AND&7FFFFFFF
  230 REPEATA$=STR$(A%AND7)+A$:A%=A%DIV8:L%=L%+3:UNTILL%>27:=RIGHT$(STR$(A%+B%)+A$,N%)
  240 :
  250 REM Octal padded with spaces
  260 DEFFNo(A%,N%):LOCAL A$:IFA%<0:=FNo0(A%,N%)
  270 REPEATA$=STR$(A%AND7)+A$:A%=A%DIV8:UNTILA%=0:=RIGHT$(STRING$(N%," ")+A$,N%)
  280 :
  290 REM Binary padded with zeros
  300 DEFFNb0(A%,N%):LOCAL A$,B$,L%:B$="0":IFA%<0:B$="1":A%=A%AND&7FFFFFFF
  310 REPEATA$=STR$(A%AND1)+A$:A%=A%DIV2:L%=L%+1:UNTILL%>30:=RIGHT$(B$+A$,N%)
  320 :
  330 REM Binary padded with spaces
  340 DEFFNb(A%,N%):LOCAL A$:IFA%<0:=FNb0(A%,N%)
  350 REPEATA$=STR$(A%AND1)+A$:A%=A%DIV2:UNTILA%=0:=RIGHT$(STRING$(N%," ")+A$,N%)
  360 :
  370 REM Drive character for supplied number
  380 DEFFNdrv(A%):=CHR$(48+A%-7*(A%>9))
  390 :
  400 REM Drive number for supplied character
  410 DEFFNDrv(A$):=ASCA$-48+7*(A$>"9")AND31
  420 :