I've been learning asm for some time (3 days now lol)
But im learnin fast.. however, how does one store and access data that is in a list in ans? or a matrix?
is it simply storing it to a .db somewhere? (it got me assemble errors but hey im a noob..)
I'd also like to know how you read/write to/from appvars, i sort of get lost there, it didnt seem to work the same as for normal programs (maybe it does though, i think it should work the same)
[TI ASM] list input through ans
Moderator: MaxCoderz Staff
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
- tr1p1ea
- Maxcoderz Staff
- Posts: 4141
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: I cant seem to get out of this cryogenic chamber!
- Contact:
In the TIOS you would do something like this:
And prgmANSLIST would look like this:
That will display the 1st element in the list. To get the 2nd element in the list change HL before calling _GetLtoOp1, like so:
Hope this helps .
Code: Select all
{0,1,2,3,4:Asm(prgmANSLIST
Code: Select all
.nolist
#define end .end
#define END .end
#define equ .equ
#define EQU .equ
#include "ti83plus.inc"
#define ProgStart $9D95
.list
.org ProgStart - 2
.db t2ByteTok, tAsmCmp
start_of_program:
bcall(_RclAns) ; recall Ans
ld hl,1 ; 1st element in Real List
bcall(_GetLtoOp1) ; get element
bcall(_ConvOp1) ; returns a as LSByte
ld h,0
ld l,a ; hl = a, the 1st list element
bcall(_DispHL) ; display hl
ret
.end
.END
Code: Select all
ld hl,2 ; 2nd element in Real List
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
thanx that looks like it should work
what happens if you try to get an element that isnt there though? im guessing your screen gets filled with strage chars - calc turns off - ramcleared?
or does it return 0 in OP1
or is there a "length of list in ans" function?
Edit: actually, nvm that, it returns a nice 0 and no error. But what about FP numbers?
what happens if you try to get an element that isnt there though? im guessing your screen gets filled with strage chars - calc turns off - ramcleared?
or does it return 0 in OP1
or is there a "length of list in ans" function?
Edit: actually, nvm that, it returns a nice 0 and no error. But what about FP numbers?
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am