Searching \ for 'program counter' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/timers.htm?key=count
Search entire site for: 'program counter'.

Truncated match.
PICList Thread
'program counter'
1999\10\18@131732 by Juimiin Hong

flavicon
face
Hi,

How do I store the 13 bits of the program counter?  I've been able to
store the 8 least significant bits
       movlw    $
       movwf    State

Thanks,
Juimiin

1999\10\18@133020 by Robin Abbott

flavicon
face
To store the upper 8 bits then:

movlw $>>8
movwf State

Of course $ will change from line to line, you may prefer:

CurrentPC=$

movlw CurrentPC
movwf StateL

movlw CurrentPC>>8
movwf StateH

Exactly how you program this is up to your application.


Robin Abbott - spam_OUTrobin.abbottTakeThisOuTspamdial.pipex.com

**************************************************************************
*
* Forest Electronic Developments
* http://dspace.dial.pipex.com/robin.abbott/FED
*
**************************************************************************

----- Original Message -----
From: Juimiin Hong <.....meKILLspamspam@spam@ELASTIC.ORG>
To: <PICLISTspamKILLspamMITVMA.MIT.EDU>
Sent: 18 October 1999 18:16
Subject: program counter


> Hi,
>
> How do I store the 13 bits of the program counter?  I've been able to
> store the 8 least significant bits
>         movlw    $
>         movwf    State
>
> Thanks,
> Juimiin

1999\10\18@162949 by Jose Souto

flavicon
face
; MPASM syntax

Label:
   movlw    high Label
   movwf    var1
   movlw    low Label
   movwf    var2

BR's
JSouto

1999\10\19@041840 by Dr. Imre Bartfai

flavicon
face
Hi,

in CVASM16 / SPASM I use the following (e. g. for PCLATH):

       Mov     PCLATH,#$<      ; same as the 'high' operator in MPASM

Regards,
Imre


On Mon, 18 Oct 1999, Juimiin Hong wrote:

{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...