home *** CD-ROM | disk | FTP | other *** search
- extrn .dten, .couta; hl := hl/10
- ;
- ; write (hl) in decimal to console, suppress leading zeroes.
- .tdzs::
- push psw
- push h; save everything
- call .dten
- push psw; save output digit
- mov a,h
- ora l
- cnz .tdzs; not left digit, recursive
- pop psw; last unlisted digit
- pop h; restore input
- adi '0'; make ascii digit
- call .couta; and output it
- pop psw
- ret
- ,