Basic Instructions for Using
Borland Turbo Assembler (TASM)
in the CAS General Access Labs


Finding the Turbo Assembler  

  1. Click on the Start button.
  2. Go up to CAS Software.
  3. Go over and down to Programming & Design.
  4. Click on the TASM Assembler.

This will open up a DOS window to the H:\ drive.



Assembling Your Program

 
  1. In the current DOS window for TASM, change to the drive and/or directory where your program is located.
  2. Type tasm  filename.asm at the DOS prompt and press <Enter>. This creates an object file for your program.

    Note:
     
    • To assemble, your filename must have the .asm file extension.
    • You must use the "/zi" switch to include debugging information in the object file.
 


 



Assuming you had no errors, type tlink  filename at the command prompt and press <Enter>. This will create an executable file in your current directory with the same name as your assembly file.

Note:
  • The filename does not require the .obj file extension for this step.
  • You must use the "/v" switch to include debugging information in the executable file.
 


 



If everything went well, you are now ready to run your program. Simply type filename at the DOS prompt and press <Enter>. Your output should appear on the screen.
 


 



Printing Your Output

There are two different ways to print your output:

Be sure to choose the method preferred by your instructor.


Redirecting Output

To redirect your program's output to a file, simply type the executable file name followed by a "greater than" sign and a filename, then press <Enter>. Your program's output will be written to the file you specified. Then, simply open that file using Notepad and print the file (directions on opening Notepad can be found near the bottom of this page).




Capturing Screen Images

After running your program and seeing the output in the DOS window, you must capture the contents of the screen:

1. Click on the MS-DOS icon in the menu bar (in the top-left corner of the DOS window).
2. In the pull-down menu, move down until Edit is highlighted, then select Mark.



3. Click on the flashing cursor in the top-left corner of the text screen.
4. While holding down the mouse button, highlight the text in the window by dragging the mouse pointer to the bottom-right corner of the text window.




With the output highlighted, press <Enter>. This copies the contents of the window into the "clipboard", a temporary memory space in Windows.


Now you must "paste" the information from the clipboard into a document using Notepad:

  1. Click on the Start button.
  2. Go up to Programs.
  3. Go over and up to Accessories.
  4. Click on Notepad.
  5. Click on Edit in the Notepad menu bar.
  6. Click on Paste in the pull-down menu.

The output from the DOS window should now be displayed in the Notepad document. Now merely print the document and you're done!


This page created by James Strawn and maintained by the CAS Lab Manager.
Last updated 03/15/2001.