mu/apps/ex4.mu

15 lines
524 B
Forth
Raw Normal View History

# Draw a character using the built-in font (GNU unifont)
#
# To build a disk image:
2021-07-16 15:09:42 +00:00
# ./translate apps/ex4.mu # emits code.img
# To run:
2021-04-17 03:26:42 +00:00
# qemu-system-i386 code.img
#
# Expected output: letter 'A' in green near the top-left corner of screen
2021-03-28 00:47:23 +00:00
fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk) {
var dummy/eax: int <- draw-code-point screen, 0x41/A, 2/row, 1/col, 0xa/fg, 0/bg
2021-08-29 08:04:26 +00:00
# wide glyph
#? var dummy/eax: int <- draw-code-point screen, 0x1b/esc, 2/row, 1/col, 0xa/fg, 0/bg
}