ARM Technical Support Knowledge Articles

RET IS REPLACED WITH RETI OR RETS

Applies to: A166 Macro Assembler

Answer

Information in this article applies to:


SYMPTOMS

I have written a procedure in assembler and I used a RET instruction to return from it. When I assemble my code, the RET instruction is replaced with RETI or RETS. What is going on?

CAUSE

You are using the PROC and ENDP statements to define your procedure. For that reason, when your file is assembled, the RET instruction is automatically converted to an appropriate machine return instruction. The appropriate return instruction is determined by the type of procedure (near, far or interrupt).

MORE INFORMATION

Article last edited on: 2005-07-15 10:36:57

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential