![]() |
|
Easiest & Hardest Programming Language? - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Coding (https://sinister.ly/Forum-Coding--71) +--- Thread: Easiest & Hardest Programming Language? (/Thread-Easiest-Hardest-Programming-Language) |
RE: Easiest & Hardest Programming Language? - cxS - 03-12-2013 (03-12-2013, 03:34 AM)w00t Wrote: AT&T syntax and Intel syntax represent the same thing, the difference being whether the operator or the operand should be provided first. Perhaps, but this was not what he was talking about in the first place. He was talking about the difference in the syntax, not what they represent... So I think your debate with him is irrelevant. (03-12-2013, 03:34 AM)w00t Wrote: Intel syntax, operand first: As shown by you here. And his comment here: Quote:The hardest is Assembly but there are many syntax the easiest for me is Intel syntax and the hardest is AT&T. So I'm not sure what you're trying to prove to the guy here? RE: Easiest & Hardest Programming Language? - Merkuri - 03-12-2013 (03-12-2013, 03:34 AM)w00t Wrote: AT&T syntax and Intel syntax represent the same thing, the difference being whether the operator or the operand should be provided first.Syntax 1 Spoiler:Code: .data
x:
.long 1
.long 5
.long 2
.long 18
sum:
.long 0
.text
.globl _start
_start:
movl $4, %eax
movl $0, %ebx
movl $x, %ecx
top:
addl (%ecx), %ebx
addl $4, %ecx
decl %eax
jnz top
movl %ebx, sumSyntax 2 Spoiler:Code: SECTION .data
global x
x:
dd 1
dd 5
dd 2
dd 18
sum:
dd 0
SECTION .text
mov eax,4
mov ebx,0
mov ecx, x
top:
add ebx, [ecx]
add ecx,4
dec eax
jnz top
mov [sum],ebxTell me that you don't see diffrent and I won't answer to any comment you have create. I'm almost sure that you even don't know which is the AT&T syntax and which is the Intel RE: Easiest & Hardest Programming Language? - w00t - 03-12-2013 The differences you're seeing are because you're using different assemblers, I believe NASM and GASM. The opcodes are the same, it's different representation of the same data. AT&T is just more explicit about what's going on. Use gdb to disassemble the same code, you'll see that it's the same data being represented and that AT&T does the same things, just more explicitly. Same language, different flavours. Different architectures are harder to learn, different styles of the same architecture are only slightly different. RE: Easiest & Hardest Programming Language? - Merkuri - 03-12-2013 (03-12-2013, 09:28 PM)w00t Wrote: The differences you're seeing are because you're using different assemblers, I believe NASM and GASM. The opcodes are the same, it's different representation of the same data. AT&T is just more explicit about what's going on. Use gdb to disassemble the same code, you'll see that it's the same data being represented and that AT&T does the same things, just more explicitly. Same language, different flavours. Different architectures are harder to learn, different styles of the same architecture are only slightly different. What I have said that the command are a little bit different and AT&T is harder for me by this. I'm using Emu8086 for the both. |