Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a program to print fibonacci series in assembly. Can you explain it line by line? .MODEL SMALL .STACK 100 .DATA NUM1 DB 01H

This is a program to print fibonacci series in assembly. Can you explain it line by line?

.MODEL SMALL

.STACK 100

.DATA NUM1 DB 01H NUM2 DB 01H L DB 00H VAL1 DB 00H VAL2 DB 00H NUM DB 0DH,0AH,'$'

.CODE

MAIN PROC MOV AX,@DATA MOV DS,AX

MOV AH,01H INT 21H MOV CL,AL SUB CL,30H SUB CL,2

MOV AH,02H MOV DL,NUM1 ADD DL,30H INT 21H

MOV AH,09H LEA DX,NUM INT 21H

MOV AH,02H MOV DL,NUM2 ADD DL,30H INT 21H

MOV AH,09H LEA DX,NUM INT 21H

DISP: MOV BL,NUM1 ADD BL,NUM2

MOV AH,00H MOV AL,BL MOV L,CL MOV CL,10 DIV CL MOV CL,L

MOV VAL1,AL MOV VAL2,AH

MOV DL,VAL1 ADD DL,30H MOV AH,02H INT 21H

MOV DL,VAL2 ADD DL,30H MOV AH,02H INT 21H

MOV DL,NUM2 MOV NUM1,DL MOV NUM2,BL

MOV AH,09H LEA DX,NUM INT 21H

LOOP DISP

MOV AH,4CH INT 21H

MAIN ENDP END MAIN

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

where to find the test bank and solution manual ? give the example

Answered: 1 week ago