Circle function works well now, it was a problem with me writing the wrong bits to the DCR register.  Started working on a rectangle function.