Message-ID: <484@voder.UUCP>
Date: Mon, 29-Oct-84 16:30:50 EST
Article-I.D.: voder.484
Posted: Mon Oct 29 16:30:50 1984
Date-Received: Fri, 2-Nov-84 04:13:23 EST
References: <419@voder.UUCP>
Organization: National Semiconductor, Santa Clara
Lines: 27
[untouchable line]
I posted the source to a `touch' command for MS-DOS 2.x; it ran fine on
my PC at work (where I used v 1.27 of the Microsoft Macro Assembler), but
I later discovered that a bug in the IBM Macro Assembler v1.00 causes
incorrect assembly. The problem is in the sixth line below (the one with
`xor' in it):
> to_upper:
> cmp al,'a' ; convert to UC
> jb short uc_end ; this isn't lc
> cmp al,'z'
> ja short uc_end ; nor is this
> xor al,'a' xor 'A' ; this one was
> uc_end: ret
One work-around is to change the line to:
xor al,'a'-'A' ; this one was
This bug is among those documented a few months ago in Dr Dobb's Journal, I
think (but I haven't checked). Another work-around, of course, is to use the
Microsoft assembler.
As long as I'm here, I'd like to mention that the message:
> no_file db 'touch: file not found',0dh,0ah,'$'
in my code is probably misleading; it would be more accurate if it said:
no_file db 'touch: no matching file name',0dh,0ah,'$'
or some such.
--
Gene E. Bloch (...!nsc!voder!gino)