section.datatitledb"———————————————————————————"db10,"ALPtoprintthestars"
db 10, "———————————————————————————",10len:equ$-titlestartimes10db"*"enddb10,"———————————————————————————",10end_len equ$-endsection.textglobal_start_start:moveax,4movebx,1movecx,titlemovedx,lenint80hmoveax,4movebx,1movecx,starmovedx,10int80hmoveax,4movebx,1movecx,endmovedx,end_lenint80hexit:movebx,0moveax,1int80h
Output
codeaft@codeaft:~$ nasm -felf64 codeaft.asm codeaft@codeaft:~$ ld codeaft.o && ./a.out
———————————————————————————
ALP to print the stars
———————————————————————————
**********
———————————————————————————
codeaft@codeaft:~$
Dear User, Thank you for visitng Codeaft. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.