Author | Joep Suijs, Copyright (c) 2007..2008, all rights reserved. |
Adapted-by | Joep Suijs, Michael Watterson |
Compiler | >=2.2 |
Outputs variables to output device. formats: _decimal and _hex vars: bit, byte, sbyte, word, sword, dword, sdword Example: var sword bhl = -684 ; print the signed word to the LCD display print_sword_dec(lcd_char, bhl) ; and now print the same signed word to the serial port print_sword_dec(serial_hw_data, bhl) ; Specials: print_crlf(serial_hw_data) -- print cr + lf to device ; const byte str1[] = "JalLibWorld V1.0\n" print_string(serial_hw_data, str1) -- print string to device ; ; Note - the whole string - that is the length of the array - ; is printed. When you use a variable array to construct strings, ; you might want to terminate at a termination character, like 0. ; You can set this termination character with: ; const print_string_terminator = 255 ; (or use a var if you want to change it runtime.) ; include print
print_sword_fp_dec uses "fixed point" integer, -127.256 to +127.256 Imagine the decimal. Thus 0x110 = 1.5 as 128 = 0.5 and 256 = 1
var bit print_prefix = false
const byte nibble2hex[] = "0123456789ABCDEF"
const dword digit_divisor[] = { 1, 10, 100, 1_000, 10_000, 100_000, 1_000_000, 10_000_000, 100_000_000, 1_000_000_000 }
print_word_dec(volatile byte out device, word in data)
print_byte_binary(volatile byte out device, byte in data)
print_sbyte_dec(volatile byte out device, sbyte in data)
print_sword_fp_dec(volatile byte out device, sword in data)
print_sword_dec(volatile byte out device, sword in data)
print_string(volatile byte out device, byte in str[])
print_bit_highlow(volatile byte out device, bit in data)
print_word_hex(volatile byte out device, word in data)
print_byte_dec(volatile byte out device, byte in data)
print_byte_hex(volatile byte out device, byte in data)
print_bit_10(volatile byte out device, bit in data)
print_sdword_hex(volatile byte out device, sdword in data)
print_dword_binary(volatile byte out device, dword in data)
print_crlf(volatile byte out device)
print_sdword_dec(volatile byte out device, sdword in data)
print_sword_hex(volatile byte out device, sword in data)
print_nibble_binary(volatile byte out device, byte in data)
print_word_binary(volatile byte out device, word in data)
print_dword_hex(volatile byte out device, dword in data)
print_dword_dec(volatile byte out device, dword in data)
print_bit_truefalse(volatile byte out device, bit in data)
_print_universal_dec(volatile byte out device, dword in data, sbyte in divisor_index)
_print_suniversal_dec(volatile byte out device, sdword in data, sbyte in divisor_index)
var bit print_prefix = false
No documentation found
const byte nibble2hex[] = "0123456789ABCDEF"
conversion string
const dword digit_divisor[] = { 1, 10, 100, 1_000, 10_000, 100_000, 1_000_000, 10_000_000, 100_000_000, 1_000_000_000 }
No documentation found
print_word_dec(volatile byte out device, word in data)
No documentation found
print_byte_binary(volatile byte out device, byte in data)
No documentation found
print_sbyte_dec(volatile byte out device, sbyte in data)
No documentation found
print_sword_fp_dec(volatile byte out device, sword in data)
8 bit fixed point integer math
print_sword_dec(volatile byte out device, sword in data)
No documentation found
print_string(volatile byte out device, byte in str[])
No documentation found
print_bit_highlow(volatile byte out device, bit in data)
No documentation found
print_word_hex(volatile byte out device, word in data)
No documentation found
print_byte_dec(volatile byte out device, byte in data)
No documentation found
print_byte_hex(volatile byte out device, byte in data)
No documentation found
print_bit_10(volatile byte out device, bit in data)
No documentation found
print_sdword_hex(volatile byte out device, sdword in data)
No documentation found
print_dword_binary(volatile byte out device, dword in data)
No documentation found
print_crlf(volatile byte out device)
No documentation found
print_sdword_dec(volatile byte out device, sdword in data)
No documentation found
print_sword_hex(volatile byte out device, sword in data)
No documentation found
print_nibble_binary(volatile byte out device, byte in data)
No documentation found
print_word_binary(volatile byte out device, word in data)
No documentation found
print_dword_hex(volatile byte out device, dword in data)
No documentation found
print_dword_dec(volatile byte out device, dword in data)
No documentation found
print_bit_truefalse(volatile byte out device, bit in data)
No documentation found
_print_universal_dec(volatile byte out device, dword in data, sbyte in divisor_index)
No documentation found
_print_suniversal_dec(volatile byte out device, sdword in data, sbyte in divisor_index)
No documentation found