Code:
.nolist
#include "ti83plus.inc"
#include "dcs7.inc"
.list
.org progstart
   .db $BB,$6D
Start:
   bcall(_ClrLCDFull)
   ld a,0
   ld (curcol),a
   ld (currow),a
   ld hl,HelloWorldMessage
   bcall (_puts)
   bcall (_newline)
   ret
HelloWorldMessage:
   .db "Hello World!",0
.end
END


Here is the code I wrote based upon the instruction of the book. The question I'd like to ask is, is the code meant to be so fast, the string 'Hello World' is barely visible? And if not, what have I done incorrectly.

EDIT:

Ok, sorted now. I also downloaded the source code, and it worked in exactly the same way as my code. Panic Over, case closed.
If you run it from the homescreen with the "asm(" token, "Hello World!" should be left on the screen when the program exits. However, if you run it from a shell it's very likely that the screen will be cleared and you'll be returned to the shell menu before you have a chance to really see it clearly. You could add a simple pause, for example a "bcall(_GetKey)" before the "ret" instruction to wait for a key before quitting the program. Otherwise, yes, it'll all take place in the blink of an eye.

EDIT: As a sidenote, at least in any modern assembler you don't need the END at the end. That was actually due to a bug with the old TASM assembler everyone used to use. I'm not sure about the .end, but i think you wouldn't have any trouble with leaving it out either, though i guess it doesn't hurt leaving it in there.
chickendude wrote:
If you run it from the homescreen with the "asm(" token, "Hello World!" should be left on the screen when the program exits. However, if you run it from a shell it's very likely that the screen will be cleared and you'll be returned to the shell menu before you have a chance to really see it clearly. You could add a simple pause, for example a "bcall(_GetKey)" before the "ret" instruction to wait for a key before quitting the program. Otherwise, yes, it'll all take place in the blink of an eye.

EDIT: As a sidenote, at least in any modern assembler you don't need the END at the end. That was actually due to a bug with the old TASM assembler everyone used to use. I'm not sure about the .end, but i think you wouldn't have any trouble with leaving it out either, though i guess it doesn't hurt leaving it in there.


Thank you very much for your help and prompt response, it is much appreciated.
chickendude wrote:
EDIT: As a sidenote, at least in any modern assembler you don't need the END at the end. That was actually due to a bug with the old TASM assembler everyone used to use. I'm not sure about the .end, but i think you wouldn't have any trouble with leaving it out either, though i guess it doesn't hurt leaving it in there.

The issue with TASM is that every line must end in a newline sequence, else the line is ignored. DOS editors like EDIT will end every line in a newline, but more modern editors will not (you need to include an empty line at the end to do so). Having .end twice seems to have become a popular way to satisfy this requirement, but has mutated into a cargo-cultish "every file needs to have two .ends" rule.
chickendude wrote:
If you run it from the homescreen with the "asm(" token, "Hello World!" should be left on the screen when the program exits. However, if you run it from a shell it's very likely that the screen will be cleared and you'll be returned to the shell menu before you have a chance to really see it clearly. You could add a simple pause, for example a "bcall(_GetKey)" before the "ret" instruction to wait for a key before quitting the program. Otherwise, yes, it'll all take place in the blink of an eye.
That's one excellent option. Another (similar to the suggestion of running it with Asm() from the homescreen) is to run it from the homescreen with Door CS's HomeRun feature. I assume that you're using DCS, which pauses when BASIC games leave contents on the screen when they finish but does not do the same for ASM programs.
Yes, I am using DCS. The bcall works a treat. Is there any further experimentation I can do with this code example to consolidate my knowledge, or should I move onto the next exercise? As a learning resource, I have also been keeping a log of all of the commands I have learnt and have been annotating the code.
  
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