Created
May 24, 2012 17:29
-
-
Save yutopp/2782938 to your computer and use it in GitHub Desktop.
こんなインターフェースにしたのは誰だ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
#include <ytl/assembler.hpp> | |
int main() { | |
namespace x86 = ytl::assembler::ia_32; | |
std::vector<char> binary_buffer; | |
auto asm_gen = ytl::assembler::make_generator<x86::engine>( binary_buffer ); | |
YTL_ASM_BEGIN( asm_gen ) | |
{ | |
push( reg::cs ); | |
pop( reg::ds ); | |
mov( reg::dx, 0x0e ); | |
mov( reg::ah, 0x09 ); | |
int_( 0x21 ); | |
mov( reg::ax, 0x4c01 ); | |
int_( 0x21 ); | |
} | |
YTL_ASM_END | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment