0% found this document useful (0 votes)
3 views

Exercise-3 (Moving Array contents)

The document outlines an exercise for a Microprocessors and Microcontroller Lab at Presidency University, Bengaluru, focusing on writing an Assembly Language Program (ALP) to move 8-bit contents of an array from one memory location to another. It includes an example of the JMP instruction and provides steps for executing Assembly Language programs using DOSBOX and MASM. The document serves as a guide for students in the IV Semester of the 2018-19 academic year.

Uploaded by

houndclegane860
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Exercise-3 (Moving Array contents)

The document outlines an exercise for a Microprocessors and Microcontroller Lab at Presidency University, Bengaluru, focusing on writing an Assembly Language Program (ALP) to move 8-bit contents of an array from one memory location to another. It includes an example of the JMP instruction and provides steps for executing Assembly Language programs using DOSBOX and MASM. The document serves as a guide for students in the IV Semester of the 2018-19 academic year.

Uploaded by

houndclegane860
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 6

PRESIDENCY UNIVERISTY, BENGALURU

School of Engineering

Microprocessors and Microcontroller Lab


CSE 254

IV Semester 2018-19
Exercise-3

Write an ALP To move 8-bit contents of array from


one memory location to another memory location
Exercise Description
The JMP instruction provides a label name where the flow of control is
transferred immediately. The syntax of the JMP instruction is −
JMP Label
Example
The following code snippet illustrates the JMP instruction
MOV AX, 00 ; Initializing AX to 0
MOV BX, 00 ; Initializing BX to 0
MOV CX, 01 ; Initializing CX to 1
L20:
ADD AX, 01 ; Increment AX
ADD BX, AX ; Add AX to BX
JMP L20 ; repeats the statements
; JNE/JNZ Jump not Equal / jump Not Zero
.model small
back:mov bl,source[si]
.data
mov dest[si],bl
source db 02,03,04,05,06
inc si
len db $-source
dec cl
dest db 05 dup(0)
jnz back
.code
int 21h
mov ax,@data
end
mov ds,ax
mov si,00
mov cl,len
Steps to Execute Assembly Language programs
1) Install DOSBOX 0.74

2) Launch DOSBOX, By default it will be in Z drive <Z:\>


3) Change the drive to that, in which MASM is installed
mount c c:\masm
4) C:
5) C:\> Edit filename.asm
6) C:\> Masm filename.asm;
7) C:\> Link filename.obj;
8) C:\> CV filename.exe
THANK YOU

You might also like