Assembly Write a program that read number from the user and then print A2. Note that A2=A^2= A*A

ساخت وبلاگ

Vote count: 0

.MODEL SMALL .STACK 100H

.DATA
MSG1 DB 0ah, 0dh, "Please enter the value of A $" MSGG DB 0ah, 0dh, "The result of A^2= $" A DB ?

.CODE MAIN PROC ;can someone help me the mul result wont print in numbers. MOV AX, @DATA
MOV DS, AX ;print message one mov ah, 9 lea dx, MSG1 int 21h ;take input from user mov ah, 1 mov A,al int 21h sub A,30h ;print message two mov ah, 9 lea dx, MSGG int 21h

 ;A*A mov al,A mul A mov bl,al add bl,30h mov ah,2 mov dl,bl int 21h mov ah, 4ch int 21h 

MAIN ENDP END MAIN

asked 36 secs ago

back soft...
ما را در سایت back soft دنبال می کنید

برچسب : نویسنده : استخدام کار backsoft بازدید : 182 تاريخ : سه شنبه 17 فروردين 1395 ساعت: 23:28