(M6 MAIN) IntroTasmProgramming
(M6 MAIN) IntroTasmProgramming
MODULE 6.1
Introduction to TASM Progamming
Text Editor
A text editor is a program that allows you to enter and prepare your
program from the ordinary keyboard into a computer readable form. It
also allows you to save this file into the disk for later use. The assembler
and loader program require the inputs to be saved files from the disk. A
text editor can be any popular work processor or edit program that can be
produce pure ASCII text. As a standard convention, program written in
assembly language are usually given the filename with an extension of
.ASM. This is also the default filename extension that MASM searches.
CPECOMSYS: Module 6: 80886/8088 Instruction Sets _ Flag Control Instruction
Assembler
Loader
MODULE 6.2
Character Input Program
Strings can’t usually fit in a register, string are then placed in the memory
and then pass the address of the string in memory of two of the registers,
the segment address in DS and offset address in DX.
The string output sends a string of characters to the standard output.
On entry: AH = 09h.
DS = segment address of the first character of the string
DX = offset address of the first character of the string
Service 9 display string of character starting with the first
character (address in DS: DX) output, but not including, the
character “$” (ASCII24H)
.
CPECOMSYS: Module 6: 80886/8088 Instruction Sets _ Flag Control Instruction
Syntax :
var_name db “string$”
db = define byte
$ = string terminator
CPECOMSYS: Module 6: 80886/8088 Instruction Sets _ Flag Control Instruction
MODULE 6.3
String Manipulation Tasm Program
• .
CPECOMSYS: Module 6: 80886/8088 Instruction Sets _ Flag Control Instruction
Clear screen
Interrupt 10h, service number 3
ax = 03 – service number to clear the screen stored in register ax
ex.
mov ax,03
int 10h
CPECOMSYS: Module 6: 80886/8088 Instruction Sets _ Flag Control Instruction
Carriage return
dl=13 – service number for carriage return stored in register dl
ex.
mov dl,13
int 21h
New Line
dl =10 – service number for new line stored in register dl
ex.
mov dl,10
int 21h
CPECOMSYS: Module 6: 80886/8088 Instruction Sets _ Flag Control Instruction