Saturday, February 18, 2017

Assembly Code to Solve the Equation 3A+B-2C.

1. Assembly Code to Solve the Equation 3A+B-2C.


 org 100h 


.code

main proc

; input 1

mov ah, 01h  ; Input A
int 21h 

mov bl, al   ; move A to bl register


add bl, al   ; 2A
add bl, al   ; 3A
            
            
; input 2 

mov ah, 01h   ; Input B
int 21h
mov cl, al    ; move B to cl register

add bl, cl    ; 3A+B

; input 3

mov ah, 01h    ; Input C
int 21h
mov cl, al     ; move C to cl register

add cl, al     ; 2C
sub bl, cl     ; 3A+B-2C

; new line

mov ah, 02h
mov dl, 0Ah    ; line feed
int 21h
mov dl ,0Dh    ; Carriage return
int 21h 


; Output 

sub bl, 30h    ;convert to real number entered 
mov dl ,bl  
int 21h
        
main endp
endp

2 comments:

  1. Hey Guys, if you want to utilize this converter then you can easily convert your one file to other files;

    Unique Converter

    ReplyDelete
  2. That converter will convert your Mov file to other formats like these;

    Wmv to Mp3

    M2ts to Mp4

    Flac to Wav

    3gp to Mp3

    Avi to Mov

    ReplyDelete

How to Write Summary of a Research Paper

Paper Summary should contain the following points: What problem author’s solved? What are the motivations for that problem? Why is it import...