View Full Version: What do you prefer???

meos32 >>Opinions and other stuff >>What do you prefer???


Madis731- 03-23-2006

We went from 32 bits to 64 bits to ASM to C :D What happened? I thought that every language should be complete...I don't mean Touring complete, but rather complete as in "you-can-write-any-program-in-any-programming-language" complete. If you really don't want to you don't have to use another language, but stop arguing about it :!: Are we cool :?:

Theorizer- 03-23-2006

If you really don't want to you don't have to use another language, but stop arguing about it :!: Sorry, Madis I didn't know you're the host of this forum, but anyway there is no doubt you've learned to speak in manner of Ville. I've been missing this style. Thanks for bringing it back :(.

Dex- 03-23-2006

PS: GAS sucks majorly.Could you explain us why you think so? I just don't. Is there a reason why you don't have your hair a certain way? I just prefer to not go near GAS. It sucks, but that is just a subjective opinion. Only a C programmer would ask this ? :lol: , i agree with Solidus117 GAS sucks majorly. PS: C is a great and powerfull language, but try to goto a linux forum and talk about converting linux to asm. Menuet is the linux for assembly programmer. We may have our jokes, but we respected each others opinions.

Theorizer- 03-23-2006

I've made a little example to show that you're much weaker than a C-compiler. It calculates sum of two vectors of 1024 integers on the stack (of course the function makes this way no sense, but after little thinking you could imagine the role of something similar in GUIs). typedef int v4si __attribute__ ((mode(V4SI))); int main (void) { v4si a[1024]; v4si b[1024]; v4si c[1024]; int i; for(i = 1023; i >= 0; i--) c[i] = a[i] + b[i]; return 0; } the generated assembly code: 00000000 <main>: 0: 81 ec 00 c0 00 00 sub esp,0xc000 6: ba ff 03 00 00 mov edx,0x3ff b: b8 f0 3f 00 00 mov eax,0x3ff0 10: 0f 28 84 04 00 80 00 movaps xmm0,XMMWORD PTR [esp+eax+32768] 17: 00 18: 66 0f fe 84 04 00 40 paddd xmm0,XMMWORD PTR [esp+eax+16384] 1f: 00 00 21: 0f 29 04 04 movaps XMMWORD PTR [esp+eax],xmm0 25: 83 e8 10 sub eax,0x10 28: 4a dec edx 29: 79 e5 jns 10 <main+0x10> 2b: 31 c0 xor eax,eax 2d: 81 c4 00 c0 00 00 add esp,0xc000 33: c3 ret Can you tell me how many times this code is faster than that one you could manually write without mmx? Actually, could you write a shorter one? I reveal you the compiler can generate an even faster (but bigger) code with only a compiler switch change. Seeing that you should admit that you already now lost against a C-compiler... That's a quite strong handicap 8). You know, more thinking, less...

Dex- 03-23-2006

Here is a very simple, relocatable bin file format. org 0 use32 jmp start ;maybe a simple header here start: mov eax,[MyVar1 + ebx] ; you need to do this mov [MyVar2 + ebx],edx; same with this mov esi,MyString add esi,ebx ; you need to do this call print ; this is ok like this jmp LetsGo ;this is ok like this ; some more code here, maybe LetsGo: ret print: ;print code here ret ;Data MyString: db 'hello world!',13,0 MyVar1 rd 1 MyVar2 rd 1 This can be loaded any where in memory, you just need to load ebx with the load address at load time and keep ebx untouched. I call it the "KISS" file format. Try do that with C 8) . You know, more thinking, less... And whos this to ???.

Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.