summaryrefslogtreecommitdiff
path: root/font
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-11-14 11:28:08 +0100
committerMichal Idziorek <m.i@gmx.at>2014-11-14 11:28:08 +0100
commitbcc833522cc25b7217e81644b804675ab19c1a63 (patch)
tree4619a5fe5a3b0d41d600715e67388b2a56080430 /font
parent81c84c9cd22e0b6c56b90fa470dad55b9bb716e0 (diff)
cleaning up directories and build system
Diffstat (limited to 'font')
-rw-r--r--font/Makefile5
-rw-r--r--font/binarize.py40
-rw-r--r--font/fill.asm11
3 files changed, 45 insertions, 11 deletions
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