JAL manual - libraries - jprint

previous up next

The jprint library provides routines which print a value in various bases. Each routine takes the same arguments.

The provided routines are:

   procedure print_binary_8( 
      byte volatile out target, 
      byte in x, 
      byte in leader = "0" 
   )
   procedure print_binary_4( ... ) 
   print_decimal_3( ... )
   print_decimal_2( ... )
   print_decimal_1( ... )
   print_hexadecimal_2( ... )
   print_hexadecimal_1( ... )

The target argument is the output destination. It must be a pseudo-variable ('put procedure) which can handle the successive writes.

The x argument is the value to be printed. The procedure which do not print the full argument will print only the number of least significant digits indicated by the procedure name.

The leader is the ASCII value which is printed instead of leading zero's. The default is "0", which causes leading zero's to be printed. A value of 0 (binary, not ASCII) will suppress printing of leading zero's.


previous up next