tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] Crutches_for_TCC_inline_Asm.


From: ANDY TAKKER
Subject: [Tinycc-devel] Crutches_for_TCC_inline_Asm.
Date: Sun, 16 Jul 2017 09:30:34 +0300

Chronology:
http://lists.nongnu.org/archive/html/tinycc-devel/2017-07/msg00031.html
http://lists.nongnu.org/archive/html/tinycc-devel/2017-07/msg00032.html
http://lists.nongnu.org/archive/html/tinycc-devel/2017-07/msg00034.html
http://lists.nongnu.org/archive/html/tinycc-devel/2017-07/msg00035.html


A good programmer writes the program in 10 minutes. And for the
rest of his life he corrects errors in it. :) Oleg E Tereshlov.

A bad programmer John made a mistake in the code, due to which
every user of the program was forced to spend an average of 15
minutes to find a work around the problem. There were 10 million
members. In total they wasted 150 million minutes = 2.5 million
hours. If a person sleeps 8 hours a day, then 16 hours are left
for the conscious activity. That is, John has destroyed 156,250
man-days ? 427.8 person-years. The average man lives 64 years,
so John had killed as many as 6.68 people.

Are you sleeping well, John — serial programmer?

Linux, Windows, GCC: But let's create together with our program
a hundred other, completely useless, which nobody will use. And
we will force the user to install all of them on the disk. We
will not give him a choice. And we'll do our main job somehow
as a typing blunder and ready. And so come down! Hahaha!

Dear student - do not write the code.
If you write, do not save it.
If you save - do not upload.
If laid out - not on the Internet.
If the Internet - delete.
If removed - did good to people.

Good Code Rules:
Simplicity-comprehensibility-compactness-productivity-lack of
duplication.

Why do I use TCC? Conveniently: Small size, *.def for the
linker. It is not necessary to determine the parameters of
functions in proto. Folder 'include' absolutely not needed.
I can put TCC in any pose. Freedom! But local variables in
inline Asm are fucked. Fucked.

I would never have thought that TCC is the fork of GCC for
Primates. But if you insist ...

Dear Daniel. It's very fun to play these games:

int   main()
{
        unsigned int a;
        int junk1, junk2, junk3;
b:
        asm ( "cpuid\n"
              "rdtsc"
              : "=a"(a), "=b"(junk1), "=c"(junk2), "=d"(junk3));
        printf("%u\n", a);
        goto b;
}

:00401000 55                      push ebp
:00401001 89E5                    mov ebp, esp
:00401003 81EC10000000            sub esp, 00000010
:00401009 90                      nop

:0040100A 53                      push ebx
:0040100B 0FA2                    cpuid
:0040100D 0F31                    rdtsc
:0040100F 8945FC                  mov dword ptr [ebp-04], eax
:00401012 895DF8                  mov dword ptr [ebp-08], ebx
:00401015 894DF4                  mov dword ptr [ebp-0C], ecx
:00401018 8955F0                  mov dword ptr [ebp-10], edx
:0040101B 5B                      pop ebx
:0040101C 8B45FC                  mov eax, dword ptr [ebp-04]

:0040101F 50                      push eax
:00401020 B800204000              mov eax, 00402000
:00401025 50                      push eax
:00401026 E80D000000              call 00401038
:0040102B 83C408                  add esp, 00000008
:0040102E EBDA                    jmp 0040100A
:00401030 C9                      leave
:00401031 C3                      ret


But the joy can quickly disappear when faced with these:

{ int a1, a2, ..., a2000000,
      .....................,
      ab1, ab2, ..., ab2000000,
      .....................,
      a...z1, a...z2, ..., a...z2000000; }

I know a lot of fan clubs PureBasic and not one TCC. Do not you
know why? Even LCC32 have... one. Just do not say that all are
Fools. If you're the second I'm of Fabrice, pass Hello to him
and again ask to do, about what he was asked.

If not, then it's not Fabrice's author, but his mother, father,
sister, wife, mother-in-law, etc. In 2013, the author of the TCC
died and development stopped.

GCC inline Asm is the most stupid thing in the world, which one
could think of. Read about its rules yourself.

I'll tell you and Fabrice a secret. When in my simple direct
question GNU-man, as usual, answers: - read third-party manuals, my
first thought: - I'll better read "Rest in peace" on your
grave, hegoat. And I'm not alone. Remember this next time.
After all, you answered.

Do you want to take the exam again? Show the children how
directly declare the stdcall function in the TCC. A long time
ago, it's time. I want you to do it yourself. Do not be shy,
more boldly. We will understand you. Who need windows.h for it?
GCC manuals again... Yes? You are fan(n)y.

Yesterday I was visited by inspiration:
GAS = AssAsm + GNUlicense. Why? Because someone just lost one
's' in as.exe. Ass.exe is much better.

All my life I was looking for fathers WSMD principle. Why do it
Simply? If you can Make it Difficult. Finally I found them. This
is the brotherhood of the gcc fathers. I'm happy.

And now, a spoonful of honey. Daniel-Fabrice, remember. The
mass success of any compiler depends on exhaustive manual, an
abundance of meaningful examples and ease of implementation.
Go to the flatassembler.net & purebasic.com and make sure.

If Fabrice ever gets together, the best assembler output has
LCC32. Just copy.

Story ends. Sleep well, brother. :)

Only You, only I
Stars are shining tonight
Kiss will be anyway
I love you - You will say - me :)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]