0
.model small
.stack 100h
.data
a db ?
b db ?
c db "Insert first value: ?"
d db 10,13,"Insert second value: ?"
e db 10,13,"Result: ?"
.code

main proc
    mov ax,@data
    mov ds,ax
    
    ;Input
    mov ah,9
    lea dx,c
    int 21h
    
    mov ah,1
    int 21h
    sub al,48
    mov a,al
    
    mov ah,9 
    lea dx,d
    int 21h
    
    mov ah,1
    int 21h
    sub al,48
    mov b,al
    
    mov ah,9
    lea dx,e
    int 21h
    
    ;Multiplication
    mov al,a
    mul b
    
    ;Outut
    mov ah,2
    mov dl,al
    add dl,48
    int 21h
    
    mov ah,4ch
    int 21h
    main endp
end main

I wrote this code from youtube but his code works however when i run this code this following message shows INT 21h, AH=09h - address: 0722F byte 24h not found after 2000 bytes.

i was expecting two values taken from the user will multiply and the result will be shown

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
  • 3
    Byte `24h` is the `$` sign. The DOS print string function that you use expects strings to end with that. Yours don't. – Jester Mar 22 '23 at 20:09
  • 1
    Near duplicate of [Assembly program not printing read string](https://stackoverflow.com/q/56563060) and [Emulator displays "error byte 24h not found after 2000 bytes" using int21h/ah=09h](https://stackoverflow.com/q/36956559) although those have other things going on, not like here where it's just entirely missing the `$` terminator from the strings constants in the source. Sep's answer on the first one could be improved to include what was only in comments about `24h` being `$`. Also [Displaying numbers with DOS](https://stackoverflow.com/q/45904075) if the product can be more than 1 digit. – Peter Cordes Mar 22 '23 at 20:36

0 Answers0