www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/10/17/14:55:24

Date: Thu, 17 Oct 2002 14:55:24 -0400
Message-Id: <200210171855.g9HItO601338@envy.delorie.com>
X-Authentication-Warning: envy.delorie.com: dj set sender to dj AT delorie DOT com using -f
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp-workers AT delorie DOT com
In-reply-to: <E182F4G-0000mx-00@phekda.freeserve.co.uk>
(rich AT phekda DOT freeserve DOT co DOT uk)
Subject: Re: Updates for distrib/ for 2.04 release [PATCH]
References: <E182F4G-0000mx-00 AT phekda DOT freeserve DOT co DOT uk>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> * use echo instead of becho in batch files (what's becho?);

A program I wrote, attached.  Replacing it is probably a good idea ;-)

	title	escape sequence printer

cseg	segment
	assume	cs:cseg,ds:cseg
	org	100h

start:	mov	si,81h
	mov	cl,ds:[80h]
	mov	ch,0
	cmp	cx,0
	je	exit
	cmp	byte ptr es:[si],' '	; skip leading space if there
	jne	found_nonwhite
	inc	si
	dec	cx
found_nonwhite:

lp1:	mov	dl,[si]
	inc	si
	dec	cx
	or	cx,cx
	js	exit
	cmp	dl,'\'			; quoted character?
	jne	nexact
	mov	dl,[si]			; get next exactly
	inc	si
	dec	cx
	or	cx,cx
	js	exit
	jmp	print
nexact:	cmp	dl,'^'			; control character?
	jne	print
	mov	dl,[si]			; get next control
	inc	si
	dec	cx
	or	cx,cx
	js	exit
	and	dl,1fh
print:
	mov	ah,0eh			; print it
	mov	bl,0fh
	mov	al,dl
	int	10h
	jmp	lp1

exit:	int	20h

cseg	ends
	end	start

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019