Hi,
I have experience in ti-basic, and I want to move on to assembly programming, but I just can't find guides for it.
The other guides I found are mostly for other versions like the ti-83 and don't work on my ti-84.
I really appreciate any help.
Asm in 28 days will get you going on the correct path, and the Doors CSE SDK will set you up on compiling. The difference that I'm aware of between monochrome and the color calc is how you call upon the lcd. There might be other smaller ones, but you'll have to wait on one of the asm gurus to pop in to answer them. If you have further questions, feel free to ask away!
I have tested this code which came from here:
https://www.youtube.com/watch?v=etdKnhwWtwA

but I think it is only for ti 83 because something is wrong with it i think it is the bcall thats not working
AsmPrgm84C
219F9D
EF0A45
EF2E45
C9
48692100
tifreak8x wrote:
Asm in 28 days will get you going on the correct path, and the Doors CSE SDK will set you up on compiling. The difference that I'm aware of between monochrome and the color calc is how you call upon the lcd. There might be other smaller ones, but you'll have to wait on one of the asm gurus to pop in to answer them. If you have further questions, feel free to ask away!

besides i have tested learning asm in 28 days the first hello world code doesn't work
Be more specific than "doesn't work".

There are a few important differences for the CSE:
  • Lots of things change address, so you need ti84pcse.inc rather than ti83plus.inc. You can get this from the DCSE 8 SDK.
  • The identifying token for asm programs is different. (tAsm84CCmp)
  • Many bcalls aren't available because we haven't discovered where they moved to yet.
  • The display works in an entirely different fashion.
"Hello World" for CSE, since it doesn't need to change much:
Code:
#include "ti84pcse.inc"

.org UserMem - 2
.db tExtTok, tAsm84CCmp

    bcall(_maybe_ClrLCDFull)
    bcall(_HomeUp)
    ld hl, str
    bcall(_PutS)
    ret

str:
    .db "Hello, world!", 0
Oh and can you also tell me what the editing program is?
You can use any text editor, such as Notepad, Notepad++, Programmer's Notepad, Text Wrangler, Sublime--whatever.
And I also want to know hex code not just z80.
You should also note that http://wikiti.brandonw.net/index.php?title=Calculator_Documentation is a great resource that outlines a lot of the hardware differences between the z80 line of calcs.
Thank you Tari, I hadn't had a chance to post my questions but I was sure there had to be something wrong with the code, it was giving me syntax errors.
tmwilliamlin168 wrote:
And I also want to know hex code not just z80.


What do you mean by this sentence? "Hex code" is not a programming language, it's a method of representing numbers. If you mean that you want to program in machine language by memorizing hexadecimal opcodes, rather than using an assembler, this sounds like a terrible idea in almost all circumstances for two reasons:
a) There's a 1-1 correspondence between assembly code and machine code. Assembly literally consists of assigning mnemonics to different instructions, because the human brain remembers language better than numbers. If you have access to a computer, there's no reason not to let it remember the mapping for you.
b) Hexadecimal representation of machine code by itself actually tells you very little about what the opcode is doing, making it more difficult to memorize. If you really really want to learn and understand machine code, learn the binary representation, which in many cases actually conveys information about the structure of the opcode and the arguments it takes. From binary it's trivial to convert into whatever representation is required.
elfprince13 wrote:
tmwilliamlin168 wrote:
And I also want to know hex code not just z80.


What do you mean by this sentence? "Hex code" is not a programming language, it's a method of representing numbers. If you mean that you want to program in machine language by memorizing hexadecimal opcodes, rather than using an assembler, this sounds like a terrible idea in almost all circumstances for two reasons:
a) There's a 1-1 correspondence between assembly code and machine code. Assembly literally consists of assigning mnemonics to different instructions, because the human brain remembers language better than numbers. If you have access to a computer, there's no reason not to let it remember the mapping for you.
b) Hexadecimal representation of machine code by itself actually tells you very little about what the opcode is doing, making it more difficult to memorize. If you really really want to learn and understand machine code, learn the binary representation, which in many cases actually conveys information about the structure of the opcode and the arguments it takes. From binary it's trivial to convert into whatever representation is required.

Using hex code on the calculator. I'm just interested in knowing it.
Then still (b) applies.
You can also assemble the code and look at the hex output from the assembler. If you have it produce a listing (.lst) file, you'll have the memory address, the hex code, and the assembly mnemonic all side by side. I'd recommend writing your code on the computer and if absolutely necessary copy the hex code from the listing or uncompressed hex output. But it's probably worth it just to spend the $5 on a link cable.
After hours, finally find this one Ti84+cse assembly programming source that actually work, with minor issues ...

1) Seems the "Hell" is deleted or not shown. But if you add words "Hello World, from ABC", the words say "o World, from ABC" appeared.

2) Can ASM but not AsmComp( in Ti84+cse

3) I use the Doors CS7 SDK on Mac. all work except it provides a kind of not exactly "warning message" as there is no warning ... The program I named H4OK.asm and "sh compile.sh H4OK.asm"

with extra 2 lines not sure what it meant:


Code:

compile.sh: line 17: ${varname^^}: bad substitution
WARNING: The runtime version supported by this application is unavailable.



Full terminal list as below:


Code:

----------------------------------
   Doors CS Assembler/Compiler
          Version 2.0L
     Written by Kerm Martian
     http://www.Cemetech.net
----------------------------------
----- Assembling H4OK.asm for the TI-83/84 Plus...
compile.sh: line 17: ${varname^^}: bad substitution
WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319
Brass Z80 Assembler 1.0.4.11 - Ben Ryves 2005-2006
--------------------------------------------------
Assembling...
Pass 1 complete. (174ms).
Pass 2 complete. (57ms).
Writing output file...
Errors: 0, Warnings: 0.
Writing list file...
Done!
----- H4OK.asm for the TI-83/84 Plus Assembled and Compiled.
TI-83 Plus version is H4OK.asm.8xp


mono version as below:


Code:

Mono JIT compiler version 6.12.0.162 (2020-02/2ca650f1f62 Tue Nov 30 10:18:09 EST 2021)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
   TLS:           
   SIGSEGV:       altstack
   Notification:  kqueue
   Architecture:  amd64
   Disabled:      none
   Misc:          softdebug
   Interpreter:   yes
   LLVM:          yes(610)
   Suspend:       hybrid
   GC:            sgen (concurrent by default)
Quote:

Code:
compile.sh: line 17: ${varname^^}: bad substitution
WARNING: The runtime version supported by this application is unavailable.
${varname^^} is a bash-ism to convert the string to all uppercase, so that the output will be H4OK.8xp; since your input is already H4OK.asm, it seems like all is well. Please try using bash instead of sh if you have it available, though.

Quote:
1) Seems the "Hell" is deleted or not shown. But if you add words "Hello World, from ABC", the words say "o World, from ABC" appeared.
Are you using Tari's source code above?
KermMartian wrote:
Quote:

Code:
compile.sh: line 17: ${varname^^}: bad substitution
WARNING: The runtime version supported by this application is unavailable.
${varname^^} is a bash-ism to convert the string to all uppercase, so that the output will be H4OK.8xp; since your input is already H4OK.asm, it seems like all is well. Please try using bash instead of sh if you have it available, though.


Strange as the shebang is already #!/bin/bash as the first line of the compile.sh
and I do also

Code:
 bash compile.sh H4OK.asm
, hence I am not sure what happens.

Quote:
1) Seems the "Hell" is deleted or not shown. But if you add words "Hello World, from ABC", the words say "o World, from ABC" appeared
Quote:
Are you using Tari's source code above?
.


So confusing me that actually this is this thread and why I post it here https://www.cemetech.net/forum/viewtopic.php?t=10630 and repeat here. Yes it is Teri source.


Code:

#include "ti84pcse.inc"

.org UserMem + 2
.db tExtTok, tAsm84CCmp

    bcall(_maybe_ClrLCDFull)
    bcall(_HomeUp)
    ld hl, str
    bcall(_PutS)
    ret

str:
    .db "Hello, world from ABC!", 0


This will do it but other than the above shell issue of variable there the asm program can produce the message but you have to add 4 characters it erased!


Code:

#include "ti84pcse.inc"

.org UserMem + 2
.db tExtTok, tAsm84CCmp

    bcall(_maybe_ClrLCDFull)
    ; bcall(_ClrLCDFull)
    ; this does work got error message
    ; "Error: Could not parse
    ;  expression '_ClrLCDFull'
    ;  in data list: Invalid number [zz"
    ;
    bcall(_HomeUp) ; what does it does I wonder
    bcall(_NewLine)
    bcall(_NewLine)
    ld hl, str1
    bcall(_PutS)
    bcall(_NewLine)
    ld hl, str2
    bcall(_PutS)
    ret

str1:
    .db "____Hello Hi, world from ABC1!", 0

str2:
    .db "____Hello Hi, world from DEF2!", 0
Ah, there's an error in Tari's source. It should be:

Code:
.org UserMem - 2
.db tExtTok, tAsm84CCmp

so that the first instruction in your program falls at UserMem.

Edit:
Quote:

Code:
bcall(_HomeUp) ; what does it does I wonder
Moves the homescreen cursor row and column to the top-left corner. c.f. the 83psysroutines.pdf documentation: https://archive.org/details/pdfy-UJfjMPdvGB444Am_ .
KermMartian wrote:
Ah, there's an error in Tari's source. It should be:

Code:
.org UserMem - 2
.db tExtTok, tAsm84CCmp

so that the first instruction in your program falls at UserMem.

Edit:
Quote:

Code:
bcall(_HomeUp) ; what does it does I wonder
Moves the homescreen cursor row and column to the top-left corner. c.f. the 83psysroutines.pdf documentation: https://archive.org/details/pdfy-UJfjMPdvGB444Am_ .


Good Idea

Many thanks.

What a surprise it still work even if the memory location is moved 4 bytes in advance. Need to learn how it still work now!
Quote:
What a surprise it still work even if the memory location is moved 4 bytes in advance. Need to learn how it still work now!
The items that would be off by 4 bytes are: absolute jump targets (jp), call targets within the program (call), and memory addresses of constants and variables within the program (e.g. your str1 and str2). Straight-line code or code that only uses relative jumps (jr) is relocatable, a fact that some programs take advantage of!
  
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 2
» 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