0% found this document useful (0 votes)
36 views2 pages

Laboratory 1: H, 3080H C, 0AH A B, A LOOP2: M Loop1 B LOOP1: H C Loop2 H, B L, A 3090H

The document contains 4 assembly language programs: 1. Adds 10 bytes of data starting at location 3080H and stores the result at 3090H. 2. Checks if the 10 numbers at 3080H are greater than 80H, and sets the 5th bit if so. 3. Finds the largest number among the 10 stored at 3080H and stores it at 3090H. 4. Counts the negative numbers among the 10 stored at 3080H and stores the count at 3090H.

Uploaded by

Tsy Less Dahal
Copyright
© Attribution Non-Commercial (BY-NC)
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)
36 views2 pages

Laboratory 1: H, 3080H C, 0AH A B, A LOOP2: M Loop1 B LOOP1: H C Loop2 H, B L, A 3090H

The document contains 4 assembly language programs: 1. Adds 10 bytes of data starting at location 3080H and stores the result at 3090H. 2. Checks if the 10 numbers at 3080H are greater than 80H, and sets the 5th bit if so. 3. Finds the largest number among the 10 stored at 3080H and stores it at 3090H. 4. Counts the negative numbers among the 10 stored at 3080H and stores the count at 3090H.

Uploaded by

Tsy Less Dahal
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 2

LABORATORY 1

1. Write a program to add 10 bytes of data at memory location starting at 3080H and store the result at 3090H ANS: LXI H, 3080H MVI C,0AH XRA A MOV B,A LOOP2: ADD M JNC LOOP1 INR B LOOP1: INX H DCR C JNZ LOOP2 MOV H,B MOV L,A SHLD 3090H HLT 2. WAP to check whether the 10 numbers at memory location starting from 3080H are greater than 80H. If they are greater than 80H, change bit D5 of those data. ANS: LXI H,3080H MVI C,0AH LOOP2: MOV A,M CPI 80H JC LOOP1 XRI 20H MOV M,A LOOP1: INX H DCR C JNZ LOOP2 HLT 3. WAP to find the largest number among the 10 data stored in memory location starting from 3080H and store the result at memory location 3090H ANS: LXI H, 3080H MVI C,0AH MOV A,M LOOP2: INX H CMP M JNC LOOP

MOV A,M LOOP: DCR C JNZ LOOP2 STA 3090H HLT

4. WAP to count the negative number among the 10 data stored in memory location starting from 3080H and store the result at memory location 3090H ANS: LXI H,9000H MVI C,0AH MVI B,00H LOOP2: MOV A,M RLC JNC LOOP1 INR B LOOP1: INX H DCR C JNZ LOOP2 MOV A,B STA 9100 HLT

You might also like