Question: hi, I need to edit the emu8086 code so it dose the following: Tasks: 1. Complete the above code and test it. If you have

hi, I need to edit the emu8086 code so it dose the following:

hi, I need to edit the emu8086 code so it dose the

Tasks: 1. Complete the above code and test it. If you have complete and run it correctly it should print F on screen.

2. You need to complete the code such that all contents of CX is printed (4 characters) in hex on screen. You can replicate the same code to achieve the desire result.

3. You extend the procedure such that you use a loop instead of repeating the same code.

ORG 100h ; For testing, we can assign an arbitrary number to cx MOV cx, OxFABC ; This procedure takes prints content of Ax as a hexadecimal ; string on console. ; Assume the value is in cx print_hex PROC MOV BX, ?b ; You need to define a 16-bit number as a mask AND BX, CX ; When apply the AND operation only 4 bits of MSB ; contains original values SHR BX, ? ; You need to shift ? amount to right such that LSB ; contains only 4 bits for MSB MOV AL, BL CMP AL, ? Replace ? with a number which is a decider for ; numbers and letters in a hex number JGE is_letter ADD AL, ? ; Replace ? with an ASCII character to make an ASCII ; number from AL JMP print is_letter: SUB AL, ? ; Replace ? with number to make AL an offset when ; added to 'A' creates the right letter ADD AL, 'A' print: MOV AH, Eh ; Print request INT 10h ret print_hex ENDP ORG 100h ; For testing, we can assign an arbitrary number to cx MOV cx, OxFABC ; This procedure takes prints content of Ax as a hexadecimal ; string on console. ; Assume the value is in cx print_hex PROC MOV BX, ?b ; You need to define a 16-bit number as a mask AND BX, CX ; When apply the AND operation only 4 bits of MSB ; contains original values SHR BX, ? ; You need to shift ? amount to right such that LSB ; contains only 4 bits for MSB MOV AL, BL CMP AL, ? Replace ? with a number which is a decider for ; numbers and letters in a hex number JGE is_letter ADD AL, ? ; Replace ? with an ASCII character to make an ASCII ; number from AL JMP print is_letter: SUB AL, ? ; Replace ? with number to make AL an offset when ; added to 'A' creates the right letter ADD AL, 'A' print: MOV AH, Eh ; Print request INT 10h ret print_hex ENDP

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!