Skip to content

Instantly share code, notes, and snippets.

@FedorLap2006
Last active May 4, 2019 17:02
Show Gist options
  • Save FedorLap2006/97fe0ab093f5a54e3f6633b422da26ba to your computer and use it in GitHub Desktop.
Save FedorLap2006/97fe0ab093f5a54e3f6633b422da26ba to your computer and use it in GitHub Desktop.
execute binary command ( OSDev )
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