Last active
May 4, 2019 17:02
-
-
Save FedorLap2006/97fe0ab093f5a54e3f6633b422da26ba to your computer and use it in GitHub Desktop.
execute binary command ( OSDev )
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
CS_ADDR equ 0x0 ; change this variable to your code ( this is code segment addr -- cs ) | |
C_COUNTER equ 0x0 ; change this variable to your code ( this is next cpu command addr -- eip ) | |
mov cs,SEC_ADDR | |
mov eip,COM_COUNTER | |
;------- or --------- | |
push eax | |
push edx | |
;----------- | |
mov CS_ADDR, edx | |
mov C_COUNTER, eax | |
mov cs,edx | |
jmp [eax] | |
; ----------- | |
pop eax | |
pop edx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment