User Tools

Site Tools


archi:x86

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
archi:x86 [2016/03/17 07:58] orelarchi:x86 [2024/03/18 15:06] (current) – external edit 127.0.0.1
Line 18: Line 18:
   * [[https://en.wikibooks.org/wiki/X86_Assembly/GAS_Syntax|Syntaxe GAS]]    * [[https://en.wikibooks.org/wiki/X86_Assembly/GAS_Syntax|Syntaxe GAS]] 
   * [[https://en.wikibooks.org/wiki/X86_Assembly|Assembleur x86]]   * [[https://en.wikibooks.org/wiki/X86_Assembly|Assembleur x86]]
 +  * Compiler Explorer: https://gcc.godbolt.org
  
 ====Exemple Hello World en GAS ==== ====Exemple Hello World en GAS ====
Line 352: Line 353:
   qemu-system-i386 -fda floppy.img -boot a   # boot on floppy disk   qemu-system-i386 -fda floppy.img -boot a   # boot on floppy disk
   qemu-system-i386 -hda floppy.img           # boot on hard disk     qemu-system-i386 -hda floppy.img           # boot on hard disk  
 +  
 +On peut également mettre son bootloader sur le premier secteur d'une clef USB : /dev/sdc sur ma machine (fdisk -l). Mais, attention de ne pas se tromper au risque de perdre toutes vos données !   
 +
 +  cat hello.bin > /dev/sdc
 +  
 +Puis on reboote la "vraie" machine avec la clef USB et voici le résultat. Notons que nous n'avons pas préparé de table des partitions, d'où le message affiché par le BIOS : //Invalid Partition Table// avant notre fameux //Hello World// :-)
 +
 +{{ :archi:helloboot-laptop.jpg?direct&300 |}}
  
 Pour aller plus loin :  Pour aller plus loin : 
Line 367: Line 376:
  
  
-==== Pour aller plus loin ====+==== Pour aller encore plus loin ====
  
   * http://viralpatel.net/taj/operating-system-tutorial.php   * http://viralpatel.net/taj/operating-system-tutorial.php
archi/x86.1458201500.txt.gz · Last modified: 2024/03/18 15:05 (external edit)