showface, a face file viewer for the PC

Russ Nelson nelson at sun.soe.clarkson.edu
Thu Sep 27 12:28:46 AEST 1990


#!/bin/sh
# shar:	Shell Archiver  (v1.22)
#
#	Run the following text with /bin/sh to create:
#	  README
#	  chrout.asm
#	  decout.asm
#	  digout.asm
#	  getdig.asm
#	  getnum.asm
#	  showface.asm
#	  showface.com
#	  skipblk.asm
#
sed 's/^X//' << 'SHAR_EOF' > README &&
XThis is the readme file for showface, a PC program for viewing
Xface files as found on uunet.uu.net:/faces.  It requires an EGA or VGA.
X
SHAR_EOF
chmod 0644 README || echo "restore of README fails"
sed 's/^X//' << 'SHAR_EOF' > chrout.asm &&
X;put into the public domain by Russell Nelson, nelson at clutx.clarkson.edu
X
X	public	chrout
Xchrout:
X	push	ax			;print the char in al.
X	push	dx
X	mov	dl,al
X	mov	ah,2
X	int	21h
X	pop	dx
X	pop	ax
X	ret
SHAR_EOF
chmod 0644 chrout.asm || echo "restore of chrout.asm fails"
sed 's/^X//' << 'SHAR_EOF' > decout.asm &&
X;put into the public domain by Russell Nelson, nelson at clutx.clarkson.edu
X
X	public	decout
Xdecout:
X	mov	si,ax			;get the number where we want it.
X	mov	di,dx
X	or	ax,dx			;is the number zero?
X	jne	decout_nonzero
X	mov	al,'0'			;yes - easier to just print it, than
X	jmp	chrout			;  to eliminate all but the last zero.
Xdecout_nonzero:
X
X	xor	ax,ax			;start with all zeroes in al,bx,bp
X	mov	bx,ax
X	mov	bp,ax
X
X	mov	cx,32			;32 bits in two 16 bit registers.
Xdecout_1:
X	shl	si,1
X	rcl	di,1
X	xchg	bp,ax
X	call	addbit
X	xchg	bp,ax
X	xchg	bx,ax
X	call	addbit
X	xchg	bx,ax
X	adc	al,al
X	daa
X	loop	decout_1
X
X	mov	cl,'0'			;prepare to eliminate leading zeroes.
X	call	byteout			;output the first two.
X	mov	ax,bx			;output the next four
X	call	wordout			;output the next four
X	mov	ax,bp
X	jmp	wordout
X
Xaddbit:	adc	al,al
X	daa
X	xchg	al,ah
X	adc	al,al
X	daa
X	xchg	al,ah
X	ret
X
SHAR_EOF
chmod 0644 decout.asm || echo "restore of decout.asm fails"
sed 's/^X//' << 'SHAR_EOF' > digout.asm &&
X;put into the public domain by Russell Nelson, nelson at clutx.clarkson.edu
X
X	public	dwordout, wordout, byteout, digout
Xdwordout:
X	mov	cl,'0'			;prepare to eliminate leading zeroes.
X	xchg	ax,dx			;just output 32 bits in hex.
X	call	wordout			;output dx.
X	xchg	ax,dx
Xwordout:
X	push	ax
X	mov	al,ah
X	call	byteout
X	pop	ax
Xbyteout:
X	mov	ah,al
X	shr	al,1
X	shr	al,1
X	shr	al,1
X	shr	al,1
X	call	digout
X	mov	al,ah
Xdigout:
X	and	al,0fh
X	add	al,90h	;binary digit to ascii hex digit.
X	daa
X	adc	al,40h
X	daa
X	cmp	al,cl			;leading zero?
X	je	digout_1
X	mov	cl,-1			;no more leading zeros.
X	jmp	chrout
Xdigout_1:
X	retSHAR_EOF
chmod 0644 digout.asm || echo "restore of digout.asm fails"
sed 's/^X//' << 'SHAR_EOF' > getdig.asm &&
X;put into the public domain by Russell Nelson, nelson at clutx.clarkson.edu
X
X	public	get_digit
Xget_digit:
X;enter with al = character
X;return nc, al=digit, or cy if not a digit.
X	cmp	al,'0'			;decimal digit?
X	jb	get_digit_1		;no.
X	cmp	al,'9'			;. .?
X	ja	get_digit_2		;no.
X	sub	al,'0'
X	clc
X	ret
Xget_digit_2:
X	cmp	al,'a'			;hex digit?
X	jb	get_digit_3
X	cmp	al,'f'			;hex digit?
X	ja	get_digit_3
X	sub	al,'a'-10
X	clc
X	ret
Xget_digit_3:
X	cmp	al,'A'			;hex digit?
X	jb	get_digit_1
X	cmp	al,'F'			;hex digit?
X	ja	get_digit_1
X	sub	al,'A'-10
X	clc
X	ret
Xget_digit_1:
X	stc
X	ret
X
X
SHAR_EOF
chmod 0644 getdig.asm || echo "restore of getdig.asm fails"
sed 's/^X//' << 'SHAR_EOF' > getnum.asm &&
X;put into the public domain by Russell Nelson, nelson at clutx.clarkson.edu
X
X	public	get_number
Xget_number:
X	mov	bp,10			;we default to 10.
X	jmp	short get_number_0
X
X	public	get_hex
Xget_hex:
X	mov	bp,16
X;get a hex number, skipping leading blanks.
X;enter with si->string of digits,
X;	di -> dword to store the number in.  [di] is not modified if no
X;		digits are given, so it acts as the default.
X;return cy if there are no digits at all.
X;return nc, bx:cx = number, and store bx:cx at [di].
Xget_number_0:
X	call	skip_blanks
X	call	get_digit		;is there really a number here?
X	jc	get_number_3
X	or	al,al			;Does the number begin with zero?
X	jne	get_number_4		;no.
X	mov	bp,8			;yes - they want octal.
Xget_number_4:
X
X	xor	cx,cx			;get a hex number.
X	xor	bx,bx
Xget_number_1:
X	lodsb
X	cmp	al,'x'			;did they really want hex?
X	je	get_number_5		;yes.
X	cmp	al,'X'			;did they really want hex?
X	je	get_number_5		;yes.
X	call	get_digit		;convert a character into an int.
X	jc	get_number_2		;not a digit (neither hex nor dec).
X	xor	ah,ah
X	cmp	ax,bp			;larger than our base?
X	jae	get_number_2		;yes.
X
X	push	ax			;save the new digit.
X
X	mov	ax,bp			;multiply the low word by ten.
X	mul	cx
X	mov	cx,ax			;keep the low word.
X	push	dx			;save the high word for later.
X	mov	ax,bp
X	mul	bx
X	mov	bx,ax			;we keep only the low word (which is our high word)
X	pop	dx
X	add	bx,dx			;add the high result from earlier.
X
X	pop	ax			;get the new digit back.
X	add	cx,ax			;add the new digit in.
X	adc	bx,0
X	jmp	get_number_1
Xget_number_5:
X	mov	bp,16			;change the base to hex.
X	jmp	get_number_1
Xget_number_2:
X	dec	si
X	mov	[di],cx			;store the parsed number.
X	mov	[di+2],bx
X	clc
X	jmp	short get_number_6
Xget_number_3:
X	cmp	al,'?'			;did they ask for the default?
X	stc
X	jne	get_number_6		;no, return cy.
X	add	si,2			;skip past the question mark.
X	mov	cx,-1
X	mov	bx,-1
X	jmp	get_number_2		;and return the -1.
Xget_number_6:
X	ret
SHAR_EOF
chmod 0644 getnum.asm || echo "restore of getnum.asm fails"
sed 's/^X//' << 'SHAR_EOF' > showface.asm &&
X;History:610,1
X
XMAJVER	EQU	1	;1.0
XVERSION	EQU	0
X
X;  Russell Nelson, Clarkson University.  December 24, 1989
X;  Copyright, 1989, Russell Nelson
X
X;   This program is free software; you can redistribute it and/or modify
X;   it under the terms of the GNU General Public License as published by
X;   the Free Software Foundation, version 1.
X;
X;   This program is distributed in the hope that it will be useful,
X;   but WITHOUT ANY WARRANTY; without even the implied warranty of
X;   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
X;   GNU General Public License for more details.
X;
X;   You should have received a copy of the GNU General Public License
X;   along with this program; if not, write to the Free Software
X;   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X
Xcode	segment	byte public
X	assume	cs:code, ds:code
X
XHT	equ	09h
XCR	equ	0dh
XLF	equ	0ah
X
Xfont_struc	struc
Xascent	dw	?			;number of pixels above base line
Xdescent	dw	?			;number of pixels below base line
XwidMax	dw	?			;number of pixels wide
Xleading	dw	?			;number of pixels below descent and above ascent
Xfont_struc	ends
X
Xsegmoffs	struc			; defines offs as 0, segm as 2
Xoffs		dw	?
Xsegm		dw	?
Xsegmoffs	ends
X
X	org	80h
Xphd_dioa	label	byte
X
X	org	100h
Xstart:
X	jmp	start_1
X
Xno_ega_msg	db	"showface: You must have an EGA or VGA display.",CR,LF,'$'
Xcopyleft_msg	label	byte
X db "Face viewer version ",'0'+majver,".",'0'+version," Copyright 1990, Russell Nelson.",CR,LF
X db "This program is free software; see the file COPYING for details.",CR,LF
X db "NO WARRANTY; see the file COPYING for details.",CR,LF
Xcrlf_msg	db	CR,LF,'$'
X
Xprompt_msg	db	"Filename: ",'$'
X
Xfile_not_found	db	"File not found",'$'
Xread_trouble	db	"Trouble reading the file",'$'
Xread_too_much	db	"The file is too large",'$'
X
Xfirstn	db	"FirstName",0
Xlastn	db	"LastName",0
Xpicdata	db	"PicData",0
Xfacedat	db	0
Xxsize	dw	?,?
Xysize	dw	?,?
X
Xffblk	label	byte
Xff_reserved	db	21 dup(?)
Xff_attrib	db	?
Xff_ftime	dw	?
Xff_fdate	dw	?
Xff_fsize	dd	?
Xff_name		db	13 dup(?)
X
Xour_fn		db	64 dup(?)
X
Xulpal	db	20 dup(00h)
X	db	20 dup(09h)
X	db	20 dup(0bh)
X	db	20 dup(0fh)
X	db	20 dup(0fh)
X	db	20 dup(0fh)
X	db	20 dup(0fh)
X	db	20 dup(08h)
X	db	20 dup(08h)
X	db	20 dup(07h)
X	db	20 dup(07h)
X	db	20 dup(07h)
X	db	20 dup(07h)
Xurpal	db	20 dup(00h)
X	db	20 dup(00h)
X	db	20 dup(0ch)
X	db	20 dup(0eh)
X	db	20 dup(0fh)
X	db	20 dup(08h)
X	db	20 dup(08h)
X	db	20 dup(08h)
X	db	20 dup(08h)
X	db	20 dup(08h)
X	db	20 dup(08h)
X	db	20 dup(08h)
X	db	20 dup(07h)
Xllpal	db	20 dup(00h)
X	db	20 dup(0ch)
X	db	20 dup(0ch)
X	db	20 dup(0dh)
X	db	20 dup(0fh)
X	db	20 dup(0fh)
X	db	20 dup(08h)
X	db	20 dup(08h)
X	db	20 dup(08h)
X	db	20 dup(08h)
X	db	20 dup(08h)
X	db	20 dup(07h)
X	db	20 dup(07h)
Xlrpal	db	20 dup(00h)
X	db	20 dup(0ah)
X	db	20 dup(0bh)
X	db	20 dup(0bh)
X	db	20 dup(0fh)
X	db	20 dup(0fh)
X	db	20 dup(0fh)
X	db	20 dup(0fh)
X	db	20 dup(08h)
X	db	20 dup(08h)
X	db	20 dup(07h)
X	db	20 dup(07h)
X	db	20 dup(07h)
X
Xsave_dacs	db	256 * 3 dup(?)
Xgray_dacs	db	256 * 3 dup(?)
X
X
Xerror:
X	mov	ah,9
X	int	21h
X	mov	ax,4c0ah		; give errorlevel 10
X	int	21h
X
Xstart_1:
X	mov	dx,offset copyleft_msg
X	mov	ah,9
X	int	21h
X
X	mov	ax,1200h		;test for an EGA
X	mov	bx,10h
X	mov	cx,-1
X	int	10h
X	cmp	cx,-1
X	jne	start_4			;go if we've got an EGA (or VGA).
X	mov	dx,offset no_ega_msg
X	jmp	error
Xstart_4:
X
X	mov	dx,offset ffblk		;set up for wildcards.
X	mov	ah,1ah
X	int	21h
X
X	cld
X	mov	si,offset phd_dioa+1
X	call	skip_blanks		;end of line?
X	cmp	al,CR
X	je	start_2
X
X	call	find_files		;find all the files that match this spec.
X	jc	error
X
X	jmp	short start_3		;all done.
X
Xstart_2:
X	mov	phd_dioa[0],128		;get set for a line input dos call.
X	mov	phd_dioa[1],0
X	mov	phd_dioa[2],CR
X
X	mov	dx,offset prompt_msg	;prompt them for a filename.
X	mov	ah,9
X	int	21h
X
X	mov	dx,offset phd_dioa	;read the line.
X	mov	ah,0ah
X	int	21h
X
X	mov	al,LF			;obligingly line feed for them.
X	call	chrout
X
X	mov	si,offset phd_dioa+2
X	call	skip_blanks		;end of line?
X	cmp	al,CR			;if so, we're done.
X	je	start_3
X
X	call	find_files		;find all the files that match.
X	jnc	start_5
X	mov	ah,9			;print the error message.
X	int	21h
Xstart_5:
X	jmp	start_2
X
Xstart_3:
X	mov	ax,4c00h		;terminate.
X	int	21h
X
X
Xfind_files:
X;enter with si -> list of filenames (possibly w/ wildcards) to show.
X;exit with cy if we couldn't find one of the files.
Xfind_name_end:
X	mov	di,offset our_fn
X	mov	dx,di
Xfind_name_end_1:
X	lodsb				;find the end of the filename.
X	stosb
X	cmp	al,'/'			;whenever we encounter a pathname char,
X	je	find_name_end_4		;  remember it.
X	cmp	al,'\'
X	jne	find_name_end_3
Xfind_name_end_4:
X	mov	dx,di			;found a path char, remember it.
Xfind_name_end_3:
X	cmp	al,' '
X	je	find_name_end_2
X	cmp	al,CR
X	jne	find_name_end_1
Xfind_name_end_2:
X	dec	si			;point si to terminator.
X	push	si			;->end of filename in input.
X	mov	byte ptr [di-1],0	;terminate pathname in our_fn.
X	mov	di,dx			;->end of pathname in our_fn.
X
X	mov	dx,offset our_fn
X	mov	ah,4eh			;find the first file.
X	mov	cx,0			;no special files
Xfind_one_file:
X	int	21h			;find a file.
X	jc	find_files_done
X
X	push	di
X	mov	si,offset ff_name	;append the found name to the pathname.
Xfind_one_file_1:
X	lodsb
X	stosb
X	or	al,al
X	jne	find_one_file_1
X
X	mov	dx,offset our_fn	;show a single file.
X	call	show_face
X
X	pop	di
X	jc	find_files_error
X
X	mov	ah,4fh			;find next file.
X	jmp	find_one_file
X
Xfind_files_done:
X	pop	si			;restore the terminator.
X	call	skip_blanks		;end of line?
X	cmp	al,CR
X	jne	find_name_end		;no, more files to do.
X
X	clc
X	ret
Xfind_files_error:
X	pop	si			;give up now if we can't find it.
X	ret
X
X
Xshow_face:
X;read the face info. from the file named in [dx].
X;return cy if we can't open the file.
X
X	call	read_file
X	jnc	show_face_1
X	ret
Xshow_face_1:
X
X	mov	di,offset picdata	;get the size of the image.
X	call	find_header
X
X	mov	di,offset xsize		;get their image size.
X	call	get_number
X
X	mov	di,offset ysize
X	call	get_number
X
X;test for VGA.
X	mov	ax,1a00h
X	int	10h
X	cmp	al,1ah
X	je	have_vga
X
X	jmp	have_ega
X
Xhave_vga:
X
X	mov	ax,13h			;put the screen into vga mode.
X	int	10h
X
X	call	pal_save		;save the palette
X	call	pal_setgrey		;set to a gray palette.
X
X	mov	di,offset firstn	;get their first name.
X	call	find_header
X
X	mov	cx,130			;put it to the screen.
X	mov	dx,10
X	call	show_name
X
X	mov	al,' '			;put a space between first and last names.
X	call	write_char
X
X	push	cx			;now find the last name (but remember
X	push	dx			;  the xy position this time.
X	mov	di,offset lastn
X	call	find_header
X	pop	dx
X	pop	cx
X
X	call	show_name		;put the last name to the screen.
X
X	mov	di,offset facedat	;now put the face up.
X	call	find_header
X
X	mov	ax,0a000h
X	mov	es,ax
X	mov	cx,ysize
X	mov	ax,320			;get the bottom line.
X	mul	cx
X	mov	di,ax
Xvga_line:
X	push	cx
X	mov	cx,xsize
Xvga_pel:
X	call	get_byte
X	stosb
X	loop	vga_pel
X	sub	di,xsize		;back to the left margin.
X	sub	di,320			;move up a line.
X	pop	cx
X	loop	vga_line
X
X	mov	ah,7			;wait for a key.
X	int	21h
X
X	call	pal_restore		;restore the original palette.
X
X	mov	ax,3h			;put the screen into text mode.
X	int	10h
X
X	clc
X	ret
X
Xhave_ega:
X	mov	ax,10h			;put the screen into ega mode.
X	int	10h
X
X	mov	ax,1000h		;change the palette entry for 7
X	mov	bx,77Q*256 + 7		;  to 77 octal.
X	int	10h
X
X	mov	ax,1000h
X	mov	bx,007Q*256 + 08h
X	int	10h
X
X	mov	ax,1000h
X	mov	bx,010Q*256 + 09h
X	int	10h
X
X	mov	ax,1000h
X	mov	bx,020Q*256 + 0ah
X	int	10h
X
X	mov	ax,1000h
X	mov	bx,030Q*256 + 0bh
X	int	10h
X
X	mov	ax,1000h
X	mov	bx,040Q*256 + 0ch
X	int	10h
X
X	mov	ax,1000h
X	mov	bx,050Q*256 + 0dh
X	int	10h
X
X	mov	ax,1000h
X	mov	bx,060Q*256 + 0eh
X	int	10h
X
X	mov	ax,1000h
X	mov	bx,070Q*256 + 0fh
X	int	10h
X
X	mov	di,offset facedat
X	call	find_header
X
X	mov	ax,0a000h
X	mov	es,ax
X	mov	cx,ysize		;get the bottom line.
X	mov	ax,640/8*2		;bytes per scan line * scan lines per pixel
X	mul	cx
X	mov	di,ax
X	xor	bh,bh
X
X	mov	dx,03ceh		;graphics controller
X	mov	ax,0205h		;write mode 2.
X	out	dx,al
X	inc	dx
X	mov	al,ah
X	out	dx,al
X	dec	dx
X	mov	al,08h			;select bitmap register.
X	out	dx,al
X	inc	dx
X
Xega_line:
X	push	cx
X	push	di
X	mov	ah,80h			;start at left margin.
X	mov	cx,xsize
Xega_pel:
X	push	ax
X	call	get_byte		;get a byte into bl where we can use
X	mov	bl,al			;  it for indexing into dithers...
X	pop	ax
X
X	mov	al,ah
X	out	dx,al
X	mov	al,ulpal[bx]
X	xchg	es:[di],al		;store the palette value.
X	mov	al,llpal[bx]
X	xchg	es:[di+80],al		;store the palette value.
X
X	shr	ah,1			;move right by a bit.
X
X	mov	al,ah
X	out	dx,al
X	mov	al,urpal[bx]
X	xchg	es:[di],al		;store the palette value.
X	mov	al,lrpal[bx]
X	xchg	es:[di+80],al		;store the palette value.
X
X	ror	ah,1			;move right by another bit,
X	adc	di,0			;  and handle byte increment.
X
X	loop	ega_pel
X	pop	di
X	sub	di,80*2			;move up a line.
X	pop	cx
X	loop	ega_line
X
X	mov	al,0ffh			;mask = all ones.
X	out	dx,al
X	dec	dx
X	mov	ax,0005h		;write mode 0
X	out	dx,al
X	inc	dx
X	mov	al,ah
X	out	dx,al
X
X	mov	ah,7			;wait for a key.
X	int	21h
X
X	mov	ax,3h			;put the screen into text mode.
X	int	10h
X
X	clc
X	ret
X
X
Xshow_name:
X;enter with si -> CR terminated string to be printed, CX = x, DX = y.
Xshow_name_0:
X	lodsb
X	cmp	al,CR
X	je	show_name_1
X	push	si
X	call	write_char
X	pop	si
X	jmp	show_name_0
Xshow_name_1:
X	ret
X
X
Xchar_number	db	?		;ASCII value of this character.
Xchar_height	dw	?		;height of this character
Xchar_width	db	?		;width of this character in pixels.
Xchar_color	db	0ffh		;color to paint this character.
X
Xwrite_char:
X;enter with cx,dx=position, al = character.
X	push	cx
X	push	dx
X	push	es
X	mov	char_number,al
X	call	compute_address
X
X	mov	ax,system_font.ascent	;compute height of character.
X	add	ax,system_font.descent
X	mov	char_height,ax		;save it.
X
X	mov	si,offset system_font + (size font_struc)
Xuse_font_1:
X	lodsw
X	xchg	ah,al			;get the number (AH) and width (AL).
X
X	or	al,al			;zero width?
X	je	use_font_3		;yes, end of the font.
X	cmp	ah,char_number		;is this the character?
X	je	use_font_2		;Yes, use it.
X	mov	ah,0
X	add	ax,7			;round up to next nearest byte.
X	shr	ax,1			;and convert pixels
X	shr	ax,1			; to
X	shr	ax,1			; bytes.
X	mul	char_height		;find the size.
X	add	si,ax			;move ahead by this size.
X	jmp	use_font_1
Xuse_font_3:
X	pop	es
X	pop	dx
X	pop	cx
X	stc
X	ret
Xuse_font_2:
X	mov	char_width,al		;remember the width of the font.
X	mov	cx,char_height
Xwrite_char_4:
X	push	cx
X	push	di
X	mov	cl,char_width
X	xor	ch,ch
X	mov	ah,80h
X	jmp	short write_char_6
Xwrite_char_5:
X	ror	ah,1			;move right in the source.
X	adc	si,0
X	call	move_right		;move right in the destination.
Xwrite_char_6:
X	test	[si],ah			;is this bit set?
X	je	write_char_7
X	call	set_bit			;yes, set it.
Xwrite_char_7:
X	loop	write_char_5
X	inc	si			;flush the rest of the bits in source.
X	pop	di
X	call	move_down
X	pop	cx
X	loop	write_char_4		;go do another line.
X	pop	es
X	pop	dx
X	pop	cx
X	inc	char_width
X	add	cl,char_width		;move over.
X	adc	ch,0
X	clc
X	ret
X
X
Xcompute_address:
X;enter with cx,dx = point on screen.
X;exit with es:di,dh -> byte/bit on screen.
X	mov	ax,0a000h
X	mov	es,ax
X	mov	ax,320			;width of screen.
X	mul	dx
X	add	ax,cx			;add the offset in.
X	mov	di,ax			;remember our pointer.
X	ret
X
X
Xmove_right:
X	inc	di
X	ret
X
Xmove_down:
X	add	di,320			;width of screen.
X	ret
X
Xset_bit:
X	mov	al,char_color
X	mov	es:[di],al
X	ret
X
X
Xhandle	dw	?
X
Xread_file:
X;enter with dx -> filename.
X;return nc if all okay, or cy, dx -> error if any problems.
X	mov	ax,3d00h		;open for reading.
X	int	21h
X	jnc	read_file_found
X	mov	dx,offset file_not_found
X	stc
X	ret
X
Xread_file_found:
X	mov	handle,ax
X
X	mov	ah,3fh			;read the whole thing in.
X	mov	bx,handle
X	mov	cx,65535 - 200
X	sub	cx,offset face_buffer
X	mov	dx,offset face_buffer
X	int	21h
X	jnc	read_okay
X	mov	dx,offset read_trouble
X	stc
X	ret
Xread_okay:
X	cmp	ax,cx			;did we read all we asked for?
X	jne	read_enough
X	mov	dx,offset read_too_much
X	stc
X	ret
Xread_enough:
X	mov	ah,3eh			;close the file.
X	mov	bx,handle
X	int	21h
X
X	clc
X	ret
X
X
Xget_byte:
X;enter with si -> two hex digits (maybe some CR/LFs first...)
X;exit with al = the byte.
X	lodsb				;get a character.
X	cmp	al,CR			;ignore CR and LF.
X	je	get_byte
X	cmp	al,LF
X	je	get_byte
X	call	get_digit		;hex digits come in pairs.
X	shl	al,1
X	shl	al,1
X	shl	al,1
X	shl	al,1
X	mov	ah,al			;shift the first nibble over.
X	lodsb				;get the second nibble
X	call	get_digit
X	or	al,ah			;combine and store.
X	ret
X
Xfind_header_ptr	dw	?
X
Xfind_header:
X;enter with di -> header name
X;exit with nc,si -> header contents, or cy if not found.
X	mov	find_header_ptr,di	;remember the pointer to their header.
X	mov	si,offset face_buffer
Xfind_header_0:
X	mov	di,find_header_ptr
X	mov	cx,30			;no header name is >30 chars.
X	repe	cmpsb			;compare the header chars.
X	cmp	[si-1],byte ptr ':'	;if we didn't get as far as the colon,
X	jne	find_header_1		;  they didn't match.
X	cmp	[di-1],byte ptr 0	;if we didn't get as far as the null,
X	jne	find_header_1		;  they didn't match.
X	call	skip_blanks
X	ret
Xfind_header_1:
X;scan to the next LF.
X	lodsb
X	cmp	al,LF
X	jne	find_header_1
X	cmp	byte ptr [si],CR	;two crlf's in a row?
X	jne	find_header_0		;yes, no more headers.
X	stc
X	ret
X
Xpal_save:
X;Save existing palette
X	mov	ax,1017h		;get all palette registers.
X	mov	bx,0			;first palette register.
X	mov	cx,256			;read all palette registers.
X	push	ds
X	pop	es
X	mov	dx,offset save_dacs
X	int	10h
X
X	ret
X
Xpal_setgrey:
X	mov	di,offset gray_dacs
X	mov	al,0
Xpal_setgrey_1:
X	mov	cx,3 * 256 / 64		;3 colors, 256 grays, 64 slots.
X	rep	stosb
X
X	inc	al
X	cmp	al,64
X	jb	pal_setgrey_1
X
X	mov	dx,offset gray_dacs
X	jmp	short pal_set
X
Xpal_restore:
X	mov	dx,offset save_dacs
Xpal_set:
X	mov	ax,1012h		;set all palette registers.
X	mov	bx,0			;first palette register.
X	mov	cx,256			;read all palette registers.
X	push	ds
X	pop	es
X	int	10h
X
X	ret
X
X	include	skipblk.asm
X	include	getdig.asm
X	include	getnum.asm
X	include	chrout.asm
X	include	decout.asm
X	include	digout.asm
X
Xsystem_font	label	byte
X	font_struc	<9, 3, 10, 1>
X
X	db	20h,6
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	21h,4
X	db	01100000b
X	db	11110000b
X	db	11110000b
X	db	11110000b
X	db	11110000b
X	db	11110000b
X	db	01100000b
X	db	00000000b
X	db	01100000b
X	db	01100000b
X	db	00000000b
X	db	00000000b
X
X	db	22h,7
X	db	00000000b
X	db	00000000b
X	db	11101110b
X	db	01100110b
X	db	11001100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	23h,6
X	db	00000000b
X	db	00000000b
X	db	01001000b
X	db	01001000b
X	db	11111100b
X	db	01001000b
X	db	11111100b
X	db	01001000b
X	db	01001000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	24h,6
X	db	00000000b
X	db	00000000b
X	db	00010000b
X	db	01111100b
X	db	11010000b
X	db	01111100b
X	db	00010110b
X	db	01111100b
X	db	00010000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	25h,6
X	db	00000000b
X	db	00000000b
X	db	11000000b
X	db	11001100b
X	db	00011000b
X	db	00110000b
X	db	01100000b
X	db	11001100b
X	db	00001100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	26h,6
X	db	00000000b
X	db	00000000b
X	db	01110000b
X	db	11011000b
X	db	11011000b
X	db	01110000b
X	db	11011100b
X	db	11011000b
X	db	01101100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	27h,4
X	db	00000000b
X	db	00000000b
X	db	00110000b
X	db	01100000b
X	db	11000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	28h,4
X	db	00000000b
X	db	00000000b
X	db	00110000b
X	db	01100000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	01100000b
X	db	00110000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	29h,4
X	db	00000000b
X	db	00000000b
X	db	11000000b
X	db	01100000b
X	db	00110000b
X	db	00110000b
X	db	00110000b
X	db	01100000b
X	db	11000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	2Ah,6
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00110000b
X	db	10110100b
X	db	01111000b
X	db	10110100b
X	db	00110000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	2Bh,6
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00110000b
X	db	00110000b
X	db	11111100b
X	db	00110000b
X	db	00110000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	2Ch,3
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	11100000b
X	db	11100000b
X	db	01100000b
X	db	11000000b
X	db	00000000b
X	db	00000000b
X
X	db	2Dh,6
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	11111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	2Eh,3
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	11100000b
X	db	11100000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	2Fh,7
X	db	00000000b
X	db	00000000b
X	db	00000110b
X	db	00001100b
X	db	00011000b
X	db	00110000b
X	db	01100000b
X	db	11000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	30h,7
X	db	01111100b
X	db	11001110b
X	db	11001110b
X	db	11010110b
X	db	11010110b
X	db	11010110b
X	db	11100110b
X	db	11100110b
X	db	01111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	31h,7
X	db	01100000b
X	db	11100000b
X	db	01100000b
X	db	01100000b
X	db	01100000b
X	db	01100000b
X	db	01100000b
X	db	01100000b
X	db	11110000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	32h,7
X	db	01111100b
X	db	10000110b
X	db	00000110b
X	db	00000110b
X	db	00001100b
X	db	00011000b
X	db	00110000b
X	db	01100000b
X	db	11111110b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	33h,7
X	db	11111100b
X	db	00001100b
X	db	00011000b
X	db	00110000b
X	db	00001100b
X	db	00000110b
X	db	00000110b
X	db	11000110b
X	db	01111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	34h,7
X	db	00011100b
X	db	00111100b
X	db	01101100b
X	db	11001100b
X	db	11001100b
X	db	11001100b
X	db	11111110b
X	db	00001100b
X	db	00001100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	35h,7
X	db	11111110b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11111100b
X	db	00000110b
X	db	00000110b
X	db	11000110b
X	db	01111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	36h,7
X	db	01111100b
X	db	11000110b
X	db	11000000b
X	db	11000000b
X	db	11111100b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	01111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	37h,7
X	db	11111110b
X	db	00000110b
X	db	00000110b
X	db	00001100b
X	db	00011000b
X	db	00110000b
X	db	00110000b
X	db	00110000b
X	db	00110000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	38h,7
X	db	01111100b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	01111100b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	01111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	39h,7
X	db	01111100b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	01111110b
X	db	00000110b
X	db	00000110b
X	db	11000110b
X	db	01111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	3Ah,3
X	db	00000000b
X	db	00000000b
X	db	11100000b
X	db	11100000b
X	db	00000000b
X	db	00000000b
X	db	11100000b
X	db	11100000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	3Bh,3
X	db	00000000b
X	db	00000000b
X	db	11100000b
X	db	11100000b
X	db	00000000b
X	db	00000000b
X	db	11100000b
X	db	11100000b
X	db	01100000b
X	db	11000000b
X	db	00000000b
X	db	00000000b
X
X	db	3Ch,7
X	db	00000000b
X	db	00000000b
X	db	00000110b
X	db	00011100b
X	db	01110000b
X	db	11000000b
X	db	01110000b
X	db	00011100b
X	db	00000110b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	3Dh,6
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	11111110b
X	db	00000000b
X	db	00000000b
X	db	11111110b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	3Eh,7
X	db	00000000b
X	db	00000000b
X	db	11000000b
X	db	01110000b
X	db	00011100b
X	db	00000110b
X	db	00011100b
X	db	01110000b
X	db	11000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	3Fh,6
X	db	01111100b
X	db	11000110b
X	db	00000110b
X	db	00001100b
X	db	00011000b
X	db	00110000b
X	db	00110000b
X	db	00000000b
X	db	00110000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	40h,6
X	db	00000000b
X	db	00000000b
X	db	00111000b
X	db	01101100b
X	db	11011100b
X	db	11010100b
X	db	11011100b
X	db	11000000b
X	db	01111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	41h,7
X	db	01111100b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11111110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	42h,7
X	db	11111100b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11111110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	43h,7
X	db	01111100b
X	db	11000010b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000010b
X	db	01111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	44h,7
X	db	11111100b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	45h,6
X	db	11111100b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11111000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	46h,6
X	db	11111100b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11111000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	47h,7
X	db	01111100b
X	db	11000100b
X	db	11000000b
X	db	11000000b
X	db	11001110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	01111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	48h,7
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11111110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	49h,2
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	4Ah,6
X	db	00001100b
X	db	00001100b
X	db	00001100b
X	db	00001100b
X	db	00001100b
X	db	00001100b
X	db	11001100b
X	db	11001100b
X	db	01111000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	4Bh,8
X	db	11000011b
X	db	11000110b
X	db	11001100b
X	db	11011000b
X	db	11110000b
X	db	11110000b
X	db	11011000b
X	db	11001100b
X	db	11000110b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	4Ch,6
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	4Dh,9
X	db	11000000b,10000000b
X	db	11100001b,10000000b
X	db	11110011b,10000000b
X	db	11011101b,10000000b
X	db	11001001b,10000000b
X	db	11000001b,10000000b
X	db	11000001b,10000000b
X	db	11000001b,10000000b
X	db	11000001b,10000000b
X	db	00000000b,00000000b
X	db	00000000b,00000000b
X	db	00000000b,00000000b
X
X	db	4Eh,8
X	db	10000001b
X	db	11000001b
X	db	11100001b
X	db	10110001b
X	db	10011001b
X	db	10001101b
X	db	10000111b
X	db	10000011b
X	db	10000001b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	4Fh,7
X	db	01111100b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	01111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	50h,7
X	db	11111100b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11111100b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	51h,7
X	db	01111100b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	01111100b
X	db	00000110b
X	db	00000000b
X	db	00000000b
X
X	db	52h,7
X	db	11111100b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11111100b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	53h,7
X	db	01111100b
X	db	11000010b
X	db	11100000b
X	db	01110000b
X	db	00111000b
X	db	00011100b
X	db	00001110b
X	db	10000110b
X	db	01111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	54h,6
X	db	11111100b
X	db	00110000b
X	db	00110000b
X	db	00110000b
X	db	00110000b
X	db	00110000b
X	db	00110000b
X	db	00110000b
X	db	00110000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	55h,7
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	01111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	56h,7
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000100b
X	db	11111000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	57h,10
X	db	11001100b,11000000b
X	db	11001100b,11000000b
X	db	11001100b,11000000b
X	db	11001100b,11000000b
X	db	11001100b,11000000b
X	db	11001100b,11000000b
X	db	11001100b,11000000b
X	db	11001100b,10000000b
X	db	11111111b,00000000b
X	db	00000000b,00000000b
X	db	00000000b,00000000b
X	db	00000000b,00000000b
X
X	db	58h,7
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	01111100b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	59h,6
X	db	11001100b
X	db	11001100b
X	db	11001100b
X	db	11001100b
X	db	01111000b
X	db	00110000b
X	db	00110000b
X	db	00110000b
X	db	00110000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	5Ah,8
X	db	11111111b
X	db	00000011b
X	db	00000110b
X	db	00001100b
X	db	00011000b
X	db	00110000b
X	db	01100000b
X	db	11000000b
X	db	11111111b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	5Bh,4
X	db	11110000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11110000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	5Ch,5
X	db	10000000b
X	db	10000000b
X	db	01000000b
X	db	01000000b
X	db	00100000b
X	db	00100000b
X	db	00010000b
X	db	00010000b
X	db	00001000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	5Dh,4
X	db	11110000b
X	db	00110000b
X	db	00110000b
X	db	00110000b
X	db	00110000b
X	db	00110000b
X	db	00110000b
X	db	00110000b
X	db	11110000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	5Eh,8
X	db	00000000b
X	db	00000000b
X	db	00010000b
X	db	00111000b
X	db	01101100b
X	db	11000110b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	5Fh,8
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	11111111b
X	db	00000000b
X	db	00000000b
X
X	db	60h,6
X	db	00000000b
X	db	00000000b
X	db	11000000b
X	db	01100000b
X	db	00110000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	61h,7
X	db	00000000b
X	db	00000000b
X	db	01111100b
X	db	10000110b
X	db	01111110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	01111110b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	62h,7
X	db	11000000b
X	db	11000000b
X	db	11111100b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	63h,6
X	db	00000000b
X	db	00000000b
X	db	01111000b
X	db	11000100b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000100b
X	db	01111000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	64h,7
X	db	00000110b
X	db	00000110b
X	db	01111110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	01111110b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	65h,7
X	db	00000000b
X	db	00000000b
X	db	01111100b
X	db	11000110b
X	db	11000110b
X	db	11111110b
X	db	11000000b
X	db	11000110b
X	db	01111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	66h,6
X	db	00111100b
X	db	01100000b
X	db	11110000b
X	db	01100000b
X	db	01100000b
X	db	01100000b
X	db	01100000b
X	db	01100000b
X	db	01100000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	67h,7
X	db	00000000b
X	db	00000000b
X	db	01111110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	01111110b
X	db	00000110b
X	db	10000110b
X	db	01111100b
X
X	db	68h,7
X	db	11000000b
X	db	11000000b
X	db	11111100b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	69h,2
X	db	11000000b
X	db	00000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	6Ah,5
X	db	00000000b
X	db	00000000b
X	db	00011000b
X	db	00000000b
X	db	00011000b
X	db	00011000b
X	db	00011000b
X	db	00011000b
X	db	00011000b
X	db	00011000b
X	db	10011000b
X	db	01110000b
X
X	db	6Bh,6
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11001100b
X	db	11011000b
X	db	11110000b
X	db	11110000b
X	db	11011000b
X	db	11001100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	6Ch,2
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	6Dh,10
X	db	00000000b,00000000b
X	db	00000000b,00000000b
X	db	11111111b,00000000b
X	db	11001100b,10000000b
X	db	11001100b,11000000b
X	db	11001100b,11000000b
X	db	11001100b,11000000b
X	db	11001100b,11000000b
X	db	11001100b,11000000b
X	db	00000000b,00000000b
X	db	00000000b,00000000b
X	db	00000000b,00000000b
X
X	db	6Eh,7
X	db	00000000b
X	db	00000000b
X	db	11111100b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	6Fh,7
X	db	00000000b
X	db	00000000b
X	db	01111100b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	01111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	70h,7
X	db	00000000b
X	db	00000000b
X	db	11111100b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11111100b
X	db	11000000b
X	db	11000000b
X	db	00000000b
X
X	db	71h,7
X	db	00000000b
X	db	00000000b
X	db	01111110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	01111110b
X	db	00000110b
X	db	00000110b
X	db	00000000b
X
X	db	72h,6
X	db	00000000b
X	db	00000000b
X	db	11011100b
X	db	11100000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	73h,6
X	db	00000000b
X	db	00000000b
X	db	01111000b
X	db	11000100b
X	db	11100000b
X	db	01111000b
X	db	00011100b
X	db	10001100b
X	db	01111000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	74h,4
X	db	01100000b
X	db	01100000b
X	db	11110000b
X	db	01100000b
X	db	01100000b
X	db	01100000b
X	db	01100000b
X	db	01100000b
X	db	00110000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	75h,7
X	db	00000000b
X	db	00000000b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	01111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	76h,7
X	db	00000000b
X	db	00000000b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000100b
X	db	11111000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	77h,10
X	db	00000000b,00000000b
X	db	00000000b,00000000b
X	db	11001100b,11000000b
X	db	11001100b,11000000b
X	db	11001100b,11000000b
X	db	11001100b,11000000b
X	db	11001100b,11000000b
X	db	11001100b,10000000b
X	db	11111111b,00000000b
X	db	00000000b,00000000b
X	db	00000000b,00000000b
X	db	00000000b,00000000b
X
X	db	78h,7
X	db	00000000b
X	db	00000000b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	01111100b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	79h,7
X	db	00000000b
X	db	00000000b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	11000110b
X	db	01111110b
X	db	00000110b
X	db	10000110b
X	db	01111100b
X
X	db	7Ah,6
X	db	00000000b
X	db	00000000b
X	db	11111100b
X	db	00001100b
X	db	00011000b
X	db	00110000b
X	db	01100000b
X	db	11000000b
X	db	11111100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	7Bh,8
X	db	00000000b
X	db	00000000b
X	db	00111000b
X	db	01100000b
X	db	01100000b
X	db	11000000b
X	db	01100000b
X	db	01100000b
X	db	00111000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	7Ch,2
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	11000000b
X	db	00000000b
X
X	db	7Dh,8
X	db	00000000b
X	db	00000000b
X	db	11100000b
X	db	00110000b
X	db	00110000b
X	db	00011000b
X	db	00110000b
X	db	00110000b
X	db	11100000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	7Eh,8
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	01100000b
X	db	10010010b
X	db	00001100b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X	db	00000000b
X
X	db	80h,0			;end of the font.
X
Xface_buffer	label	byte
X
Xcode	ends
X
X	end	start
SHAR_EOF
chmod 0644 showface.asm || echo "restore of showface.asm fails"
sed 's/^X//' << 'SHAR_EOF' > s2_temp_.tmp &&
Xbegin 600 showface.com
XMZ=`+<VAO=V9A8V4Z(%EO=2!M=7-T(&AA=F4 at 86X@14=!(&]R(%9'02!D:7-P
XM;&%Y+ at HD1F%C92!V:65W97(@=F5R<VEO;B`Q+C`@0V]P>7)I9VAT(#$Y.3`L
XM(%)U<W-E;&P at 3F5L<V]N+ at I4:&ES('!R;V=R86T@:7, at 9G)E92!S;V9T=V%R
XM93L@<V5E('1H92!F:6QE($-/4%E)3D<@9F]R(&1E=&%I;',N"DY/(%=!4E)!
XM3E19.R!S964@=&AE(&9I;&4 at 0T]064E.1R!F;W(@9&5T86EL<RX*"B1&:6QE
XM;F%M93H@)$9I;&4@;F]T(&9O=6YD)%1R;W5B;&4@<F5A9&EN9R!T:&4 at 9FEL
XM9214:&4 at 9FEL92!I<R!T;V\@;&%R9V4D1FER<W1.86UE`$QA<W1.86UE`%!I
XM8T1A=&$`````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM``````````D)"0D)"0D)"0D)"0D)"0D)"0D)"PL+"PL+"PL+"PL+"PL+"PL+
XM"PL/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/
XM#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P@("`@("`@(
XM"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@'!P<'!P<'!P<'!P<'
XM!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'
XM!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P``````````````````````````````
XM```````````````````````,#`P,#`P,#`P,#`P,#`P,#`P,#`X.#@X.#@X.
XM#@X.#@X.#@X.#@X.#P\/#P\/#P\/#P\/#P\/#P\/#P\("`@("`@("`@("`@(
XM"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(
XM"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(
XM"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`<'!P<'!P<'
XM!P<'!P<'!P<'!P<'```````````````````````````,#`P,#`P,#`P,#`P,
XM#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#0T-#0T-#0T-#0T-#0T-#0T-
XM#0T/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/"`@(
XM"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(
XM"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(
XM"`@("`@("`<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'
XM!P<```````````````````````````H*"@H*"@H*"@H*"@H*"@H*"@H*"PL+
XM"PL+"PL+"PL+"PL+"PL+"PL+"PL+"PL+"PL+"PL+"PL+"PL+"P\/#P\/#P\/
XM#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/
XM#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/"`@("`@("`@("`@("`@("`@(
XM"`@("`@("`@("`@("`@("`@("`@("`<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'
XM!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P<'!P``````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM`````````````````````````````````````````````````````````+0)
XMS2&X"DS-(;HT`;0)S2&X`!*[$`"Y___-$(/Y_W4%N@,!Z]NZ3P*T&LTA_+Z!
XM`.A6`SP-=`?H0`!RQ.LWQ@:``(#&!H$``,8&@@`-NN(!M`G-(;J``+0*S2&P
XM"NC!`[Z"`. at C`SP-=`OH#0!S!+0)S2'KR;@`3,TAOWH"B]>LJCPO=`0\7'4"
XMB]<\('0$/`UU[$Y6QD7_`(OZNGH"M$ZY``#-(7(75[YM`JRJ"L!U^KIZ`N at 3
XM`%]R#K1/Z^5>Z,<"/`UUM/C#7L/H_P%S`<._/@+H4`*_1P+HW@*_2P+HV`*X
XM`!K-$#P:=`/K9Y"X$P#-$.A<`NAJ`K\K`N at G`KF"`+H*`.@<`;`@Z"D!45*_
XM-0+H$0):6>@*`;]&`N@&`K@`H([`BPY+`KA``??AB_A1BPY'`NC/`:KB^BL^
XM1P*![T`!6>+JM`?-(>@K`K@#`,T0^,.X$`#-$+@`$+L'/\T0N``0NP@'S1"X
XM`!"["0C-$+@`$+L*$,T0N``0NPL8S1"X`!"[#"#-$+@`$+L-*,T0N``0NPXP
XMS1"X`!"[#SC-$+]&`NA_`;@`H([`BPY+`KB@`/?AB_ at R_[K.`[@%`NY"BL3N
XM2K`([D)15[2`BPY'`E#H,@&*V%B*Q.Z*A[H")H8%BH?"!":&15#0[(K$[HJ'
XMO@,FA at 6*A\8%)H9%4-#,@]<`XLQ?@>^@`%GBO+#_[DJX!0#N0HK$[K0'S2&X
XM`P#-$/C#K#P-=`=6Z`D`7NOTPP````#_45(&HOL.Z&X`H681`P9H$:/\#KYN
XM$:V&X`K`=!DZ)OL.=!BT``4'`-'HT>C1Z/<F_`X#\.O@!UI9^<.B_ at Z+#OP.
XM45>*#OX.,NVT at .L(T,R#U@#H,`"$)'0#Z#``XN]&7^@D`%GBVP=:6?X&_ at X"
XM#OX. at -4`^,.X`*".P+A``??B`\&+^,-'PX''0`'#H/\.)H@%PP``N``]S2%S
XM!;KM`?G#HY0/M#^+'I0/N3?_@>G2%KK2%LTA<P6Z_`'YPSO!=06Z%0+YP[0^
XMBQZ4#\TA^,.L/`UT^SP*=/?H at 0#0X-#@T.#0X(K at K.AS``K$PP``B3[N#[[2
XM%HL^[@^Y'@#SIH!\_SIU"H!]_P!U!.A$`,.L/`IU^X`\#77=^<.X%Q"[``"Y
XM``$>![K*!LT0P[_*";``N0P`\ZK^P#Q`<O6ZR at GK`[K*!K at 2$+L``+D``1X'
XMS1##K#P@=/L\"73W3L,\,'(@/#EW!"PP^,,\87((/&9W!"Q7^,,\07((/$9W
XM!"PW^,/YP[T*`.L#O1``Z,3_Z,S_<D8*P'4#O0@`,\DSVZP\>'0H/%AT).BS
XM_W(D,N0[Q7,>4(O%]^&+R%*+Q??CB]A:`]I8`\B#TP#KT[T0`.O.3HD-B5T"
XM^.L0/#_Y=0N#Q@*Y__^[___KY\-04HK0M`+-(5I8PXOPB_H+PG4$L##KZ3/`
XMB]B+Z+D@`-'FT=>5Z!H`E9/H%0"3$L`GXNVQ,. at C`(O#Z!<`B\7K$Y`2P">&
XMQ!+`)X;$P[$PDN@!`))0BL3H`0!8BN#0Z-#HT.C0Z.@"`(K$)`\$D"<40"<Z
XMP70$L?_KAL,)``,`"@`!`"`&````````````````(01@\/#P\/!@`&!@```B
XM!P``[F;,`````````",&``!(2/Q(_$A(````)`8``!!\T'P6?!`````E!@``
XMP,P8,&#,#````"8&``!PV-APW-AL````)P0``#!@P``````````H!```,&#`
XMP,!@,````"D$``#`8#`P,&#`````*@8````PM'BT,``````K!@```#`P_#`P
XM`````"P#````````X.!@P```+08``````/P````````N`P````````#@X```
XM`"\'```&#!@P8,``````,`=\SL[6UM;FYGP````Q!V#@8&!@8&!@\````#('
XM?(8&!@P8,&#^````,P?\#!@P#`8&QGP````T!QP\;,S,S/X,#````#4'_L#`
XMP/P&!L9\````-@=\QL#`_,;&QGP````W!_X&!@P8,#`P,````#@'?,;&QGS&
XMQL9\````.0=\QL;&?@8&QGP````Z`P``X.```.#@`````#L#``#@X```X.!@
XMP```/`<```8<<,!P'`8````]!@```/X``/X``````#X'``#`<!P&''#`````
XM/P9\Q at 8,&#`P`#````!`!@``.&S<U-S`?````$$'?,;&QO[&QL;&````0@?\
XMQL;&_L;&QOP```!#!WS"P,#`P,#"?````$0'_,;&QL;&QL;\````10;\P,#`
XM^,#`P/P```!&!OS`P,#XP,#`P````$<'?,3`P,[&QL9\````2`?&QL;&_L;&
XMQL8```!)`L#`P,#`P,#`P````$H&#`P,#`P,S,QX````2PC#QLS8\/#8S,8`
XM``!,!L#`P,#`P,#`_````$T)P(#A@/.`W8#)@,&`P8#!@,&`````````3 at B!
XMP>&QF8V'@X$```!/!WS&QL;&QL;&?````%`'_,;&QOS`P,#`````40=\QL;&
XMQL;&QGP&``!2!_S&QL;\QL;&Q@```%,'?,+@<#@<#H9\````5`;\,#`P,#`P
XM,#````!5!\;&QL;&QL;&?````%8'QL;&QL;&QL3X````5PK,P,S`S,#,P,S`
XMS,#,P,R`_P````````!8!\;&QL9\QL;&Q@```%D&S,S,S'@P,#`P````6 at C_
XM`P8,&#!@P/\```!;!/#`P,#`P,#`\````%P%@(!`0"`@$!`(````703P,#`P
XM,#`P,/````!>"```$#ALQ@```````%\(````````````_P``8`8``,!@,```
XM``````!A!P``?(9^QL;&?@```&('P,#\QL;&QL;\````8P8``'C$P,#`Q'@`
XM``!D!P8&?L;&QL;&?@```&4'``!\QL;^P,9\````9 at 8\8/!@8&!@8&````!G
XM!P``?L;&QL;&?@:&?&@'P,#\QL;&QL;&````:0+``,#`P,#`P,````!J!0``
XM&``8&!@8&!B8<&L&P,#`S-CP\-C,````;`+`P,#`P,#`P,````!M"@````#_
XM`,R`S,#,P,S`S,#,P````````&X'``#\QL;&QL;&````;P<``'S&QL;&QGP`
XM``!P!P``_,;&QL;&_,#``'$'``!^QL;&QL9^!@8`<@8``-S at P,#`P,````!S
XM!@``>,3@>!R,>````'0$8&#P8&!@8&`P````=0<``,;&QL;&QGP```!V!P``
XMQL;&QL;$^````'<*`````,S`S,#,P,S`S,#,@/\`````````>`<``,;&QGS&
XMQL8```!Y!P``QL;&QL;&?@:&?'H&``#\#!@P8,#\````>P@``#A at 8,!@8#@`
XM``!\`L#`P,#`P,#`P,#``'T(``#@,#`8,##@````?@@```!@D at P```````"`
X!``!\
X`
Xend
SHAR_EOF
uudecode < s2_temp_.tmp && rm -f s2_temp_.tmp &&
chmod 0644 showface.com || echo "restore of showface.com fails"
sed 's/^X//' << 'SHAR_EOF' > skipblk.asm &&
X;put into the public domain by Russell Nelson, nelson at clutx.clarkson.edu
X
X	public	skip_blanks
Xskip_blanks:
X	lodsb				;skip blanks.
X	cmp	al,' '
X	je	skip_blanks
X	cmp	al,HT
X	je	skip_blanks
X	dec	si
X	ret
X
SHAR_EOF
chmod 0644 skipblk.asm || echo "restore of skipblk.asm fails"
exit 0
--
--russ (nelson at clutx [.bitnet | .clarkson.edu])  Russ.Nelson@$315.268.6667
It's better to get mugged than to live a life of fear -- Freeman Dyson



More information about the Alt.sources mailing list