preparation of writing the program 1 write an


Preparation of writing the program

1.  Write an algorithm for your program closer to assembly language. For instance the algorithm for preceding program will be:

get NUM1

add NUM2

put sum into memory at RESULT

position carry bit in LSB of byte

                        mask off upper seven bits

                        store the result in the CARRY location.

2.  Specify the necessary input and output.

input required -                       two 8-bit numbers

output required -                     an 8-bit result and a 8-bit carry in memory.

 

3.  Study instruction set carefully. This step assists in specifying available instructions and their constraints andformat. For illustration the segment registers can't be directly initialized by a memory variable. In its place we have to first move offset for segment in a register and then move contents of register to segment register.

You can exit to DOS by employing interrupt routine 21h with function 4Ch placed in AH register.

It is a nice practice to first write your program on paper and employ comments generously. This makes programming easier and also helps you understand your program in future. Please consider that number of comments don't affect size of program. 

After program development you can assemble it by an assembler and correct it for errors, finally creating exe file for execution.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: preparation of writing the program 1 write an
Reference No:- TGS0327964

Expected delivery within 24 Hours