I need an ASM script that is able to take a list name, and some list data, and store the list data.

Kinda shows what I want, I guess. [url is here]
^^ Image is big, didn't want to flood the thread Smile

Edit:
PT_ wants more info, but my wording on how data is inputed is ambiguous. I am able to adapt to the script's requirements.
There we go, input is the name in Str0, and the list in Ans, be sure they exists! Wink

It's not optimized, but who cares Razz


Code:
#include "ti84pce.inc"
.db tExtTok, tAsm84CECmp
.org UserMem

start:
   call _AnsName
   call _ChkFindSym
   push de
      ld hl, Str0Name
      call _Mov9ToOP1
      call _ChkFindSym
      ld hl, OP1
      ld (hl), ListObj
      inc hl
      ld (hl), tVarLst
      inc hl
      ex de, hl
      ld bc, 0
      ld c, (hl)
      inc hl
      inc hl
      ldir
      ex de, hl
      ld (hl), 0
      call _ChkFindSym
      call nc, _DelVar
   pop hl
   ld bc, 0
   ld c, (hl)
   inc hl
   ld b, (hl)
   inc hl
   push hl
      push bc
      pop hl
      push hl
         call _CreateRList
         inc de
         inc de
      pop bc
      push bc
      pop hl
      add hl, hl
      add hl, hl
      add hl, hl
      add hl, bc
      push hl
      pop bc
   pop hl
   ldir
   ret

Str0Name:
   .db StrngObj, tVarStrng, tStr0, 0




Hex string:

Code:
CDF40F02CD0C0502
D521D5A8D1CD2003
02CD0C050221F805
D0360123365D23EB
010000004E2323ED
B0EB3600CD0C0502
D4880502E1010000
004E234623E5C5E1
E5CD3C05021313C1
C5E129292909E5C1
E1EDB0C904AA0900
PT_ is a god, I tell you. According to codewalr.us chat, he started at 6:06 pm, and ended < 30 min later.

Thank's a ton, this will help a lot on my "secret project" I have been alluding to in SAX!
*facepalm*
I went to all the trouble of typing out the code, double and triple checking it, and wondering why it wouldn't work, before I realized that this is an ASM program for the CE. What's the 83+ equivalent?
RandomGuest wrote:
*facepalm*
I went to all the trouble of typing out the code, double and triple checking it, and wondering why it wouldn't work, before I realized that this is an ASM program for the CE. What's the 83+ equivalent?

Replace all the calls by bcall's, and you are almost done Smile

Here you go, untested:

Code:
EF524BEFF142D521
DE9D00EF7A41EFF1
4221788400360123
365D23EB06004E23
23EDB0EB3600EFF1
423803EF5143E14E
234623E5C5E1E5EF
15431313C1C5E129
292909E5C1E1EDB0
C904AA0900
PT_ wrote:
RandomGuest wrote:
*facepalm*
I went to all the trouble of typing out the code, double and triple checking it, and wondering why it wouldn't work, before I realized that this is an ASM program for the CE. What's the 83+ equivalent?

Replace all the calls by bcall's, and you are almost done Smile

Here you go, untested:

Code:
EF524BEFF142D521
DE9D00EF7A41EFF1
4221788400360123
365D23EB06004E23
23EDB0EB3600EFF1
423803EF5143E14E
234623E5C5E1E5EF
15431313C1C5E129
292909E5C1E1EDB0
C904AA0900



Tested - it works! Thanks PT_! I will certainly add this to my list of programs called "List of programs that I know work but have no idea HOW they work". AKA, I have no idea how to ASM.
Could someone help me modify the code so that if there is no list in ans (or just create a different program for it, it doesn't matter), it returns the list named in Str0? I need this to recall saves. (Like, you store a save into a user defined list, then, later in the program, recall a list whose name is in Str0)
*bump* I need this ^^

I don't like bumping, and spent a day debating whether I should or not. Sorry!
Also checks to make sure the list exists if not then creates it with dimension of zero. Input is string in Ans:


Code:
CD 50 0F 02
0E 00 ED 4C
1A 4F 13 13
21 F8 05 D0
36 01 23 36
5D 23 EB ED
B0 CD 0C 05
02 38 04 C3
30 0F 02 B7
ED 62 CD 3C
05 02 CD C8
02 02 18 EF


Hope this helps Smile
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement