what is FAR PASCAL?

后端 未结 7 1617
故里飘歌
故里飘歌 2020-12-10 01:00

I was wondering why in some source code there are these macros like FAR and PASCAL. What do they mean and do?

7条回答
  •  再見小時候
    2020-12-10 01:33

    this is an old calling convention...

    FAR is inherited from a time when processor registers where too small to hold the complete address of a jump destination. so, processors had 2 type of jump depending how "far" the destination was from the current program counter.

    PASCAL describes the argument order on the stack, it tells that the function uses the order described by the Pascal programming language, which was different from C. (very old version of operating systems like MacOS and Windows where developped using Pascal).

提交回复
热议问题