From: adastra Date: Saturday, September 23, 2000 4:11 PM Subject: [PIC]: Could someone please explain this asm notation? >I need to convert 16 bit binary to 4 BCD digits. I searched the archives >and thought I had found just the right thing, so I more-or-less just pasted >it into my 16C877 code. However, MPASM gives error messages on the lines >with the ds and $ directives. I can't find any references to the $ (except >where it returns the PCL) in the MPASM user's guide. > >Could someone please explain what I need to know in order to modify this >code to produce the desired result? > >Thanks very much, > > Foster [SNIP] >NumH: ds 1 >NumL: ds 1 >TenK: ds 1 >Thou: ds 1 >Hund: ds 1 >Tens: ds 1 >Ones: ds 1 I believe this reserve data bytes within a program. You're going to have to reserve some GP file registers with these names. [SNIP] > addlw $E2 [SNIP] A $ before a number is another way to indicate hexadecimal. Just replace these with 0x and you'll be set. John -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu