This is not a place to make fun of my lack of skills for asm, as I am just now learning the language. Anyways, while experimenting with asm, I might/will post code occasionally to something that I did, just to say that I did something.

Please dont go: "Oh you should have done it this way" or something, because I will probably remove the post without a second's thought. But if you have a suggestion on how it could be done better, that would be appreciated.

And here is some of the code that I have managed to get to work. ^_^


Code:
getkey program:

Main
        bcall(_clrlcdfull)
        bcall(_getkey)
        ld l, a
        ld h, 0
        bcall(_disphl)
        bcall(_newline)
        jr Main
        ret



Code:
count down timer

Main
        bcall(_clrlcdfull)
        ld b, 250
        jr Loop

Loop
        dec b
        ld l, b
        ld h, 0
        bcall(_disphl)
        bcall(_newline)
        djnz Loop
        ret


the count down timer I got a lil help on by threefingeredguy, because of a stupid-simple mistake... <_< Oh well, it works. ^_^
The getkey program looks like it would get stuck in an infinite loop. After the new line, it always jumps back to main, and never reaches the ret at the end, unless that's what you wanted. You may want to add a check for a certain key so it'll exit then.
The counter works fine, but the "jr Loop" is superflous. Labels are only there to make it easier for you. In the processor, they don't exist, so it'll just blow right through the label and start looping.
uh, yeah, I know. With PTI you can reset the calc with a press of a button. I might get around to fixing it later... Smile

As to the counting loop, it counts down from 250 and returns to the TI-OS. It works just fine...
In the countdown program, Tari is saying that you can get rid of the jr Loop and it will "work just fine" and be smaller. It's just like how you wouldn't do this in BASIC:


Code:
:...
:GOTO B
:LBL B
:...


It looks like your improving Smile One thing, could you please stop saying that you have no asm skills. You know a lot more than most people, and it's getting a little annoying. Wink Smile
Chipmaster wrote:
In the countdown program, Tari is saying that you can get rid of the jr Loop and it will "work just fine" and be smaller. It's just like how you wouldn't do this in BASIC:


Code:
:...
:GOTO B
:LBL B
:...




Ok, I can understand that.

Chipmaster wrote:

It looks like your improving Smile One thing, could you please stop saying that you have no asm skills. You know a lot more than most people, and it's getting a little annoying. Wink Smile



To clarify, I don't have asm skills. I do, however, have a decent grasp on the overall concept of asm, and how a good majority of it works. When I claim to have some skills in asm, is when I get around to making a true game/program. Wink
For the first program, ideally you would have the clrlcdfull command outside the main loop to avoid the slowdown it causes. Instead, I might recommend the _newline bcall.

For the timer, you can use hl itself instead of using b and then loading b into hl. Just push and pop hl around the bcalls in the loop.
Yeah, I know to both, just havin fun experimenting. Smile

According to the PTI emu that is in Latenite, what is up with all the open memory from AAA0 through F5AB?? Is that archive space?
Or it could just be free RAM - I doubt your one program is occupying all 24k of available RAM Wink
Maybe not, but that is a TON of open area, I don't think that is 24k worth of space... More like almost all the archive...
tifreak8x wrote:
Maybe not, but that is a TON of open area, I don't think that is 24k worth of space... More like almost all the archive...


0xF5AB - 0xAAA0 == 19,211 Wink

It can't be archive because that isn't in the RAM address space Laughing
ok... I never bothered adding them up, so I don't know. It just took forever to get through all the 0's...
I just entered that into python, lol, I'm too lazy to convert hex to decimal by hand Cool
Only 0000 through 7FFF can possibly be mapped to ROM (two 16k pages). RAM pages 0 and 1 always occupy 8000-BFFF and C000-FFFF respectively. That's all free space. The free space starts at $9d95 and end somewhere around $f500.
Well, free RAM can go from $9D95 to $FF37, but it rarely does because the upper limit is defined by the length of the VAT.
The Tari wrote:
Well, free RAM can go from $9D95 to $FF37, but it rarely does because the upper limit is defined by the length of the VAT.
Exactly, and the VAT and symbol table take up a fair amount of space even on a lightly used calc (#, !, L1-L6...)
  
 
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