ALP to print the given alphanumeric characters (32-bit)
kw.asm
section.datatitledb"———————————————————————————————————————————"db10,"ALPtoprintthegivenalphanumericcharacters"
db 10, "———————————————————————————————————————————",10title_len equ$-titleinputdb10,"Entercharacters"input_len equ$-inputoutputdb10,"Givencharactersare"output_len equ$-outputenddb"———————————————————————————————————————————",10end_len equ$-endsection.bssnumresb5section.textglobal_start_start:moveax,4movebx,1movecx,titlemovedx,title_lenint80hmoveax,4movebx,1movecx,inputmovedx,input_lenint80hmoveax,3movebx,2movecx,nummovedx,51int80hmoveax,4movebx,1movecx,outputmovedx,output_lenint80hmoveax,4movebx,1movecx,nummovedx,51int80hmoveax,4movebx,1movecx,endmovedx,end_lenint80hexit:movebx,0moveax,1int80h
Output
kodingwindow@kw:~$ nasm -felf64 kw.asm kodingwindow@kw:~$ ld kw.o && ./a.out
———————————————————————————————————————————
ALP to print the given alphanumeric characters
———————————————————————————————————————————
Enter characters HELLO @WORLD
Given characters are HELLO @WORLD
———————————————————————————————————————————
kodingwindow@kw:~$
ALP to print the given alphanumeric characters using macro (32-bit)
kodingwindow@kw:~$ nasm -felf64 kw.asm kodingwindow@kw:~$ ld kw.o && ./a.out
———————————————————————————————————————————
ALP to print the given alphanumeric characters
———————————————————————————————————————————
Enter characters HELLO, @WORLD!
Given characters are HELLO, @WORLD!
———————————————————————————————————————————
kodingwindow@kw:~$
Dear User, Thank you for visitng KodingWindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.