From comments, it seems like what you want is something like:
;Input
; cx Clock ticks since midnight
;
;Output
; ax Most significant non-zero decimal digit of clocks since midnight (unless
; clocks since midnight is zero, where zero will be returned)
;
;Trashed
; none (contents of all registers not used for outputs are preserved)
get_most_significant_decimal_digit:
mov ax,cx ;ax = numerator = clocks since midnight
cmp ax,10 ;Is it already small enough?
jb .done ; yes
push bx
push dx
mov bx,10 ;bx = divisor (constant value 10)
.continue:
xor dx.dx ;dx:ax = numerator zero extended to 32 bits
div bx ;ax = numerator / 10
cmp ax,10 ;Is it small enough now?
jae .continue ; no, keep going
pop dx
pop bx
.done:
ret
Note: For maximum performance it'd probably be better to use a different divisor for each division, with divisors chosen to minimize the number of divisions. E.g. "if not smaller than 10000 then divide by 10000" then "if not smaller than 100 then divide by 100" then "if not smaller than 10 then divide by 10". It's hard to tell if the performance improvement is worth the extra complexity (and worse code readability) that would be required.
On second thought; it's not really that messy (untested, NASM syntax):
section .data
const10000: dw 10000
const100: dw 100
const10: dw 10
section .text
;Input
; cx Clock ticks since midnight
;
;Output
; ax Most significant non-zero decimal digit of clocks since midnight (unless
; clocks since midnight is zero, where zero will be returned)
;
;Trashed
; none (contents of all registers not used for outputs are preserved)
get_most_significant_decimal_digit:
mov ax,cx ;ax = numerator = clocks since midnight
push dx
cmp ax,10000
jb .l1
xor dx,dx
div word [const10000]
.l1:
cmp ax,100
jb .l2
xor dx,dx
div word [const100]
.l2:
cmp ax,10
jb .l3
xor dx,dx
div word [const10]
.l3:
pop dx
ret
For this alternative, "worse case" is 3 divisions and 3 branches (instead of 4 divisions and 5 branches for previous approach).