t4.asm - mov bx,4 m add bx,ax ;4+3 bx=7 sub ax,bx ;3-7 ax=...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
;write a program that exchange the values of two register say AX and BX. ; You can not use any other register or memory space. You can not use exchange command c .model small .stack 100h .data num1 dw 3 num2 dw 4 .code main proc mov ax,@data mov ds,ax mov ax,0 mov bx,0 mov ax,3
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: mov bx,4 m add bx,ax ;4+3 bx=7 sub ax,bx ;3-7 ax= - 4 mov cl,-1 mul cl m mov dx,ax mov ah,02h sub bx,ax add dl,30h int 21h i mov ah,02 mov dl,0 add dl,0ah int 21h i mov dx,bx mov ah,02h add dl,30h int 21h mov ah,4ch int 21h main endp end main...
View Full Document

Ask a homework question - tutors are online