Bootstrap2.c 659 B

123456789101112131415161718192021222324
  1. #include "pal.h"
  2. #include "pal_debug.h"
  3. int main(int argc, char** argv, char** envp) {
  4. /* check if the program is loaded */
  5. pal_printf("User Program Started\n");
  6. /* check control block */
  7. /* check executable name */
  8. pal_printf("Loaded Executable: %s\n", pal_control.executable);
  9. /* check manifest name */
  10. char manifest[30] = "";
  11. DkStreamGetName(pal_control.manifest_handle, manifest, 30);
  12. pal_printf("Loaded Manifest: %s\n", manifest);
  13. /* check arguments */
  14. pal_printf("# of Arguments: %d\n", argc);
  15. for (int i = 0; i < argc; i++) {
  16. pal_printf("argv[%d] = %s\n", i, argv[i]);
  17. }
  18. return 0;
  19. }