《操作系统》的实验代码。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
384 B

12 years ago
  1. .text
  2. .globl _start
  3. _start:
  4. # set ebp for backtrace
  5. movl $0x0, %ebp
  6. # load argc and argv
  7. movl (%esp), %ebx
  8. lea 0x4(%esp), %ecx
  9. # move down the esp register
  10. # since it may cause page fault in backtrace
  11. subl $0x20, %esp
  12. # save argc and argv on stack
  13. pushl %ecx
  14. pushl %ebx
  15. # call user-program function
  16. call umain
  17. 1: jmp 1b