Revision: 1685
Author: jsuijs
Date: Sat Feb 20 10:17:40 2010
Log: fix of test_format.jal (testfile was incorrect)
http://code.google.com/p/jallib/source/detail?r=1685
Modified:
/trunk/sample/16f648a_serial_format.jal
/trunk/sample/16f723_serial_format.jal
/trunk/sample/16f73_serial_format.jal
/trunk/sample/16f877a_serial_format.jal
/trunk/sample/16f88_serial_format.jal
/trunk/sample/18f14k50_serial_format.jal
/trunk/sample/18f2450_serial_format.jal
/trunk/sample/18f4550_serial_format.jal
/trunk/test/jal/test_serial_format.jal
=======================================
--- /trunk/sample/16f648a_serial_format.jal Sun Aug 16 16:42:16 2009
+++ /trunk/sample/16f648a_serial_format.jal Sat Feb 20 10:17:40 2010
@@ -58,7 +58,10 @@
serial_hw_data = 10
end procedure
-procedure line() is
+procedure line(byte in nr) is
+ serial_hw_data = nr + "0"
+ serial_hw_data = " "
+
for 20 loop
serial_hw_data = "-"
end loop
@@ -70,7 +73,7 @@
serial_hw_data = "T" serial_hw_data = "e" serial_hw_data = "s"
serial_hw_data = "t" serial_hw_data = ":" serial_hw_data = " "
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(0) --
--------------------------------------------------------------------
-- hex byte output
format_byte_hex(serial_hw_data, 0xEA)
@@ -83,7 +86,7 @@
-- hex word output
format_dword_hex(serial_hw_data, 0x12345678)
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(1) --
--------------------------------------------------------------------
-- decimal output ' 1.2'
format_byte_dec(serial_hw_data, 12, 3, 1)
@@ -100,7 +103,7 @@
-- decimal output '12.0'
format_byte_dec(serial_hw_data, 120, 3, 1)
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(2) --
--------------------------------------------------------------------
-- decimal output '-12'
format_sbyte_dec(serial_hw_data, -12, 4, 0)
@@ -114,43 +117,19 @@
format_sbyte_dec(serial_hw_data, -12, 4, 2)
plingcrlf()
- -- decimal output '-12'
+ -- decimal output ' 12'
format_sbyte_dec(serial_hw_data, 12, 4, 0)
plingcrlf()
- -- decimal output '-1.2'
+ -- decimal output ' 1.2'
format_sbyte_dec(serial_hw_data, 12, 4, 1)
plingcrlf()
- -- decimal output '-0.12'
+ -- decimal output ' 0.12'
format_sbyte_dec(serial_hw_data, 12, 4, 2)
plingcrlf()
- line() --
--------------------------------------------------------------------
-
- -- decimal output '-12'
- format_sbyte_dec(serial_hw_data, -123, 3, 0)
- plingcrlf()
-
- -- decimal output '-1.2'
- format_sbyte_dec(serial_hw_data, -123, 3, 1)
- plingcrlf()
-
- -- decimal output '-0.12'
- format_sbyte_dec(serial_hw_data, -123, 3, 2)
- plingcrlf()
-
- -- decimal output '-12'
- format_sbyte_dec(serial_hw_data, 113, 3, 0)
- plingcrlf()
-
- -- decimal output '-1.2'
- format_sbyte_dec(serial_hw_data, 113, 3, 1)
- plingcrlf()
-
- -- decimal output '-0.12'
- format_sword_dec(serial_hw_data, 765, 3, 2)
- plingcrlf()
- line() --
--------------------------------------------------------------------
+
+ line(3) --
--------------------------------------------------------------------
-- decimal output ' 0.012'
format_word_dec(serial_hw_data, 12, 6, 3)
=======================================
--- /trunk/sample/16f723_serial_format.jal Mon Nov 9 16:32:06 2009
+++ /trunk/sample/16f723_serial_format.jal Sat Feb 20 10:17:40 2010
@@ -69,7 +69,10 @@
serial_hw_data = 10
end procedure
-procedure line() is
+procedure line(byte in nr) is
+ serial_hw_data = nr + "0"
+ serial_hw_data = " "
+
for 20 loop
serial_hw_data = "-"
end loop
@@ -81,7 +84,7 @@
serial_hw_data = "T" serial_hw_data = "e" serial_hw_data = "s"
serial_hw_data = "t" serial_hw_data = ":" serial_hw_data = " "
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(0) --
--------------------------------------------------------------------
-- hex byte output
format_byte_hex(serial_hw_data, 0xEA)
@@ -94,7 +97,7 @@
-- hex word output
format_dword_hex(serial_hw_data, 0x12345678)
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(1) --
--------------------------------------------------------------------
-- decimal output ' 1.2'
format_byte_dec(serial_hw_data, 12, 3, 1)
@@ -111,7 +114,7 @@
-- decimal output '12.0'
format_byte_dec(serial_hw_data, 120, 3, 1)
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(2) --
--------------------------------------------------------------------
-- decimal output '-12'
format_sbyte_dec(serial_hw_data, -12, 4, 0)
@@ -125,43 +128,19 @@
format_sbyte_dec(serial_hw_data, -12, 4, 2)
plingcrlf()
- -- decimal output '-12'
+ -- decimal output ' 12'
format_sbyte_dec(serial_hw_data, 12, 4, 0)
plingcrlf()
- -- decimal output '-1.2'
+ -- decimal output ' 1.2'
format_sbyte_dec(serial_hw_data, 12, 4, 1)
plingcrlf()
- -- decimal output '-0.12'
+ -- decimal output ' 0.12'
format_sbyte_dec(serial_hw_data, 12, 4, 2)
plingcrlf()
- line() --
--------------------------------------------------------------------
-
- -- decimal output '-12'
- format_sbyte_dec(serial_hw_data, -123, 3, 0)
- plingcrlf()
-
- -- decimal output '-1.2'
- format_sbyte_dec(serial_hw_data, -123, 3, 1)
- plingcrlf()
-
- -- decimal output '-0.12'
- format_sbyte_dec(serial_hw_data, -123, 3, 2)
- plingcrlf()
-
- -- decimal output '-12'
- format_sbyte_dec(serial_hw_data, 113, 3, 0)
- plingcrlf()
-
- -- decimal output '-1.2'
- format_sbyte_dec(serial_hw_data, 113, 3, 1)
- plingcrlf()
-
- -- decimal output '-0.12'
- format_sword_dec(serial_hw_data, 765, 3, 2)
- plingcrlf()
- line() --
--------------------------------------------------------------------
+
+ line(3) --
--------------------------------------------------------------------
-- decimal output ' 0.012'
format_word_dec(serial_hw_data, 12, 6, 3)
=======================================
--- /trunk/sample/16f73_serial_format.jal Sat Feb 20 10:03:18 2010
+++ /trunk/sample/16f73_serial_format.jal Sat Feb 20 10:17:40 2010
@@ -56,7 +56,10 @@
serial_hw_data = 10
end procedure
-procedure line() is
+procedure line(byte in nr) is
+ serial_hw_data = nr + "0"
+ serial_hw_data = " "
+
for 20 loop
serial_hw_data = "-"
end loop
@@ -68,7 +71,7 @@
serial_hw_data = "T" serial_hw_data = "e" serial_hw_data = "s"
serial_hw_data = "t" serial_hw_data = ":" serial_hw_data = " "
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(0) --
--------------------------------------------------------------------
-- hex byte output
format_byte_hex(serial_hw_data, 0xEA)
@@ -81,7 +84,7 @@
-- hex word output
format_dword_hex(serial_hw_data, 0x12345678)
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(1) --
--------------------------------------------------------------------
-- decimal output ' 1.2'
format_byte_dec(serial_hw_data, 12, 3, 1)
@@ -98,7 +101,7 @@
-- decimal output '12.0'
format_byte_dec(serial_hw_data, 120, 3, 1)
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(2) --
--------------------------------------------------------------------
-- decimal output '-12'
format_sbyte_dec(serial_hw_data, -12, 4, 0)
@@ -112,43 +115,19 @@
format_sbyte_dec(serial_hw_data, -12, 4, 2)
plingcrlf()
- -- decimal output '-12'
+ -- decimal output ' 12'
format_sbyte_dec(serial_hw_data, 12, 4, 0)
plingcrlf()
- -- decimal output '-1.2'
+ -- decimal output ' 1.2'
format_sbyte_dec(serial_hw_data, 12, 4, 1)
plingcrlf()
- -- decimal output '-0.12'
+ -- decimal output ' 0.12'
format_sbyte_dec(serial_hw_data, 12, 4, 2)
plingcrlf()
- line() --
--------------------------------------------------------------------
-
- -- decimal output '-12'
- format_sbyte_dec(serial_hw_data, -123, 3, 0)
- plingcrlf()
-
- -- decimal output '-1.2'
- format_sbyte_dec(serial_hw_data, -123, 3, 1)
- plingcrlf()
-
- -- decimal output '-0.12'
- format_sbyte_dec(serial_hw_data, -123, 3, 2)
- plingcrlf()
-
- -- decimal output '-12'
- format_sbyte_dec(serial_hw_data, 113, 3, 0)
- plingcrlf()
-
- -- decimal output '-1.2'
- format_sbyte_dec(serial_hw_data, 113, 3, 1)
- plingcrlf()
-
- -- decimal output '-0.12'
- format_sword_dec(serial_hw_data, 765, 3, 2)
- plingcrlf()
- line() --
--------------------------------------------------------------------
+
+ line(3) --
--------------------------------------------------------------------
-- decimal output ' 0.012'
format_word_dec(serial_hw_data, 12, 6, 3)
=======================================
--- /trunk/sample/16f877a_serial_format.jal Sat Feb 13 07:53:07 2010
+++ /trunk/sample/16f877a_serial_format.jal Sat Feb 20 10:17:40 2010
@@ -52,7 +52,10 @@
serial_hw_data = 10
end procedure
-procedure line() is
+procedure line(byte in nr) is
+ serial_hw_data = nr + "0"
+ serial_hw_data = " "
+
for 20 loop
serial_hw_data = "-"
end loop
@@ -64,7 +67,7 @@
serial_hw_data = "T" serial_hw_data = "e" serial_hw_data = "s"
serial_hw_data = "t" serial_hw_data = ":" serial_hw_data = " "
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(0) --
--------------------------------------------------------------------
-- hex byte output
format_byte_hex(serial_hw_data, 0xEA)
@@ -77,7 +80,7 @@
-- hex word output
format_dword_hex(serial_hw_data, 0x12345678)
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(1) --
--------------------------------------------------------------------
-- decimal output ' 1.2'
format_byte_dec(serial_hw_data, 12, 3, 1)
@@ -94,7 +97,7 @@
-- decimal output '12.0'
format_byte_dec(serial_hw_data, 120, 3, 1)
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(2) --
--------------------------------------------------------------------
-- decimal output '-12'
format_sbyte_dec(serial_hw_data, -12, 4, 0)
@@ -108,43 +111,19 @@
format_sbyte_dec(serial_hw_data, -12, 4, 2)
plingcrlf()
- -- decimal output '-12'
+ -- decimal output ' 12'
format_sbyte_dec(serial_hw_data, 12, 4, 0)
plingcrlf()
- -- decimal output '-1.2'
+ -- decimal output ' 1.2'
format_sbyte_dec(serial_hw_data, 12, 4, 1)
plingcrlf()
- -- decimal output '-0.12'
+ -- decimal output ' 0.12'
format_sbyte_dec(serial_hw_data, 12, 4, 2)
plingcrlf()
- line() --
--------------------------------------------------------------------
-
- -- decimal output '-12'
- format_sbyte_dec(serial_hw_data, -123, 3, 0)
- plingcrlf()
-
- -- decimal output '-1.2'
- format_sbyte_dec(serial_hw_data, -123, 3, 1)
- plingcrlf()
-
- -- decimal output '-0.12'
- format_sbyte_dec(serial_hw_data, -123, 3, 2)
- plingcrlf()
-
- -- decimal output '-12'
- format_sbyte_dec(serial_hw_data, 113, 3, 0)
- plingcrlf()
-
- -- decimal output '-1.2'
- format_sbyte_dec(serial_hw_data, 113, 3, 1)
- plingcrlf()
-
- -- decimal output '-0.12'
- format_sword_dec(serial_hw_data, 765, 3, 2)
- plingcrlf()
- line() --
--------------------------------------------------------------------
+
+ line(3) --
--------------------------------------------------------------------
-- decimal output ' 0.012'
format_word_dec(serial_hw_data, 12, 6, 3)
=======================================
--- /trunk/sample/16f88_serial_format.jal Mon Nov 9 16:32:06 2009
+++ /trunk/sample/16f88_serial_format.jal Sat Feb 20 10:17:40 2010
@@ -68,7 +68,10 @@
serial_hw_data = 10
end procedure
-procedure line() is
+procedure line(byte in nr) is
+ serial_hw_data = nr + "0"
+ serial_hw_data = " "
+
for 20 loop
serial_hw_data = "-"
end loop
@@ -80,7 +83,7 @@
serial_hw_data = "T" serial_hw_data = "e" serial_hw_data = "s"
serial_hw_data = "t" serial_hw_data = ":" serial_hw_data = " "
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(0) --
--------------------------------------------------------------------
-- hex byte output
format_byte_hex(serial_hw_data, 0xEA)
@@ -93,7 +96,7 @@
-- hex word output
format_dword_hex(serial_hw_data, 0x12345678)
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(1) --
--------------------------------------------------------------------
-- decimal output ' 1.2'
format_byte_dec(serial_hw_data, 12, 3, 1)
@@ -110,7 +113,7 @@
-- decimal output '12.0'
format_byte_dec(serial_hw_data, 120, 3, 1)
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(2) --
--------------------------------------------------------------------
-- decimal output '-12'
format_sbyte_dec(serial_hw_data, -12, 4, 0)
@@ -124,43 +127,19 @@
format_sbyte_dec(serial_hw_data, -12, 4, 2)
plingcrlf()
- -- decimal output '-12'
+ -- decimal output ' 12'
format_sbyte_dec(serial_hw_data, 12, 4, 0)
plingcrlf()
- -- decimal output '-1.2'
+ -- decimal output ' 1.2'
format_sbyte_dec(serial_hw_data, 12, 4, 1)
plingcrlf()
- -- decimal output '-0.12'
+ -- decimal output ' 0.12'
format_sbyte_dec(serial_hw_data, 12, 4, 2)
plingcrlf()
- line() --
--------------------------------------------------------------------
-
- -- decimal output '-12'
- format_sbyte_dec(serial_hw_data, -123, 3, 0)
- plingcrlf()
-
- -- decimal output '-1.2'
- format_sbyte_dec(serial_hw_data, -123, 3, 1)
- plingcrlf()
-
- -- decimal output '-0.12'
- format_sbyte_dec(serial_hw_data, -123, 3, 2)
- plingcrlf()
-
- -- decimal output '-12'
- format_sbyte_dec(serial_hw_data, 113, 3, 0)
- plingcrlf()
-
- -- decimal output '-1.2'
- format_sbyte_dec(serial_hw_data, 113, 3, 1)
- plingcrlf()
-
- -- decimal output '-0.12'
- format_sword_dec(serial_hw_data, 765, 3, 2)
- plingcrlf()
- line() --
--------------------------------------------------------------------
+
+ line(3) --
--------------------------------------------------------------------
-- decimal output ' 0.012'
format_word_dec(serial_hw_data, 12, 6, 3)
=======================================
--- /trunk/sample/18f14k50_serial_format.jal Fri Jan 29 14:24:50 2010
+++ /trunk/sample/18f14k50_serial_format.jal Sat Feb 20 10:17:40 2010
@@ -93,7 +93,10 @@
serial_hw_data = 10
end procedure
-procedure line() is
+procedure line(byte in nr) is
+ serial_hw_data = nr + "0"
+ serial_hw_data = " "
+
for 20 loop
serial_hw_data = "-"
end loop
@@ -105,7 +108,7 @@
serial_hw_data = "T" serial_hw_data = "e" serial_hw_data = "s"
serial_hw_data = "t" serial_hw_data = ":" serial_hw_data = " "
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(0) --
--------------------------------------------------------------------
-- hex byte output
format_byte_hex(serial_hw_data, 0xEA)
@@ -118,7 +121,7 @@
-- hex word output
format_dword_hex(serial_hw_data, 0x12345678)
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(1) --
--------------------------------------------------------------------
-- decimal output ' 1.2'
format_byte_dec(serial_hw_data, 12, 3, 1)
@@ -135,7 +138,7 @@
-- decimal output '12.0'
format_byte_dec(serial_hw_data, 120, 3, 1)
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(2) --
--------------------------------------------------------------------
-- decimal output '-12'
format_sbyte_dec(serial_hw_data, -12, 4, 0)
@@ -149,43 +152,19 @@
format_sbyte_dec(serial_hw_data, -12, 4, 2)
plingcrlf()
- -- decimal output '-12'
+ -- decimal output ' 12'
format_sbyte_dec(serial_hw_data, 12, 4, 0)
plingcrlf()
- -- decimal output '-1.2'
+ -- decimal output ' 1.2'
format_sbyte_dec(serial_hw_data, 12, 4, 1)
plingcrlf()
- -- decimal output '-0.12'
+ -- decimal output ' 0.12'
format_sbyte_dec(serial_hw_data, 12, 4, 2)
plingcrlf()
- line() --
--------------------------------------------------------------------
-
- -- decimal output '-12'
- format_sbyte_dec(serial_hw_data, -123, 3, 0)
- plingcrlf()
-
- -- decimal output '-1.2'
- format_sbyte_dec(serial_hw_data, -123, 3, 1)
- plingcrlf()
-
- -- decimal output '-0.12'
- format_sbyte_dec(serial_hw_data, -123, 3, 2)
- plingcrlf()
-
- -- decimal output '-12'
- format_sbyte_dec(serial_hw_data, 113, 3, 0)
- plingcrlf()
-
- -- decimal output '-1.2'
- format_sbyte_dec(serial_hw_data, 113, 3, 1)
- plingcrlf()
-
- -- decimal output '-0.12'
- format_sword_dec(serial_hw_data, 765, 3, 2)
- plingcrlf()
- line() --
--------------------------------------------------------------------
+
+ line(3) --
--------------------------------------------------------------------
-- decimal output ' 0.012'
format_word_dec(serial_hw_data, 12, 6, 3)
=======================================
--- /trunk/sample/18f2450_serial_format.jal Fri Jan 29 14:24:50 2010
+++ /trunk/sample/18f2450_serial_format.jal Sat Feb 20 10:17:40 2010
@@ -89,7 +89,10 @@
serial_hw_data = 10
end procedure
-procedure line() is
+procedure line(byte in nr) is
+ serial_hw_data = nr + "0"
+ serial_hw_data = " "
+
for 20 loop
serial_hw_data = "-"
end loop
@@ -101,7 +104,7 @@
serial_hw_data = "T" serial_hw_data = "e" serial_hw_data = "s"
serial_hw_data = "t" serial_hw_data = ":" serial_hw_data = " "
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(0) --
--------------------------------------------------------------------
-- hex byte output
format_byte_hex(serial_hw_data, 0xEA)
@@ -114,7 +117,7 @@
-- hex word output
format_dword_hex(serial_hw_data, 0x12345678)
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(1) --
--------------------------------------------------------------------
-- decimal output ' 1.2'
format_byte_dec(serial_hw_data, 12, 3, 1)
@@ -131,7 +134,7 @@
-- decimal output '12.0'
format_byte_dec(serial_hw_data, 120, 3, 1)
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(2) --
--------------------------------------------------------------------
-- decimal output '-12'
format_sbyte_dec(serial_hw_data, -12, 4, 0)
@@ -145,43 +148,19 @@
format_sbyte_dec(serial_hw_data, -12, 4, 2)
plingcrlf()
- -- decimal output '-12'
+ -- decimal output ' 12'
format_sbyte_dec(serial_hw_data, 12, 4, 0)
plingcrlf()
- -- decimal output '-1.2'
+ -- decimal output ' 1.2'
format_sbyte_dec(serial_hw_data, 12, 4, 1)
plingcrlf()
- -- decimal output '-0.12'
+ -- decimal output ' 0.12'
format_sbyte_dec(serial_hw_data, 12, 4, 2)
plingcrlf()
- line() --
--------------------------------------------------------------------
-
- -- decimal output '-12'
- format_sbyte_dec(serial_hw_data, -123, 3, 0)
- plingcrlf()
-
- -- decimal output '-1.2'
- format_sbyte_dec(serial_hw_data, -123, 3, 1)
- plingcrlf()
-
- -- decimal output '-0.12'
- format_sbyte_dec(serial_hw_data, -123, 3, 2)
- plingcrlf()
-
- -- decimal output '-12'
- format_sbyte_dec(serial_hw_data, 113, 3, 0)
- plingcrlf()
-
- -- decimal output '-1.2'
- format_sbyte_dec(serial_hw_data, 113, 3, 1)
- plingcrlf()
-
- -- decimal output '-0.12'
- format_sword_dec(serial_hw_data, 765, 3, 2)
- plingcrlf()
- line() --
--------------------------------------------------------------------
+
+ line(3) --
--------------------------------------------------------------------
-- decimal output ' 0.012'
format_word_dec(serial_hw_data, 12, 6, 3)
=======================================
--- /trunk/sample/18f4550_serial_format.jal Fri Jan 29 14:24:50 2010
+++ /trunk/sample/18f4550_serial_format.jal Sat Feb 20 10:17:40 2010
@@ -97,7 +97,10 @@
serial_hw_data = 10
end procedure
-procedure line() is
+procedure line(byte in nr) is
+ serial_hw_data = nr + "0"
+ serial_hw_data = " "
+
for 20 loop
serial_hw_data = "-"
end loop
@@ -109,7 +112,7 @@
serial_hw_data = "T" serial_hw_data = "e" serial_hw_data = "s"
serial_hw_data = "t" serial_hw_data = ":" serial_hw_data = " "
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(0) --
--------------------------------------------------------------------
-- hex byte output
format_byte_hex(serial_hw_data, 0xEA)
@@ -122,7 +125,7 @@
-- hex word output
format_dword_hex(serial_hw_data, 0x12345678)
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(1) --
--------------------------------------------------------------------
-- decimal output ' 1.2'
format_byte_dec(serial_hw_data, 12, 3, 1)
@@ -139,7 +142,7 @@
-- decimal output '12.0'
format_byte_dec(serial_hw_data, 120, 3, 1)
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(2) --
--------------------------------------------------------------------
-- decimal output '-12'
format_sbyte_dec(serial_hw_data, -12, 4, 0)
@@ -153,43 +156,19 @@
format_sbyte_dec(serial_hw_data, -12, 4, 2)
plingcrlf()
- -- decimal output '-12'
+ -- decimal output ' 12'
format_sbyte_dec(serial_hw_data, 12, 4, 0)
plingcrlf()
- -- decimal output '-1.2'
+ -- decimal output ' 1.2'
format_sbyte_dec(serial_hw_data, 12, 4, 1)
plingcrlf()
- -- decimal output '-0.12'
+ -- decimal output ' 0.12'
format_sbyte_dec(serial_hw_data, 12, 4, 2)
plingcrlf()
- line() --
--------------------------------------------------------------------
-
- -- decimal output '-12'
- format_sbyte_dec(serial_hw_data, -123, 3, 0)
- plingcrlf()
-
- -- decimal output '-1.2'
- format_sbyte_dec(serial_hw_data, -123, 3, 1)
- plingcrlf()
-
- -- decimal output '-0.12'
- format_sbyte_dec(serial_hw_data, -123, 3, 2)
- plingcrlf()
-
- -- decimal output '-12'
- format_sbyte_dec(serial_hw_data, 113, 3, 0)
- plingcrlf()
-
- -- decimal output '-1.2'
- format_sbyte_dec(serial_hw_data, 113, 3, 1)
- plingcrlf()
-
- -- decimal output '-0.12'
- format_sword_dec(serial_hw_data, 765, 3, 2)
- plingcrlf()
- line() --
--------------------------------------------------------------------
+
+ line(3) --
--------------------------------------------------------------------
-- decimal output ' 0.012'
format_word_dec(serial_hw_data, 12, 6, 3)
=======================================
--- /trunk/test/jal/test_serial_format.jal Sat Feb 20 10:03:18 2010
+++ /trunk/test/jal/test_serial_format.jal Sat Feb 20 10:17:40 2010
@@ -37,7 +37,10 @@
serial_hw_data = 10
end procedure
-procedure line() is
+procedure line(byte in nr) is
+ serial_hw_data = nr + "0"
+ serial_hw_data = " "
+
for 20 loop
serial_hw_data = "-"
end loop
@@ -49,7 +52,7 @@
serial_hw_data = "T" serial_hw_data = "e" serial_hw_data = "s"
serial_hw_data = "t" serial_hw_data = ":" serial_hw_data = " "
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(0) --
--------------------------------------------------------------------
-- hex byte output
format_byte_hex(serial_hw_data, 0xEA)
@@ -62,7 +65,7 @@
-- hex word output
format_dword_hex(serial_hw_data, 0x12345678)
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(1) --
--------------------------------------------------------------------
-- decimal output ' 1.2'
format_byte_dec(serial_hw_data, 12, 3, 1)
@@ -79,7 +82,7 @@
-- decimal output '12.0'
format_byte_dec(serial_hw_data, 120, 3, 1)
plingcrlf()
- line() --
--------------------------------------------------------------------
+ line(2) --
--------------------------------------------------------------------
-- decimal output '-12'
format_sbyte_dec(serial_hw_data, -12, 4, 0)
@@ -104,32 +107,8 @@
-- decimal output ' 0.12'
format_sbyte_dec(serial_hw_data, 12, 4, 2)
plingcrlf()
- line() --
--------------------------------------------------------------------
-
- -- decimal output '-12'
- format_sbyte_dec(serial_hw_data, -123, 3, 0)
- plingcrlf()
-
- -- decimal output '-1.2'
- format_sbyte_dec(serial_hw_data, -123, 3, 1)
- plingcrlf()
-
- -- decimal output '-0.12'
- format_sbyte_dec(serial_hw_data, -123, 3, 2)
- plingcrlf()
-
- -- decimal output '-12'
- format_sbyte_dec(serial_hw_data, 113, 3, 0)
- plingcrlf()
-
- -- decimal output '-1.2'
- format_sbyte_dec(serial_hw_data, 113, 3, 1)
- plingcrlf()
-
- -- decimal output '-0.12'
- format_sword_dec(serial_hw_data, 765, 3, 2)
- plingcrlf()
- line() --
--------------------------------------------------------------------
+
+ line(3) --
--------------------------------------------------------------------
-- decimal output ' 0.012'
format_word_dec(serial_hw_data, 12, 6, 3)
--
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.