Lesson 1 in ASM
I have converted the Lesson 1 code into ASM but there still isn''t all the message boxes telling you if something went wrong. There isn''t a fullscreen mode yet either. The code is also VERY messy!
How many people are interested in seeing the code in it''s current state? I am so fired up to try and see how much a speed improvement that OpenGL in asm provides and a comparason(sp?) to the dissassembled Lesson1 code.
______________________________
I assume that the improvement won''t be much at all for Lesson1 but say the flag effect one it might have a larger effect.
Lemme know.
Cya,
Kenny
I''m sure you''re right!
I''ve programmed a lot of year in Asm (under MS-DOS), I''ve compared them rewritten in C/C++... eh eh... my programs were 100% faster...
I''ve programmed a lot of year in Asm (under MS-DOS), I''ve compared them rewritten in C/C++... eh eh... my programs were 100% faster...
October 18, 2000 04:56 PM
real, what did you think of the asm port for lesson 1 that''s linked to the tutorial?
I like the current ASM source posted.
My asm source isn''t "pure" asm it is SpAsm syntax.
Here is an example:
I don''t know how that will turn with the UBB and all the coments but you get the idea.
The power of SpAsm is it''s Macro''s. The api command is just a macro:
Cya,
Kenny
My asm source isn''t "pure" asm it is SpAsm syntax.
Here is an example:
;==============================================================================================InitGL: ;// When the program is first started we call this routine.;============================================================================================== mov D$FInitGLF &FALSE;----> finit ; Turn on the Floating Point Unit(FPU) api ''OPENGL32.glShadeModel'' &GL_SMOOTH mov F$xx0 F$1.00 api ''OPENGL32.glClearColor'' F$xx0 F$xx0 F$xx0 api ''OPENGL32.glClearDepth'' F$xx0 api ''OPENGL32.glEnable'' &GL_DEPTH_TEST api ''OPENGL32.glDepthFunc'' &GL_LEQUAL api ''OPENGL32.glHint'' &GL_PERSPECTIVE_CORRECTION_HINT api ''OPENGL32.glHint'' &GL_NICEST;----> mov D$FInitGLF &TRUE ; return true;............................................................................................... ret ;// Were done!;...............................................................................................
I don''t know how that will turn with the UBB and all the coments but you get the idea.
The power of SpAsm is it''s Macro''s. The api command is just a macro:
[api | push #L>2 | call #1]
Cya,
Kenny
October 19, 2000 03:15 PM
very interesting, please post when you''ve converted a tutorial i can bench press against the c++ version.
quote: Original post by real_man
I have converted the Lesson 1 code into ASM
ahh, good good. now we just need someone to do the INTERCAL-port, and I''ll take care of BeFunge.
in my conversion to asm I tried to convert "glDepthFunc(GL_LEQUAL);" over to SpAsm syntax. I kept getting illegal errors. This was not good so I was determined to find out why.
I dissassembled Lesson1.exe and found that for "glDepthFunc(GL_LEQUAL);"
The actual assembly code for it is:
push GL_LINE_SMOOTH_HINT
push GL_NICEST
call glDepthFunc
Why is this?
I know I am probably the most knowlegable of assembly code here but maybe someone here knows win32 much better then I do??
I can''t complete my conversion untill this is fixed. Am I doing something wrong? I will keep working on my problem and as soon as I find the answer I will surely let you know.
I dissassembled Lesson1.exe and found that for "glDepthFunc(GL_LEQUAL);"
The actual assembly code for it is:
push GL_LINE_SMOOTH_HINT
push GL_NICEST
call glDepthFunc
Why is this?
I know I am probably the most knowlegable of assembly code here but maybe someone here knows win32 much better then I do??
I can''t complete my conversion untill this is fixed. Am I doing something wrong? I will keep working on my problem and as soon as I find the answer I will surely let you know.
Hey I looked farther into my problem and found that it is a SpAsm specific problem. Because SpAsm doesn't use .lib files it doesn't look for extra code it may need to add. I will start researching how to write code to include .lib files. Untill either I or rené Tournois does it this will be delayed.
Sorry about that.
Kenny
Edited by - real_man on October 20, 2000 12:56:25 AM
Sorry about that.
Kenny
Edited by - real_man on October 20, 2000 12:56:25 AM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement