Author |
Message |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Fri Sep 03, 2004 10:28 am Post maybe stupid Post subject: |
 |
|
|
|
Well I'm trying to leave this code as near to the original as possible... thanks, though. |
|
Back to top |
|
 |
Grelminar Creator of Asss
Joined: Feb 26 2003 Posts: 378 Offline
|
Posted: Fri Sep 03, 2004 11:27 pm Post maybe stupid Post subject: |
 |
|
|
|
First, that's not a linker error. Second, that's not valid gcc inline asm syntax. This page should help. |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Sat Sep 04, 2004 3:15 am Post maybe stupid Post subject: |
 |
|
|
|
MS conforms to Intel ASM spec. That GCC stuff is like reading hex data.  |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Sat Sep 04, 2004 11:42 am Post maybe stupid Post subject: |
 |
|
|
|
Eh, it's easy to read once you understand what it's doing. |
|
Back to top |
|
 |
Smong Server Help Squatter

Joined: 1043048991 Posts: 0x91E Offline
|
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Sat Sep 04, 2004 2:38 pm Post maybe stupid Post subject: |
 |
|
|
|
I probably should just to be safe, but I've already tested the build and sent the source to Catid, so I think I'll just leave it alone for now. |
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Sat Sep 04, 2004 6:14 pm Post maybe stupid Post subject: |
 |
|
|
|
Cyan~Fire wrote: | Eh, it's easy to read once you understand what it's doing. |
The point is, the MS version shows you the actual assembly, instruction for instruction. Making a whole new language that hides the operations and their sequences is like using C++. |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Sat Sep 04, 2004 9:43 pm Post maybe stupid Post subject: |
 |
|
|
|
Yeah, just like C and PERL and ASM and all those other stupid high-level languages! Bah! Let's just write in machine code!! |
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Sat Sep 04, 2004 10:03 pm Post maybe stupid Post subject: |
 |
|
|
|
Sigh. When you write in ASM, you are trying to talk directly to the machine you are targetting. In the case of Intel/AMD, the instruction set is a known. Trying to disguise instructions with crazy symbols or pretending it's higher level than it is is not helpful. One line, one instruction, one opcode. |
|
Back to top |
|
 |
D1st0rt Miss Directed Wannabe

Age:37 Gender: Joined: Aug 31 2003 Posts: 2247 Location: Blacksburg, VA Offline
|
Posted: Sat Sep 04, 2004 10:13 pm Post maybe stupid Post subject: |
 |
|
|
|
Cyan, why write in machine code when you can use 0's and 1's? $$
Some old guy> What?! You had 0's?! Back in my day, we had to use the letter 'O' _________________
 |
|
Back to top |
|
 |
Mine GO BOOM Hunch Hunch What What

Age:41 Gender: Joined: Aug 01 2002 Posts: 3615 Location: Las Vegas Offline
|
Posted: Sun Sep 05, 2004 12:24 am Post maybe stupid Post subject: |
 |
|
|
|
I've actually used someone's machine in which it required you to toggle switches to talk to it. They made their own computer, like back in the original computer type days. Much easier to do now. |
|
Back to top |
|
 |
Grelminar Creator of Asss
Joined: Feb 26 2003 Posts: 378 Offline
|
Posted: Sun Sep 05, 2004 1:54 am Post maybe stupid Post subject: |
 |
|
|
|
Mr Ekted wrote: | The point is, the MS version shows you the actual assembly, instruction for instruction. Making a whole new language that hides the operations and their sequences is like using C++. |
I don't think you get it, Ek. The gcc method is actually more powerful and more transparent than the msvc method.
First, there's nothing hidden: gcc writes your instructions directly into the assembly output, as written. Of course, substitutions are performed where input and output are concerned, but msvc also performs substitutions, so I see no difference there.
Second, consider trying to imul a variable and a constant. In msvc, you'd have to mov at least one into a register, perform the imul, and then move the result into a variable. In gcc, you just tell it where you want the input and output to go, and it takes care of the rest. Specifically, it can perform register allocation so that the desired input and output values are already in the correct registers, and save those extra mov instructions. Also, you tell gcc which registers are clobbered by your operation, so it can optimize better by eliminating spills that msvc would have to include, since it doesn't know what registeres are clobbered. |
|
Back to top |
|
 |
|