;This program inspects a C string pointed to by DI
;It changes all ascii nums to '*' and then prints the string
mov bh, 0 ;set video page
mov ah, 0eh ;subfunction for write teletype
lp: mov al, byte ptr 0 [di] ;get next byte
cmp al, 0 ;end of string
je stopit
cmp al, '0' ;check to see if it is a num
jb printch
cmp al, '9'
ja printch
mov byte ptr 0 [di], '*' ;zap it - it's a num
mov al, '*'
printch: int 10h ;write the char out
inc di ;get next char
jmp lp
stopit: mov al, 7 ;ring the bell
int 10h
mov al, 0ah ;line feed
int 10h
int 10h ;another line feed
int 20h