MichalStrehovsky / sizegame

Compare binary sizes of canonical Hello World in 18 different languages
210 stars 17 forks source link

Added flat assembler #25

Open dminta opened 1 year ago

dminta commented 1 year ago

Hello @MichalStrehovsky, Here is my implementation using flat assembler:

The code uses macroinstructions described in Windows programming headers document.

MichalStrehovsky commented 1 year ago

Thanks! This will have to wait until we have a B-sides benchmark as mentioned here. There already is a compiler for assembly and I chose the one from the platform manufacturer as "canonical".

prints "Kŕdeľ ďatľov učí koňa žrať kôru" correctly :)

It would not print anything when redirecting output to a file though! Might depend on the use case, but it comes with a tradeoff nonetheless.

dminta commented 1 year ago

Thanks! This will have to wait until we have a B-sides benchmark as mentioned here. There already is a compiler for assembly and I chose the one from the platform manufacturer as "canonical".

👍

prints "Kŕdeľ ďatľov učí koňa žrať kôru" correctly :)

It would not print anything when redirecting output to a file though! Might depend on the use case, but it comes with a tradeoff nonetheless.

You're right, I've replaced WriteConsoleW with WriteFile and unicode headers with ansi; now it works like the MASM version.