0

I have a part of code where I need to multiply number from 0-9 and print it out, but I do it by taking one integer at a time and multiplying it by 4 this time, but I don't know what to do when after multiplying I get two digit number. I can only print the mod of it. please help!!!!

Someone said to go to the end of a buffer but I also don't know how to do that...

work:
    MOV dl, [si]
    
    sub dl,48
    mov bl,dl
    mov al,4 ; this can be changed from 0-9
    mul bl
    mov ah,2
    mov dl,al
    
    
    
    
    
    count:  
    cmp dl,09H     ;compares with 9
    jbe moveon    
    ja ifmorethanten

ifmorethanten:
    
    mov ax,dx
    
    mov bl, 10
    div bl         ;al=ax/bl  ah=ax%bl 
    mov dl, al
    
    cmp dl, 09H
    jbe moveon
    ja ifmorethanten


    
    add dl,48      
    push ax        
  
    mov ah,02h     
    int 21h
 
    pop ax         
    mov dl, ah

moveon:
    MOV [di], dl
    INC si ;moving on to another buffer's integer
    INC di ;ignore it I put the number into another buffer here
    LOOP    work

Maybe I should do it somehow different please help me!!!

lulzo
  • 11
  • 3

0 Answers0