diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-07-16 08:09:42 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-07-16 08:28:56 -0700 |
commit | 44d26b77c45668c9b0c99894a4294cec004361fe (patch) | |
tree | 68a5dcd4971873efd4ce184e9bf9a531c2161813 /apps/ex4.mu | |
parent | ac45f097153afd3a89f43886e4124c5b2c26b98a (diff) | |
download | mu-44d26b77c45668c9b0c99894a4294cec004361fe.tar.gz |
.
Diffstat (limited to 'apps/ex4.mu')
-rw-r--r-- | apps/ex4.mu | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/ex4.mu b/apps/ex4.mu new file mode 100644 index 00000000..9c3e28ee --- /dev/null +++ b/apps/ex4.mu @@ -0,0 +1,14 @@ +# Draw a character using the built-in font (GNU unifont) +# +# To build a disk image: +# ./translate apps/ex4.mu # emits code.img +# To run: +# qemu-system-i386 code.img +# Or: +# bochs -f bochsrc # bochsrc loads code.img +# +# Expected output: letter 'A' in green near the top-left corner of screen + +fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk) { + draw-code-point screen, 0x41/A, 2/row, 1/col, 0xa/fg, 0/bg +} |