Hi Rob & others,

I looked into the stack use of the lcd libraries and noticed that IO
pin operations in the (16f877a) device file are inline, like:

procedure pin_D7'put(bit in x at _PORTD_shadow : 7) is
   pragma inline
   _PORTD_flush()
end procedure

and so is access to the full port:

procedure PORTD'put(byte in x) is
   pragma inline
   _PORTD_shadow = x
   _PORTD_flush()
end procedure

However, when you address a nibble, it is not:

procedure PORTD_high'put(byte in x) is
   _PORTD_shadow = (_PORTD_shadow & 0x0F) | (x << 4)
   _PORTD_flush()
end procedure

function PORTD_high'get() return byte is
   return (PORTD >> 4)
end function

This is responsible for use of one stack level and adding inline to
the put-procedure not only removes one stack level, but also makes the
sample at hand smaller.
Is there a particular reason why the nibble port procedures are not
inline? Would it be a good idea to change this?

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