0% found this document useful (0 votes)
5 views4 pages

Lab Assessment-6

The document contains a lab assessment for a student named Arnab Mandal. It includes two questions, the first asking to write an ALP to perform matrix transpose and the second asking to write modules to read and display characters and then use them to read and display a string.

Uploaded by

arnab9434mandal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views4 pages

Lab Assessment-6

The document contains a lab assessment for a student named Arnab Mandal. It includes two questions, the first asking to write an ALP to perform matrix transpose and the second asking to write modules to read and display characters and then use them to read and display a string.

Uploaded by

arnab9434mandal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

LAB ASSESSMENT – 6

Name : Arnab Mandal


Reg No : 20BCE0026
Course : Microprocessor and Interfacing(CSE2006)

1. Write an ALP to perform the Transpose of a 3 * 3 Matrix.


Ans :
Code :
.model small
.stack 100h
.data
matrix db 1, 2, 3
db 4, 5, 6
db 7, 8, 9

transpose db 9 dup(0)
.code
main proc
mov ax, @data
mov ds, ax
mov es, ax

; Transpose the matrix


mov cx, 3
mov si, 0
mov di, 0

outer_loop:
push cx
mov cx, 3

inner_loop:
mov al, [matrix + si]
mov [transpose + di], al
add si, 3
inc di
loop inner_loop
pop cx
inc si
add di, 6
loop outer_loop

mov ah, 4Ch


int 21h

main endp
end main
Output :

2. Write an ALP (Using Interrupt)


a. To read a character from the keyboard in module X(any different file)
b. To display a character in module Y(from different file)
c. Use the above module X & module Y to read a string of characters from the
keyboard and display the string in the next line.
Ans:

You might also like