1 / 2

Store 2 value in BL Store 3 value in CL Display to BL and CL register

Program.-(7) * Write a program to interchange values of two registers and display string or message from LEA/offset address command. Store 2 value in BL Store 3 value in CL Display to BL and CL register To Interchange value of BL and CL After swap Display to BL and CL register.

nyla
Download Presentation

Store 2 value in BL Store 3 value in CL Display to BL and CL register

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Program.-(7)* Write a program to interchange values of two registers and display string or message from LEA/offset address command. • Store 2 value in BL • Store 3 value in CL • Display to BL and CL register • To Interchange value of BL and CL • After swap Display to BL and CL register Start BL=2 CL=3 Display BL AND CL Interchange TO BL and CL Display BL AND CL Design By M.Masood End

  2. .model small .stack 100h .data mes1 db 0ah,0dh,'Value of BL=$' mes2 db 0ah,0dh,'Value of CL=$' .code main proc ax,@data mov ds,ax mov bl,2 mov cl,3 XCHG bl,cl mov ah,9 LEA DX,msg1 int 21h mov ah,2 mov dl,bl add dl,30h int 21h mov ah,9 lea dx,msg2 int 21h mov ah,2 mov dl,cl add dl,30h int 21h mov ah,4ch int 21h main endp End main mov ah,9 LEA DX, msg1 int 21h mov ah,2 mov dl,bl add dl,30h int 21h mov ah,9 lea dx,msg2 int 21h mov ah,2 mov dl,cl add dl,30h int 21h Design By M.Masood

More Related