only task 2 and 3 from the assignment to be done

1 answer below »
only task 2 and 3 from the assignment to be done
Answered Same DayJul 09, 2021

Answer To: only task 2 and 3 from the assignment to be done

Sonu answered on Jul 14 2021
151 Votes
Menu Driven Program/MenuDriven.asm
%macro scall 4
mov eax,%1
mov ebx,%2
mov ecx,%3
mov edx,%4
int 80h
%endmacro
section .data
arr dq 0000003h,00000002h
n equ 2
menu db 10d,13d,"**********MENU**********"
db 10d,13d,"1. Addition"
db 10d,13d,"2. Subtraction"
db 10d,13d,"3. Multiplication"
db 10d,13d,"4. Exit"
db 10d,13d,"Enter your Choice: "
menu_len equ $-menu
m1 db 10d,13d,"Addition: "
l1 equ $-m1
m2 db 10d,13d,"Substraction: "
l2 equ $-m2
m3 db 10d,13d,"Multiplication: "
l3 equ $-m3
        
    
section .bss
answer resb 8        ;to store the result of operation
choice resb 2
section .text
global _start:
_start:
up:     scall 4,1,menu,menu_len
     scall 3,0,choice,2    
    
cmp byte[choice],'1'
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here