1 / 6

Comparing three numbers

Comparing three numbers. .model small .stack 100h .code main proc mov ax,@data mov ds,ax mov bl,10 mov cx,3 mov si,offset var1. Comparing three numbers. call get numbers call compare numbers call show numbers mov ax,4c00h int 21h main endp.

hans
Télécharger la présentation

Comparing three numbers

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. Comparing three numbers .model small .stack 100h .code main proc mov ax,@data mov ds,ax mov bl,10 mov cx,3 mov si,offset var1 Lecture 20

  2. Comparing three numbers call get numbers call compare numbers call show numbers mov ax,4c00h int 21h main endp Lecture 20

  3. Comparing three numbers get numbers proc agn1: mov ah,1 int 21h sub al,30h mul bl mov dl,al mov ah,1 int 21h sub al,30h add dl,al mov [si],dl inc si loop agn1 get numbers endp Lecture 20

  4. Comparing three numbers compare numbers proc mov cx,2 agn2: mov al,var2 cmp var1,al jb l1 xchg var1,al mov var2,al l1: cmp al,var3 jb l2 xchg var3,al mov var2,al l2: loop agn2 compare numbers endp Lecture 20

  5. Comparing three numbers show numbers proc show: mov dl,var1 mov ah,2 int 21h mov dl,var2 mov ah,2 int 21h mov dl,var3 mov ah,2 int 21h show numbers endp Lecture 20

  6. Comparing three numbers .data var1 db 0 var2 db 0 var3 db 0 end main Lecture 20

More Related