Write an assembly language program that displays the dollar

Write an assembly language program that displays the dollar sign ($) 10 times on the first line and 5 times on the second line.

SAMPLE:

section .text
   global_start   ;must be declared for linker (gcc)
         
_start:          ;tell linker entry point
   mov  edx,len  ;message length
   mov  ecx,msg  ;message to write
   mov  ebx,1    ;file descriptor (stdout)
   mov  eax,4    ;system call number (sys_write)
   int  0x80     ;call kernel
         
   mov  edx,9    ;message length
   mov  ecx,s2   ;message to write
   mov  ebx,1    ;file descriptor (stdout)
   mov  eax,4    ;system call number (sys_write)
   int  0x80     ;call kernel
         
   mov  eax,1    ;system call number (sys_exit)
   int  0x80     ;call kernel
         
section .data
msg db ‘Displaying 9 stars’,0xa ;a message
len equ $ – msg  ;length of message
s2 times 9 db ‘*’
When the above code is compiled and executed, it produces the following result −

 

Stressed over that homework?

Essay deadline breathing down your neck?

Let’s cut to the chase: Why struggle when you can ace it with zero hassle?

Whether it’s essays, research papers, or assignments — we’ve got you covered.

✅ Expert writers
✅ 100% original work
✅ No AI tools, just real pros

Stressed about your essay or homework? Get a top-quality custom essay NOW!!! Stop worrying. Start succeeding.

GradeEssays.com
We are GradeEssays.com, the best college essay writing service. We offer educational and research assistance to assist our customers in managing their academic work. At GradeEssays.com, we promise quality and 100% original essays written from scratch.
Contact Us

Enjoy 24/7 customer support for any queries or concerns you have.

Phone: +1 213 3772458

Email: support@gradeessays.com

© 2020 -2025 GradeEssays.com. All rights reserved.

WE HAVE A GIFT FOR YOU!

15% OFF 🎁

Get 15% OFF on your order with us

Scroll to Top