CSc 3210 Computer Organization and Programming
Fall Quarter 1999
Programming Assignment #0 (Due: 17 September 1999, Friday)

Assignment Objectives:

  1. To become familiar with Turbo Assembler and Turbo Debugger.
  2. To compare a program written in a higher level language with a similar one written in assembly language.

Problem Description:

  1. Create the following program on disk. Assemble, link and run it on your computer using the following commands:
      a:\>tasm /zi /l hello
      a:\>tlink /v hello
      a:\>td hello
    
    where hello.asm is the name of the file containing the program.
    ;--------------------------------------------
    page 60,132
    title Hello World Program
    .model small
    ;----Stack Segment---------------------------
    .stack 100h
    ;----Data Segment----------------------------
    .data
    hello_message db 'Hello, World!',0dh,0ah,'$'
    ;----Code Segment----------------------------
    .code
    main proc far
      mov   ax,@data
      mov   ds,ax
    
      mov   ah,9
      mov   dx,offset hello_message
      int   21h
    
      mov   ax,4c00h
      int   21h
    main endp
      end main
    ;--------------------------------------------
    
  2. Write a program in any other high-level language to print the string "Hello, World!" to the screen on a separate line. Compile, link and run this program.
  3. Observe and report the size of the .EXE files produced by the compiler and the assembler.

Submission Instructions: Submit listing files for the assembly and high-level programs. Also submit a directory listing containing both the .EXE files along with the file sizes. Highlight the file sizes.