I could use some help. For some reason this code does not work. It is the first lesson of the 28 days tutorial. I am sure the code is exact.
Code:
.nolist
#include "ti83plus.inc"
#define Progstart $9D95
.list
.org ProgStart - 2
.db t2ByteTok, tAsmCmp
b_call(_ClrLCDFull)
ld hl, 0
ld (PenCol), hl
ld hl, msg
b_call(_Puts)
b_call(_NewLine)
ret
msg:
.db "Hello World!", 0
.end
.end
I am using the DCS SDK.
Thanks in advance.
Note: The error is ERR:INVALID.
Try running it from the Doors CS desktop and tell us what happens.
Uh. I did not know there was a Door CS Desktop. can I get a link?
Aes_Sedia5 wrote:
Uh. I did not know there was a Door CS Desktop. can I get a link?
... Apps -> DoorsCS7 ...
Oh. Hold on let me send to the calc.
Aes_Sedia5 wrote:
Oh. Hold on let me send to the calc.
Oh, you weren't executing this from your homescreen via HomeRun? You can't just run ASM programs the way you run BASIC programs. You have to either use Asm(prgmNAME), the bad way, or use something like Doors CS's HomeRun that handles everything like archived programs and ASM for you transparently, which is the right way.
I was using Asm( I was just using wabbit emulator.
Aes_Sedia5 wrote:
I was using Asm( I was just using wabbit emulator.
*WabbitEmu. May I also suggest you try using this and see if it changes anything?
Code: .nolist
#include "ti83plus.inc"
.list
.org 9D93h
.db $BB,$6D
xor a
ld (CURCOL),a
ld (CURROW),a
ld hl,text
B_CALL(_PutS)
ret
text:
.db "Hello, World!",0
.end
end
Still does not work with WabbitEmu. Also TiLP hates me and wont let me transfer to my calc. I will try again in the morning. Also catherine said I need a space before everyline? So should I add a space to what you have there?
Things that are commands (ld, cp, jp, call, or, and, etc) should have a tab before them (not a space). Things that are labels (label: here:) should be at the left margin of the source code. What is the name of your source file? Is it "blah.asm" or "blah.z80"?
You can use tabs and spaces together, right? I tend to just use tabs, but when I am putting code online, I just go with the "two space" approach. I also wasn't aware that Brass needed those .end parts. And, just for completeness, isn't it convention to put the .command lines in-line with your code? Like, .db .org .dw? (Not .list and .nolist, since those surround code that is left-aligned anyways)
hhmm. I put the .end lines in just for the sake of having the same code that was on the lesson. I figured I could optimize after I got it working. Could the .end's be causing problems? Also I was using tabs and spaces, but only a single space at the beginning.
Note on some good news. Brass the the Doors SDK actually works on my computer! The programs that the 28 days says to use never did work right.
You didn't answer my question about your source. If your source is either "blah.z80" or "blah.asm", you must type "compile blah" to compile your program (not "compile blah.asm" or "compile blah.z80"). I suspect that you might be doing one of the latter, which would yield you an empty program. I need to make the Doors CS SDK handle that better...
Or sorry. I thought I answered that last night sorry about that. I have tried blah.z80 from notepad. and Blah.asm from notepad++.
I also tried editing blah.z80 in notepad++. None of them worked right.
Also thanks for the title change, it makes a lot more sense now. I did not think about that last night.
Edit: My CMD line.
Code:
Compile.bat Name_of_Program
Not sure if that is right or not.
Wait, what's not working? The editing or the assembling or the executing? Do you have Windows set to show or hide file extensions? If you have file extensions hidden, and you create "blah.z80" from Notepad, it's likely it's actually "blah.z80.txt". Stick with Notepad++.
Once again, what command line are you using to compile, "compile blah" or "compile blah.asm"?
Sorry. The execution is not working. Assembling and Editing works fine. I have my computer show file extensions so my .z80 file from notepad is a .z80 file. That is the description as well. It also has the generic icon that windows gives things that is has no idea what to open it with.
Command line
Code:
Compile.bat Blah
Which now I see is probably my problem... I will have to fix that when I get home.
So you mean you were assembling "blah" via "compile blah.asm" or "compile blah.z80" rather than the correct "compile blah"? I figured that might be the case, which makes me more convinced to change the way the compile.bat file works to detect when people do things like that and handle them anyway.
So I need to add the extension. Got it. Thanks. That explains why catherine did not explain my question on IRC last night. Will try again when I get home.
Aes_Sedia5 wrote:
So I need to add the extension. Got it. Thanks. That explains why catherine did not explain my question on IRC last night. Will try again when I get home.
Nooo, you type it without the extension for the compile program. I don't know how I could be more clear on this.
ARE YOU TYPING:
compile blah <-- THIS ONE IS CORRECT
OR
compile blah.asm <-- THIS ONE IS WRONG
Sorry. You can erase these last few posts for me being a moron. I am _NOT_ adding the extension for the file name. I _AM_ Adding the extension for compile. Ex.
My _exact_ command line.
Code:
compile.bat Blah
Where blah is the name of the program.