Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 17th August 2007, 01:18 AM   (permalink)
Default PIC High operator

Could someone please explain what the High operator does?

many thanks
HerbertMunch is offline   Reply With Quote
Old 17th August 2007, 02:19 AM   (permalink)
Default

It gives you the high byte of the assemble time evaluated expression.
philba is offline   Reply With Quote
Old 17th August 2007, 10:07 AM   (permalink)
Default

?
Sorry I still dont understand!
When used on a table construct what would it return?

Thanks
HerbertMunch is offline   Reply With Quote
Old 17th August 2007, 10:50 AM   (permalink)
Default

Quote:
Originally Posted by HerbertMunch
?
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.
__________________
Gayan

My Website
http://gsmicro.blogspot.com/
Gayan Soyza is offline   Reply With Quote
Old 19th August 2007, 06:04 AM   (permalink)
Default

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,
philba is offline   Reply With Quote
Old 19th August 2007, 08:17 AM   (permalink)
Default

Quote:
Originally Posted by philba
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!
HerbertMunch is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Speedometer Kiko Micro Controllers 131 29th November 2007 05:33 PM
Validating Code Without PIC burg Micro Controllers 4 22nd April 2007 04:14 PM
Need some help with a code provided by ATMEL ikalogic Micro Controllers 1 23rd January 2007 02:45 PM
Newcomers, please read! (PIC regarded) Upd. 0xD Jay.slovak Micro Controllers 0 17th April 2005 01:04 PM
Having problems with pic16f872 cjgalway1000 Micro Controllers 0 7th April 2004 02:39 PM



All times are GMT. The time now is 05:17 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.