doors.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #ifndef DOORS
  2. #define DOORS
  3. #ifdef NOSTUB
  4. #error "doors.h" must not be included in "nostub" mode!
  5. #undef DOORS
  6. #else
  7. #ifndef KERNEL_NEW
  8. #include <default.h>
  9. #endif
  10. #define __REDEFINE_ALL_ROM_CALLS
  11. #include <romsymb.h>
  12. /* Begin Auto-Generated Part */
  13. #define _ram_call_addr(ind) (&_RAM_CALL_##ind)
  14. #define _ram_call(ind,type) ((type)(&_RAM_CALL_##ind))
  15. /* End Auto-Generated Part */
  16. extern void
  17. _RAM_CALL_0,_RAM_CALL_1,_RAM_CALL_2,_RAM_CALL_3,
  18. _RAM_CALL_4,_RAM_CALL_5,_RAM_CALL_6,_RAM_CALL_7,
  19. _RAM_CALL_8,_RAM_CALL_9,_RAM_CALL_A,_RAM_CALL_B,
  20. _RAM_CALL_C,_RAM_CALL_D,_RAM_CALL_E,_RAM_CALL_F,
  21. _RAM_CALL_10,_RAM_CALL_11,_RAM_CALL_12,_RAM_CALL_13,
  22. _RAM_CALL_14,_RAM_CALL_15,_RAM_CALL_16,_RAM_CALL_17,
  23. _RAM_CALL_18,_RAM_CALL_19,_RAM_CALL_1A,_RAM_CALL_1B,
  24. _RAM_CALL_1C,_RAM_CALL_1D,_RAM_CALL_1E,_RAM_CALL_1F;
  25. #ifndef _GENERIC_ARCHIVE
  26. _INCLUDE_PATCH(__kernel);
  27. #ifdef USE_PREOS_COMPRESSED_TABLES
  28. _INCLUDE_PATCH(__preos_headers);
  29. #endif
  30. #ifdef RETURN_VALUE
  31. #define __str(x) #x /* A set of nasty hacks with preprocessor */
  32. #define __xstr(x) __str(x) /* based on some very specific features */
  33. #define __var(x) x##1
  34. #define __xvar(x) __var(x)
  35. #if __xvar(RETURN_VALUE)
  36. _INCLUDE_PATCH(__doors_retval);
  37. #else
  38. _INCLUDE_PATCH(__doors_retval_var);
  39. asm("\n"
  40. " /* RETURN_VALUE <variable> Extra Support */\n"
  41. " .xdef __retval_var_name__\n"
  42. " .byte 0\n"
  43. " .ascii \""__xstr(RETURN_VALUE)"\"\n"
  44. "__retval_var_name__:\n"
  45. " .byte 0\n"
  46. " .even\n"
  47. " ");
  48. #endif
  49. #undef __str
  50. #undef __xstr
  51. #undef __var
  52. #undef __xvar
  53. #endif
  54. #if defined(ENABLE_ERROR_RETURN)
  55. __INCLUDE_PATCH(__special_error_return_support);
  56. #endif
  57. #ifdef COMMENT_STRING
  58. char _comment[] = (COMMENT_STRING);
  59. #endif
  60. #endif
  61. #endif
  62. #endif