Question: D and F please, in ASM format 5.15 Write ASC assembly language programs for the following. Start programs at locations #H0, using ORG 0 Statement.

D and F please, in ASM format
5.15 Write ASC assembly language programs for the following. Start programs at locations #H0, using ORG 0 Statement. a. Subtract an integer stored at memory location A from that at B and store the result at C. b. Read several integers from the input device one at a time and store them in a memory location start- ing at Z. The input process should stop when the integer read has a value of 0. c. Change the program in (b) to store only positive integers at a location starting at POS. d. Modify the program in (b) to store the positive integers starting at POS and the negative integers starting at NEG. e. Location #450 contains an address pointing to the first entry in a table of integers. The table is also in the memory and the first entry is the number of entries in the table, excluding itself. Store the maximum and minimum valued integers at memory locations MAX and MIN, respectively. f. SORT the entries in a table of n entries in increasing order of magnitude. g. Multiply integers stored at memory locations A and B and store the result in C. Assume the product is small enough and can be represented in 16 bits. Note that multiplication is the repeated addition Table 5.1 ASC Instruction Set Opcodes Mnemonic (Hexadecimal) Description HLT 0 Halt LDA 1 ACC + M[MEM] STA 2 M[MEM] + ACC ADD 3 ACC +- ACC + M[MEM] TCA 4 ACC + ACC + 1 (2s complement) BRU 5 Branch unconditional BIP 6 Branch if ACC > 0 BIN 7 Branch if ACC
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
