Keith Dowsett wrote:
{Quote hidden}>
> At 22:28 12/05/97 +0200, you wrote:
> >Hello everybody !
> >
> >I'm learning PIC16C84 and I've got a simple problem (I think !).
> >
> >I'd like to make a small program which just count down from FFh to 00h by
> >example !
> >(to wait for the flashing of a led by example...)
> >I think that I will have to use the RAM to do that but I don't know how to
> >do that !
> >Is there a way to decrement or increment a variable (not a register) ?
> >
> >Thanks.
> >
> > )|(
> > (o o)
> > -----ooO--(_)--Ooo----
> > Jerome Avot "YOYO"
> >
.....aavotKILLspam
.....nordnet.fr
>
> How about decfsz? It's in the data sheet. Here's an example:
>
> Short_delay clrf Your_variable
> decfsz Your_variable
> goto $-1
> return
>
> Keith.
>
> ==========================================================
> Keith Dowsett "Variables won't; constants aren't."
>
> E-mail:
EraseMEkdowsettspam_OUT
TakeThisOuTrpms.ac.uk
> WWW:
http://kd.rpms.ac.uk/index.htm
This example is good apart from the fact it failes to say where
"Your_variable" is.
If I understand the orignal question the writer asks how to decriment a
"Memory" variable. "Memory" variables have to be assigned first like
this :-
Your_variable equ 0Ch
Where 0Ch is a "Memory" location in usable RAM
I hope this clears it up a little more
Cheers Peter ..........
Mailto:efoc
spam_OUTcyberstop.net
+=================================+
| Listen to the Nothing, child, |
| Listen to the Don'ts |
| Listen to the Never Haves |
| The Shouldn'ts, and the Won'ts |
| |
| Listen to Impossible |
| then listen close to me: |
| |
| Anything can happen, child, |
| ANYTHING can be. |
| |
| Poem by Sal Silverstein |
+=================================+