CSc 343, Computer Organization and Programming
Fall 1998
Programming Assignment #5 (Due: 11 December 1998, Friday)
Assignment Objectives: To learn how to manipulate disk files using DOS services, process command line parameters, read lines of text from ascii files, write directly to video display area, and to become more proficient at writing assembly programs.
Problem Description: Write an assembly program, called BROWSE, which takes the name of a file as command line input. The following is an example of how the program will be invoked:
a:> browse t.asmIt then displays the first 24 lines of text from the file on the screen. The following keyboard functions should be implemented:
PgUp Scroll up 24 lines PgDn Scroll down 24 lines UpArrow Scroll up 1 line DnArrow Scroll down 1 line Esc Exit to DOSYou should write directly to video memory for best performance. The program should run in the default text mode (03h).
Submission Instructions: Electronically submit browse.asm and browse.exe by the deadline and submit program listing of browse.asm.
Hints:
INT 21H, Function 3DH ; Open file INT 21H, Function 3EH ; Close file INT 21H, Function 3FH ; Read record from file INT 21H, Function 42H ; Move File Pointer (can be used to ; find the size of the file)