byte - In C programming, what does "emit" do? -


i tried expand knowledge of c language , came across program used emit, possibly emit byte.

__declspec(naked) void marker_begin() { __asm {     _emit 0x51;     _emit 0x21;     _emit 0x1a;     _emit 0x14;     _emit 0x2c;     _emit 0x5b; } 

}

what used for? in advance.

your c program executing inline assembly code using _asm keyword. _asm microsoft specific keyword used in msdn. __asm keyword invokes inline assembler. must followed assembly instruction, group of instructions enclosed in braces, or, @ least, empty pair of braces.

the _emit pseudo instruction similar db directive of masm. _emit msdn specific pseudo instruction. _emit used define single immediate byte @ current location in current text segment. _emit can define 1 byte @ time , in text segment.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -