Advertisement
obernardovieira

Basic code and cmds to Assembler the code

Feb 4th, 2015
519
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. section .text
  2.     global thisismymain
  3.  
  4. thisismymain:
  5.     mov eax, 0
  6.     ret
  7.  
  8. ;this program don't print anything but this is basic of the basic.
  9. ;It's not easy and I'm just starting.
  10. ;I compile in Windows with NASM, but also work in other platforms but you need to change thisismymain to _start
  11.  
  12. ;save it has basic.asm
  13. ;then open command line (you need to install NASM, just search on the web)
  14. ;
  15. ;nasm -f elf basic.asm
  16. ;ld -s -o basic.exe basic.o
  17. ;
  18. ;now, you just need to execute
  19. ;sorry for the empty program, soon I will post something printing text
  20. ;thanks to http://sudevshares.blogspot.pt/2012/01/running-your-first-assembly-language.html
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement