Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use G++ program in assembly language Extend the program to take care of word and double word add operations ; yasm -g dwarf2 -f elf64
Use G++ program in assembly language
Extend the program to take care of word and double word add operations ; yasm -g dwarf2 -f elf64 a1.asm - a1.lst ; ld-g -o a1 a1.o gdb./a1 gdb commands :b_start ; s ;p/x $al ; s :p section .data 0 EXIT SUCCESS equ SYS_exit equ 60 bvar1 db 17 bvar2 db 9 bvar3 db 0 wvar1 dw 17000 wvar2 dw 9000 wvar3 dw O dvar1 dd 17000000 dvar2 dd 9000000 dvar3 dd o qvar1 dw 17000 qvar2 dw 9000 qvar3 dw 0 section text global_start imov ax, word (wvarl] imov eax, dword (dvarl] _start: mov al, byte [bvar 1] add al, byte [bvar2] mov byte [bvar3], al _bye: mov rax, SYS_exit mov rdi, EXIT_SUCCESS syscall Extend the program to take care of word and double word add operations ; yasm -g dwarf2 -f elf64 a1.asm - a1.lst ; ld-g -o a1 a1.o gdb./a1 gdb commands :b_start ; s ;p/x $al ; s :p section .data 0 EXIT SUCCESS equ SYS_exit equ 60 bvar1 db 17 bvar2 db 9 bvar3 db 0 wvar1 dw 17000 wvar2 dw 9000 wvar3 dw O dvar1 dd 17000000 dvar2 dd 9000000 dvar3 dd o qvar1 dw 17000 qvar2 dw 9000 qvar3 dw 0 section text global_start imov ax, word (wvarl] imov eax, dword (dvarl] _start: mov al, byte [bvar 1] add al, byte [bvar2] mov byte [bvar3], al _bye: mov rax, SYS_exit mov rdi, EXIT_SUCCESS syscallStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started