Richard, Kyle,

This is very interesting indeed.
The only differences between the two asm files are (except for the
direct call of  print_char_5x7() at the end on line 85) a number of
'movlb 0' statments. All variables are on the same location.

So: if  print_char_5x7()  is called directly (working ok.jal), the
code gets a number of 'movlb 0' statments and works okay, including
the calls of print_char_5x7() via pseudo-var LCD.
However, if you remove the direct call to print_char_5x7() on line 85,
the variables all remain the same.
Interesting is the call stack:
In the working program, it starts with:
; --- call stack ---
; {root} (depth=0)
;   print_char_5x7 (depth=1)
;     _lcd_write_data (depth=2)
;       _lcd_write (depth=3)
;     _lcd_write_data (depth=2)
;       _lcd_write (depth=3)
;   lcd_gotoxy (depth=1)


while in the non-working version it is:
; --- call stack ---
;   lcd_gotoxy (depth=1)

So does the compiler think print_char_5x7() is not called? But why
does it include the code of the procedure? But there is a difference
(optimization?) done...
And at first glance, it looks that all code is there to call
print_char_5x7() via lcd'put()...

Definite one for Kyle to investige.

Joep

-- 
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