Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

Adam’s Engineering College, Paloncha

ECE Department –MPI LAB

Experiment No.: 16 Year : III/IV B.Tech II Semester Page 1 of 1

STORING SUCCESSIVE NUMBERS

Aim: - To write an assembly language program to store


successive numbers from 00H to FFH in successive memory
locations.

Registers: - AX and CX

Description: - Storing successive numbers from 00H to FFH


in successive memory locations.

Ports:- None.

DATA SEGMENT
VAR DB 0100 DUP(00)
DATA ENDS

CODE SEGMENT
ASSUME CS: CODE, DS: DATA
START:
MOV AX, DATA
MOV DS, AX
XOR AL, AL
LEA SI, VAR
MOV CX, 0100
NEXT: MOV [SI], AL
INC AL
INC SI
LOOP NEXT

CODE ENDS
END START

Result: Successive numbers are stored in given successive


memory locations from00H to FFH.
Lab in-charge HOD, ECE

You might also like