News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

GDI+ Bezier curve demo with anti-aliasing

Started by MichaelW, February 26, 2016, 08:43:05 AM

Previous topic - Next topic

MichaelW

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.

Well Microsoft, here's another nice mess you've gotten us into.

jj2007

Compliments, very clear and very well written :t