0% found this document useful (0 votes)
24 views3 pages

Coal Lab Imran Shaheer 19F-0285 Problem # 1: Problem 1.1

This document contains the solutions to 4 problems in a coal lab assignment. Problem 1 involves basic arithmetic with numbers in memory and addresses. Problem 2 examines pointers. Problem 3 demonstrates adding values from an array to another array using a loop. Problem 4 loads values from two data arrays into registers for manipulation.

Uploaded by

Imran Shaheer
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)
24 views3 pages

Coal Lab Imran Shaheer 19F-0285 Problem # 1: Problem 1.1

This document contains the solutions to 4 problems in a coal lab assignment. Problem 1 involves basic arithmetic with numbers in memory and addresses. Problem 2 examines pointers. Problem 3 demonstrates adding values from an array to another array using a loop. Problem 4 loads values from two data arrays into registers for manipulation.

Uploaded by

Imran Shaheer
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/ 3

Coal Lab

Imran Shaheer
19F-0285
Problem # 1:
Problem 1.1
0000 78

0001 56

0002 34

0003 12

Problem 1.2

Problem 1.3
Size is different that’s why we need PTR operator

Problem 1.4
There will be no error.

Problem 1.5
 wvar is 0101h
 count has no address

Problem # 2:
Problem 2.1
Problem 2.2

Problem 2.3

Problem # 3:
.MODEL SMALL

.DATA

CHG DB ?

CNT DB 0AH

.CODE

START:

MOV AX,@DATA

MOV DS,AX

LEA SI,CHG

MOV CL,CNT

MOV AX,00H

MOV BX,01H

L1:

ADD AX,BX

MOV [SI],AX

MOV AX,BX

MOV BX,[SI]

INC SI

LOOP L1

INT 3H

END START

Problem # 4:
.model small

.stack 100h

.data

VARR DW 1000h, 2000h, 3000h, 4000h

SARR DW -1, -2, -3, -4

.code

mov ax, @data

mov ds, ax

mov ax,VARR

mov bx,VARR+2

mov cx,VARR+4

mov dx,VARR+6

mov ax,SARR

mov bx,SARR+1

mov cx,SARR+2

mov dx,SARR+3

mov AH,4CH

int 21h

You might also like