From bcc833522cc25b7217e81644b804675ab19c1a63 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Fri, 14 Nov 2014 11:28:08 +0100 Subject: cleaning up directories and build system --- font/Makefile | 5 +++++ font/binarize.py | 40 ++++++++++++++++++++++++++++++++++++++++ font/fill.asm | 11 ----------- 3 files changed, 45 insertions(+), 11 deletions(-) create mode 100644 font/Makefile create mode 100644 font/binarize.py delete mode 100644 font/fill.asm (limited to 'font') diff --git a/font/Makefile b/font/Makefile new file mode 100644 index 0000000..f758bfd --- /dev/null +++ b/font/Makefile @@ -0,0 +1,5 @@ +############ fool-font ############ +binfont.bin: binfont.src + python binarize.py $< $@ +clean: + -rm binfont.bin diff --git a/font/binarize.py b/font/binarize.py new file mode 100644 index 0000000..6dcbdef --- /dev/null +++ b/font/binarize.py @@ -0,0 +1,40 @@ +# this is a simple script to convert the ascii files into binaries +# everything but 0 an 1 , or alternatively _ and X is ignored in +# source file. + +import binascii +import sys + + +f=open(sys.argv[1],'r') +o=open(sys.argv[2],'wb') + +print "binarizing " + sys.argv[1] + " to "+sys.argv[2] + "." + +b="" +l=0 + +while True: + + c=f.read(1) + + if not c: + break + + if c=="0" or c=='_': + l+=1 + b+="0" + + if c=="1" or c=='X': + l+=1 + b+="1" + + if l==8: +# print b + l=0 + o.write(chr(int(b,2))) + b="" + +o.close() + + diff --git a/font/fill.asm b/font/fill.asm deleted file mode 100644 index ce9cb5f..0000000 --- a/font/fill.asm +++ /dev/null @@ -1,11 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;;;;;; Miguel's FoolOS Helper Functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; -; -; fill an empty floppy disk -; -; - -;times 1474560 db 0x69 -times 14745600 db 0x69 -- cgit v1.2.3