Bootstrap2.c 832 B

123456789101112131415161718192021222324252627
  1. /* -*- mode:c; c-file-style:"k&r"; c-basic-offset: 4; tab-width:4; indent-tabs-mode:nil; mode:auto-fill; fill-column:78; -*- */
  2. /* vim: set ts=4 sw=4 et tw=78 fo=cqt wm=0: */
  3. #include "pal.h"
  4. #include "pal_debug.h"
  5. int main (int argc, char ** argv, char ** envp)
  6. {
  7. /* check if the program is loaded */
  8. pal_printf("User Program Started\n");
  9. /* check control block */
  10. /* check executable name */
  11. pal_printf("Loaded Executable: %s\n", pal_control.executable);
  12. /* check manifest name */
  13. char manifest[30] = "";
  14. DkStreamGetName(pal_control.manifest_handle, manifest, 30);
  15. pal_printf("Loaded Manifest: %s\n", manifest);
  16. /* check arguments */
  17. pal_printf("# of Arguments: %d\n", argc);
  18. for (int i = 0 ; i < argc ; i++)
  19. pal_printf("argv[%d] = %s\n", i, argv[i]);
  20. return 0;
  21. }