;******************************************************************************************************************************** ;* * ;* File: CoreLibrary.inc * ;* * ;* This file defines the constants, macros, and structures for accessing functions of PwnOS. * ;* * ;* See Also: * ;* - * ;* * ;* Authors: * ;* - Neil G. Dickson * ;* * ;******************************************************************************************************************************** EXTERN_CORE_INCLUDE equ TRUE include ..\Core\Core.inc ;******************************************************************************************************************************** ;* * ;* Macro: CALL_CORE * ;* * ;* Call the from with one of the and parameters. * ;* * ;* Parameters: * ;* functionIndex - an operand containing one of the , to be mov'd to eax if not eax * ;* params - list of parameters to be sent to the function * ;* * ;******************************************************************************************************************************** CALL_CORE MACRO functionIndex,params:VARARG LOCAL count count = 0 FOR param, push param count = count + 1 ENDM IF functionIndex NE "eax" mov eax,functionIndex ENDIF ;call far ptr SELECTOR_CORE_CALL_GATE:00000000h byte 9Ah ;call far ptr dword 0 word SELECTOR_CORE_CALL_GATE add esp,4*count ENDM