Hi guys! I'm starting to learn assembly programming. I only know C programming so it's not my first attempt at a programming language.
I've started at reading the 28 days guide. Then I've read some other guides. But I can't manage to get working the simplest program ever: hello world.
First, I had to define B_CALL because with every ti83plus.inc that I've found, TASM gave me unrecognized "something" error. Then, when I test the program at my calc (ti83plus) it only displays a zero and that's all. The weirdest part, is I tried to make a clrlcdfull program and I get the same output in display. I also tried to use some codes posted in this forum and nothing, same output.

My setup: Thinkpad 600x laptop with Windows XP, TASM compiler and var8x converter. It's my programming rig because this ancient laptop has com ports Smile



Last code I tried to use:


Code:
.NOLIST
#define EQU .equ
#define equ .equ
#define END .end
#define end .end
#define B_CALL(xxxx) rst 28h \ .dw xxxx
#include "ti83plus.inc"
.LIST
.org 9D93h
        .db $BB,$6D
   B_CALL(_ClrLCDFull)
   ld a,0
   ld(curCol),a
   ld(curRow),a
   ld hl,text
   B_CALL(_PutS)
   ret
text:
   .db "Hola Mundo",0
   
.end
end


PS: sorry if my grammer isn't perfect. English isn't my native language.[/img]
A few suggestions:
(1) Please consider using Brass (via the Doors CS SDK) or SourceCoder 3 rather than TASM.
(2) Did you use Asm() to run the program? From the screenshot, it's not clear if you did.
(3) The code to your program looks fine. Hopefully (1) fixes the problems with ti83plus.inc.
Thank you KermMartian! I've tried to use Source Coder 3 but I don't know how to work without an 8xx file. It's easier for me to work in a txt file and then do compiling and converting. It's possible to work like this with SC3? And no, I didn't used Asm command. I've tried it now but I'm getting "ERR:INVALID".

I didn't try in my TI 83, but besides some adress differences, I assume they are equal to coding. Maybe I should try later at home with it.
ramiro77 wrote:
I didn't try in my TI 83, but besides some adress differences, I assume they are equal to coding.


It has a few more differences than that, since it's a bit older. ROM_CALL() is used to call ROM routines, and there's fewer ROM_CALL() than the TI-83 Plus has B_CALL()s. You can find the include file "ti83asm.inc" online in a few places. Other than that and a different .org, you should find it to be quite similar.

There's a quirk in storing and running assembly programs: as there is no Asm( function, you would run an assembly program with Send(9prgmYOURPRGM). Only 'unsquished' programs can be run that way. 'Unsquished' programs hold the hexadecimal code as text in a standard program; var8x should output unsquished code, and if you open up one in the TI-83's onboard program editor, you should see the hex code. 'Squished' programs store the assembly as bytes instead of text, which makes squished programs about twice as small; however, squished programs can't be run without something to load the squished code, so Send(9 doesn't work for these. Squishing is more efficient with memory, but not as simple to use.

An example of an unsquished program, written on-calc:

Code:
PROGRAM:YOURPRGM
:C9
:End
:0000
:End
C9 is the ret instruction, so this program does nothing. More info on this can be found in TI's official TI-83 assembly documentation (which also has the include files).

SourceCoder 3 is probably a bit sluggish with a Thinkpad 600x, I would suggest using Brass or spasm with editing done in something like Notepad++.
Thank you CVsoft! Well, I'll keep trying with my 83+ because its my main calculator. I understand what you explained to me. So isn't possible to run assembly programs without Asm( function? I mean running them directly from prgm menu.

Also I'll take a look at Spasm.
If you use special programs, like Doors CS 7 or zStart for example, they add the "Asm(" automatically so you can run the programs without it. But normally you need to type "Asm(prgmXXX".
Well, I'll have to get used to that. But isn't a problem. Right now I'm giving a shot to spasm.
I have another question: I've found many include files for ti 83+ around the web. Which one would you suggest me to use?

Thanks a lot to all of you! You're beeing really helpful Smile

UPDATE: Finally got it working! Spasm + some include files (Right now I'm using ti83plus.inc only).
Hola Ramiro, me alegra ver otrx programadorx hispanohablante interesarse por el z80 Wink

This is, i believe, the most up-to-date include file: http://wikiti.brandonw.net/index.php?title=83Plus:OS:ti83plus.inc
CVSoft wrote:
It has a few more differences than that, since it's a bit older. ROM_CALL() is used to call ROM routines, and there's fewer ROM_CALL() than the TI-83 Plus has B_CALL()s. You can find the include file "ti83asm.inc" online in a few places. Other than that and a different .org, you should find it to be quite similar.
Are you sure you aren't confusing the 83 with the 82? The 82 uses the ROM_CALL() syntax, the 83 calls OS routines directly (call _PutS).
  
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