This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's z80 & ez80 Assembly subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Z80 & 68k Assembly => z80 & ez80 Assembly
Author Message
Jeffrey


Member


Joined: 12 Jun 2003
Posts: 212

Posted: 01 Nov 2003 03:51:55 pm    Post subject:

Either I suck at ASM or have bad luck, probably a combination of both. I am trying to detect programs on the ti-83+, and then display them. I am using bcall(_findalphaup). When I run the program it outputs all of the wrong stuff. I tried using bcall(_dispOP1a) instead of bcall(_puts), but then it says "OVERFLOW" error. Here is my source, any ideas?


Code:
;Standard template for ti83+ asm programs
#include "ti83plus.inc";File needed to access system routines
.org userMem-2   ;Define where to start in memory
.db $BB,$6D   ;AsmPrgm instruction


   bcall(_ZeroOp1)
   ld a,ProgObj
   ld (Op1),a
   ld a,00
   ld (op1+1),a
   
   
   bcall(_findalphaup)
   ret c

   bcall(_formbase)
   bcall(_Op3toOp1)
   ld hl,op1
   bcall(_puts)

   ret

   

.end    ;End of code
Back to top
sgm


Calc Guru


Joined: 04 Sep 2003
Posts: 1265

Posted: 02 Nov 2003 12:07:22 am    Post subject:

Jeffrey wrote:

Code:
   bcall(_findalphaup)
   ret c

   bcall(_formbase)
   bcall(_Op3toOp1)
   ld hl,op1
   bcall(_puts)

I take it you done even have the slightest clue as to what this does? I suggest you try to find out, because what you are doing makes absolutely no sense.
Back to top
Jeffrey


Member


Joined: 12 Jun 2003
Posts: 212

Posted: 02 Nov 2003 11:57:00 am    Post subject:

Find alpha up finds the next program in memory and stores it to OP1. Formbase changes OP1 to a null terminated displayable string in OP3. Op3 to Op1 moves the contents of OP3 to Op1. Loading OP1 into hl and then using (puts) would display the contents of OP1.

Of course that doesnt work. I was asking why? I have tried it without formbase, just the alphaup, but then how do you display OP1?

I know I am a novice programmer in ASM, extremely unexperienced with the language. I agree, that I have no clue what I was doing there. I dont supposed you were born with the knowledge of ASM programming. Instead if discouraging someone, why dont you try to post something useful, like an answer?
Back to top
David
The XORcist!


Advanced Member


Joined: 20 May 2003
Posts: 268

Posted: 07 Nov 2003 06:03:35 am    Post subject:

Yeah sigma, you aren't here to be supercilious to those who happen to be less experienced than you in asm.

Jeffrey, _findalphaup returns the program name as a null terminated string in OP1, so there's no need to convert it. _FormBase convert numbers to strings, you see.
All you have to do is just to point HL to OP1+1, where the first char of the program name is, and then do a bcall(_puts).


Code:
 ld hl,progobj;H=0, L=progobj
 ld (op1),hl  ;(OP1)=progobj, (OP1+1)=0

nextprog:
 bcall(_findalphaup)
 ret c
 ld hl,op1+1
 bcall(_puts)
 bcall(_newline)
 jr nextprog


Last edited by Guest on 07 Nov 2003 06:06:36 am; edited 1 time in total
Back to top
Jeffrey


Member


Joined: 12 Jun 2003
Posts: 212

Posted: 07 Nov 2003 04:26:52 pm    Post subject:

(First post as UTI member)---

Thank you very much. It was way less complicated than I was making it out to be... thanks again!
Back to top
Display posts from previous:   
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
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement