Assembly Program to Calculate Tax


Write and run a program using 8086 assembly language that calculates the tax due for a person. You may assume that the annual salary of the person is stored in a memory location. You may also assume a flat 30% tax rate. [Dec 2012, Set-4]

DATA SEGMENT
    SALARY DW 100H 
    TAX DB ?     
DATA ENDS

CODE SEGMENT
START:

    ASSUME CS:CODE, DS:DATA 
    MOV AX, DATA
    MOV DS, AX

    MOV AX, SALARY   
    MOV CX, 3H
    MUL CX 
    
    MOV BL,10H    
    DIV BL 
    
    MOV TAX, AL
  
    MOV AX, 4C00H
    INT 21H  
      
CODE ENDS

END START