Hi Everyone. I've encountered an interesting problem porting a small application from a 16C77 to an 18C452. I'm using HI-TECH PIC C on the '77 and HI-TECH PIC18 C on the '452. The problem involves reading the 16-bit register Timer1. On the '77, TMR1H and TMR1L are both readable, and so I declare: static volatile unsigned INT TMR1 @ 0x0E; and do something like counter = -TMR1; and that works fine. The trouble is that on the '452, TMR1H is only updated (it's really just a holding register) when TMR1L is read, and unluckily for me counter = -TMR1; compiles/assembles to code that reads the high byte first, then the low byte, and so the result in is worthless. What is an elegant way to stay as much as possible in 16-bit land yet "persuade" the compiler to read the low byte first? Thanks, -- ______________________________________ Andrew E. Kalman, Ph.D. aek@pumpkininc.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu