Write a program in assembly language to load a byte in memory location 8000H and increment the contents of the memory location – IGNOU MCA Assignment 2017 – 18

By | December 8, 2017

MASTER OF COMPUTER APPLICATIONS

Course Code : MCSL-017
Course Title : C and Assembly Language Programming (Lab Course)
Assignment Number : MCA(1)/L-017/Assignment/17-18
Maximum Marks : 50
Weightage : 25%

Write a program in assembly language to load a byte in memory location 8000H and increment the contents of the memory location – IGNOU MCA Assignment 2017 – 18

Code:-

DATA SEGMENT
NUM1 DB 7H
NUM2 DB ?
ENDS

CODE SEGMENT
ASSUME DS:DATA CS:CODE
START:
MOV AX,DATA
MOV DS,AX

MOV AL,NUM1

MOV [8000H],AL

INC [8000H]

MOV AL,[8000H]

MOV NUM2,AL

MOV AH,4CH
INT 21H
ENDS
END START

 

DATA SEGMENT
NUM1 DB 7H
NUM2 DB ?
ENDS
CODE SEGMENT
ASSUME DS:DATA CS:CODE
START:
MOV AX,DATA
MOV DS,AX
MOV AL,NUM1
MOV [8000H],AL
INC [8000H]
MOV AL,[8000H]
MOV NUM2,AL
MOV AH,4CH
INT 21H
ENDS
END START

Screen Shots :-

Asm_program_Load_Byte_Memory

Before Execution :-

Asm_program_Load_Byte_Memory_v1

After Execution :-

Asm_program_Load_Byte_Memory_v2

Note :- To see the variable and its value you have to click vars button in the emulator.