This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BIOS_exit(int stat);函数参数



看了一些关于sys/bios的例程,在退出系统的时候都用了BIOS_exit(0);

请教各位大神,这个BIOS_exit(int stat);函数的参数表示什么意思,只有0这一个值吗?

  • 看你需要什么参数了。

    这是传给结束时候要执行的函数的,functions bound via System_atexit会调用这些函数,支持传进去一个参数,也就是BIOS_exit()中传进去的参数。


    下面是手册上对该函数的解释:

    Void BIOS_exit(Int stat);

     
    ARGUMENTS
    stat — exit status to return to calling environment.

    DETAILS
    This function is called when a SYS/BIOS executable needs to terminate normally. This function sets the internal SYS/BIOS threadType to ThreadType_Main and then calls System_exit(stat), passing along the 'stat' argument.
    All functions bound via System_atexit or the ANSI C Standard Library atexit function are then executed.