[A83] Re: Error: Undefined


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

[A83] Re: Error: Undefined




Okay, first of all:
You're programming a TI-83 PLUS!!!!

your source file looked like this:

-----
#define equ .equ
#define EQU .equ
#define end .end
#define END .end

#include "tokens.inc"
#include "ti83asm.inc"

.org 9327h ; (speculation)
  ld a, 6
  ld b, 6
  add a,b
  call _setxxop1
  call _stox
  ret

.end
----

now, I'm gonna show you your problems:
(everything following ';' means commented,
"wrong" is just meant as not right, no offense meant!) 

-----
#define equ .equ
#define EQU .equ
#define end .end
#define END .end

; The following line should be added, why is explained later:

#define bcall(xxxx) .db $ef \ .dw xxxx


; The following lines are wrong:
; #include "tokens.inc"
; #include "ti83asm.inc"
; They are meant for the simple TI-83, not for the TI83 Plus!
; Use "ti83plus.inc" from the mirageos package instead!
; your line should then read:

#include "ti83plus.inc"

; Following is wrong too:
; .org 9327h ; (speculation)
; since the TI83 Plus uses another start point, you should use:

.org 9d95h

  ld a, 6
  ld b, 6
  add a,b

; Following lines are wrong too:
;  call _setxxop1
;  call _stox
; since the TI83 Plus uses changeable flash pages (if you don't get this it's 
; okay), TI "invented" another way to make system calls, by using 
; "bcall(your_system_call)" (Thats what we've put in above!)
  ret

.end
----
Now your code should work.

Oh, and remember, next time you send in a question,
don't just give the assembled result, give the source code too,
most people don't take time to disassemble it ;-)

Good luck,
--Peter-Martijn


 
> 
> I try to learn ti-83+ asm by the tutorals on ticalc =
> (http://www.ticalc.org/programming/columns/ti83logs/vol1.html)
> I tried to use the first example. After I=B4ve used tasm I have a file =
> which contains:=20
> AsmPrgm
> 3E03060680CD
> 744ACDD44EC9
> 
> After I send this to my calculator I run AsmComp(prgmTEST, prgmTEST2). =
> All OK.
> But when I try to run it by Asm(prgmTEST2) I get an error message: =
> UNDEFINED. Why?
> I've tried to download other sources but with the same result.
> 
> /Micke
> 
> 
> 





References: