about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--baremetal/101screen.subx2
-rw-r--r--baremetal/102keyboard.subx3
-rw-r--r--baremetal/103grapheme.subx4
-rw-r--r--baremetal/108write.subx1
-rw-r--r--baremetal/112read-byte.subx1
-rw-r--r--baremetal/115write-byte.subx1
-rw-r--r--baremetal/120allocate.subx1
-rw-r--r--baremetal/313index-bounds-check.subx2
-rw-r--r--baremetal/ex1.subx2
-rw-r--r--baremetal/ex2.subx2
10 files changed, 19 insertions, 0 deletions
diff --git a/baremetal/101screen.subx b/baremetal/101screen.subx
index fb87709c..225efeec 100644
--- a/baremetal/101screen.subx
+++ b/baremetal/101screen.subx
@@ -1,5 +1,7 @@
 # Primitives for screen control.
 
+== code
+
 pixel:  # screen: (addr screen), x: int, y: int, color: int
     # . prologue
     55/push-ebp
diff --git a/baremetal/102keyboard.subx b/baremetal/102keyboard.subx
index 7913d449..b047a7c2 100644
--- a/baremetal/102keyboard.subx
+++ b/baremetal/102keyboard.subx
@@ -1,5 +1,8 @@
 # check keyboard for a key
 # return 0 on no keypress or unrecognized key
+
+== code
+
 read-key:  # kbd: (addr keyboard) -> result/eax: byte
     # . prologue
     55/push-ebp
diff --git a/baremetal/103grapheme.subx b/baremetal/103grapheme.subx
index a536bfed..9b19884f 100644
--- a/baremetal/103grapheme.subx
+++ b/baremetal/103grapheme.subx
@@ -1,3 +1,7 @@
+# Use the built-in font to draw a grapheme to screen.
+
+== code
+
 draw-grapheme:  # screen: (addr screen), g: grapheme, x: int, y: int, color: int
     # . prologue
     55/push-ebp
diff --git a/baremetal/108write.subx b/baremetal/108write.subx
index e97cbc1f..91a5e680 100644
--- a/baremetal/108write.subx
+++ b/baremetal/108write.subx
@@ -1,3 +1,4 @@
+== code
 #   instruction                     effective address                                                   register    displacement    immediate
 # . op          subop               mod             rm32          base        index         scale       r32
 # . 1-3 bytes   3 bits              2 bits          3 bits        3 bits      3 bits        2 bits      2 bits      0/1/2/4 bytes   0/1/2/4 bytes
diff --git a/baremetal/112read-byte.subx b/baremetal/112read-byte.subx
index 73ea3c87..e6a54fdd 100644
--- a/baremetal/112read-byte.subx
+++ b/baremetal/112read-byte.subx
@@ -1,3 +1,4 @@
+== code
 #   instruction                     effective address                                                   register    displacement    immediate
 # . op          subop               mod             rm32          base        index         scale       r32
 # . 1-3 bytes   3 bits              2 bits          3 bits        3 bits      3 bits        2 bits      2 bits      0/1/2/4 bytes   0/1/2/4 bytes
diff --git a/baremetal/115write-byte.subx b/baremetal/115write-byte.subx
index 32245116..d69663bc 100644
--- a/baremetal/115write-byte.subx
+++ b/baremetal/115write-byte.subx
@@ -1,3 +1,4 @@
+== code
 #   instruction                     effective address                                                   register    displacement    immediate
 # . op          subop               mod             rm32          base        index         scale       r32
 # . 1-3 bytes   3 bits              2 bits          3 bits        3 bits      3 bits        2 bits      2 bits      0/1/2/4 bytes   0/1/2/4 bytes
diff --git a/baremetal/120allocate.subx b/baremetal/120allocate.subx
index fbe998bb..2aaa8e75 100644
--- a/baremetal/120allocate.subx
+++ b/baremetal/120allocate.subx
@@ -1,3 +1,4 @@
+== code
 #   instruction                     effective address                                                   register    displacement    immediate
 # . op          subop               mod             rm32          base        index         scale       r32
 # . 1-3 bytes   3 bits              2 bits          3 bits        3 bits      3 bits        2 bits      2 bits      0/1/2/4 bytes   0/1/2/4 bytes
diff --git a/baremetal/313index-bounds-check.subx b/baremetal/313index-bounds-check.subx
index 8380d741..4624a2ac 100644
--- a/baremetal/313index-bounds-check.subx
+++ b/baremetal/313index-bounds-check.subx
@@ -1,5 +1,7 @@
 # TODO: bring this back
 
+== code
+
 __check-mu-array-bounds:  # index: int, elem-size: int, arr-size: int, function-name: (addr array byte), array-name: (addr array byte)
     # . prologue
     55/push-ebp
diff --git a/baremetal/ex1.subx b/baremetal/ex1.subx
index 78bbe1ae..8a5dfdb7 100644
--- a/baremetal/ex1.subx
+++ b/baremetal/ex1.subx
@@ -10,6 +10,8 @@
 # Or:
 #   bochs -f baremetal/boot.bochsrc  # boot.bochsrc loads disk.img
 
+== code
+
 main:
   e9/jump main/disp32
 
diff --git a/baremetal/ex2.subx b/baremetal/ex2.subx
index 9a72d883..57806e34 100644
--- a/baremetal/ex2.subx
+++ b/baremetal/ex2.subx
@@ -10,6 +10,8 @@
 # Expected output:
 #   html/baremetal.png
 
+== code
+
 main:
   # ecx <- start of video memory
   8b/-> *0x7f28 1/r32/ecx