about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2021-01-09 15:38:03 -0800
committerKartik Agaram <vc@akkartik.com>2021-01-09 18:20:28 -0800
commitdbd7082a0ed09ee06401d0af06ce24e89e87b189 (patch)
treef71f3886e0c99e7ea1e8a1c5bc6356501582683b
parent952ccfc66e829f04978bb107407a1e97d49fc9e2 (diff)
downloadmu-dbd7082a0ed09ee06401d0af06ce24e89e87b189.tar.gz
7489 - include GNU Unifont
https://en.wikipedia.org/wiki/GNU_Unifont#The_.hex_font_format
http://unifoundry.com/unifont/index.html

Since GNU Unifont is covered under the GPL v2, so I believe is this repo.
-rw-r--r--LICENSE.txt283
-rwxr-xr-xapps/survey_baremetalbin51155 -> 51155 bytes
-rw-r--r--apps/survey_baremetal.subx34
-rw-r--r--baremetal/README.md2
-rw-r--r--baremetal/boot.hex251
-rw-r--r--baremetal/ex1.hex4
-rw-r--r--baremetal/ex2.hex2
-rw-r--r--baremetal/ex3.hex2
8 files changed, 552 insertions, 26 deletions
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 00000000..ecaae0f0
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,283 @@
+GPL VERSION 2
+-------------
+
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
diff --git a/apps/survey_baremetal b/apps/survey_baremetal
index 879889b7..6d1af44d 100755
--- a/apps/survey_baremetal
+++ b/apps/survey_baremetal
Binary files differdiff --git a/apps/survey_baremetal.subx b/apps/survey_baremetal.subx
index fbb79b68..7b0815ba 100644
--- a/apps/survey_baremetal.subx
+++ b/apps/survey_baremetal.subx
@@ -7,7 +7,7 @@
 #
 # The expected input is a stream of bytes and some interspersed labels.
 # Comments and '==' segment headers are allowed, but ignored. The emitted code
-# will all lie in a single header, and start at address 0x8800.
+# will all lie in a single header, and start at address 0x9000.
 #   $ cat x
 #   == code
 #   l1:
@@ -197,7 +197,7 @@ test-subx-survey-computes-addresses:
     #     01
     #
     # trace contains (in any order):
-    #   label x is at address 0x8805
+    #   label x is at address 0x9005
     #
     # . prologue
     55/push-ebp
@@ -315,10 +315,10 @@ test-subx-survey-computes-addresses:
 #?     # . . discard args
 #?     81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
 #?     # }}}
-    # . check-trace-contains("label 'x' is at address 0x00008805.", msg)
+    # . check-trace-contains("label 'x' is at address 0x00009005.", msg)
     # . . push args
     68/push  "F - test-subx-survey-computes-addresses/0"/imm32
-    68/push  "label 'x' is at address 0x00008805."/imm32
+    68/push  "label 'x' is at address 0x00009005."/imm32
     # . . call
     e8/call  check-trace-contains/disp32
     # . . discard args
@@ -330,7 +330,7 @@ test-subx-survey-computes-addresses:
 
 compute-offsets:  # in: (addr stream byte), labels: (addr stream {(handle array byte), address})
     # pseudocode:
-    #   var current-address = 0x8800
+    #   var current-address = 0x9000
     #   var line: (stream byte 512)
     #   while true                                  # line loop
     #     clear-stream(line)
@@ -362,8 +362,8 @@ compute-offsets:  # in: (addr stream byte), labels: (addr stream {(handle array
     53/push-ebx
     56/push-esi
     57/push-edi
-    # var current-address/esi: int = 0x8800
-    be/copy-to-esi  0x8800/imm32
+    # var current-address/esi: int = 0x9000
+    be/copy-to-esi  0x9000/imm32
     # var line/ecx: (stream byte 512)
     81          5/subop/subtract    3/mod/direct    4/rm32/esp    .           .             .           .           .               0x200/imm32       # subtract from esp
     68/push  0x200/imm32/size
@@ -595,7 +595,7 @@ test-compute-offsets:
     #     34
     #
     # trace contains (in any order):
-    #   label 'x' is at address 0x8806.
+    #   label 'x' is at address 0x9006.
     #
     # . prologue
     55/push-ebp
@@ -697,10 +697,10 @@ test-compute-offsets:
 #?     # . . discard args
 #?     81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
 #?     # }}}
-    # . check-trace-contains("label 'x' is at address 0x00008806.", msg)
+    # . check-trace-contains("label 'x' is at address 0x00009006.", msg)
     # . . push args
     68/push  "F - test-compute-offsets"/imm32
-    68/push  "label 'x' is at address 0x00008806."/imm32
+    68/push  "label 'x' is at address 0x00009006."/imm32
     # . . call
     e8/call  check-trace-contains/disp32
     # . . discard args
@@ -732,7 +732,7 @@ emit-output:datum:  # slice
 
 emit-output:  # in: (addr stream byte), out: (addr buffered-file), labels: (addr stream {(handle array byte), address})
     # pseudocode:
-    #   var address-of-next-instruction = 0x8800
+    #   var address-of-next-instruction = 0x9000
     #   var line: (stream byte 512)
     #   line-loop:
     #   while true
@@ -803,8 +803,8 @@ emit-output:  # in: (addr stream byte), out: (addr buffered-file), labels: (addr
     68/push  0/imm32/end
     68/push  0/imm32/start
     89/copy                         3/mod/direct    2/rm32/edx    .           .             .           4/r32/esp   .               .                 # copy esp to edx
-    # var address-of-next-instruction/ebx = 0x8800
-    bb/copy-to-ebx  0x8800/imm32
+    # var address-of-next-instruction/ebx = 0x9000
+    bb/copy-to-ebx  0x9000/imm32
 $emit-output:line-loop:
     # clear-stream(line)
     # . . push args
@@ -1491,12 +1491,12 @@ test-emit-output-code-label:
     #     ef gh
     #     e8 l1/disp32
     #   labels:
-    #     - 'l1': 0x8810
+    #     - 'l1': 0x9010
     #
     # output:
     #   ab cd
     #   ef gh
-    #   e8 07 00 00 00  # 0x8810 - 0x8809 = 7
+    #   e8 07 00 00 00  # 0x9010 - 0x9009 = 7
     #
     # . prologue
     55/push-ebp
@@ -1566,8 +1566,8 @@ test-emit-output-code-label:
     e8/call  write/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
-    # . stream-add2(labels, "l1", 0x8810)
-    68/push  0x8810/imm32/label-address
+    # . stream-add2(labels, "l1", 0x9010)
+    68/push  0x9010/imm32/label-address
     # . . push handle for "l1"
     53/push-ebx
     68/push  "l1"/imm32
diff --git a/baremetal/README.md b/baremetal/README.md
index 4d1c2876..96e7c900 100644
--- a/baremetal/README.md
+++ b/baremetal/README.md
@@ -30,7 +30,7 @@ operating systems. There's also currently no code/data segment separation,
 just labels and bytes. I promise not to write self-modifying code. Security
 and sandboxing is still an open question.
 
-Most programs here assume `main` starts at address 0x8800 (3KB or 6 disk
+Most programs here assume `main` starts at address 0x9000 (7KB or 14 disk
 sectors past the BIOS entrypoint). See baremetal/boot.hex for details.
 
 So far the programs have only been tested in Qemu and Bochs emulators.
diff --git a/baremetal/boot.hex b/baremetal/boot.hex
index f6ded4aa..3f78ca7a 100644
--- a/baremetal/boot.hex
+++ b/baremetal/boot.hex
@@ -1,4 +1,4 @@
-# Code for the first 2 disk sectors, that all programs in this directory need:
+# Code for the first disk sector that all programs in this directory need:
 #   - load sectors past the first (using BIOS primitives) since only the first is available by default
 #     - if this fails, print 'D' at top-left of screen and halt
 #   - initialize a minimal graphics mode
@@ -31,7 +31,7 @@
 #   - can't use any syscalls
 #   - can't print text to video memory (past these boot sectors)
 #   - must only print raw pixels (256 colors) to video memory (resolution 1024x768)
-#   - must store their entry-point at address 0x8800
+#   - must store their entry-point at address 0x9000
 
 ## 16-bit entry point
 
@@ -64,7 +64,7 @@
   b5 00  # ch <- 0  # cylinder 0
   b6 00  # dh <- 0  # track 0
   b1 02  # cl <- 2  # second sector, 1-based
-  b0 10  # al <- 16  # number of sectors to read; all sectors must be in a single track
+  b0 20  # al <- 32  # number of sectors to read; all sectors must be in a single track
   # address to write sectors to = es:bx = 0x7e00, contiguous with boot segment
   bb 00 00  # bx <- 0
   8e c3  # es <- bx
@@ -205,7 +205,7 @@ e9 fb ff  # loop forever
 
   # initialization is done; enable interrupts
   fb
-  e9 01 0b 00 00  # jump to 0x8800 [label]
+  e9 01 13 00 00  # jump to 0x9000 [label]
 
 # padding
 # ff:
@@ -428,7 +428,10 @@ e9 fb ff  # loop forever
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
+## the rest of this file has data
+
 # offset 400 (address 0x8000):
+# translating keys to ASCII {{{
 # keyboard normal map:
 00
 #  es
@@ -585,6 +588,246 @@ e9 fb ff  # loop forever
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+# }}}
+
 # offset c00 (address 0x8800)
+# Bitmaps for some ASCII characters (soon Unicode) {{{
+# Part of GNU Unifont
+# 8px wide, 16px tall
+# Based on http://unifoundry.com/pub/unifont/unifont-13.0.05/font-builds/unifont-13.0.05.hex.gz
+# See https://en.wikipedia.org/wiki/GNU_Unifont#The_.hex_font_format
+# Website: http://unifoundry.com/unifont/index.html
+# License: http://unifoundry.com/LICENSE.txt (GPL v2)
+# Each line below is a bitmap for a single character.
+#   Each byte is a bitmap for a single row of 8 pixels.
+
+# some unprintable ASCII chars
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+# 0x20 = space
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+# !
+  00 00 00 00 08 08 08 08 08 08 08 00 08 08 00 00
+# "
+  00 00 22 22 22 22 00 00 00 00 00 00 00 00 00 00
+# 0x23 = '#'
+  00 00 00 00 12 12 12 7e 24 24 7e 48 48 48 00 00
+# $
+  00 00 00 00 08 3e 49 48 38 0e 09 49 3e 08 00 00
+# %
+  00 00 00 00 31 4a 4a 34 08 08 16 29 29 46 00 00
+# &
+  00 00 00 00 1c 22 22 14 18 29 45 42 46 39 00 00
+# '
+  00 00 08 08 08 08 00 00 00 00 00 00 00 00 00 00
+# (
+  00 00 00 04 08 08 10 10 10 10 10 10 08 08 04 00
+# )
+  00 00 00 20 10 10 08 08 08 08 08 08 10 10 20 00
+# *
+  00 00 00 00 00 00 08 49 2a 1c 2a 49 08 00 00 00
+# +
+  00 00 00 00 00 00 08 08 08 7f 08 08 08 00 00 00
+# ,
+  00 00 00 00 00 00 00 00 00 00 00 00 18 08 08 10
+# -
+  00 00 00 00 00 00 00 00 00 3c 00 00 00 00 00 00
+# .
+  00 00 00 00 00 00 00 00 00 00 00 00 18 18 00 00
+# /
+  00 00 00 00 02 02 04 08 08 10 10 20 40 40 00 00
+# 0x30 = '0'
+  00 00 00 00 18 24 42 46 4a 52 62 42 24 18 00 00
+# 1
+  00 00 00 00 08 18 28 08 08 08 08 08 08 3e 00 00
+# 2
+  00 00 00 00 3c 42 42 02 0c 10 20 40 40 7e 00 00
+# 3
+  00 00 00 00 3c 42 42 02 1c 02 02 42 42 3c 00 00
+# 4
+  00 00 00 00 04 0c 14 24 44 44 7e 04 04 04 00 00
+# 5
+  00 00 00 00 7e 40 40 40 7c 02 02 02 42 3c 00 00
+# 6
+  00 00 00 00 1c 20 40 40 7c 42 42 42 42 3c 00 00
+# 7
+  00 00 00 00 7e 02 02 04 04 04 08 08 08 08 00 00
+# 8
+  00 00 00 00 3c 42 42 42 3c 42 42 42 42 3c 00 00
+# 9
+  00 00 00 00 3c 42 42 42 3e 02 02 02 04 38 00 00
+# :
+  00 00 00 00 00 00 18 18 00 00 00 18 18 00 00 00
+# ;
+  00 00 00 00 00 00 18 18 00 00 00 18 08 08 10 00
+# <
+  00 00 00 00 00 02 04 08 10 20 10 08 04 02 00 00
+# =
+  00 00 00 00 00 00 00 7e 00 00 00 7e 00 00 00 00
+# >
+  00 00 00 00 00 40 20 10 08 04 08 10 20 40 00 00
+# ?
+  00 00 00 00 3c 42 42 02 04 08 08 00 08 08 00 00
+# 0x40 = @
+  00 00 00 00 1c 22 4a 56 52 52 52 4e 20 1e 00 00
+# A
+  00 00 00 00 18 24 24 42 42 7e 42 42 42 42 00 00
+# B
+  00 00 00 00 7c 42 42 42 7c 42 42 42 42 7c 00 00
+# C
+  00 00 00 00 3c 42 42 40 40 40 40 42 42 3c 00 00
+# D
+  00 00 00 00 78 44 42 42 42 42 42 42 44 78 00 00
+# E
+  00 00 00 00 7e 40 40 40 7c 40 40 40 40 7e 00 00
+# F
+  00 00 00 00 7e 40 40 40 7c 40 40 40 40 40 00 00
+# G
+  00 00 00 00 3c 42 42 40 40 4e 42 42 46 3a 00 00
+# H
+  00 00 00 00 42 42 42 42 7e 42 42 42 42 42 00 00
+# I
+  00 00 00 00 3e 08 08 08 08 08 08 08 08 3e 00 00
+# J
+  00 00 00 00 1f 04 04 04 04 04 04 44 44 38 00 00
+# K
+  00 00 00 00 42 44 48 50 60 60 50 48 44 42 00 00
+# L
+  00 00 00 00 40 40 40 40 40 40 40 40 40 7e 00 00
+# M
+  00 00 00 00 42 42 66 66 5a 5a 42 42 42 42 00 00
+# N
+  00 00 00 00 42 62 62 52 52 4a 4a 46 46 42 00 00
+# O
+  00 00 00 00 3c 42 42 42 42 42 42 42 42 3c 00 00
+# 0x50 = P
+  00 00 00 00 7c 42 42 42 7c 40 40 40 40 40 00 00
+# Q
+  00 00 00 00 3c 42 42 42 42 42 42 5a 66 3c 03 00
+# R
+  00 00 00 00 7c 42 42 42 7c 48 44 44 42 42 00 00
+# S
+  00 00 00 00 3c 42 42 40 30 0c 02 42 42 3c 00 00
+# T
+  00 00 00 00 7f 08 08 08 08 08 08 08 08 08 00 00
+# U
+  00 00 00 00 42 42 42 42 42 42 42 42 42 3c 00 00
+# V
+  00 00 00 00 41 41 41 22 22 22 14 14 08 08 00 00
+# W
+  00 00 00 00 42 42 42 42 5a 5a 66 66 42 42 00 00
+# X
+  00 00 00 00 42 42 24 24 18 18 24 24 42 42 00 00
+# Y
+  00 00 00 00 41 41 22 22 14 08 08 08 08 08 00 00
+# Z
+  00 00 00 00 7e 02 02 04 08 10 20 40 40 7e 00 00
+# [
+  00 00 00 0e 08 08 08 08 08 08 08 08 08 08 0e 00
+# \
+  00 00 00 00 40 40 20 10 10 08 08 04 02 02 00 00
+# ]
+  00 00 00 70 10 10 10 10 10 10 10 10 10 10 70 00
+# ^
+  00 00 18 24 42 00 00 00 00 00 00 00 00 00 00 00
+# _
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 00
+# 0x60 = backtick
+  00 20 10 08 00 00 00 00 00 00 00 00 00 00 00 00
+# a
+  00 00 00 00 00 00 3c 42 02 3e 42 42 46 3a 00 00
+# b
+  00 00 00 40 40 40 5c 62 42 42 42 42 62 5c 00 00
+# c
+  00 00 00 00 00 00 3c 42 40 40 40 40 42 3c 00 00
+# d
+  00 00 00 02 02 02 3a 46 42 42 42 42 46 3a 00 00
+# e
+  00 00 00 00 00 00 3c 42 42 7e 40 40 42 3c 00 00
+# f
+  00 00 00 0c 10 10 10 7c 10 10 10 10 10 10 00 00
+# g
+  00 00 00 00 00 02 3a 44 44 44 38 20 3c 42 42 3c
+# h
+  00 00 00 40 40 40 5c 62 42 42 42 42 42 42 00 00
+# i
+  00 00 00 08 08 00 18 08 08 08 08 08 08 3e 00 00
+# j
+  00 00 00 04 04 00 0c 04 04 04 04 04 04 04 48 30
+# k
+  00 00 00 40 40 40 44 48 50 60 50 48 44 42 00 00
+# l
+  00 00 00 18 08 08 08 08 08 08 08 08 08 3e 00 00
+# m
+  00 00 00 00 00 00 76 49 49 49 49 49 49 49 00 00
+# n
+  00 00 00 00 00 00 5c 62 42 42 42 42 42 42 00 00
+# o
+  00 00 00 00 00 00 3c 42 42 42 42 42 42 3c 00 00
+# 0x70 = p
+  00 00 00 00 00 00 5c 62 42 42 42 42 62 5c 40 40
+# q
+  00 00 00 00 00 00 3a 46 42 42 42 42 46 3a 02 02
+# r
+  00 00 00 00 00 00 5c 62 42 40 40 40 40 40 00 00
+# s
+  00 00 00 00 00 00 3c 42 40 30 0c 02 42 3c 00 00
+# t
+  00 00 00 00 10 10 10 7c 10 10 10 10 10 0c 00 00
+# u
+  00 00 00 00 00 00 42 42 42 42 42 42 46 3a 00 00
+# v
+  00 00 00 00 00 00 42 42 42 24 24 24 18 18 00 00
+# w
+  00 00 00 00 00 00 41 49 49 49 49 49 49 36 00 00
+# x
+  00 00 00 00 00 00 42 42 24 18 18 24 42 42 00 00
+# y
+  00 00 00 00 00 00 42 42 42 42 42 26 1a 02 02 3c
+# z
+  00 00 00 00 00 00 7e 02 04 08 10 20 40 7e 00 00
+# {
+  00 00 00 0c 10 10 08 08 10 20 10 08 08 10 10 0c
+# |
+  00 00 08 08 08 08 08 08 08 08 08 08 08 08 08 08
+# }
+  00 00 00 30 08 08 10 10 08 04 08 10 10 08 08 30
+# ~
+  00 00 00 31 49 46 00 00 00 00 00 00 00 00 00 00
+# 0x7f = del (unused)
+  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+# }}}
+
+# offset 1400 (address 0x9000)
 
 # vim:ft=subx
diff --git a/baremetal/ex1.hex b/baremetal/ex1.hex
index 8dadf0e2..49f6e446 100644
--- a/baremetal/ex1.hex
+++ b/baremetal/ex1.hex
@@ -13,7 +13,7 @@
 # Or:
 #   bochs -f baremetal/boot.bochsrc  # boot.bochsrc loads disk.img
 
-# main:  (address 0x8800)
-e9 fb ff ff ff  # jump to address 0x8800
+# main:  (address 0x9000)
+e9 fb ff ff ff  # jump to main, hanging indefinitely
 
 # vim:ft=subx
diff --git a/baremetal/ex2.hex b/baremetal/ex2.hex
index 52150b7f..439a0e03 100644
--- a/baremetal/ex2.hex
+++ b/baremetal/ex2.hex
@@ -13,7 +13,7 @@
 # Expected output:
 #   html/baremetal.png
 
-# main:  (address 0x8800)
+# main:  (address 0x9000)
 
 # ecx <- LFB
 8b  # copy *rm32 to r32
diff --git a/baremetal/ex3.hex b/baremetal/ex3.hex
index 92664a23..694de37d 100644
--- a/baremetal/ex3.hex
+++ b/baremetal/ex3.hex
@@ -11,7 +11,7 @@
 # Or:
 #   bochs -f baremetal/boot.bochsrc  # boot.bochsrc loads disk.img
 
-# main:  (address 0x8800)
+# main:  (address 0x9000)
 
 # eax <- LFB
 8b  # copy *rm32 to r32