PIC High operator

Status
Not open for further replies.
HerbertMunch said:
?
When used on a table construct what would it return?
Thanks

You mean a DATA LOOKUP table?

When a CALL instruction occurred ex: (call TABLE) it writes down the next line in the STACK memory & going to TABLE read (where the Table located at). After getting Table value & returning to the previous saved value in the stack by the use of program counter.
 
HIGH isn't code that gets executed. It gives you the top byte of a constant expression.

Code:
; assume all that init code happens
movlw    HIGH foo      ; puts 4 into W

; later on in the source code
ORG 400
foo    dt  "abc"
Note that HIGH foo evaluates to a constant,
 


Many thanks mate, you put it in a way that I could understand!
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…