Skip to content

Instantly share code, notes, and snippets.

@djg djg/test2.cpp
Created Jul 8, 2010

Embed
What would you like to do?
// Yet another test. Also had a .obj along side.
#include <winsock2.h>
int
main()
{
u_short x = 1;
x = htons(x);
return x;
}
// Dump of file test.obj
//
// File Type: COFF OBJECT
//
// _main:
// 00000000: 55 push ebp
// 00000001: 8B EC mov ebp,esp
// 00000003: 51 push ecx
// 00000004: 66 C7 45 FC 01 00 mov word ptr [ebp-4],1
// 0000000A: 66 8B 45 FC mov ax,word ptr [ebp-4]
// 0000000E: 50 push eax
// 0000000F: FF 15 00 00 00 00 call dword ptr [__imp__htons@4]
// 00000015: 66 89 45 FC mov word ptr [ebp-4],ax
// 00000019: 0F B7 45 FC movzx eax,word ptr [ebp-4]
// 0000001D: 8B E5 mov esp,ebp
// 0000001F: 5D pop ebp
// 00000020: C3 ret
//
// Summary
//
// 61 .debug$S
// 5D .drectve
// 21 .text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.