What's a better language for someone that remembers numbers better than letters, Assembly or Machine code
 92%  [ 23 ]
Machine code
 8%  [ 2 ]
Total Votes : 25

I know I'm a bit late to answer, but you might want to ask Xeda(http://www.cemetech.net/forum/profile.php?mode=viewprofile&u=2106) about this particular topic. When she started, she was programming in machine code (hex representation). She has since learned assembly.
Since she has experience with both I think she'd be able to give unique insight to your question. I wouldn't say that programming in machine code isn't done, but it is quite rare, and most people don't have reason to.
But it is exactly the same... one is just 1000x easier to use. Smile
For almost everyone, I'd agree. However, some people's brains work differently than others.
Art_of_camelot wrote:
For almost everyone, I'd agree. However, some people's brains work differently than others.

But they can't work as fast as a compiler, which is all that these hex codes even mean. Technically, they aren't even compiled, they are just the ASCII representation of the token...
As someone learning Z80 via machine codes, I'm going to throw in a point here;

Machine language makes you feel like a geeky boss- especially if your friends don't know assembly- all the better! Sit down with their calc, bang out some hex and feel like a wizard~ Having a program turn the calculator off at random, or just a flat out virus if they try to cheat in a game- not that assembly should be used for evil, but if you were to "forget" a C9, who would notice? Wink

Other point- machine language is literally as low level language as you can get- with that comes, from my experiance, a great knowledge of what the calculator is doing- granted with regular z80 you give it the commands, but in terms of addresses that is all mostly hidden.

All of that said, machine language is NOT for large programs- unless you're Xeda- the code quickly can get out of hand, and addresses get mangled, etc.- novelty programs and/or hybrid BASIC machine code works just fine in my experience Wink

If you want to learn the machine language, my best advice would be to reverse engineer all of these programs http://tibasicdev.wikidot.com/hexcodes

That should give you an idea of what's going on with syntax-

Okay, I am sorry, but I have to say this: DON'T! If you really need to know these so-called hex codes on a calculator, just compile an assembly file and then take a look at the listing file! There is no point in learning the ascii hex representations, unless you are building a compiler! And now I am done. Learn assembly the right way. Smile
Writing assembly out in hex isn't any more low-level than the opcodes, the output is exactly the same instruction for instruction. If you don't want to use equates (_DispS, penCol, AppData, etc.) you can just type the addresses, though it makes it difficult for others and yourself to read your code later on. It's still much easier to read uncommented opcodes than a list of hex characters. Rather than feel like a geeky boss i'd rather be able to finish the program i've started instead of giving up 1/100th of the way through because i'm over my head in hex characters and recalculating jumps .
I have learned many (most? some?) of the hex codes by heart and I have actually wrote an entire program in them, however insetad of asmComp(), I used Axe and a bunch of asm()s to calculate jumps. I only did this, though, because at the time I didn't have a laptop. I wrote all the code on paper, then I used a table of all of the opcodes to assemble them (sans jumps). Now that I have a laptop, I find it much easier to use the mnemonics instead of the hex codes.

I definitely encourage the machine code route, but why not both? Learning the machine code, as elfprince13 said, is fairly easy simply because of the structure to them (and believe it or not, it is actually quite easy to just learn it in hexadecimal and still get a notion of the binary patterns). Learning machine code will give you a head start in the finer details, like why a relative jump can go 128 bytes forward, but 126 backwards (it's not actually true, it just depends on how you think of it).

For me, learning machine code had some distinct advantages:
-Because I did not have internet or a computer, this was my only way to create assembly programs on my calc.
-I am also a lot more comfortable with numbers when it comes to learning. I was a weird kid growing up, in that I dwelled a lot on numbers, so I guess my brain was just naturally wired to encode and decode number sequences (by the way, z80 machine code is a loooooot easier to get a handle on than learning a human language).

With all of that said, you should almost certainly try to learn the mnemonic stuff. It isn't difficult, and it will allow you to communicate with the other z80 assembly programmers.

elfprince13 wrote:
I made this point in another topic, but I'll make it again here:
If you absolutely bizarrely insist on learning machine code, learn it in binary, not hex. Opcodes actually have structure to them - they aren't just randomly selected numbers, and the structure isn't necessarily 4-bit aligned, meaning it will be obscured by hex.

The primary downside is that you lose labels, which means your code really really can't be reorganized cleanly.
Hello and Happy New Year:
After exploring TI-BASIC and writting a couple of programs application for celestial navigation.
I would like now to get my feet wet on the Z-80 assembly.
I got the Notepad ++ downloaded, the Door CS SDK assembler unzipped and the vrtual TI-84 plus finally working.
I wrote on the Notepad++ the code "Hello, World" as shown in p 264 of the Programming the TI-83 Plus/TI-84 Plus book.

Now what?

Thanks in advance

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
Page 2 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