Assembly Computer Program

Ford SportTrac Forum

Help Support Ford SportTrac Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Dale McMurry

Active Member
Joined
Mar 11, 2006
Messages
114
Reaction score
1
Location
Midland, TX
Can any of you guys help on this problem? The following is the information for one of the assembly programs that I am currently working on, and attached is a pdf file describing the next program. Currently we have been using 8086 based assembly. Any help would be greatly appreciated.



Thank you,



Colby Burns



Assembly Language Program



For this lab, design, enter, assemble, execute, and debug a program that:





· Use the full segment specifiers and creates a EXE format executable



· Contains a stack segment (512 words), a data segment, and the program segment



· Requests that the user enter a 16-bit unsigned hexadecimal number (A)



· Check to insure that the number A is valid. If it is not, ask the user to enter it again.



· Requests that the user enter a 16-bit unsigned hexadecimal number (B)



· Check to insure that the number B is valid. If it is not, ask the user to enter it again.



· Calculates and prints the result of: the sum (A+B), the difference (A-B), the product



(A*B), the division (A/B), the logical AND (A and B), the logical OR (A or B), and



the exclusive OR (A xor B).



· Prints a message after each arithmetic operation if a carry or overflow is generated.



· Exits to DOS



· You must use at least 2 procedures in your code



· You must format you code in a readable form and add meaningful comments







--------------------------------------------------------------------------------

 
Not to be a pain, but we aren't going to do your homework FOR you :p



Write a program in assembly that works (creates an EXE) that does the following:



Asks for 2 numbers (error checks that they are numbers, if not, ask again).

Calculate and print to the screen the sum, difference, product, division, AND, OR, XOR (print errors if there are any with the operation).

Exit back to DOS.



Store the 2 numbers in the data segment. Do the operations by putting them in the right registries and calling the right interrupt to run the calculation, output the result to the screen.



Google 8086 Assembly tutorial for more descriptive how-to's :)
 
The only other help I can give is that since the program must have at least two procedures, then I suggest writing procedures for:





- display of string at a memory location (used for your prompt and to display your results)



- input of a hex number (that's the letters 0, 1...9, A, B, C, D, E, F); this could use the above proc for the display of the prompt, get a char from the keyboard, check if it is valid, and if so, place it in a known reg or memory loc, and if not, loop back to prompt again



TJR
 
Top