2 * librm: a library for interfacing to real-mode code
4 * Michael Brown <mbrown@fensystems.co.uk>
9 /* Build a null object under -DKEEP_IT_REAL */
16 * This file provides functions for managing librm.
21 * Allocate space on the real-mode stack and copy data there.
24 uint16_t copy_to_rm_stack ( void *data, size_t size ) {
26 if ( rm_sp <= size ) {
27 printf ( "librm: out of space in RM stack\n" );
32 copy_to_real ( rm_ss, rm_sp, data, size );
37 * Deallocate space on the real-mode stack, optionally copying back
41 void remove_from_rm_stack ( void *data, size_t size ) {
43 copy_from_real ( data, rm_ss, rm_sp, size );
48 #endif /* KEEP_IT_REAL */