I've seen alot of these C-Compilers that compile the code to ASM and stuff and i was wondering if it was okay to NOT use them and still could get the same results?
Last edited by starvinmarvin; 12-04-2008 at 10:07 AM.
Of course. I'm actually working on an entire Operating System using Assembly. I'm gonna start posting some shows of it once I get more work done. It's especially useful since I don't actually KNOW any C. As well, hand-written Assembly typically runs faster than compiled Assembly because humans are more instruction-efficient with their code than machines are.
Last edited by InfectiousFight; 12-04-2008 at 12:04 PM.
That might be true for the zCPU.
But the Compiles for a real CPU are this good, you have to be very good to surpass them, but it's still possible.
But as we are talking about the zCPU:
The hand-written asm code might be really the best choose. I didn't even touch a compiler, I did everything myself and I'm going to continue that.
Of course, ASM is a little more difficult...
But if you are serious: ASM is the easiest language you can find. There are just a few commands to remember. But the language is this easy, it turns hard...
Xan
Kind of offtopic but, my CPU programs never tend to work unless i have IOBUS wired to a data port or somthing, but if i have multiple outputs on different ports only 1 will work. AM i doing something wrong?
Are you sure?
Most programmers I know (on gamedev.net and the like) have said that computer-compiled ASM has gotten to the point where there's really no need to write in ASM any more, even when optimizing your program for speed.
'course they might only be referring to inline ASM calls within a higher-level language, such as C, 'cause you'd think pure ASM would be faster, neh?
There is no need to write in ASM any more, but for different reasons. Of course it would be possible to write everything in ASM, but with present complexity of the applications it would be just suicide. Assembler is the best if you want direct access to hardware, memory etc., but if you aren't writing an OS, you won't need that now. It was sometimes necessary for example in DOS, it was constructed like this, but current OSs don't like when programmers try to bypass their functions. Sometimes it is even impossible due to the application being in a virtual address space.
I might have mixed something up, but generally it's all about different architecture of current and past OSs and programming currently being much, much easier in higher-level languages.
My programs: BIOS - Alcyone - Calculator - Notepad - Movie Player
My tutorials: applyTorque - Quaternions - PID controllers
Some other things I made: FT Chip - RK4 Solar System
knowing asm is still incredibly useful for debugging, cracking and game hacking.
Bookmarks