RE: A86: changing a variable to op register


[Prev][Next][Index][Thread]

RE: A86: changing a variable to op register




Clarification:

While programming in basic, somethings I come across are storing 
characters
into lists or matrixes.  Since TI-OS doesn't put characters in lists or
matrixes, I have made a loop in basic that gets a number value 
depending on
the character.  The only problem is basic is slow in doing this for both
uppercase letters and lowercase letters. The program would need to take a
character stored in a variable (say 'letter') and then return 
back a number
also stored in a variable (say 'number').  That way, I can use 
basic to get
the letter from the user and then use basic to display the number and use
asm to do the comparing.

> -----Original Message-----
> From: owner-assembly-86@lists.ticalc.org
> [mailto:owner-assembly-86@lists.ticalc.org]On Behalf Of Joshua J Seagoe
> Sent: Tuesday, November 09, 1999 10:34 PM
> To: assembly-86@lists.ticalc.org
> Subject: Re: A86: changing a variable to op register
>
>
>
> there is a _rclans routine, by the way
>
> -josh
>
> On Tue, 09 Nov 1999 16:57:02 -0800 Chris Phelps <chicane@reninet.com>
> writes:
> >
> >Richins wrote:
> >
> >> How would I use a variable, made in TI-OS, in assembly?  I want to
> >be able
> >> to take a letter, compare it, and then return back a number
> >associated with
> >> that number.  I want the letter inputed to be from TI-OS and the
> >number
> >> returned to work with TI-OS.
> >>
> >> Thanks
> >
> >I think you are going to need to clarify. This is what im reading:
> >You want to store a 1 byte string, with a single character, and have
> >an asm
> >program figure out the ascii code, and then store it to Ans or
> >something?
> >
> >This might work (input from Ans:
> >
> >LookupRoutine:
> >   ld  hl,stringName-1
> >   rst  20h
> >   rst  10h
> >   ret  c   ;doesnt exist if carry set
> >   ld   a,(_OP1)
> >   cp  $0C
> >   ret  nz              ;return if Ans isnt a string
> >   ld   a,b
> >   ex  de,hl
> >   call _load_ram_ahl
> >   inc hl
> >   inc hl                ;past the size bytes
> >   ld   a,(hl)
> >  call _setxxop1  ;think thats the propper call
> >  call _stoans      ;hope thats the right one too.
> >  ret
> >
> >StringName:
> >   .db $03,"Ans"
> >
> >
>
> ___________________________________________________________________
> Get the Internet just the way you want it.
> Free software, free e-mail, and free Internet access for a month!
> Try Juno Web: http://dl.www.juno.com/dynoget/tagj.
>
> 


References: