directives

Status
Not open for further replies.

falleafd

New Member
Hi,

I'm writing a program using MPASM,
and have to use many mathematical formula.

I don't know how to use operator in ASM code.
I used MPASM to compile the code to HEX file,
but it doesn't work.

By the way, I also cannot use some directives in ASM code.
While compiling, it warns errors.

I wrote this in my asm code:

while bit=1
movlw d'25'
movwf step
endw

but it didn't work.

Pls explain me about directives.

In some asm code, I saw they wrote as follow:

bank1
movlw 0x00
movwf trisb ; portb pins are output
bank0

But when I write it in my code, and compile with MPASM,
it cannot recognize bank1 is select bank 1
I then have to write

bcf status,rp1
bsf status,rp0
....
bcf status,rp0 ;back to bank0.

Why?

And how can I use as they did....?

Another question,

Is there any other way to let PIC know this directive:

__confic _cp_off&_wdt_off&_pwrite_on&_xt_osc

what does _cp, and _pwrite mean?


Thanks for your help.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…