Memory Access Tutorial or Sample
Memory Access Tutorial or Sample
II. THEORIES:
1. MOV instruction
SAMPLE PROGRAM:
ORG 100h
MOV DS, AX
MOV [BX], CX
RET
ORG 100h
RET
VAR1 DB 7
var2 DW 1234h
OUTPUT EMULATOR SCREEN:
SAMPLE PROGRAM:
ORG 100h
RET
VAR1 DB 22h
END
SAMPLE PROGRAM:
ORG 100h .
INT 10h
INT 10h
INT 10h
INT 10h
INT 10h
INT 10h
RET
SAMPLE PROGRAM:
name "hi-world"
org 100h
mov ax, 3
int 10h
mov bx, 0
int 10h
mov ds, ax
mov [02h], 'H'
mov cx, 12
add di, 2
loop c
mov ah, 0
int 16h
ret
IV. ANSWERS:
Hardware Interrupts – Hardware interrupts are those interrupts that are caused by any peripheral device by
sending a signal through a specified pin to the microprocessor. There are two hardware interrupts in the 8086
microprocessor:
NMI (Non-Maskable Interrupt): It is a single pin non-maskable hardware interrupt that cannot be disabled. It is the
highest priority interrupt in the 8086 microprocessor. After its execution, this interrupt generates a TYPE 2
interrupt. IP is loaded from word location 00008 H, and CS is loaded from the word location 0000A H.
INTR (Interrupt Request): It provides a single interrupt request and is activated by the I/O port. This interrupt can
be masked or delayed. It is a level-triggered interrupt. It can receive any interrupt type, so the value of IP and CS
will change on the interrupt type received.
Software Interrupts – These are instructions inserted within the program to generate interrupts. There are 256
software interrupts in the 8086 microprocessor. The instructions are of the format INT type, where the type ranges
from 00 to FF. The starting address ranges from 00000 H to 003FF H. These are 2-byte instructions. IP is loaded
from type * 04 H, and CS is loaded from the following address given by (type * 04) + 02 H. Some important
software interrupts are:
2. What are the two types of variables supported by the EMU 8086 compiler?
-The two types of variables supported by the EMU 8086 compiler BYTE and WORD.
- Arrays are what's called a "reference variable" in that they refer to, or point to a value in memory
instead of directly holding the value. This distinction doesn't often make much difference but here
it does. With const the effect is only one level deep, so can't change which array it points to, but
you are allowed to alter the array.
4. What is an assembly language?
5. Enumerate how many ways Variable can be viewed in any numbering system.