This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to realize exit(0) function in keilC51

HI: We can use exit(0) instruction to exit a normally running routine in C language. But exit(0) is not being in the KEILC51.Now how can I realize the same function as exit(0) instruction with other instructions?

Parents
  • I think lots of embedded systems have methods to implement different abort() solutions where a failure may be emitted to flash/EEPROM/LEDs/UART/...

    But then we are normally talking about an abort or shutdown or forced reboot - not a normal "exit". The function exit() is expected to make a controlled exit - close open files etc. A problem when you really do find such a bad problem that you need to abort the program run, is how to know that you are enough in control that you may dare to do the last touch-up of a flash file system before a restart? And more interestingly - what should/could a compiler vendor do?

Reply
  • I think lots of embedded systems have methods to implement different abort() solutions where a failure may be emitted to flash/EEPROM/LEDs/UART/...

    But then we are normally talking about an abort or shutdown or forced reboot - not a normal "exit". The function exit() is expected to make a controlled exit - close open files etc. A problem when you really do find such a bad problem that you need to abort the program run, is how to know that you are enough in control that you may dare to do the last touch-up of a flash file system before a restart? And more interestingly - what should/could a compiler vendor do?

Children