-1
When the code will return from a routine it must specify how many bytes it should return to the stack by changing the Stack Pointer (SP) register. That’s the number there.
Note that the numbers are always multiples of 4 bytes which is the size of a word in architecture then it is returning the amount of words determined by that number divided by 4. Do not forget that it is in hexadecimal.
The N
indicates that you must do this within the code segment itself. In the past 16 buts codes could only address 64KB and to get more memory was required to use multiple segments through a so-called distant addressing (far) and there used to be instruction RETF
, unless it was only in the same segment that uses the RETN
(near). IN modern codes there is only one segment, but even in the past it was rarer to leave the segment for this kind of end.
The RET
in fact is the RETN
(or RETF
if necessary), but the assembler infers how many bytes should return on the stack pointer.
That’s the x86 Assembly, don’t watch out for other flavors.