Introduction to 80x86 Assembly Language and Computer Architecture” by R. C. Detmer, 2. ed. 2006.

boot sector means they got the code under 512 bytes boot sector basic programming boot sector games


x86 forth

RISC V nice little interpeter to play with

# it's the sum of 1 to n
addi a0, x0, 4
addi t0, x0, 0
addi t1, x0, 1
  add t0,a0,t0
  sub a0, a0, t1
  #jal x0, loop
  bne a0, x0, loop notes nice cheatsheet of instructions, registers registers

  • a0 a1 are arguments nad returns values
  • t0-t are temporaries
  • x0 or zero is zero register
  • equivalent floating point just add f.
  • s0 .. saved resgiters

instructions Seems like really good intro to assembly

example risc5 programs. sort, search. vector matrix mult, string copy.

  • Art of Assembly DOS version. Good stuff in here. Some ways of implementing function calls I’d never considered