diff --git a/core/comboot.inc b/core/comboot.inc
index 1a1dbfe..1923308 100644
--- a/core/comboot.inc
+++ b/core/comboot.inc
@@ -962,6 +962,45 @@ comapi_shufraw:
 		mov ecx,P_ECX
 		jmp shuffle_and_boot_raw
 
+
+;
+; INT 22h AX=0025h	Set current working directory
+;
+%if IS_ISOLINUX
+comapi_setcwd:
+		mov si,P_BX
+		mov di,TmpDirName
+		mov cx,FILENAME_MAX
+		mov ds,P_ES
+.copy:
+		lodsb
+		stosb
+		or al,al
+		loopnz .copy
+		push cs
+		pop ds
+		stc
+		jnz .err
+		mov di,TmpDirName
+		call setcwd
+.err:
+		ret
+%else
+comapi_setcwd	equ comapi_err
+%endif
+
+
+;
+; INT 22h AX=0026h	Read filesystem meta data
+;
+%if IS_ISOLINUX
+comapi_mount:
+;		call iso_mount
+		ret
+%else
+comapi_mount	equ comapi_err
+%endif
+
 		section .data
 
 %macro		int21 2
@@ -969,6 +1008,109 @@ comapi_shufraw:
 		dw %2
 %endmacro
 
+
+;
+; INT 22h AX=0027h	Run command, return on error
+;
+; Terminates the COMBOOT program and executes the command line in
+; ES:BX as if it had been entered by the user.
+; CS:SI: comboot callback (via far call)
+; EDI kernel load address
+; EDX memory end (sets MyHighMemSize if != 0)
+;
+comapi_run2:
+		push word P_CS
+		push word P_SI
+		pop dword [comboot_far]
+		push dword P_EDI
+		pop dword [KernelStart]
+		mov edx,P_EDX
+		or edx,edx
+		jz .nohimemsize
+%if HIGHMEM_SLOP != 0
+		sub edx,HIGHMEM_SLOP
+%endif
+.nohimemsize:
+		mov [AltHighMemSize],edx
+		mov ds,P_ES
+		mov si,P_BX
+		mov di,command_line
+		call strcpy
+		push cs
+		pop ds
+		push cs
+		pop es
+		mov [comboot_sp_save],sp	; save stack pointer
+		mov word [comboot_hook],comboot_hook_entry
+		or byte [QuietBoot],2
+		jmp load_kernel		; Run a new kernel
+
+comapi_run2_cont:
+		mov word [comboot_hook],comboot_hook_nop
+		mov sp,[comboot_sp_save]	; fix stack pointer
+		and byte [QuietBoot],~2
+		clc
+		ret
+
+
+;
+; INT 22h AX=0028h	Get memory size
+;
+comapi_memsize:
+		push dword [HighMemSize]
+		pop dword P_EAX
+		clc
+		ret
+
+
+;
+; Callback function used at various places during kernel/initrd loading.
+;
+; The function either returns or continues at comapi_run2_cont.
+;
+; AL:
+;  bit 7: 0/1 return/don't return
+;  bit 0-6: function code
+;    0: abort kernel/initrd loading
+;    1: kernel/initrd not found
+;    2: kernel corrupt
+;    3: out of memory (while initrd loading)
+;    4: progress start
+;    5: progress increment
+;    6: progress end: kernel loaded, stop gfxboot
+;    7: stop gfxboot
+;
+comboot_hook_entry:
+		pushad
+		push gs
+		push fs
+		push es
+		push ds
+		call far [comboot_far]
+		pop ds
+		pop es
+		pop fs
+		pop gs
+		popad
+		pushad
+		and al,7fh
+		cmp al,6
+		jnz .notlast
+		push es
+		mov si,DOSSaveVectors
+		mov di,4*20h
+		mov cx,20h
+		push word 0
+		pop es
+		rep movsd		; Restore DOS-range vectors
+		pop es
+.notlast:
+		popad
+		test al,80h
+		jnz comapi_run2_cont
+comboot_hook_nop:
+		ret
+
 int21_table:
 		int21	00h, comboot_return
 		int21	01h, comboot_getkey
@@ -1021,8 +1163,16 @@ int22_table:
 		dw comapi_closedir	; 0022 close directory
 		dw comapi_shufsize	; 0023 query shuffler size
 		dw comapi_shufraw	; 0024 cleanup, shuffle and boot raw
+		dw comapi_setcwd	; 0025 set current working directory
+		dw comapi_mount		; 0026 read fs structures (aka mount)
+		dw comapi_run2		; 0027 like 0003, but return on error
+		dw comapi_memsize	; 0028 get memory size
 int22_count	equ ($-int22_table)/2
 
+comboot_sp_save	dw 0
+comboot_hook	dw comboot_hook_nop
+comboot_far	dd 0
+
 APIKeyWait	db 0
 APIKeyFlag	db 0
 
@@ -1041,8 +1191,10 @@ feature_flags_len equ ($-feature_flags)
 err_notdos	db ': attempted DOS system call INT ',0
 err_comlarge	db 'COMBOOT image too large.', CR, LF, 0
 
-		section .bss1
+		section .bss2
 		alignb 4
+AltHighMemSize	resd	1
 DOSErrTramp	resd	33		; Error trampolines
+TmpDirName	resb	FILENAME_MAX
 ConfigName	resb	FILENAME_MAX
 CurrentDirName	resb	FILENAME_MAX
