CALC16

 

GOALS OF THE CALC16.ASM PROGRAM

a) The program receives the two data words from the kedyboard as decimal numbers between 0 and 65535 and stores them at DATA1 and DATA2 in its data segment.

b) The program then asks the operator what is the arithmetic operation desired, that is “+,” “-”, “*”, “/,” or all of these operations.

c) This involves calling the DECIN16, DECOU16, and DECou32 sub-procedures form the CONV.LIB. Since these are called from the main program, they have to declared as external using the EXTRN command. 

c) The program then calls the subroutine or subprocedure called ADD16, SUB16, MUL16, DIV16, or all of them one after another.

d) The subprocedures are written to output their results to SUM, DIFF, PRODL+PRODH, QUOTIENT, and REMAINDER in the main program data segment.

e) Since these sub-procedures are called from the main program, it means they have to declared as external using the EXTRN command.

e) The results are then displayed on the monitor. 

f) The program then request for the next set of numbers or to quit.

Follow the next steps to see how all these steps are achieved.

 

BuiltWithNOF

[PHY353/553] [PHY353/553] [Goals] [Prof. Saj Alam] [Syllabus] [Grading Policy] [Books] [Schedule] [Lectures] [Chp 1: History of Computers] [Chp2: Binary Numbers] [Chp3: Conceptual Computer] [Software Model] [Addressing Modes] [Instruction Set] [Assembly Language] [First Program] [ADD16] [SUB16] [MUL16] [DIV16] [CALC16] [CALC32] [Manual] [Exams] [Grades]