Skip to content

Instantly share code, notes, and snippets.

@7shi
7shi / label.cpp
Created November 26, 2012 08:37
PE generation with labels
// public domain
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <vector>
#include <map>
#include <memory>
#include <windows.h>
@7shi
7shi / makeexe5.cpp
Created November 10, 2012 01:01
generate an exe, a simple hello world.
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <windows.h>
using namespace std;
char image[0x800];
int main()
@zchothia
zchothia / avx_dispatch_example.c
Created July 9, 2012 21:13
AVX CPU dispatching - based on Agner Fog's C++ vector class library [http://www.agner.org/optimize/vectorclass.zip]
// AVX CPU dispatching - based on Agner Fog's C++ vector class library:
// http://www.agner.org/optimize/vectorclass.zip
#include <stdio.h>
#include <stdbool.h>
//------------------------------------------------------------------------------
//>> BEGIN <instrset.h>
// Detect 64 bit mode