CmpE 444 Assembly Project

 

The aim of this project is to learn the basics of assembly. You will be provided with assembler and linker as well as with a tutorial on the assembly language. You can prepare a diskette to use to develop your project and you may use this diskette at the lab afterwards.

 

The project is to write a program which implements string reversal. Please use only 8086 instructions, that is do not use string instructions available on more advanced processors. The program should prompt the user for a string input. The string should be written to a memory area assigned by you in the data segment. You can use DB (define byte) to define bytes in the data segment. You can assume a maximum string length of 15. Use EXE layout, that is define stack, data and code segments. Try to be modular, subdivide your code into procedures. To be able to use procedures you have to have a nonzero stack size. When CALL is used to invoke a procedure, the return address of the code (IP) is saved on the stack. MASM will help you to initialize the stack segment and specify a stack size. You can use DOS interrupts to output strings on the console and read from console. Please check the appendices of your book for DOS interrupt functions (B. Bray).

 

A sample run of your program should be like this:

 

C:\444Prj\prj1

Please input a string: abcd12

Your string reversed is: 21dcba

C:\444Prj\

 

Due Date: Nov 19, 2001