real_man: proper terminology; "you program in assembly and use the OpenGL API".
delta_z: possibly, since the cpu bit depth does not conclude the performance of the system. the PSX has a 32-bit processor as is a Pentium III; they do not perform the same.
Roach: assembly language is not evil. it is a language. and like any language it has a time and a place. for instance, i would like to see you write you entire motherboard BIOS in C++. while, it may be possible, it would be inappropriate. if you want to say that you find it inappropriate to use assembler for an OpenGL program than fine (i agree).
To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
Assembly for OpenGL
To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
there is NO way my beloved c64 will ever run an opengl. using x86 assmebly wont help matters considering now your adding a damn emulation layer just to get the code to run. furthermore you will need to add some ram (i highly doubt you could even load the opengl library into 64k of ram let along the entire emulator and assmebly code). dont forget you dont really have access to a harddrive unless you do some hacking.
delta_z: i find it very difficult to fathom that similar processors with the SAME clock speed AND almost the same instruction set (well the 32bit cpu will have some more to handle the 16bit and 32bit sized registers). you will not get an 8bit cpu to run code faster then a 32bit cpu. i have an idea, tell me the code you would use to add two 32bit integers using only 8bit registers of yoru 8bit cpu.
assume standard 32 bit registers of eax, ebx
in the 8bit code i will allow you to access
ah, al, bh, bl
giving you even more registers then the 32bit cpu. BUT those registers are not linked, ie overflows dont spill into the next register. they are only named as such for convience.
here is my version for the 32bit cpu:
mov eax, [var1]
mov ebx, [var2]
add eax, ebx
mov eax, [someMem]
all done, now you please supply the 8bit version. assume 8bit registers i mention above and only use the instructions:
mov, add, sub, jnc(jump if not carry), jc (jump if carry), and, or, xor, not, push, pop, jz, jnz, jmp
i am pretty sure those are the only ones you need. (btw jc and jnc i am unsure if those are correct or not). yes i know the cpu can have any instructions. if you need some other instructions please include them, just dont make them too wierd. lets assume all instructions can be done in one cycle. also you can only move 8bits of memory at a time, so your loads of the two 32bit varibles each take atleast 4 instructions each). you can access the varible using the array notation of [var1+1] which would be accessing the second byte of var1. you CANNOT add or do ops besides mov on memory locations. this means you must first move the data into a register then operate on it.
i will further even give you a 4x mhz speed increase so for ever 4 incstructions you do, i do only one. i will try as well to come up with an 8bit code.
btw, i am not an assembly guru by any means and mainly use it for mmx optimizing certain routines. (like full frame blurs, fades, blending, etc.) anyone is welcome to participate in this little game. this is merely to show whether an 8bit cpu which is 4x clock speed as 32bit cpu but with similar instruction sets would be able to do certain simple tasks faster. i hope someone can come up with a 12 instruction add routine. (though you may need more registers, if so feel free to add ch and cl).
delta_z: i find it very difficult to fathom that similar processors with the SAME clock speed AND almost the same instruction set (well the 32bit cpu will have some more to handle the 16bit and 32bit sized registers). you will not get an 8bit cpu to run code faster then a 32bit cpu. i have an idea, tell me the code you would use to add two 32bit integers using only 8bit registers of yoru 8bit cpu.
assume standard 32 bit registers of eax, ebx
in the 8bit code i will allow you to access
ah, al, bh, bl
giving you even more registers then the 32bit cpu. BUT those registers are not linked, ie overflows dont spill into the next register. they are only named as such for convience.
here is my version for the 32bit cpu:
mov eax, [var1]
mov ebx, [var2]
add eax, ebx
mov eax, [someMem]
all done, now you please supply the 8bit version. assume 8bit registers i mention above and only use the instructions:
mov, add, sub, jnc(jump if not carry), jc (jump if carry), and, or, xor, not, push, pop, jz, jnz, jmp
i am pretty sure those are the only ones you need. (btw jc and jnc i am unsure if those are correct or not). yes i know the cpu can have any instructions. if you need some other instructions please include them, just dont make them too wierd. lets assume all instructions can be done in one cycle. also you can only move 8bits of memory at a time, so your loads of the two 32bit varibles each take atleast 4 instructions each). you can access the varible using the array notation of [var1+1] which would be accessing the second byte of var1. you CANNOT add or do ops besides mov on memory locations. this means you must first move the data into a register then operate on it.
i will further even give you a 4x mhz speed increase so for ever 4 incstructions you do, i do only one. i will try as well to come up with an 8bit code.
btw, i am not an assembly guru by any means and mainly use it for mmx optimizing certain routines. (like full frame blurs, fades, blending, etc.) anyone is welcome to participate in this little game. this is merely to show whether an 8bit cpu which is 4x clock speed as 32bit cpu but with similar instruction sets would be able to do certain simple tasks faster. i hope someone can come up with a 12 instruction add routine. (though you may need more registers, if so feel free to add ch and cl).
Here''s the link to Iczelions'' site:
http://spiff.tripnet.se/~iczelion/
The board is at http://board.win32asmcommunity.net
http://spiff.tripnet.se/~iczelion/
The board is at http://board.win32asmcommunity.net
- "Has the world gone mad, or am I at work?"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement