org 100h ; its here when the program start  include 'emu8086.inc' ;Include funcions of the librery emu8086  DEFINE_SCAN_NUM DEFINE_PRINT_STRING DEFINE_PRINT_NUM DEFINE_PRINT_NUM_UNS   jmp start ;jump to the start of the tag  text db 13,10,10,13,'Adrian Espino---Jose Carlos Elizondo--Proyect' db 13,10,'Calculator'  db 13,10,13,10,'Type the first number:','$'  var1 db 13,10,'Type the second number: ', '$' op1 db 10,13, 'Enter the operating','$' info db 10,13, 'To sum type in +,- for subtraction,* to multiplication and to divide /','$' text4 db 13,10,13,10, 'The sum is: ','$'                       text5 db 13,10,'The subtraction is: ','$'  text6 db 13,10,'The multiplication is:','$'  text7 db 13,10,'The division is:','$' text8 db 13,10,'For exit press e','$'  num1 dw ? ;2 bytes define variables num2 dw ? ; the symbol ? to indicate q is not any value inicilizan     start:      LEA DX,text ;load string 1 in dx MOV AH,09 ;instruction to print on screen INT 21h ;screen interruption   CALL SCAN_NUM ;Call SCAN_NUM function takes number of keyboard, the value is stored in ax  MOV num1,CX ;move to floating number num1   LEA DX,var1 ;string charge 2 in dx  MOV AH,09 ;interruption to print on screen INT 21h   CALL SCAN_NUM ;Call SCAN_NUM function takes number of keyboard, the value is stored in ax  MOV num2,CX ;move to floating number num2    ;prints the list of operators LEA DX, info MOV AH,09h INT 21h  ;consult the operator LEA DX,op1 MOV AH,09 INT 21h   MOV AH,1 INT 21h  ;comparisons to choose the operating    CMP AL, '+';sum JE sum  CMP AL, '-';sub JE SUBTR  CMP AL, '*';mult JE multi  CMP AL, '/';div JE divi     sum: LEA DX, text4 MOV AH,09h INT 21h   MOV AX,num1 ;first number typed moves to ax ADD AX,num2 ;sum the numbers typed, is stored in ax  CALL PRINT_NUM   JMP start   SUBTR:   MOV DX, text5 MOV AH,09h INT 21h   MOV AX,num1 ;first number typed moves to ax SUB AX,num2 ;the subs o the 1er and 2nd number, is stored in ax  CALL PRINT_NUM   JMP start   multi:  LEA DX,text6 MOV AH,09h INT 21h   MOV AX,num1 ;first number typed moves to ax  MOV BX,num2 ;moves second number typed a bx MUL BX ;ax = ax*bx CALL PRINT_NUM    JMP start    divi:  LEA DX,text7 MOV AH,09h INT 21h   XOR DX, DX; makes zero dx, if I do the division overflows ;DX STORED module division, so let's zero q MOV AX, num1; moving fingering first number to ax MOV BX, num2; moves second number typed a bx DIV BX ;x = x * bx CALL PRINT_NUM   JMP start         ret