Hello All!

I was interested by the concept of programming in Assembly. I am an experienced programmer proficient in multiple language, and it occurred to me that I should write a Z80 Assembly program for my TI 84 C Silver Edition. I am relatively new to assembly, having studied higher level languages such as C++ and C#. TI-BASIC is too slow and feature-lacking for my purposes, so I have turned to Assembly.

I used the code from a tutorial for writing Assembly for the TI 84 Plus, but every time I execute the compiled .8XP on my calculator, (built with Brass and var8x) I get a "BASIC Exec error: SYNTAX." Additionally, the program, which was actually ASM, shows up as BASIC in Doors CSE 8.1.

This is my current code:

Code:

.nolist
#include "ti84pcse.inc"
#define ProgStart userMem-2
.list
.org    ProgStart - 2
    .db    t2ByteTok, tAsmCmp
    b_call(_ClrLCDFull)
    ld    hl, 0
    ld    (CurRow), hl ; penRow/penCol are for the small text (_vPutS) not the large text (_putS).
    ld    hl, msg
    b_call(_PutS)            ; Display the text
    b_call(_NewLine)
    ret

msg:
    .db "Hello world!", 0
.end
.end


I was shocked and disappointed to see that even my simple Hello World program would not run. Please help me and either correct my code or give me a skeleton that I can use in writing my TI 84+CSE ASM programs!

HELP!!!!!

Thanks,

Oda Hideyoshi
Sure; of course. I believe the issue is on this line:

Code:
.db    t2ByteTok, tAsmCmp

Which has been changed to this for the CSE line:

Code:
.db tExtTok,tAsm84CCmp

Hope this helps! 🙂 Also, welcome to Cemetech, odahideyoshi!
yes it really does! thanks! Is that my only error?
Welcome to Cemetech! It sounds like you're potentially using an older version of TI-83 Plus ASM in 28 Days. Although it's still not going to directly apply to the color calculator, our newer version fixes a number of the errors in the older tutorial:
http://media.taricorp.net/83pa28d/lesson/toc.html

In other news, what tools are you using to build and test your programs? If you need help with things like an assembler or an emulator, we can certainly help.
@KermM:
odahideyoshi wrote:
(built with Brass and var8x)
Ivoah wrote:
@KermM:
odahideyoshi wrote:
(built with Brass and var8x)
Neither of those is an emulator or a toolchain, so I figured it was still worthwhile to ask. 🙂 If he wasn't entirely pleased or was looking for new suggestions, I was going to suggest the Doors CSE SDK or SourceCoder, used with jsTIfied, since he mentioned Doors CSE in the first post.
The code now shows up as ASM (you caught the problem, thanks!) but when I execute it, it shows "E[theta symbol]Hello World" instead of just "Hello World." How do I fix this?

Finally, I have seen smaller font on other assembly programs--how do I implement this in my program?

Thanks,
Oda Hideyoshi
You're subtracting two from the ProgStart twice:
Code:
#define ProgStart userMem-2
.list
.org    ProgStart - 2
You only need -2 in one place. If you wanted to use small font in this example, you'd use pencol instead of curcol, penrow instead of pencol, and _vputs instead of _Puts.
Sorry: that was foolish of me:
I didnt realize that userMem-2 was a minus expression (silly me) i thought it was a location in memory.

Thank you!
What would you suggest that I use to test my compiled Assembly programs? I am currently using WabbitEmu, but it is annoying because I need to load and save states before uploading the program, and this is quite a hassle. What are my alternatives?

Thanks,
Oda Hideyoshi
Well, there is always JsTIfied: http://www.cemetech.net/projects/jstified/
But as for the saving and restoring the state in WabbitEmu, you should only need to press F10 and reload your program. It should automatically overwrite any program; and if not, you can always delete the .sav file located in AppData\Roaming\Wabbit. 🙂
I imagine you can write a simple .bat file that assembles your code and sends it to WabbitEmu automatically, something like:

Code:
spasm program.z80 program.8xp
WabbitEmu program.8xp
That's more or less what my asm work environment looks like, except with TilEm2.
  
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