Binarus
2013-03-04 16:00:42 UTC
Hi all,
I have a 16-bit (DOS) assembler module which I compile using JWasm and the following command line:
jwasm -5p -e20 -FPi87 -fp3 -Gd -W4 -WX -zcm -omf -Fo=bla.obj bla.asm
Within the source file, I have PROC declarations / definitions like the following:
PUBLIC C Foo
FOO PROC FAR C
<code goes here>
FOO ENDP
Now, JWasm compiles a "half" of a stack frame automatically with the following result:
FOO PROC FAR C
push bp
mov bp, sp
<code goes here>
FOO ENDP
That means that it generates the stack entry frame, but not the stack leaving frame.
This is not really a problem because I can add the missing "pop bp" at the end of every PROC manually. But I'm feeling a bit uncomfortable doing so, considering that I might need to compile the code with other assemblers in the future, and I'm strongly interested in knowing what I am doing wrong.
By the way, there is no .MODEL directive in the code.
Any comments?
Thank you very much,
Binarus
I have a 16-bit (DOS) assembler module which I compile using JWasm and the following command line:
jwasm -5p -e20 -FPi87 -fp3 -Gd -W4 -WX -zcm -omf -Fo=bla.obj bla.asm
Within the source file, I have PROC declarations / definitions like the following:
PUBLIC C Foo
FOO PROC FAR C
<code goes here>
FOO ENDP
Now, JWasm compiles a "half" of a stack frame automatically with the following result:
FOO PROC FAR C
push bp
mov bp, sp
<code goes here>
FOO ENDP
That means that it generates the stack entry frame, but not the stack leaving frame.
This is not really a problem because I can add the missing "pop bp" at the end of every PROC manually. But I'm feeling a bit uncomfortable doing so, considering that I might need to compile the code with other assemblers in the future, and I'm strongly interested in knowing what I am doing wrong.
By the way, there is no .MODEL directive in the code.
Any comments?
Thank you very much,
Binarus