View the step-by-step solution to:

Write a MASM assembly program that runs in DOSBox named CONVERTROM that reads lines of ASCII text from an input file. Each line contains a number...

I need help on a MASM assembly program that runs in DOSBox named CONVERTROM that reads lines of ASCII text from an input file. Each line contains a number encoded in Roman numeral format. The program converts the number from Roman numeral format to an Unsigned Positional number, doubles the number, converts the result back to Roman numeral format, and outputs the result. You may use only xlat, compares and jumps, but the most efficient solution will the more general form of indirect addressing. See the program notes in the attached file, but all input lines will be valid, so full error handling is not necessary. I need the CONVERTROM.asm file. Please see the attached document for the full program specs and input and expected output files. I need this completed today, if possible. The program should run in DOSBOX Enviroment :
http://www.dosbox.com/

I'm just not sure where to start.
Write a MASM assembly program that runs in DOSBox named CONVERTROM that reads lines of ASCII text from an input file. Each line contains a number encoded in Roman numeral format. The program converts the number from Roman numeral format to an Unsigned Positional number, doubles the number, converts the result back to Roman numeral format, and outputs the result. You may use only xlat, compares and jumps, but the most efficient solution will the more general form of indirect addressing. See the program notes, but all input lines will be valid , so full error handling is not necessary. I need the CONVERTROM.asm file. Program input specification  Input comes from a file that has been redirected to the standard input stream.  An input file will consist of zero or more lines of text.  Each input line consists of one or more printable ASCII data characters in the range of 20h to 7Fh.  Each input line is terminated by the character pair Carriage Return (CR=0Dh) and Line Feed (LF=0Ah).  A valid line has the following format. Items in brackets [ ] are optional. [ LB ] NN. ..N [ TB ] [ ; COMMENT ] CR/LF LB = 0 or more leading blank spaces. NN. ..N = A single valid Roman number in the range of I to LXXXIX or decimal 1 to 89. The value of any individual input numeral represented by “N” will only be: I, V, X, L All numerals will be in upper case. You do not need to test for lower case. There will be no blanks spaces within the number. TB = 0 or more trailing blank spaces. ; COMMENT = An optional comment about the input line. If it is present, the comment starts with a semi-colon (;) CR/LF = The end of line character pair, carriage return and line feed.  The end of the file will always be represented by an End Of File (EOF) character, which is has the hex value 1A. Program processing specification for all input lines and output specification  Do not use ah=1 to read and echo. This does not work under DOSBox. See the DOSBox Limitations link on the class WEB site. Instead, use int 21h with ah=8 to read characters and ah=2 to write characters.  Read and write (echo) any leading blank spaces and locate the start of the Roman number.  Read and write (echo) the Roman numerals and convert the Roman number to an Unsigned Positional number.  The end of the Roman number is indicated in one of these ways. - a trailing blank - a semi-colon (;) that starts the comment field - CR/LF  Read and write (echo) any trailing blank spaces and the comment field.  Read and write (echo) the end of line character pair (CR/LF).  Double the value of the Unsigned Positional number by adding it to itself. This is your result.  Convert this result back to Roman numeral format and write it to the standard output device in upper case. It will be in the range of II to CLXXVIII or decimal 2 to 178.  Do not write any leading or trailing blank spaces or any other text characters on your results output line.  Terminate your resulting output line with a CR/LF.  After writing the output line, write one additional null line (a CR/LF pair) to make the output more readable.  After you read and write (echo) the EOF character (1Ah), terminate your program. Programming notes Full error handling for CONVERTROM would make the program quite large. To simplify the program you may make the following assumptions to which the grading data will adhere. All input lines will be valid . - They will meet the specification given. NN. ..N will be a valid Roman number in upper case. - Error checking is not needed in your code. - The individual characters CR and LF will never appear separately in the input file by themselves. They will always appear together as a pair and will mark the end of a line of text. Every input line will terminate with the CR/LF pair. - There will always be an EOF character. The EOF character will never appear within the data. It will always appear after the CR/LF pair (except in a null file which consists of only the EOF character). - There will be no ASCII control characters (00h-1Fh) other than the CR, LF, EOF.  If running under DOSBox use int 21h with ah=8 to read characters, ah=2 to write characters, ah=9 to write strings. Do not use ah=1 to read and echo . .. this does not work under DOSBox.
Background image of page 1
 Make sure all your output lines end with a CR/LF pair and then an additional null line.  Make sure your output file ends with an EOF. This is the sample file named roman.in I ; expected output II test lower boundary LXXX ; expected output CLX test additive function XLIV ; expected output LXXXVIII test subtractive function LXXXIX ; expected output CLXXVIII test combined upper bound This is the correct output for the above input. I ; expected output II test lower boundary II LXXX ; expected output CLX test additive function CLX V; expected output X test leading blanks & comment X XLIV ; expected output LXXXVIII test subtractive function LXXXVIII LXXXIX ; expected output CLXXVIII test combined upper bound CLXXVIII
Background image of page 2
Sign up to view the entire interaction

Top Answer

We need you to clarify your question for our tutors! Clarification request: Dear... View the full answer

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online