Discussion:
retf
(too old to reply)
muta...@gmail.com
2022-11-06 22:16:28 UTC
Permalink
I thought I only needed to code "ret", and the memory
model would take care of converting that to either
retf or retn, as required.

But I found under both wasm and masm I need to put
retf. Any idea why?

.model medium

.code

public two
two:

push dx
mov ah,2
mov dl,41h
int 21h
pop dx

retf

db 40000 dup(?)


end



Thanks. Paul.
muta...@gmail.com
2022-11-06 23:23:02 UTC
Permalink
Post by ***@gmail.com
I thought I only needed to code "ret", and the memory
model would take care of converting that to either
retf or retn, as required.
But I found under both wasm and masm I need to put
retf. Any idea why?
.model medium
.code
public two
push dx
mov ah,2
mov dl,41h
int 21h
pop dx
retf
db 40000 dup(?)
end
Thanks. Paul.
I found that if I put it in a proc, it behaves as expected.

.model medium

.code

public two
two proc

push dx
mov ah,2
mov dl,41h
int 21h
pop dx

ret

two endp

db 40000 dup(?)

end

Loading...