Revision: 1845
Author: eur.van.andel
Date: Fri Mar 26 14:18:01 2010
Log: fixed bug in print where sdword could not be printed

http://code.google.com/p/jallib/source/detail?r=1845

Modified:
 /trunk/include/jal/format.jal
 /trunk/include/jal/print.jal

=======================================
--- /trunk/include/jal/format.jal       Sat Nov 28 01:47:57 2009
+++ /trunk/include/jal/format.jal       Fri Mar 26 14:18:01 2010
@@ -278,6 +278,7 @@
    ;var bit sign at B[1]:7
    var bit sign at data:15

+
    if sign then
       _format_sign = "-"
       data = -data
=======================================
--- /trunk/include/jal/print.jal        Wed Mar 17 13:16:46 2010
+++ /trunk/include/jal/print.jal        Fri Mar 26 14:18:01 2010
@@ -115,6 +115,7 @@

 end procedure

+
 procedure print_byte_binary(volatile byte out device, byte in data) is

    if (print_prefix) then
@@ -130,10 +131,25 @@
       end if
       data = data * 2
    end loop
-
+
+end procedure
+
+
+procedure print_nibble_binary(volatile byte out device, byte in data) is
+
+   for 4 loop
+      if ((data & 0x08) != 0) then
+         device = "1"
+      else
+         device = "0"
+      end if
+      data = data << 1
+   end loop

 end procedure

+
+
 procedure print_dword_hex(volatile byte out device, dword in data) is

    if (print_prefix) then
@@ -152,6 +168,25 @@

 end procedure

+procedure print_sdword_hex(volatile byte out device, sdword in data) is
+
+   if (print_prefix) then
+      device = "0"
+      device = "x"
+   end if
+
+   device = nibble2hex[0x0F & (data>>28)]
+   device = nibble2hex[0x0F & (data>>24)]
+   device = nibble2hex[0x0F & (data>>20)]
+   device = nibble2hex[0x0F & (data>>16)]
+   device = nibble2hex[0x0F & (data>>12)]
+   device = nibble2hex[0x0F & (data>>8)]
+   device = nibble2hex[0x0F & (data>>4)]
+   device = nibble2hex[0x0F & (data)]
+
+end procedure
+
+
 procedure print_word_hex(volatile byte out device, word in data) is

    if (print_prefix) then
@@ -232,7 +267,7 @@
       device = "-"
    end if

-   _print_universal_dec(device, word( data ), digit_divisor, digit_number)
+   _print_universal_dec(device, dword( data ), digit_divisor, digit_number)

 end procedure

--
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to