You can do that, but the way you have your code structured will cause your calculator to go into an infinite loop.
it seems as if this program would run in an endless loop forever Wink

What I would suggest -- see which keycode you want to have be the exit one, and do this (I'll use clear for example)


Code:
BCALL(getKey)
CP kClear
JR NZ Init
RET


if the key is clear, then return Wink
That makes sense to me, and I'd say that that's the best way to do what you're doing for something this size. For a more complex program, it probably wouldn't be the best.
I've gotten used to kClear, kUp. I have yet to learn how to use getkey in hex.
ScoutDavid wrote:
I've gotten used to kClear, kUp. I have yet to learn how to use getkey in hex.


I hope I don't seem as though I lose my patience, but learning Hex coding really doesn't make you cool. Xeda has a good excuse to use it -- she had limited resources and got used to it after a while of just using that. So I get her point.

However, someone new to assembly programming should NOT be using hex unless they really have to (they have no link cable, no mimas, no on-comp emu, etc.) all of which I'm sure you have. If you continue to try and just learn this in Hex, you will learn how to use assembly either really slow, or incorrectly, or both -- and might quite learning due to the stress of having to remember what "AE4C9673A6C" is.

So, good luck with your exploitures in assembly, but I just have to say that the way you are going about learning it is a bit... wrong. Razz
Ashbad wrote:
ScoutDavid wrote:
I've gotten used to kClear, kUp. I have yet to learn how to use getkey in hex.


I hope I don't seem as though I lose my patience, but learning Hex coding really doesn't make you cool. Xeda has a good excuse to use it -- she had limited resources and got used to it after a while of just using that. So I get her point.

However, someone new to assembly programming should NOT be using hex unless they really have to (they have no link cable, no mimas, no on-comp emu, etc.) all of which I'm sure you have. If you continue to try and just learn this in Hex, you will learn how to use assembly either really slow, or incorrectly, or both -- and might quite learning due to the stress of having to remember what "AE4C9673A6C" is.

So, good luck with your exploitures in assembly, but I just have to say that the way you are going about learning it is a bit... wrong. Razz


I'm not always in a computer, you know? And Mimas is pretty good, but I still prefer Hex. What I usually do is creating Mimas programs but with inline Hex. I learnt Hex before Assembly, so I got used to it.

Actually, this sounds wrong, Hex=assembly, I learnt hex before mnemonics.
ScoutDavid wrote:
I learnt Hex before Assembly, so I got used to it.

Actually, this sounds wrong, Hex=assembly, I learnt hex before mnemonics.
No, you learned hexadecimal before you learned assembly. Xeda learned to code ASM in hEx before she had access to tools to use mnemonics. I really do feel like you're purposely making life harder for yourself because you see the use of hEx as making you a 1337 coder. Sad I could of course be wrong though, and that's just my opinion. Re: kClear, kUp, etc: if and when you try out GetCSC, keep in mind that that uses skClear, skUp, etc.
Quote:
No, you learned hexadecimal before you learned assembly. Xeda learned to code ASM in hEx before she had access to tools to use mnemonics.


I PM'd Zeda to teach me hexadecimal coding (at the time I didn't know it was Assembly) and she thought me a lot. Then I started reading HotDog's tutorials.

Now I'm trying to learn mnemonics.
Well, scout, no offense but I'm gonna say that even your skills in hex aren't great -- again, no offense intended, but I'm sure some will be received Sad however, I did notice you showed to have much better skills in mnemonic programming -- so I suggest you stick with that and build upon your strengths Smile
Without making a judgment either way, I definitely think that mnemonic programming is the way to go for you.
DAMN THIS, I AM TELLING YOU I AM LEARNING MNEMONICS NOW SO YOU GUYS CAN SHUT UP WITH THIS HEX THING. I AM ALREADY DOING WHAT YOU SUGGESTED:

Quote:

Now I'm trying to learn mnemonics.


@ASHBAD: THAT WAS NOT NICE ("YOUR SKILLS AREN'T GREAT", I THINK YOU SHOULD REPHRASE THAT).

@Kerm: WHAT I SAID ABOVE, I AM ALREADY LEARNING.

EDIT: Sorry if anything above sounds rude, but I think you guys should calm down, let me make my choices since I've already heard your recommendations >10 times.
Whoa, I wasn't trying to be extra-rude in any way at all. I was just saying that your mnemonic skills are much better than your hex skills -- I didn't want to make you upset. I just wanted you to work on your strong areas, since the weak ones are toppled over by the strong ones. Sorry if I caused you any strife Sad

Also, good to see you're learning mnemonics, good luck! Smile
Ashbad wrote:
Whoa, I wasn't trying to be extra-rude in any way at all. I was just saying that your mnemonic skills are much better than your hex skills -- I didn't want to make you upset. I just wanted you to work on your strong areas, since the weak ones are toppled over by the strong ones. Sorry if I caused you any strife Sad

Also, good to see you're learning mnemonics, good luck! Smile


Perhaps you should've noticed I'm learning mnemonics 6 PAGES OF THE TOPIC BACK?

Hum, eitherway, I just don't think you can compare my hex X mnemonics skill. You can say stuff like 'I don't see you making good things in assembly' or even 'You suck at assembly', but only me can differ my skills between hex and mnemonics.
That's true, but I hope we can just end this now by me saying I'm sorry Sad

I'd really rather not fight.

Also, again, good luck, you seem to be learning quickly in mnemonics.
Thanks, sorry for being upset.
ScoutDavid wrote:
Thanks, sorry for being upset.


All forgotten Wink sorry again.
ScoutDavid wrote:
EDIT: Sorry if anything above sounds rude, but I think you guys should calm down, let me make my choices since I've already heard your recommendations >10 times.
I think we were elaborating on our discussion of hEx vs. mnemonics independent of how it applied to you, and saying that we thought it might be nice for you to switch to mnemonics but that we respected your use of hEx. I had actually thought we were tiptoeing very careful around being polite, but I guess not enough. Sad
KermMartian wrote:
ScoutDavid wrote:
EDIT: Sorry if anything above sounds rude, but I think you guys should calm down, let me make my choices since I've already heard your recommendations >10 times.
I think we were elaborating on our discussion of hEx vs. mnemonics independent of how it applied to you, and saying that we thought it might be nice for you to switch to mnemonics but that we respected your use of hEx. I had actually thought we were tiptoeing very careful around being polite, but I guess not enough. Sad


Let's just forget about this. Why hEx?
hEx is the slightly-sarcastic name we call programming in machine code on the z80 to distinguish it from hex, which is short for hexadecimal, which is a number system. hEx is programing, hex is math. Smile
Except hEx is the wrong way to program for a beginner, but I digress Razz
  
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
» Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
» View previous topic :: View next topic  
Page 6 of 10
» 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