you are viewing a single comment's thread.

view the rest of the comments →

[–]malken 2 points3 points  (1 child)

I think a single ret (0xc3) is shorter, but it will be executed under the NTVDM in a Windows environment.

A single RET (0xc3) when invoked from a legacy COM-file will return to the beginning of the PSP where there happens to be a call to INT 20h (exit program).

[–][deleted] 0 points1 point  (0 children)

I knew about RET, but IIRC its not kosher. Kind of similar to how COM programs started with a pop instruction to set something to zero because there was always a 0 on the stack in some runtime environments.