www.pudn.com > LFYOS.zip > enter_fs.s
.global enter_file_system,copy_os_data copy_os_data: movl $(0xc0001000),%edi movl 0x04(%esp),%esi movl $(0x1000),%ecx 1: movl %cs:(%esi),%eax movl %eax,(%edi) addl $(0x04),%esi addl $(0x04),%edi subl $(0x04),%ecx jne 1b ret enter_file_system: movl $(0xc0000ffc),%esp pushl %ebp pushl %edi pushl %esi pushl %edx pushl %ecx pushl %ebx pushl %eax pushl %esp call file_system_call_deal popl %ebx popl %ebx popl %ebx popl %ecx popl %edx popl %esi popl %edi popl %ebp movl %eax,%ebx 1: movl $(0x03),%eax int $(0x80) movl $(0x00),%ebx jmp 1b