zlacker

[return to "Ask HN: Best blog tutorial explaining Assembly code?"]
1. westur+Q5[view] [source] 2023-12-26 15:23:16
>>whatam+(OP)
https://news.ycombinator.com/item?id=23930335#23931373 ; the HLA book: https://en.wikipedia.org/wiki/High_Level_Assembly

Code a sum function, Compile artifact1; Mutate/Change a line, Compile artifact2; and bindiff artifact1 artifact2

HLA is easier to follow than diffing to see what ASM gcc builds from C without flags to simplify the output bytecode. >>36454485

Learn X in Y minutes > MIPS Assembly: https://learnxinyminutes.com/docs/mips/

◧◩
2. westur+CO1[view] [source] 2023-12-27 04:35:12
>>westur+Q5
This is almost Hello World:

https://stackoverflow.com/questions/2246748/assembly-linking... ~:

  cat hello.asm
  # section .text
  #      jmp [rax]
  nasm -f elf64 hello.asm
  objdump -Sr hello.o
/? nasm helloworld: https://www.google.com/search?q=nasm+helloworld :

- https://www.devdungeon.com/content/hello-world-nasm-assemble... : succinct Hello World program; 32bit ; - [ ] port this to 64bit

- "NASM Tutorial" https://cs.lmu.edu/~ray/notes/nasmtutorial/ ; a good "blog tutorial explaining Assembly code" per OT

"What is better "int 0x80" or "syscall" [or "sysenter" or VDSO] in 32-bit code on Linux?" https://stackoverflow.com/questions/12806584/what-is-better-... links to https://stackoverflow.com/questions/12776340/system-calls-im... which links to the vDSO Wikipedia article, which explains that vDSO supports ASLR and is more portable than `int 80` (which is the old 32bit way to syscall)

vDSO: https://en.wikipedia.org/wiki/VDSO

"Linux Assembly HOWTO" http://tldp.org/HOWTO/Assembly-HOWTO/

[go to top]