link all examples to header
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#apm */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#apm */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-color */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-examples */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
PRINT_STRING $msg
|
PRINT_STRING $msg
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-clear-screen */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-color */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-examples */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
CLEAR
|
CLEAR
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-detect-memory */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
CLEAR
|
CLEAR
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-disk-load */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
CLEAR
|
CLEAR
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-disk-load */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
CLEAR
|
CLEAR
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-hello-world */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
DBG
|
DBG
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-initial-state */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
.macro INITIAL_STORE x
|
.macro INITIAL_STORE x
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-keyboard */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
mov $0x00, %ah
|
mov $0x00, %ah
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-keyboard */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
start:
|
start:
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-examples */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
PRINT_STRING $msg
|
PRINT_STRING $msg
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-draw-pixel */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
/* Enter video mode 13h. */
|
/* Enter video mode 13h. */
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-draw-pixel */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
mov $0x0013, %ax
|
mov $0x0013, %ax
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-examples */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
/* 40 == ASCII for '@'
|
/* 40 == ASCII for '@'
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-scroll */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-sleep */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
/* Must enable interrupts, since BIOS uses
|
/* Must enable interrupts, since BIOS uses
|
||||||
|
|||||||
2
cs.S
2
cs.S
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#cs */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
CLEAR
|
CLEAR
|
||||||
|
|||||||
2
idt.S
2
idt.S
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#idt */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
STAGE2
|
STAGE2
|
||||||
|
|||||||
2
idt1.S
2
idt1.S
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#idt */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
STAGE2
|
STAGE2
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#idt-divide-by-zero */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
STAGE2
|
STAGE2
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#infinite-loop */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
loop:
|
loop:
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#interrupts */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
CLEAR
|
CLEAR
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#interrupts */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
CLEAR
|
CLEAR
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#ps-2-keyboard */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
CLEAR
|
CLEAR
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#interrupts */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
CLEAR
|
CLEAR
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#interrupts */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
CLEAR
|
CLEAR
|
||||||
|
|||||||
2
lidt.S
2
lidt.S
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#lidt */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
CLEAR
|
CLEAR
|
||||||
|
|||||||
2
lidt0.S
2
lidt0.S
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#lidt */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
CLEAR
|
CLEAR
|
||||||
|
|||||||
2
lidt2.S
2
lidt2.S
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#lidt */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
CLEAR
|
CLEAR
|
||||||
|
|||||||
2
min.S
2
min.S
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#minimal-gas-example */
|
||||||
|
|
||||||
/* Tell GAS to generate 16 bit code. */
|
/* Tell GAS to generate 16 bit code. */
|
||||||
.code16
|
.code16
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#page-fault */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|||||||
2
paging.S
2
paging.S
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples# */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples# */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|||||||
2
pit.S
2
pit.S
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples# */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples# */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
IVT_PIT_SETUP
|
IVT_PIT_SETUP
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples# */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
STAGE2
|
STAGE2
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples# */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
CLEAR
|
CLEAR
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples# */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
CLEAR
|
CLEAR
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples# */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
CLEAR
|
CLEAR
|
||||||
|
|||||||
2
reboot.S
2
reboot.S
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples# */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
ljmpw $0xF000, $0XFFF0
|
ljmpw $0xF000, $0XFFF0
|
||||||
|
|||||||
2
rtc.S
2
rtc.S
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples# */
|
||||||
|
|
||||||
/* TODO what do those numbers mean? Where is this all documented? */
|
/* TODO what do those numbers mean? Where is this all documented? */
|
||||||
.equ RTCaddress, 0x70
|
.equ RTCaddress, 0x70
|
||||||
.equ RTCdata, 0x71
|
.equ RTCdata, 0x71
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples# */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|||||||
2
smp.S
2
smp.S
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples# */
|
||||||
|
|
||||||
/* Must be a multiple of 0x1000. */
|
/* Must be a multiple of 0x1000. */
|
||||||
.equ STARTUP_CODE_ADDRESS, 0x1000
|
.equ STARTUP_CODE_ADDRESS, 0x1000
|
||||||
.equ SPINLOCK_ADDRESS, 0x2000
|
.equ SPINLOCK_ADDRESS, 0x2000
|
||||||
|
|||||||
2
ss.S
2
ss.S
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples# */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
/* Save the good sp for later. */
|
/* Save the good sp for later. */
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples# */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
hlt
|
hlt
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples# */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
STAGE2
|
STAGE2
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples# */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
IVT_PIT_SETUP
|
IVT_PIT_SETUP
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples# */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
CLEAR
|
CLEAR
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* https://github.com/cirosantilli/x86-bare-metal-examples# */
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
BEGIN
|
BEGIN
|
||||||
CLEAR
|
CLEAR
|
||||||
|
|||||||
Reference in New Issue
Block a user