Re: A86: changing a variable to op register
[Prev][Next][Index][Thread]
Re: A86: changing a variable to op register
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"
References: