Closed tkchia closed 3 years ago
Thanks for this report. It is really wrong in "Language reference" guide. __saveregs means to save all segment registers.
Hello @jmalak,
Is __saveregs
supposed to save other registers too --- e.g. the general purpose registers and flags register?
Thank you!
No it is only for segment register. If you want to save all registers and flags then you can specify function with __interrupt modifier and specify INTPACK structure as parameter then you can access all register on entry and on exit.
void __interrupt int10( union INTPACK r )
Use of such function is described in OW guide.
Hello @jmalak,
Thanks for the clarification!
Good day,
I have been trying to use Open Watcom's
__saveregs
keyword, but I am confused about what it is supposed to do.The User's Guide (
cguide.pdf
) sayswhile the Language Reference (
clr.pdf
) saysMeanwhile, for the actual implementation of
__saveregs
(as of 2.0 beta May 17 2020), it seems the compiler does add some code to save registers --- but only the segment registers.I think it will be good to clear up what the "correct" intended meaning of
__saveregs
really is.Thank you!