25 V5C Laboratory3
25 V5C Laboratory3
Laboratory Exercise 3
Segmentation and Addressing Modes
II. Theory
DOS are mainly used to read a
character or a string from the keyboard,
which could be an iput data to a program
and display characters or strings, which
could be results or an output of a program.
Emulator 8086 is a windows based
application for assembly programming. It is
an Integrated Development Environment
(IDE) that includes advanced source editor
and 8086 assembler. Compared to other
major assemblers like Borland’s Turbo
Assembler (TASM) and Microsoft Macro
Assembler (MASM). Emulator 8086 has a
much easier syntax and, but will still
generate a program that can be executed
on any computer that runs 8086 machine
code.
.CODE
.STARTUP
LEA DX,MSG1
MOV AH,09H
INT 21H
MOV AH,0AH
LEA DX,BUFFER
INT 21H
MOV AH,09H
MOV BH,00H
MOV BL,BUFFER[1]
MOV BUFFER[BX+2],"$"
INT 21H
MOV AH,09H
LEA DX,MSG2
INT 21H
MOV BP,02H ;LOOP
MOV CX,BX
AGAIN:
ADD BUFFER[BP],20H
INC BP
LOOP AGAIN
LEA DX,BUFFER[2]
INT 21H
.EXIT
END