Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #2912

detecting if ASCII value is a letter

Newsgroups comp.sys.apple2.programmer
Date 2016-08-11 10:49 -0700
Message-ID <796f9375-af4b-497a-a448-e2338d04d882@googlegroups.com> (permalink)
Subject detecting if ASCII value is a letter
From Mark Lemmert <mark.lemmert@gmail.com>

Show all headers | View raw


Does anyone know if there is a more efficient way than the code below to detect if an ASCII value is a letter (A-Z). It seems like there should be a bit level way of doing it but I haven't been able to figure it out. 

I'm using this in conjunction with AND #$DF to convert the ASCII value to lower case, but unless I'm missing something I need to make the ASCII value is a letter first to avoid corrupting non-letter values. 

Thanks!


	lda value
	cmp #$C1
	bcc .NOT.A.LETTER
	cmp #$FB
	bcs .NOT.A.LETTER2

Back to comp.sys.apple2.programmer | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

detecting if ASCII value is a letter Mark Lemmert <mark.lemmert@gmail.com> - 2016-08-11 10:49 -0700
  Re: detecting if ASCII value is a letter Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-08-11 13:04 -0700
  Re: detecting if ASCII value is a letter Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-08-11 13:05 -0700
  Re: detecting if ASCII value is a letter Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-08-11 13:44 -0700
    Re: detecting if ASCII value is a letter Mark Lemmert <mark.lemmert@gmail.com> - 2016-08-11 14:25 -0700
    Re: detecting if ASCII value is a letter Michael J. Mahon <mjmahon@aol.com> - 2016-08-11 23:44 -0500
  Re: detecting if ASCII value is a letter Mark Lemmert <mark.lemmert@gmail.com> - 2016-08-11 16:26 -0700
    Re: detecting if ASCII value is a letter Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-08-11 18:28 -0700
      Re: detecting if ASCII value is a letter Michael J. Mahon <mjmahon@aol.com> - 2016-08-12 02:54 -0500
        Re: detecting if ASCII value is a letter Mark Lemmert <mark.lemmert@gmail.com> - 2016-08-12 07:37 -0700
          Re: detecting if ASCII value is a letter Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-08-12 08:10 -0700
          Re: detecting if ASCII value is a letter mmphosis <mmphosis@macgui.com> - 2016-08-12 15:57 +0000
            Re: detecting if ASCII value is a letter Mark Lemmert <mark.lemmert@gmail.com> - 2016-08-12 11:11 -0700
              Re: detecting if ASCII value is a letter Michael J. Mahon <mjmahon@aol.com> - 2016-08-12 16:15 -0500
              Re: detecting if ASCII value is a letter Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-08-13 09:53 -0700
                Re: detecting if ASCII value is a letter Michael J. Mahon <mjmahon@aol.com> - 2016-08-13 15:29 -0500
                Re: detecting if ASCII value is a letter Mark Lemmert <mark.lemmert@gmail.com> - 2016-08-19 19:22 -0700
              Re: detecting if ASCII value is a letter rich.martin@gmail.com - 2016-08-13 20:49 -0700
      Re: detecting if ASCII value is a letter Anthony Lawther <alawther@spammenot.mac.com> - 2016-08-14 16:09 +0900
        Re: detecting if ASCII value is a letter Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-08-15 09:09 -0700
    Re: detecting if ASCII value is a letter John Brooks <jbrooks@blueshiftinc.com> - 2016-08-11 21:49 -0700
      Re: detecting if ASCII value is a letter Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-08-12 06:17 -0700
        Re: detecting if ASCII value is a letter Mark Lemmert <mark.lemmert@gmail.com> - 2016-08-12 07:40 -0700
          Re: detecting if ASCII value is a letter Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-08-12 10:37 -0700
            Re: detecting if ASCII value is a letter Mark Lemmert <mark.lemmert@gmail.com> - 2016-08-12 11:41 -0700
              Re: detecting if ASCII value is a letter Michael J. Mahon <mjmahon@aol.com> - 2016-08-12 16:15 -0500
            Re: detecting if ASCII value is a letter D Finnigan <dog_cow@macgui.com> - 2016-08-12 21:09 +0000
              Re: detecting if ASCII value is a letter Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-08-12 17:35 -0700

csiph-web