52 53 - print_al proc cmp al, e jne print_al_r push ax mov al, '0' mov ah, Øeh 54 55 56 57 58 59 int 10h 60 pop ax 61 ret 62 63 - print_alr: pusha mov ah, 0 64 65 стр ах, 0 je pn_done mov dl, 10 div...


Instruction: Analyze the given Emu8086 assembly codes and answer the following questions.
Note: You can execute the program if you have the Emu8086 Emulator installed on your computer.



  1. What is the purpose of Lines 39-40?

  2. What is the purpose of Lines 49-50?

  3. What is the purpose of the next: section in the program?


52<br>53 - print_al proc<br>cmp al, e<br>jne print_al_r<br>push ax<br>mov al, '0'<br>mov ah, Øeh<br>54<br>55<br>56<br>57<br>58<br>59<br>int 10h<br>60<br>pop ax<br>61<br>ret<br>62<br>63 - print_alr:<br>pusha<br>mov ah, 0<br>64<br>65<br>стр ах, 0<br>je pn_done<br>mov dl, 10<br>div dl<br>call print_al_r<br>mov al, ah<br>add al, 30h<br>mov ah, Øeh<br>66<br>67<br>68<br>69<br>70<br>71<br>72<br>73<br>74<br>int 10h<br>75<br>jmp pn_done<br>76<br>77<br>pn_done:<br>78<br>роpa<br>79<br>ret<br>80<br>endp<br>81<br>

Extracted text: 52 53 - print_al proc cmp al, e jne print_al_r push ax mov al, '0' mov ah, Øeh 54 55 56 57 58 59 int 10h 60 pop ax 61 ret 62 63 - print_alr: pusha mov ah, 0 64 65 стр ах, 0 je pn_done mov dl, 10 div dl call print_al_r mov al, ah add al, 30h mov ah, Øeh 66 67 68 69 70 71 72 73 74 int 10h 75 jmp pn_done 76 77 pn_done: 78 роpa 79 ret 80 endp 81
org 100h<br>2<br>mov cx, 5<br>mov al, 0<br>mov bx, 0<br>3<br>5<br>6.<br>7- next:<br>8<br>add al, vector[bx]<br>9<br>inc bx<br>loop next<br>mov m, al<br>10<br>11<br>12<br>mov bl, m<br>mov cx, 8<br>13<br>14<br>15<br>16<br>17 - print:<br>mov ah, 2<br>mov dl, '0'<br>test bl, 10000000b<br>jz zero<br>mov dl, '1'<br>18<br>19<br>20<br>21<br>22<br>23<br>24<br>zero:<br>25<br>int 21h<br>shl bl, 1<br>loop print<br>26<br>27<br>28<br>29<br>mov dl, 'b'<br>30<br>int 21h<br>31<br>32<br>33<br>mov dl, Øah<br>34<br>int 21h<br>mov dl, Odh<br>int 21h<br>36<br>37<br>38<br>mov al, m<br>call print_al<br>39<br>40<br>41<br>42<br>43<br>mov ah, 0<br>44<br>int 16h<br>45<br>46<br>ret<br>47<br>48<br>49<br>vector db 5, 4, 5, 2, 1<br>50<br>m db 0<br>51<br>m m m mm<br>

Extracted text: org 100h 2 mov cx, 5 mov al, 0 mov bx, 0 3 5 6. 7- next: 8 add al, vector[bx] 9 inc bx loop next mov m, al 10 11 12 mov bl, m mov cx, 8 13 14 15 16 17 - print: mov ah, 2 mov dl, '0' test bl, 10000000b jz zero mov dl, '1' 18 19 20 21 22 23 24 zero: 25 int 21h shl bl, 1 loop print 26 27 28 29 mov dl, 'b' 30 int 21h 31 32 33 mov dl, Øah 34 int 21h mov dl, Odh int 21h 36 37 38 mov al, m call print_al 39 40 41 42 43 mov ah, 0 44 int 16h 45 46 ret 47 48 49 vector db 5, 4, 5, 2, 1 50 m db 0 51 m m m mm

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here