mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 23:13:34 +00:00
I wanted a tiny scriptable meltdown proof way to run userspace programs and visualize how program execution impacts memory. It helps to explain how things like Actually Portable Executable works. It can show you how the GCC generated code is going about manipulating matrices and more. I didn't feel fully comfortable with Qemu and Bochs because I'm not smart enough to understand them. I wanted something like gVisor but with much stronger levels of assurances. I wanted a single binary that'll run, on all major operating systems with an embedded GPL barrier ZIP filesystem that is tiny enough to transpile to JavaScript and run in browsers too. https://justine.storage.googleapis.com/emulator625.mp4
33 lines
1.3 KiB
C++
33 lines
1.3 KiB
C++
#define ExitProcess(...) __imp_ExitProcess(__VA_ARGS__)
|
|
extern typeof(ExitProcess) *const __imp_ExitProcess __msabi;
|
|
|
|
#define FreeEnvironmentStrings(...) __imp_FreeEnvironmentStringsW(__VA_ARGS__)
|
|
extern typeof(FreeEnvironmentStrings) *const
|
|
__imp_FreeEnvironmentStringsW __msabi;
|
|
|
|
#define GetCommandLine(...) __imp_GetCommandLineW(__VA_ARGS__)
|
|
extern typeof(GetCommandLine) *const __imp_GetCommandLineW __msabi;
|
|
|
|
#define GetEnvironmentStrings(...) __imp_GetEnvironmentStringsW(__VA_ARGS__)
|
|
extern typeof(GetEnvironmentStrings) *const
|
|
__imp_GetEnvironmentStringsW __msabi;
|
|
|
|
#define GetStdHandle(...) __imp_GetStdHandle(__VA_ARGS__)
|
|
extern typeof(GetStdHandle) *const __imp_GetStdHandle __msabi;
|
|
|
|
#define SetStdHandle(...) __imp_SetStdHandle(__VA_ARGS__)
|
|
extern typeof(SetStdHandle) *const __imp_SetStdHandle __msabi;
|
|
|
|
#define ReadFile(...) __imp_ReadFile(__VA_ARGS__)
|
|
extern typeof(ReadFile) *const __imp_ReadFile __msabi;
|
|
|
|
#define WriteFile(...) __imp_WriteFile(__VA_ARGS__)
|
|
extern typeof(WriteFile) *const __imp_WriteFile __msabi;
|
|
|
|
#define SetDefaultDllDirectories(...) \
|
|
__imp_SetDefaultDllDirectories(__VA_ARGS__)
|
|
extern typeof(SetDefaultDllDirectories) *const
|
|
__imp_SetDefaultDllDirectories __msabi;
|
|
|
|
#define GetCurrentProcess(...) __imp_GetCurrentProcess(__VA_ARGS__)
|
|
extern typeof(GetCurrentProcess) *const __imp_GetCurrentProcess __msabi;
|