Professional Documents
Culture Documents
Yash CoA2
Yash CoA2
Lab Assignment -2
1. Write program to read a number from the keyboard and display it on the screen
section .data ;Data segment
userMsg db 'Please enter a number: ' ;Ask the user to enter a number
lenUserMsg equ $-userMsg ;The length of the message
dispMsg db 'You have entered: '
lenDispMsg equ $-dispMsg
1
0801IT211098
2. Write a program to store a number in the data section of the memory, then change its value to
another number programmatically and displays both the numbers.
section .text
global _start ;must be declared for linker (ld)
_start: ;tell linker entry point
section .data
num db '35 '