init9.s 452 B

12345678910111213141516171819202122232425
  1. /*
  2. * This is the same as the C programme:
  3. *
  4. * void
  5. * main(char* argv0)
  6. * {
  7. * startboot(argv0, &argv0);
  8. * }
  9. *
  10. * It is in assembler because SB needs to be
  11. * set and doing this in C drags in too many
  12. * other routines.
  13. */
  14. TEXT main(SB), 1, $8
  15. MOVW $setR12(SB), R12 /* load the SB */
  16. MOVW $boot(SB), R0
  17. ADD $12, R13, R1 /* pointer to 0(FP) */
  18. MOVW R0, 4(R13) /* pass argc, argv */
  19. MOVW R1, 8(R13)
  20. BL startboot(SB)
  21. _loop:
  22. B _loop