View Single Post
  #1 (permalink)  
Old 03-02-2008, 03:19 PM
SCR SCR is offline
Newbie
 
Join Date: Mar 2008
Posts: 1
Rep Power: 0
SCR is on a distinguished road
Default Help with 8086 Assembly

I need to make a program that ask two numbers, multiply it and then show the result.

This is what I have done until now. My problem is when the program must show the result. If anyone can help me I would thank you.
Code:
.model small
.stack 2000h
.data
m1 db 0dh,0ah,"Enter multiplicant (0-9): $"
m2 db 0dh,0ah,"Enter multiplier (0-9): $"
m3 db 0dh,0ah,"The product is: $"
.code
main proc
	mov ax,@data
	mov ds,ax
	mov ah,9
	mov dx,offset m2
	int 21h
	mov ah,1
	int 21h
	mov cl,al
	mov ah,9
	mov dx,offset m1
	int 21h
	mov ah,1
	int 21h
	sub cl,30
	sub al,30
	mul cl
	aam
	add al,30
	add ah,30
	mov bx,ax
	mov ah,9
	mov dx,offset m3
	int 21h
	mov dx,'bx'
	mov ah,2
        int 21h
	mov ax,4c00h
	int 21h
main endp
end main

Last edited by v0id; 03-03-2008 at 12:24 AM. Reason: Remember the code-tags!
Reply With Quote

Sponsored Links