Assignment 1
CSCI 2370
Due: One week after distributed
The assignment is to type in and run the assembly language program entitled "assignment 1" . Turn in a listing of the program in its ASM form plus the copies of the printscreens showing the results.
1. Run the entire program and get the results afterwards. The results should be printed by using the SHIFT-PRTSC key or a screen capture program to output the watch area. All the locations within the program's data segment that change should be part of the printouts.
The following two processes are what you will be doing to debug your program. Get accustomed to them now and it will be easier to do later.
2. Once the entire program has been executed (step 1) and the results printed, without leaving TD, change NOINARR to be 5. You do this by reloading the program (CTRL-F2), then going to the watch window, moving the cursor to NOINARR. To change a single memory location like NOINARR, press CTRL-C, and enter the desired value. Consecutively, set breakpoints at each C comment line up to the LEA BX,ARRAY statement, execute to that point, and print the screen. When you get to the LEA BX,ARRAY statement, print out the results. Then, watching what happens, step through the rest of the program until you have executed MOV TOTARR,AX. Finally print the final results.
3. Reload the program again, change NOINARR to be 3, modify the data in ARRAY to be 3A,4B,5C (by going to the watch window, moving the cursor to ARRAY, pressing ALT-V to get the View Menu, selecting the CPU window, moving to the first byte of ARRAY, and typing the new values). You must separate the data by a space, and include H at the end to indicate hex. Execute to the CALL TOTAL statement and then trace through the rest of the program. Go slow and watch the registers and data. Print only when you get to the MOV AH,4CH statement in the main program.
Make sure you also get a copy printed out of the .LST file. We will discuss this listing later in the quarter. To get a copy you may need to redo your TASM command.
Be sure to turn in a listing of the program (the .ASM file) along with the seven printouts of the screen showing the results in the data segment and the registers. You should not turn in the .LST file.
Assignments are due at the beginning of class on the date given. Late assignments are penalized at a rate of 10% per day up to a maximum of 50%.