Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mchlmmc/x86-Assembly-Font-Renderer
Bootloader that draws characters from a 5x7px font
https://github.com/mchlmmc/x86-Assembly-Font-Renderer
assembly fileformat flat-assembler font intel-syntax rendering
Last synced: 7 days ago
JSON representation
Bootloader that draws characters from a 5x7px font
- Host: GitHub
- URL: https://github.com/mchlmmc/x86-Assembly-Font-Renderer
- Owner: mchlmmc
- Created: 2018-06-12T04:20:07.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-12T05:00:49.000Z (over 6 years ago)
- Last Synced: 2023-10-19T22:37:55.415Z (over 1 year ago)
- Topics: assembly, fileformat, flat-assembler, font, intel-syntax, rendering
- Language: Assembly
- Homepage:
- Size: 25.4 KB
- Stars: 5
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-typography - x86-Assembly-Font-Renderer - Bootloader that draws characters from a 5x7px font. (Assembly)
README
# Raster font renderer written entirely in Assembly
FASM-Enabled Intel x86 Assembly code, intended for usage in real-mode operating systems.**This code has only been tested on VirtualBox, not a physical computer. USE AT YOUR OWN DISCRETION!**
## Compiling
I assembled the `font.asm` file with Flat Assembler (https://flatassembler.net/) on Windows 10 with no Makefile. All of the programs that I used were:* flat assembler 1.71.39
* HxD 1.7.7.0
* VirtualBox 5.2.2Instead of writing a linker script, for some reason I manually copied the assembled version of font.asm into the first sector of a file I created, called font.img, using HxD upon each build. Then, I ran it in VirtualBox to see the result. No debugging tools were used.
While this code should work in Protected and Long Mode, I have not tested it under such running conditions yet.
## Output
If you run font.img in VirtualBox you can expect to see something very similar to below:![Demonstration Screenshot](https://github.com/Mikestylz/x86-Assembly-Font-Renderer/blob/master/demo.png)
**WARNING: This bootloader ends in a busy loop, so your computer fan might go crazy if you leave it running for too long.**
## Making your own font
Run the tool FontGenerator.cs in Visual Studio, Visual Studio Code, MonoDevelop etc to generate a new fontdata.bin from a font.txt file in the same running directory. Then, copy the contents of fontdata.bin to the first and second sectors of font.img. The format for font.txt should be rather intuitive, but if you do not understand it then there is a full outline in the FontGenerator.cs file.Use the following ASCII Table for reference if you are unfamiliar with the standard:
![ASCII Table](http://www.asciitable.com/index/asciifull.gif)