From: "Rick A. Hohensee" <rickh@capaccess.org>
To: linux-kernel@vger.kernel.org
Subject: RAWBIT font
Date: Thu, 26 Jun 2003 15:57:12 -0400 [thread overview]
Message-ID: <fc.0010c7b200939d750010c7b200939d75.939d7c@capaccess.org> (raw)
alancox=/dev/null
echo "
If you source this file into your Bash shell, and maybe other post-Korn
shells, it should make a VGA font file named RAWBIT.VGAfont, using no
programs external to Bash. RAWBIT.VGAfont is a degenerate font that's 9
lines high and each glyph is vertical bitbars in the pattern of the ASCII
value being displayed, plus a couple 7's and a blank line for visual
indexing. It allows you to turn your unix workstation into a big UPC
scandcode. RAWBIT.VGAfont is particularly good for studying things like
Linus Torvalds' coding guidelines.
The data and routines used are from osimplay, my x86 assembler written in
Bash, with which one can produce other binary oddities like OS kernels and
VESA VBE 3.0 interfaces. Actually compembling a font line-by-line ala X
bitmaps takes several minutes on a Pentium 1 in osimplay, but this
degenerate little doohicky doesn't take long.
Rick Hohensee
Precision Mojo Engineer
" > $alancox
declare -i H C
octalbyte=({0,1,2,3}{0,1,2,3,4,5,6,7}{0,1,2,3,4,5,6,7})
## several doodads to have meta listings notes
hex=({0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f}{0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f})
opnote ( ) { # internal =shasm
if test "$pass" = "2" ; then
echo -n " "$*" " >> $listing
fi
}
allocated=yes
output=RAWBIT.VGAfont
listing=/dev/null
pass=2
ab () { # assemble bytes. pass-sensitive. =shasm
if test "$pass" = "2" ; then
bytes $*
else
H=H+$#
fi
}
bytes ( ) { # internal =shasm
H=H+$#
for a in $* ;do
if test $(($a)) -gt 255 ; then
echo " H " $H ": index into hex[] > 255"
fi
if test "$allocated" = "yes" ;then
echo -en \\${octalbyte[$a&0xff]} >> $output
fi
if test $(($a)) -lt 0 ;then
let a=$a+256
fi
echo -n ${hex[$a]}" " >> $listing
done
}
let this=0
while test $this -lt 256 ; do
echo $this
ab $this $this $this $this $this $this 7 7 0
let this=$this+1
done
reply other threads:[~2003-06-26 19:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fc.0010c7b200939d750010c7b200939d75.939d7c@capaccess.org \
--to=rickh@capaccess.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®