Ok, errors, 2:

Could not open file c:\yadayada\ti83plus.inc

Error in 'ti83plus.inc'


You don't ever have to type .include for any of the "standard" includes (ion, mos, and ti83plus.inc)
so wait, I dont need all the defines, and includes?? Confused
Not for the "standard" ones - latenite does that automatically
Yup, you never have to worry about the standard includes with latenite.
Ok, so this eliminates the need for .nolist through .db t2bytetok, tasmcomp. That is nifty. and looks like gets rid of the need for the .ends...

So, I want to see if I understand this part well enough, MAIN is somparative to the Lbl thing in BASIC, right? And it cannot exceed so many characters??

Also, if I made program TEST, and complete that, but the second part requires another program, called program TEST1, do I need to create a new project??
no

how can I explain this?

rarely will you ever need to rely on a second program because of the way ASM works. Because of that, labels are your friend. You can call labels and have them return to where they come from, acting like true subroutines, unlike the basic ones which are external AFAIK.
tifreak8x wrote:
Also, if I made program TEST, and complete that, but the second part requires another program, called program TEST1, do I need to create a new project??


Yes. For smaller, test programs, this is a pain - for bigger projects its a godsend (however, you CAN just keep reusing the same project...)
Ok, that answers #2, #1...

Main is an "address" correct? and you can use a few different commands to get to it (or at least 2 that I know of). I am used to seeing:


Code:
main:


Not:


Code:
                           Main
ya I think latenite uses it as a giant Macro replacement for the .nolist stuff and the .org stuff. Don't change it, I think it's for the program. Yes it is a label, for the start of the program. All ASM programs I believe have to be executed from the same spot I think, especially if it needs a shell.
ok, now on to day 3, refresh my memory on all this stuff...
actually, if you wanted to, you don't have to use Main at all.

The program will enter at the BEGINNING OF THE FILE PROGRAM.ASM! Not necessarily at Main if you put something before it.

For example, changing


Code:
.module Program
.export

   Main
      ; Program entry point
      bcall(_clrlcdfull)
      ld hl, 0
      ld (pencol), hl
      ld hl, msg
      bcall(_puts)
      bcall(_newline)
      ret
   msg
      .db "Hello world!", 0
.endmodule


to


Code:
   bcall(_clrlcdfull)
   ld hl, 0
   ld (pencol), hl
   ld hl, msg
   bcall(_puts)
   bcall(_newline)
   ret
msg
   .db "Hello world!", 0


Will work the exact same way. so don't include stuff before your main...
So, what you are saying is, if I have aprogram that is gonna say, clear out a screen, then it isn't required to have a lbl??
The TIOS has a rom call that will do that for you.

However, if you wanted to write your own screen clearing routine
you'd need a label:

Code:

screenclear
      ;code to clear screen
      ret


and the somewhere in your main program:


Code:

;code
;you want to clear screen
call screenclear
;when screen clear is done clearing the screen, it comes back here
I know there is a bcall routine to do that. It was an example.

Basically, Labels are required. Yes or No?? That is what I was askin. Smile
Well, the way the calculator works is that it will follow instruction after instruction. If you tell it to read an instruction from somewhere else, you have to have an address for it to find the new instructions.

That is the purpose of the label. Its an alias for the address. Just keep reading, you'll get there.
So, what you are telling me is, that it operates like BASIC, since it starts at the top, and goes down. So I can do the whole hello world program, and not really require a label for it. That is what Kllrnohj posted, that is why I am asking.
Here's what a label is. All a label does is create a 2-byte integer equated to the hex address of the instruction it is directly up so that jrs, jps, calls, and references work correctly. The TI-OS never sees labels or anything related.
It's all numbers really Very Happy

Kllrnohj was just saying that since it's COMPILED from top to bottom, you didn't need a label for the VERY FIRST address because the compiler would have assumed you meant to have your program start where it's suppose to.
Are labels technically *REQUIRED*? No

Are labels practically required? Yes

Without them your program is linear, and can't really do anything (if you notice even the hello world needs a label, as a label is what you are using in the ld hl, (hello) command - hello is a label, which points to the string you want to display)
  
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