ALP to print the ASCII hex to hexadecimal number (32-bit)
kw.asm
section.datatitledb"———————————————————————————————————————————"db10,"ALPfortheASCIIhextohexadecimalnumber"
db 10, "———————————————————————————————————————————",10len:equ$-titleNO:db10,30h,31h,32h,33h,34h,35h,36h,37h,38h,39h,41h,42h,43h,44h,45h,46h,47h,10enddb10,"———————————————————————————————————————————",10end_len equ$-endsection.textglobal_start_start:moveax,4movebx,1movecx,titlemovedx,lenint80hmoveax,4movebx,1movecx,NOmovedx,17int80hmoveax,4movebx,1movecx,endmovedx,end_lenint80hexit:movebx,0moveax,1int80h
Output
kodingwindow@kw:~$ nasm -felf64 kw.asm kodingwindow@kw:~$ ld kw.o && ./a.out
———————————————————————————————————————————
ALP for the ASCII hex to hexadecimal number
———————————————————————————————————————————
0123456789ABCDEF
———————————————————————————————————————————
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.