+ Reply to Thread
Page 2 of 2
First 1 2
Results 16 to 21 of 21

Thread: just getting around with PIC assembler

  1. #16
    t.man Newbie
    Join Date
    Mar 2008
    Posts
    173

    Default

    Quote Originally Posted by Pommie View Post
    Just add a line at the top of your code that reads,
    Code:
    	radix	dec
    
    Mike.
    oh! i see,
    thanks


  2. #17
    Mr RB Excellent Mr RB Excellent Mr RB Excellent Mr RB Excellent Mr RB Excellent Mr RB Excellent Mr RB Excellent
    Join Date
    Jul 2008
    Location
    Out there
    Posts
    1,757

    Default

    Quote Originally Posted by Pommie View Post
    movlw high(49999)
    [/code]
    Are high() and low() built into MPLAB or are they your own macros?

  3. #18
    t.man Newbie
    Join Date
    Mar 2008
    Posts
    173

    Default

    Quote Originally Posted by Mr RB View Post
    Are high() and low() built into MPLAB or are they your own macros?
    I want to believe they are built into MPLAB because i just used them.

  4. #19
    birdman0_o Excellent birdman0_o Excellent birdman0_o Excellent birdman0_o Excellent birdman0_o Excellent birdman0_o Excellent
    Join Date
    Feb 2009
    Location
    Montreal, Quebec
    Posts
    1,064

    Default

    Quote Originally Posted by Mr RB View Post
    Are high() and low() built into MPLAB or are they your own macros?
    Hey Mr. RB,

    They are macros, high will capture the MSByte of a 16bit address and low will capture the LSByte. One handy use is to store the PCLATH value of a label by using the "high".
    Mike
    My website: www.ElectroBird.net

  5. #20
    Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent
    Join Date
    Jan 2005
    Location
    Michigan, USA
    Posts
    2,521

    Default

    Roman, there's also an 'upper()' operator to capture the b23..b16 portion of the constant operand. So, a matched set of sorts for setting TBLPTRL, H, and U (grin)...

    Have fun, Mike
    Last edited by Mike, K8LH; 25th September 2009 at 11:10 PM.

  6. #21
    Mr RB Excellent Mr RB Excellent Mr RB Excellent Mr RB Excellent Mr RB Excellent Mr RB Excellent Mr RB Excellent
    Join Date
    Jul 2008
    Location
    Out there
    Posts
    1,757

    Default

    Thanks!

+ Reply to Thread
Page 2 of 2
First 1 2

Similar Threads

  1. Glcds with Pic 18F Assembler
    By richard.c in forum Micro Controllers
    Replies: 26
    Latest: 5th October 2009, 01:51 PM
  2. Pic assembler ansd compiler...
    By simrantogether in forum Micro Controllers
    Replies: 5
    Latest: 12th December 2007, 05:49 AM
  3. Back to PIC assembler..
    By mramos1 in forum Micro Controllers
    Replies: 16
    Latest: 11th June 2006, 04:13 PM
  4. Writing an assembler for PIC using C
    By blueyhd in forum Micro Controllers
    Replies: 1
    Latest: 26th October 2003, 09:20 PM
  5. 4-bit PIC-LCD assembler-tutorial
    By egh01 in forum Micro Controllers
    Replies: 1
    Latest: 19th September 2003, 10:07 PM

Tags for this Thread