Skip to content

Instantly share code, notes, and snippets.

int callbackGetWindows(HWND hwnd, LPARAM lParam) nothrow {
import std.experimental.ui.internal.window;
GetWindows* ctx = cast(GetWindows*)lParam;
if (!IsWindowVisible(hwnd))
return true;
RECT rect;
GetWindowRect(hwnd, &rect);

{pagebreak}

Add with Carry

Variations
Mnemonic Opcode Valid/Requires 64bit? Description
ADC AL, imm8 14 ib Valid Add imm8 to AL + CF
ADC AX, imm16 15 iw Valid Add imm16 to AX + CF

{pagebreak}

ModRM/SIB encoding

Below is the structure of the ModRM byte:

7, 6 5, 4, 3 2, 1, 0
Mod Reg Reg/Mem

Macro Preprocessor

Syntax

  • #define Identifier Literal
    • Modifies the translation unit
    • Identifier#1 is replaced by Literal#1
  • #undef Identifier
    • Behaves as #define Identifier#1 $empty
  • #ifdef Identifier
@rikkimax
rikkimax / app.d
Last active January 23, 2016 12:13
import std.stdio;
import std.experimental.allocator : IAllocator, processAllocator;
import memmgr;
void main() {
writeln("START1");
func();
writeln("END2");
}
module dnetdev.webserver.common.classfinder;
Interface findAndCreateClass(Interface)(string name) if (is(Interface == class) || is(Interface == interface)) {
import std.experimental.allocator;
auto alloc = theAllocator();
auto classinfo = TypeInfo_Class.find(name);
if (classinfo is null)
return null;
module bytecode.opcodes;
enum OpCode {
nop = 0x00,
add = 0x10,
sub = 0x11,
mul = 0x12,
div = 0x13,
mod = 0x14,

Data glossary

Data IO:


  • __Name:__ INPUT-FILE
    __Data Type:__ Is a collection of other types
    __Range of values:__ Not applicable

Used on line numbers: 164, 176, 195

module dnetdev.vfs.path;
import std.experimental.allocator : IAllocator, makeArray, theAllocator, expandArray, shrinkArray, dispose, make;
private {
// santisization uses this
char[1024] charBuffer;
size_t[128] charIndexBuffer;
char[1024] tCopyBuffer;
}
binary e:\programs\D\ldc2-0.15.2-beta2-win64-msvc\bin\ldc2.exe
version 0.15.2-beta2 (DMD v2.066.1, LLVM 3.7.0git)
config e:\programs\D\ldc2-0.15.2-beta2-win64-msvc\etc\ldc2.conf
predefs LDC all D_Version2 assert X86_64 D_InlineAsm_X86_64 D_HardFloat
LittleEndian D_LP64 D_PIC Windows Win64 LDC_LLVM_307
parse test
importall test
import object (e:\programs\D\ldc2-0.15.2-beta2-win64-msvc\bin/../include/d/ldc\object.di)
import std.stdio (e:\programs\D\ldc2-0.15.2-beta2-win64-msvc\bin/../include/d\std\stdio.d)
import core.stdc.stdio (e:\programs\D\ldc2-0.15.2-beta2-win64-msvc\bin/../include/d\core\stdc\stdio.d)