Quantcast
Channel: Cemetech
Viewing all articles
Browse latest Browse all 75370

z80 Assembly :: RE: My Program Doesn't do Anything?

$
0
0
Author: chickendude
Posted: 18 Feb 2013 10:00:11 pm (GMT -5)

Ah, true, i missed that. But it should give an error in that case when run from the homescreen and if run should spit some gibberish text, whatever HL points to, probably somewhere around $0013.

Yeah, on the 83/4+/SE (but not the regular TI-83), all assembly programs are copied to the memory address $9D95 (that's the hex address). People commonly write .org (this sets the starting address of your program, really only used for labels) $9D93 (or .org $9D95-2) because immediately after you have .db $BB,$6D. This puts two bytes at the start of your program that equate to the AsmPrgm token. If you put the AsmPrgm token into a program on-calc you'll see that it does indeed take up two bytes. That's why we use .org $9D93, because the first byte of actual code of your program should start at $9D95. Another option would be to reverse them:
.db $BB,$6D
.org $9D95
This way you don't need to subtract two.

I've never used the DoorsCS SDK, check it out and see how you like it. Really, the hardest part about assembly is getting your first program to assemble correctly (or at least that's how it used to be "back in the day"Razz).


Viewing all articles
Browse latest Browse all 75370

Trending Articles