1. Perform the following data transfer operations
.section .data
value:
.int 42
.section .text
.globl _start
_start:
movl $100, %eax
movl %eax, %ebx
movl $1, %eax
movl $0, %ebx
int $0x80
2. 1. Consider the following source code fragment
Int a,b,c,d;
a= (b + c)-d + (b*c) / d;
Registration Number: 23ETCS002165
• Assume that b, c, d are in registers. Develop an assembly language program to perform
this assignment statements.
• Assume that b is in registers and c, d in memory. Develop an assembly language
program to perform this assignment statements.
Value of b= 7654
Value of c= 3110
Value of d=234
.section .text
.globl _start
_start:
movl $100, %eax
movl $200, %ebx
addl %eax, %ebx
movl %ebx, %eax
movl $2, %edx
mull %edx
movl $1, %eax
movl $0, %ebx
int $0x80
Comments
Post a Comment