Documented/Commented blender.asm
by Nate "Nateholio" Watson · in Torque Game Engine · 02/17/2005 (2:22 am) · 15 replies
Well after being slightly prodded by LabRat while in IRC, I opened up the ole blender.asm in notepad and began to read the code, much like you C++ guys read C++. So I got all excited to be messing around in ASM again and started commenting each ASM line of the file.
Anyway, on to my question....
Would anyone in the community like to see a well documented ASM blender? Im not sure how useful this would be if it is at all. Basically what I'll do if I get a decent response is comment each line of code, group them into functional units, give a brief overview of ASM instructions used, etc. In theory any programmer should be able to understand whats going on by reading the documentation I would be generating, even if they dont know ASM. Im not sure if doxygen generates this kind of stuff for ASM files, but Im bored so I'll document it anyway for now.
Back to the ASM with me....
Anyway, on to my question....
Would anyone in the community like to see a well documented ASM blender? Im not sure how useful this would be if it is at all. Basically what I'll do if I get a decent response is comment each line of code, group them into functional units, give a brief overview of ASM instructions used, etc. In theory any programmer should be able to understand whats going on by reading the documentation I would be generating, even if they dont know ASM. Im not sure if doxygen generates this kind of stuff for ASM files, but Im bored so I'll document it anyway for now.
Back to the ASM with me....
#2
02/17/2005 (3:22 am)
An interesting read indeed :)
#3
02/17/2005 (5:12 am)
Yeah i would be interested in reading this.
#4
02/17/2005 (5:39 am)
To be able to say I read an ASM code once, yeah I'd put some time aside for that :)
#5
02/17/2005 (7:38 am)
I too would be interested in reading this
#6
This would be a very awesome contribution and I think everyone would love to have it. If you want you can contact me, robertb@garagegames.com or Ben, beng@garagegames.com to see about getting this put into HEAD after you are finished.
02/17/2005 (10:22 am)
Nate,This would be a very awesome contribution and I think everyone would love to have it. If you want you can contact me, robertb@garagegames.com or Ben, beng@garagegames.com to see about getting this put into HEAD after you are finished.
#7
02/18/2005 (11:45 am)
When are you expecting the next HEAD? Ive got several things on my plate including a 12 day alert starting sunday. While very interested in doing this and well into it already it is only about halfway up in my pile of things to do. Not saying I wont do it or Ive lost interest, its just not a priority right now.
#8
02/19/2005 (5:08 pm)
Sometime not too far out. This would be great, and I'd love to put it in the engine.
#9
02/20/2005 (11:23 pm)
*Agrees on the awesomeness*
#10
02/21/2005 (1:37 am)
Is the asm blender much faster than the C++ blender? Has anyone done any kind of comparision between the two with newer compilers?
#11
Ive got everything but do1x1Lumel, cheatmips, and cheatmips4x4 commented. Its easy to figure out what a block of ASM is doing, but unless you have a frame to reference it to its just doing math and moving data around. Since Ive figured out what some of the C++ code does in blender, things on the ASM side have been moving along a little faster. Im still not very fluent in C++ so before I post it as a rescource I'll need to proofread it several times against the C++ version and maybe submit it to Robert or Ben so they can look over it if they want to. Anyway, its back to blender with me.
Also I *may* have figured out why terrain that uses blender.asm doesnt 'look correct' when compared to terrain using the C++ blender, but until I can test Torque out on this old laptop its just speculation.
02/21/2005 (12:12 pm)
A little update on why this has been taking so long to complete -Ive got everything but do1x1Lumel, cheatmips, and cheatmips4x4 commented. Its easy to figure out what a block of ASM is doing, but unless you have a frame to reference it to its just doing math and moving data around. Since Ive figured out what some of the C++ code does in blender, things on the ASM side have been moving along a little faster. Im still not very fluent in C++ so before I post it as a rescource I'll need to proofread it several times against the C++ version and maybe submit it to Robert or Ben so they can look over it if they want to. Anyway, its back to blender with me.
Also I *may* have figured out why terrain that uses blender.asm doesnt 'look correct' when compared to terrain using the C++ blender, but until I can test Torque out on this old laptop its just speculation.
#12
02/21/2005 (9:02 pm)
The ASM is much faster, as it uses MMX. For comparison, an Altivec blender on Mac is SIGNIFICANTLY faster than the Mac C compile. Altivec is similar in many ways to MMX.
#13
For the overview of IA-32 instructions that are used in blender.asm would you like them to be in blender.asm itself, as seperate file, or on my web site? The explanations can get rather lenghty due to the many types used in blender.asm.
02/22/2005 (11:24 am)
Quick question - For the overview of IA-32 instructions that are used in blender.asm would you like them to be in blender.asm itself, as seperate file, or on my web site? The explanations can get rather lenghty due to the many types used in blender.asm.
#14
But if you do do that, I'd say, put it in a seperate appendix file.
02/23/2005 (9:08 pm)
I'm not sure that we need an IA-32 reference... :)But if you do do that, I'd say, put it in a seperate appendix file.
#15
04/08/2007 (2:01 pm)
So is this extra commenting already in tge 1.5? I notice plenty of commenting in blender.h, but blender.asm is really hard to follow without lots of comments. It doesn't help that I never really use asm for anything either.
Torque Owner Dylan Sale