Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Explain each line of code.Explain in details the logic of the program? What will be displayed on the screen?For the 2 programs down below will

Explain each line of code.Explain in details the logic of the program? What will be displayed on the screen?For the 2 programs down below will leave a thumbs up .model small.386.stack 100h.datamsg db 13,10,"W E L L D O N E !","$"; a string variableYU db 2ppp db 32h.codemain proc ;mov ax,@datamov ds,axL: call kySHL PPP,1dec YUjnz LMOV AH,9mov DX,offset MSGINT 21Hmov ax,4c00hint 21hky procm:mov ah,1int 21hcmp al, pppjnz minc pppretky endpmain endpend mainCode 2-.model small .386.stack 100h .data msg1 db 13,10, "Enter any key -->","$"by_10 dd 10 sp_counter db 0 disp_number dd 0 disp_number2 dd 0disp_number3 dd 0op_type db 0last_key dd 0 remainder db 0.code main procmov ax,@data mov ds,ax mov dx,offset msg1call display_messagecall m_keyinmov EAX, DISP_NUMBERzzz:dec DISP_NUMBERmul DISP_NUMBERcmp DISP_NUMBER, 1jnz zzzmov DISP_NUMBER, eaxcall m_displaymov ax,4c00h int 21h m_display procmov eax, disp_numbermov sp_counter, 0Base_lp:LP1:mov edx, 0div By_10push dxinc sp_countercmp eax, 0jnz lp1LP2:pop dxcall displaydec sp_counterjnz lp2mov edx, -8call displaymov edx, by_10call displaymov edx, -7call display dec By_10mov eax, disp_numbercmp By_10,1jnz Base_lpretm_display endpiii:mov ax,4c00h int 21h op_mult procmov eax, disp_number2mul disp_number3mov disp_number, eaxretop_mult endpdisplay procadd dl,30hcmp dl,3ahjs short skip_hexadd dl,7Skip_hex: mov ah,6int 21hretdisplay endpdisplay_message procmov ah,9 int 21hmov edx, 0retdisplay_message endpm_keyin procMOV disp_number, 0mov last_key, 0LP_key:mov eax, disp_numbermul by_10 add eax, last_keymov DISP_NUMBER, eax mov ah,1 int 21hAND eax, 000000ffhcmp al,13 jz short finkey cmp al,30hjs iiicmp al,3Ahjns iii sub al,30h MOV LAST_KEY, EAX jmp lp_key finkey:MOV eax, DISP_NUMBERcmp DISP_NUMBER2,0jnz short skipMOV DISP_NUMBER2, EAXskip:MOV DISP_NUMBER3, EAXcmp DISP_NUMBER, 13jns iiicmp DISP_NUMBER, 1jz iiiretm_keyin endpmain endpend main

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Azure SQL Database For Modern Developers Building Applications In The Microsoft Cloud

Authors: Davide Mauri, Silvano Coriani, Anna Hoffma, Sanjay Mishra, Jovan Popovic

1st Edition

1484263693, 978-1484263693

More Books

Students also viewed these Databases questions

Question

Draw a labelled diagram of the Dicot stem.

Answered: 1 week ago