Sei sulla pagina 1di 3

c 


  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
 !" #c $
%% from the disk. A text editor can be any popular work processor or edit
 program that can be produce pure ‘ text. As a standard
 convention, program written in assembly language are usually given
 &'#() the filename with an extension of ‘ . This is also the default
#c#c   filename extension that ‘ searches.
 
 
$%

#*+, A program written in assembly language is translated to machine
code by an assembler. Assembler and the corresponding assembly
1. to be able to learn the basics of turbo assembler. language mnemonics are generally limited to use with one particular
2. To properly assemble and link a program using tasm and tlink. microprocessor, which limits their portability, or use on other
3. To be able to create an assembly language program using turbo machines. Today¶s assembler do much more than translate
assembler with SK as editor. assembly language mnemonics into binary code.
 
 2

-#c Before the microprocessor can execute any machine instruction, it
must first be loaded into memory accessible to it. The loader is the
1 personal computer program that actually takes the machine instructions (object code)
1 system disk and places it in memory at the specified starting address for
1 data disk execution. Loaders range from the very simple to the very complex.
( Asembler ±  ' 
( Loader -  #c.' 
( Editor - . 

 1. Write the following program using SK¶s notepad as your text
##c editor. Assign the filename exer2.asm

Writing a program in Assembly Language follows the same .model small


procedures as in high- level languages such as Pascal. .code
org 100h
1. Type the program instructions into the computer using a text start:
editor, then save the program on the disk. mov ah,2
2. Translate the text file into machine language program using an mov dl, µR¶
assembler. If the assembler finds errors, correct them with the int 21h
text editor and reassemble the program. mov dl, µE¶
3. Convert the assembler output to an executable m  using int 21h
the loader. mov dl, µD¶
4. Execute the program. int 21h
5. Check the results. If they differ from what you expected, you must int 20h
find the error or 
, that is, you must  the program. end start


/0120  2. Save the program by pressing F2.
A text editor is a program that allows you to enter and prepare your
program from the ordinary keyboard into a computer readable form.
3. Go to the DOS prompt and then assemble the program by using
the command below: ´  
m 

4. If there are warnings and errors in assembling process go back to 6. What are those files?
the source code and fix those errors. If no error occur proceed to the
next step.

5. Link the program by using the command : m


7. Which files are created in assembling process?
There should be no BAD OBJECT FILE message in the
linking process, if = =
 assemble the
program once again.

6. Execute the program by simple typing the filename on the prompt. r. Which files are created in linking process?
What is the output of the given program?

7. Modify exer2.asm. The output should be: 9. What is the purpose of /t in linking process?
Y



r. Write down the modify program on the space below. 10. Compare the use of DEBUG and TURBO ASSEMBLER in
assembly language programming.
9. Copy the program to your data disk.
 They are almost the same but in tasm we can directly put the
 character even if it is not in hexadecimal just inclose it with single
'# quote symbol.

1. Write down the required program output from your instructor.
11. What is the purpose of org 100h in your program?

2. Encode the program.

3. Ask your instructor to check your work, then copy it to your data  
disk.

4. Compare the actions of ESC and CTRL+ALT when moving from


SK to DOS.

5. How many files are created in using turbo assembler?

_______________________________
 &3c #c

Potrebbero piacerti anche