right, i got it! subroutine gets two digits of the num in the W register, and places them in UNITS and TENS. the whole point of this is for my clock project, which i have decided to use 7 seg displays. btw, has anyone got any info on using the dallas ds1302 chip with the serial port of the pic16f876, would it be better to bit-bang it? ------------------------ TENS equ 0x0C UNITS equ 0xD COUNT equ 0xE NUM equ 0x10 TEMP equ 0x11 tensunits clrf TENS clrf UNITS movwf TEMP movwf NUM Loop0 movlw .10 movwf COUNT Loop1 decfsz TEMP goto cont call mult return cont decfsz COUNT goto Loop1 incf TENS goto Loop0 mult movlw .10 movwf COUNT movf UNITS,w MULTLOOP addwf TENS,w decfsz COUNT goto MULTLOOP subwf NUM,w movwf UNITS return ---------------------------- -- View this message in context: http://www.nabble.com/seperate-num-into-tens%2Bunits-tf3356654.html#a9342882 Sent from the PIC - [PIC] mailing list archive at Nabble.com. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist