(08/03/2012 07:27 PM)ProperBritish Wrote: also PS Vita is programmed in C++ or C#, not assembly.
hell even PSP was programmed in C, not assembly.
you read assembly right to left, and all of it revolves around registers or stacks (can't remember which) such as the EAX, EBX, ECX registers.
I did a section of my advanced programming on reading assembly, it's not hard to read. But to write, god help you.
The compiler of PSSuite, which i have, the PS Certified DevKit for PS Certified devices and the Vita, will compile the program into whatever assembly functions it needs to do.
Never should you need to program anything in Assembly these days, unless you are writing an OS of your own or something that in-depth.
While that's definitely the case proper, I thought there are merits to assembly programming. As you said, yes, the C/C++/Java languages are basically templates to assembly code (as you give it to a compiler to interpret the statements to you) this makes coding easier to read but a much sloppier implementation.
By which I mean, anything done by a template may or may not be the most optimized assembly code for the device. In these days our devices are starting to get so fast that you don't even NEED to optimize your code to that level (like you said), it's still VERY handy in optimizing programs for smaller devices like the psp/ps vita/what have you with smaller amounts of ram/cpu power/etc.
Of course, I haven't done all of this yet so what do I know, this is all from what I've been reading about and hearing. Which is why I want to learn it and see if it's all true. That's the reason why I want to...
(08/03/2012 08:30 PM)ZiNgA BuRgA Wrote: My guess is that he's interested in assembly for the purposes of hacking the device?
I can only really think of five reasons, off the top of my head, why you may need to use assembly:
- reverse engineering
- you need a lot of speed or more optimisation than a compiler can give you
- some features not available in higher level languages (eg how an OS needs to save all registers)
- some fancy code injection type stuff
- specific applications, such as compilers, emulators etc
...read me like a book, that's almost all the reasons as to why I want to learn assembly coding Zinga. But also for the "performance" that seems to be the golden land of assembly code, I still am trying to look into ARM architecture but nonetheless my exploits have been of mixed success because, as I said, I don't know assembly enough to know what the books I get are talking about.
Yeah fun stuff.
If I ever do get into the hacking shenanigans, I better change my name, YOU DIDN'T HEAR IT FROM ME HERE!
Oh, nonetheless, your replies have been really helpful guys, thanks.
EDIT:
(08/03/2012 08:22 PM)Assassinator Wrote: Assembly language is generally very simple to learn (for RISC systems anyway), it's just very annoying to use. If you want to program anything significant it'll end up massive so I suggest not doing that and using a higher level language instead.
Also, you probably shouldn't try to program any games until you're very proficient at programming.
Oh god, using assembly for everything? I think that's a bit much and I'd agree with you on using a higher level language for some parts of the program. Having said that, I also heard that C is the closest you can get to assembly (as in, a language that implements it in it's design), and that you can actually mix the two together in a single program, pretty neat if you ask me. Which allows you to optimize your algorithms but at the same time not bothering to assembly program your print statements and such.
Actually I don't know this to be true, my prof told me this, though I don't think I misheard him.