The MASM Forum

General => The Campus => Topic started by: MichaelW on February 26, 2016, 08:43:05 AM

Title: GDI+ Bezier curve demo with anti-aliasing
Post by: MichaelW on February 26, 2016, 08:43:05 AM
The attachment contains a MASM32 version of a C app that I did as part of a C and X64 assembly tutorial, along with the C source. As a baseline, I aimed the tutorial at beginning programmers in their early teens, primarily because I have two nephews in this group, and this is the reason for the "thorough" commenting. I did not bother to pare the commenting down, and added the C code where I felt it necessary to understand the assembly code, and C declarations where necessary to make the operand sizes obvious. Note that the declarations are as defined in the header files for a recent 64-bit MinGW distribution, which I chose to use for the tutorial over other possibilities because GCC supports inline assembly in 64-bit code.

For those of you not accustomed to translating C or other HLL code to assembly code, one critical operation that is easy to get wrong, and the reason for needing to know the operand sizes, is the translation of HL array indexes to byte indexes, by assigning a constant index or an appropriate scale factor.

Title: Re: GDI+ Bezier curve demo with anti-aliasing
Post by: jj2007 on February 26, 2016, 09:34:55 AM
Compliments, very clear and very well written :t