Explore BrainMass
Share

Explore BrainMass

    Manually Assemble

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Write and manually assemble the following programs. All memory addresses include the starting and ending addresses. Show comments and identified source codes.

    1. Clear (place 0s) in all memory locations from 2000h to 200Ah.
    2. Make every odd bit in memory addresses C000h and D000h a 0. Do not change any other bit at each address.

    © BrainMass Inc. brainmass.com October 9, 2019, 4:41 pm ad1c9bdddf
    https://brainmass.com/computer-science/memory/manually-assembling-programs-38975

    Solution Preview

    The response is attached in MS WORD file named solution.doc.

    ANSWER:

    PART 1
    Mem. Mnemonics comments
    Location
    1000 MOV CX,000A(h) ; put total number of memory locations in CX

    1002 MOV BX, 2000h ;put address of first memory location in BX

    1004 MOV AX, DS:[BX] ; put contents of memory location specified by
    BX inAX

    1005 AND AX,0000h ; logically AND contents of memory location with
    0000h i.e. clear memory location
    ...

    Solution Summary

    The solution writes and manually assembles the following programs.

    $2.19