It's part of picnic project (http://picnic.sf.net) - in the file webpic.asm This code receives an ISA_OFFSET to address an register inside an ISA board that is connected to the pic. ISA_HBASEIO and ISA_LBASEIO are the 2 bytes that makes the fixed adresses of the board, such as 0x300 or 0x280. Rafael. Liam O'Hagan wrote: >What is it meant to do? > >-----Original Message----- >From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] On >Behalf Of Rafael Vidal Aroca >Sent: Tuesday, 25 May 2004 1:12 PM >To: PICLIST@MITVMA.MIT.EDU >Subject: [PIC:] Conversion ASM -> CCS C > > > Hello guys, > i'm having trouble converting this asm code that runs on a pic 16F877 to >CCS C. I tried to convert it, but it did not work :( > > I'd be really thankful if anyone could translate this code into C so >that i can compare with what i did. > > movlw ISA_HBASEIO > movwf ISA_HADR > > movf ISA_OFFSET, W > addlw ISA_LBASEIO > movwf ISA_LADR > > ; parse address > > movf ISA_LADR, W > andlw 0x3F > movwf PORTC > > rrf ISA_LADR, F > rrf ISA_LADR, W > andlw 0x30 > movwf ISA_LADR > > swapf ISA_HADR, F > rlf ISA_HADR, F > rlf ISA_HADR, W > andlw 0xC0 > movwf ISA_HADR > > movlw 0x0F > addwf ISA_LADR, W > addwf ISA_HADR, W > movwf PORTB > > > again, thanks a lot for the attention. > >Rafael. > >-- >http://www.piclist.com#nomail Going offline? Don't AutoReply us! email >listserv@mitvma.mit.edu with SET PICList DIGEST in the body > >-- >http://www.piclist.com#nomail Going offline? Don't AutoReply us! >email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body