C
SeppJ schrieb:
Moderne Compiler sind eigentlich recht aggressive Inliner
Jop, VS inlinet alles:
int main()
{
00081000 push ebp
00081001 mov ebp,esp
00081003 push ecx
00081004 push ebx
00081005 push esi
//void *arg1 = (void*)0x80001000;
//int arg2 = 12;
//void *returnValue = someOperation(arg1, arg2);
//try
//{
k_clear_screen();
00081006 mov eax,0B8000h
0008100B mov bl,7
0008100D lea ecx,[ecx]
00081010 mov byte ptr [eax],20h
00081013 mov byte ptr [eax+1],bl
00081016 add eax,2
00081019 cmp eax,0B8FA0h
0008101E jb main+10h (81010h)
k_printf("Welcome to HenkesSoft OS.", 0);
00081020 xor edx,edx
00081022 mov ecx,offset string "Welcome to HenkesSoft OS." (87810h)
00081027 mov al,57h
00081029 xor esi,esi
0008102B jmp main+30h (81030h)
0008102D lea ecx,[ecx]
00081030 cmp al,2Fh
00081032 jne main+4Ch (8104Ch)
00081034 mov al,byte ptr [ecx+1]
00081037 inc ecx
00081038 cmp al,6Eh
0008103A jne main+4Ch (8104Ch)
0008103C mov al,byte ptr [ecx+1]
0008103F inc ecx
00081040 add esi,0A0h
00081046 mov edx,esi
00081048 test al,al
0008104A je main+62h (81062h)
0008104C mov byte ptr [edx+0B8000h],al
00081052 inc ecx
00081053 mov byte ptr [edx+0B8001h],bl
00081059 mov al,byte ptr [ecx]
0008105B add edx,2
0008105E test al,al
00081060 jne main+30h (81030h)
k_printf("The C kernel has been loaded.", 2);
00081062 mov edx,140h
00081067 mov ecx,offset string "The C kernel has been loaded." (8782Ch)
0008106C mov al,54h
0008106E mov esi,edx
00081070 cmp al,2Fh
00081072 jne main+8Ch (8108Ch)
00081074 mov al,byte ptr [ecx+1]
00081077 inc ecx
00081078 cmp al,6Eh
0008107A jne main+8Ch (8108Ch)
0008107C mov al,byte ptr [ecx+1]
0008107F inc ecx
00081080 add esi,0A0h
00081086 mov edx,esi
00081088 test al,al
0008108A je main+0A2h (810A2h)
0008108C mov byte ptr [edx+0B8000h],al
00081092 inc ecx
00081093 mov byte ptr [edx+0B8001h],bl
00081099 mov al,byte ptr [ecx]
0008109B add edx,2
0008109E test al,al
000810A0 jne main+70h (81070h)
update_cursor(3, 0);
000810A2 mov ax,0Fh
000810A6 mov dx,3D4h
000810AA out dx,ax
000810AC mov dword ptr [ebp-4],0F0h
000810B3 mov ax,word ptr [ebp-4]
000810B7 mov dx,3D5h
000810BB out dx,ax
000810BD mov ax,0Eh
000810C1 mov dx,3D4h
000810C5 out dx,ax
000810C7 mov dword ptr [ebp-4],0
000810CE mov ax,word ptr [ebp-4]
000810D2 mov dx,3D5h
000810D6 out dx,ax
000810D8 pop esi
return 0;
000810D9 xor eax,eax
000810DB pop ebx
// }
//catch(...)
//{
// return 1;
//}
}
000810DC mov esp,ebp
000810DE pop ebp
000810DF ret