How to Display Table of any Number in Assembly Language
Use of registers in Assembly Language:
As we have performed program in Assembly Language and we also know it is a low level language use for direct interaction with the hardware. In this program we have used some basic registers to display a table of a given number provided by the user. Mostly we used Accumulator register, base register and counter register for the working of this program. This program is performed while using masm in Visual Studio 2019 (you can use any version). Follow our all videos on YouTube channel to learn more about Assembly Language in Visual Studio masm.
Tutorial to Display Table of any Number in Assembly Language:
Display Table of Any Number in Assembly Language:
.386
INCLUDE Irvine32.inc
.model small
.stack 100h
.data
msg db "Enter Number",0
msg1 byte '*'
msg2 byte '='
var dd ?
.code
main proc
; let begin coding
mov edx,offset msg
call writestring
call readint
mov var,eax
mov ecx,10
mov ebx,1
l1:
mov eax,var
call writeint
mov al,msg1
call writechar
mov eax,ebx
call writeint
mov al,msg2
call writechar
mov eax,var
mul ebx
call writeint
inc ebx
call crlf
loop l1
call readint
invoke ExitProcess,0
main endp
end main
Output:
Output of Assembly Language |
Great documnetation. learn more from here.
ReplyDelete