Write an assembly language program to read a sequence of integers , add 10 to each one, printing out the sum each time. Assume 16 bit instructions and 16 bit integers. Stop when the input is -1.
NOTE: The "pseudo-code" or "declarative" operation codes that start with a period (.) These are NOT translated into operations but are instructions to the assembler to treat the information in the line differently.
NOTE: The "labels" that precede the instructions. These are identifiers that the assembler can use to link names in operand fields to memory locations.
In the simulators used in the exercises that follow, we have chosen to restrict the operand portion of each instruction to four (4) bits, so that each instruction is contained in two bytes (one word) and data and instructions can be stored in sequentially addressed words.
CS1104 Main Page
Last Updated 2002/03/18
©J.A.N. Lee, 2000-2002.