DGivney / assemblytutorials

This project was put together to teach myself NASM x86 assembly language on linux.
https://asmtutor.com/
654 stars 117 forks source link

The tutorial is not 64 bit nasm #14

Closed calvous closed 5 years ago

calvous commented 5 years ago

Thank you for this very explanatory tutorial. According to this: http://asmtutor.com/ I thought it is about 64bit nasm tutorial which it is not. Are you planning on continuing your awesome work on this? It is especially hard to find any information about how to print out itoa with the 64 bit version (not using printf). Seems to be a simple thing but I am completely lost. Chapter 10 and 11 won't work when compiled and linked in 64bits. Even though I've changed the registers to be compatible. I did days of investigation and am unable to figure it out.

Thank you

DGivney commented 5 years ago

Hi calvous

Thank you for your interest in this project.

My plan for these tutorials was to slowly move from the 32-bit syntax into the 64-bit syntax and eventually into a much more modern example of assembly on linux. Unfortunately time got the best of me and I never completed all the tutorials to show that. I'm still planning to continue work on this when I have some free time.

They do run on 64-bit systems so please answer the following questions and I'll try to help you get it working.

The following will compile lesson10 with Nasm, link it with the elf_i386 option and run it on 64bit systems. nasm -f elf helloworld-10.asm ld -m elf_i386 helloworld-10.o -o helloworld-10 ./helloworld-10

calvous commented 5 years ago

Hi DGivney, thanks for the response. I am just trying to get that "simple" thing done with printing a number sequence which is compared to another number scanned in with scanf function.

calvous commented 5 years ago

Found the solution here: https://www.youtube.com/watch?v=XuUD0WQ9kaE very descriptive.