'How to know address assigned by "CBLOCK"'
In the following snipit how can I tell what address the CBLOCK
directive assigned to the "month". Currently I compile, look at
the listing, assign a value at label add_mo. Surley there is a
better way. Any ideas?
add_mo equ 0x16
movlw add_mo ; set up FSR with starting RAM address
movwf FSR ;
call uartrx ; Get a char from GPS
movf CHARBUF,W ; place into W reg
movwf INDF ; move data to RAM @ FSR address
incf FSR,F ; increment FSR to point to next address
movf FSR,W ; move FSR into W for done test
sublw add_mo+7 ; last ram location
btfss STATUS,Z ; done?
goto storedata ; loop untill 7 bytes read
Brooke <MITVMA.MIT.EDU> wrote: PICLIST
> In the following snipit how can I tell what address the CBLOCK
> directive assigned to the "month". Currently I compile, look at the
> listing, assign a value at label add_mo. Surley there is a better
> way. Any ideas?
> yrmsb, yrlsb
> add_mo equ 0x16
> movlw add_mo ; set up FSR with starting RAM
> movwf FSR ; address
You have two choices here:
1. Don't use the "add_mo" symbol AT ALL; you can just as easily
2. Define "add_mo" as follows:
add_mo equ month
=== Andrew Warren - ix.netcom.com === fastfwd
=== Fast Forward Engineering - Vista, California ===
=== Did the information in this post help you? Consider ===
=== contributing to the PICLIST Fund. Details are at: ===
=== http://www.geocities.com/SiliconValley/2499/fund.html ===
More... (looser matching)
- Last day of these posts
- In 1996
, 1997 only
- New search...