Hello, I'm new to assembly programming and I'm facing some problems using the "as/gcc" compiler on my MacBook. For example, it seems that I can't use labels for jmps/loops. The following code:

.intel_syntax noprefix
...
...

cicle:
	<instructions>
	<instructions>
	<...>
	loop cicle

Returns the error:
"t.s:16:suffix or operands invalid for `loop'"

Anybody knows why ?

Thanks in advance for any help.

Well I am not familiar with as so it could be a syntax error. Are you placeing a value in ecx? loop will iterate only while ecx > 0. Every time the loop executes ecx is decremented.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.