title: os-tutorial: porting from x86_64 to ARM Cortex A9
body: <p>For learning purpose I started this series of tutorials about writing an operating system from scratch:
  <a href="https://github.com/cfenollosa/os-tutorial" rel="nofollow noreferrer">os-tutorial</a></p>
  <p>The tutorial aims at x86_64 systems using NASM assembler. My goal is to translate the code in order to execute it on ARM systems using arm-none-eabi-as as the assembler. I understand the x86_64 code provided in the tutorial but I am struggling in the translation step.</p>
  <p>Are there any resources that could help me with the task?</p>
  <p>For example, how can I translate the following x86_64 code in ARM?</p>
  <pre><code>mov ah, 0x0e ;tty mode
  mov al, 'H'
  int 0x10
  mov al, 'e'
  int 0x10
  mov al, 'l'
  int 0x10
  int 0x10
  mov al, 'o'
  int 0x10
  
  loop:
      jmp loop ;infinite loop
  
  times 510-($-$$) db 0 ;write 510 minus previous code size 0
  
  dw 0xAA55 ;write an half word -- boot magic number
  </code></pre>