Dear Jal guys,
First of all, may 2007 be a great year for you all !
I'm currently trying to use the "case ... of" feature of jal v2, but
I've observed strange things that occurs... Here the test case:
-- -------------------
include 16f628_bert
var byte data
const char_a = "a"
case data of
char_a: serial_sw_write("b")
-- "a": serial_sw_write("b")
end case
-- -------------------
This actually compiles ok, but produces some weird messages. Here the
output:
generating p-code
[... some usual warnings]
0 errors, 13 warnings
320 tokens, 125079 chars; 3566 lines; 13 files
generating PIC code pass 1
generating PIC code pass 2
writing result
Code area: 112 of 2048 used
Data area: 4 of 224 used
Software stack available: 88 bytes
Hardware stack depth 2
!!! tag 0x80f9458: char_a(1) ct = 2
!!! tag 0x8107630: _btemp66(1) ct = 2
!!! tag 0x81071b8: _l412(1) ct = 2
!!! tag 0x8107160: _l411(1) ct = 2
!!! tag 0x8106fd0: _floop24(1) ct = 2
!!! tag 0x8106c58: _l410(1) ct = 2
!!! tag 0x8106c00: _l409(1) ct = 2
!!! tag 0x8106ba8: delay_5s(2) ct = 2
!!! tag 0x81067f0: _btemp65(1) ct = 2
!!! tag 0x8106360: _l408(1) ct = 2
!!! tag 0x8106308: _l407(1) ct = 2
!!! tag 0x8106178: _floop23(1) ct = 2
!!! tag 0x8105e10: _l406(1) ct = 2
[... lots of message of this kind]
While switching the case block with:
case data of
-- char_a: serial_sw_write("b")
"a": serial_sw_write("b")
end case
the program compiles without those "!!! tag ..." messages. Diffing the
asm and hex files gives no differences, so this seems not to be a big
issue, but my question is why those 2 lines are not behaving the same
? Can't I use a constant as a "case entry" ?
Thanks in advance for your help
Cheers
Seb
--
Seb
sirloon[at]sirloon.net
http://www.sirloon.net