home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / config / m68k-emul / geninc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-12-10  |  3.3 KB  |  77 lines

  1. #include <exec/alerts.h>
  2. #include <exec/types.h>
  3. #include <exec/execbase.h>
  4. #include <exec/tasks.h>
  5. #include <dos/dosextens.h>
  6. #include <stdio.h>
  7. #include <stddef.h>
  8.  
  9. #define FuncOffset(x)       (int)__AROS_GETJUMPVEC(0,x)
  10.  
  11. int main (void)
  12. {
  13.     printf ("# Macros\n"
  14.     "#define AROS_CSYMNAME(n)       n\n"
  15.     "#define AROS_CDEFNAME(n)       n\n"
  16.     "#define AROS_SLIB_ENTRY(n,s)   s ## _ ## n\n"
  17.         "\n");
  18.  
  19.     printf ("# ExecBase\n");
  20.     printf ("\tAttnResched   = %d\n", (int)offsetof (struct ExecBase, AttnResched));
  21.     printf ("\tIDNestCnt     = %d\n", (int)offsetof (struct ExecBase, IDNestCnt));
  22.     printf ("\tTDNestCnt     = %d\n", (int)offsetof (struct ExecBase, TDNestCnt));
  23.     printf ("\tTaskReady     = %d\n", (int)offsetof (struct ExecBase, TaskReady));
  24.     printf ("\tThisTask      = %d\n", (int)offsetof (struct ExecBase, ThisTask));
  25.  
  26.     printf ("\n# struct Task\n");
  27.     printf ("\ttc_State      = %d\n", (int)offsetof (struct Task, tc_State));
  28.     printf ("\ttc_Flags      = %d\n", (int)offsetof (struct Task, tc_Flags));
  29.     printf ("\ttc_ExceptCode = %d\n", (int)offsetof (struct Task, tc_ExceptCode));
  30.     printf ("\ttc_ExceptData = %d\n", (int)offsetof (struct Task, tc_ExceptData));
  31.     printf ("\ttc_SigExcept  = %d\n", (int)offsetof (struct Task, tc_SigExcept));
  32.     printf ("\ttc_SigRecvd   = %d\n", (int)offsetof (struct Task, tc_SigRecvd));
  33.     printf ("\ttc_Launch     = %d\n", (int)offsetof (struct Task, tc_Launch));
  34.     printf ("\ttc_Switch     = %d\n", (int)offsetof (struct Task, tc_Switch));
  35.     printf ("\ttc_SPReg      = %d\n", (int)offsetof (struct Task, tc_SPReg));
  36.     printf ("\ttc_SPLower    = %d\n", (int)offsetof (struct Task, tc_SPLower));
  37.     printf ("\ttc_SPUpper    = %d\n", (int)offsetof (struct Task, tc_SPUpper));
  38.     printf ("\ttc_IDNestCnt  = %d\n", (int)offsetof (struct Task, tc_IDNestCnt));
  39.  
  40.     printf ("\n# struct DosBase\n");
  41.     printf ("\tdl_SysBase    = %d\n", (int)offsetof (struct DosLibrary, dl_SysBase));
  42.  
  43.     printf ("\n# struct StackSwapStruct\n");
  44.     printf ("\tstk_Lower     = %d\n", (int)offsetof (struct StackSwapStruct, stk_Lower));
  45.     printf ("\tstk_Upper     = %d\n", (int)offsetof (struct StackSwapStruct, stk_Upper));
  46.     printf ("\tstk_Pointer   = %d\n", (int)offsetof (struct StackSwapStruct, stk_Pointer));
  47.  
  48.     printf ("\n# Task Flags\n");
  49.     printf ("\tTS_RUN        = %d\n", TS_RUN);
  50.     printf ("\tTS_READY      = %d\n", TS_READY);
  51.     printf ("\tTF_EXCEPT     = 0x%04lX\n", TF_EXCEPT);
  52.     printf ("\tTF_SWITCH     = 0x%04lX\n", TF_SWITCH);
  53.  
  54.     printf ("\tTB_EXCEPT     = %d\n", TB_EXCEPT);
  55.     printf ("\tTB_SWITCH     = %d\n", TB_SWITCH);
  56.     printf ("\tTB_LAUNCH     = %d\n", TB_LAUNCH);
  57.  
  58.     printf ("\n# Exec functions\n");
  59.     printf ("\tSupervisor    = %d\n", FuncOffset (5));
  60.     printf ("\tSwitch        = %d\n", FuncOffset (9));
  61.     printf ("\tDispatch      = %d\n", FuncOffset (10));
  62.     printf ("\tException     = %d\n", FuncOffset (11));
  63.     printf ("\tAlert         = %d\n", FuncOffset (18));
  64.     printf ("\tDisable       = %d\n", FuncOffset (20));
  65.     printf ("\tEnable        = %d\n", FuncOffset (21));
  66.     printf ("\tEnqueue       = %d\n", FuncOffset (45));
  67.     printf ("\tStackSwap     = %d\n", FuncOffset (122));
  68.  
  69.     printf ("\n# Constants\n");
  70.     printf ("\tAT_DeadEnd    = 0x%08X\n", AT_DeadEnd);
  71.     printf ("\tAN_StackProbe = 0x%08X\n", AN_StackProbe);
  72.  
  73.     return 0;
  74. }
  75.  
  76.  
  77.