Accessing the #variable in the Pic include

Coding and general discussion relating to the compiler

Moderators: David Barker, Jerry Messina

Post Reply
TimB
Posts: 262
Joined: Wed Oct 04, 2006 7:25 am
Location: London UK

Accessing the #variable in the Pic include

Post by TimB » Thu Apr 12, 2007 9:09 pm

Hi I could not see a ClearRam command so though I would write my own

All I need to know is the amount of ram there is in the pic. I looked in the device include and its there..

#variable _maxram = $0600 // 1536 bytes of user RAM

But when I put that in my asm

Public Sub MemClear()
ASM
Lfsr 0,_maxram
Clrf POSTDEC0,0
Movf FSR0L,W,0
Iorwf FSR0H,W,0
Bnz $ - 6
Clrf INDF0,0
End ASM
End Sub

The assembler complains that it cannot find _maxram

How do I access that data?

Post Reply