home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / programm / programi / gcc_9112.lzh / include20 / inline / arp.h next >
Encoding:
C/C++ Source or Header  |  1991-12-15  |  38.2 KB  |  1,792 lines

  1. #include <inline/stub.h>
  2. #ifndef BASE_EXT_DECL
  3. #define BASE_EXT_DECL extern struct ArpBase * ArpBase;
  4. #endif
  5. #ifndef BASE_PAR_DECL
  6. #define BASE_PAR_DECL
  7. #endif
  8. #ifndef BASE_NAME
  9. #define BASE_NAME ArpBase
  10. #endif
  11. #ifdef PRIVATE
  12. __inline static BPTR Open(BASE_PAR_DECL char* name, LONG accessMode)
  13. {
  14.     BASE_EXT_DECL
  15.     register BPTR res __asm("d0");
  16.     register void *a6 __asm ("a6");
  17.     register char* d1 __asm("d1");
  18.     register LONG d2 __asm("d2");
  19.  
  20.     a6 = BASE_NAME;
  21.     d1 = name;
  22.     d2 = accessMode;
  23.     __asm volatile ("
  24.     jsr a6@(-0x1e)"
  25.     : "=g" (res)
  26.     : "g" (a6), "g" (d1), "g" (d2)
  27.     : "d0", "d1", "a0", "a1", "d2");
  28.     return res;
  29. }
  30. __inline static void Close(BASE_PAR_DECL BPTR file)
  31. {
  32.     BASE_EXT_DECL
  33.     register void *a6 __asm ("a6");
  34.     register BPTR d1 __asm("d1");
  35.  
  36.     a6 = BASE_NAME;
  37.     d1 = file;
  38.     __asm volatile ("
  39.     jsr a6@(-0x24)"
  40.     : /* no output */
  41.     : "g" (a6), "g" (d1)
  42.     : "d0", "d1", "a0", "a1");
  43. }
  44. __inline static LONG Read(BASE_PAR_DECL BPTR file, char* buffer, LONG length)
  45. {
  46.     BASE_EXT_DECL
  47.     register LONG res __asm("d0");
  48.     register void *a6 __asm ("a6");
  49.     register BPTR d1 __asm("d1");
  50.     register char* d2 __asm("d2");
  51.     register LONG d3 __asm("d3");
  52.  
  53.     a6 = BASE_NAME;
  54.     d1 = file;
  55.     d2 = buffer;
  56.     d3 = length;
  57.     __asm volatile ("
  58.     jsr a6@(-0x2a)"
  59.     : "=g" (res)
  60.     : "g" (a6), "g" (d1), "g" (d2), "g" (d3)
  61.     : "d0", "d1", "a0", "a1", "d2", "d3");
  62.     return res;
  63. }
  64. __inline static LONG Write(BASE_PAR_DECL BPTR file, char* buffer, LONG length)
  65. {
  66.     BASE_EXT_DECL
  67.     register LONG res __asm("d0");
  68.     register void *a6 __asm ("a6");
  69.     register BPTR d1 __asm("d1");
  70.     register char* d2 __asm("d2");
  71.     register LONG d3 __asm("d3");
  72.  
  73.     a6 = BASE_NAME;
  74.     d1 = file;
  75.     d2 = buffer;
  76.     d3 = length;
  77.     __asm volatile ("
  78.     jsr a6@(-0x30)"
  79.     : "=g" (res)
  80.     : "g" (a6), "g" (d1), "g" (d2), "g" (d3)
  81.     : "d0", "d1", "a0", "a1", "d2", "d3");
  82.     return res;
  83. }
  84. __inline static BPTR Input(BASE_PAR_DECL void)
  85. {
  86.     BASE_EXT_DECL
  87.     register BPTR res __asm("d0");
  88.     register void *a6 __asm ("a6");
  89.     a6 = BASE_NAME;
  90.     __asm volatile ("
  91.     jsr a6@(-0x36)"
  92.     : "=g" (res)
  93.     : "g" (a6)
  94.     : "d0", "d1", "a0", "a1");
  95.     return res;
  96. }
  97. __inline static BPTR Output(BASE_PAR_DECL void)
  98. {
  99.     BASE_EXT_DECL
  100.     register BPTR res __asm("d0");
  101.     register void *a6 __asm ("a6");
  102.     a6 = BASE_NAME;
  103.     __asm volatile ("
  104.     jsr a6@(-0x3c)"
  105.     : "=g" (res)
  106.     : "g" (a6)
  107.     : "d0", "d1", "a0", "a1");
  108.     return res;
  109. }
  110. __inline static LONG Seek(BASE_PAR_DECL BPTR file, LONG position, LONG offset)
  111. {
  112.     BASE_EXT_DECL
  113.     register LONG res __asm("d0");
  114.     register void *a6 __asm ("a6");
  115.     register BPTR d1 __asm("d1");
  116.     register LONG d2 __asm("d2");
  117.     register LONG d3 __asm("d3");
  118.  
  119.     a6 = BASE_NAME;
  120.     d1 = file;
  121.     d2 = position;
  122.     d3 = offset;
  123.     __asm volatile ("
  124.     jsr a6@(-0x42)"
  125.     : "=g" (res)
  126.     : "g" (a6), "g" (d1), "g" (d2), "g" (d3)
  127.     : "d0", "d1", "a0", "a1", "d2", "d3");
  128.     return res;
  129. }
  130. __inline static LONG DeleteFile(BASE_PAR_DECL char* name)
  131. {
  132.     BASE_EXT_DECL
  133.     register LONG res __asm("d0");
  134.     register void *a6 __asm ("a6");
  135.     register char* d1 __asm("d1");
  136.  
  137.     a6 = BASE_NAME;
  138.     d1 = name;
  139.     __asm volatile ("
  140.     jsr a6@(-0x48)"
  141.     : "=g" (res)
  142.     : "g" (a6), "g" (d1)
  143.     : "d0", "d1", "a0", "a1");
  144.     return res;
  145. }
  146. __inline static LONG Rename(BASE_PAR_DECL char* oldName, char* newName)
  147. {
  148.     BASE_EXT_DECL
  149.     register LONG res __asm("d0");
  150.     register void *a6 __asm ("a6");
  151.     register char* d1 __asm("d1");
  152.     register char* d2 __asm("d2");
  153.  
  154.     a6 = BASE_NAME;
  155.     d1 = oldName;
  156.     d2 = newName;
  157.     __asm volatile ("
  158.     jsr a6@(-0x4e)"
  159.     : "=g" (res)
  160.     : "g" (a6), "g" (d1), "g" (d2)
  161.     : "d0", "d1", "a0", "a1", "d2");
  162.     return res;
  163. }
  164. __inline static BPTR Lock(BASE_PAR_DECL char* name, LONG type)
  165. {
  166.     BASE_EXT_DECL
  167.     register BPTR res __asm("d0");
  168.     register void *a6 __asm ("a6");
  169.     register char* d1 __asm("d1");
  170.     register LONG d2 __asm("d2");
  171.  
  172.     a6 = BASE_NAME;
  173.     d1 = name;
  174.     d2 = type;
  175.     __asm volatile ("
  176.     jsr a6@(-0x54)"
  177.     : "=g" (res)
  178.     : "g" (a6), "g" (d1), "g" (d2)
  179.     : "d0", "d1", "a0", "a1", "d2");
  180.     return res;
  181. }
  182. __inline static void UnLock(BASE_PAR_DECL BPTR lock)
  183. {
  184.     BASE_EXT_DECL
  185.     register void *a6 __asm ("a6");
  186.     register BPTR d1 __asm("d1");
  187.  
  188.     a6 = BASE_NAME;
  189.     d1 = lock;
  190.     __asm volatile ("
  191.     jsr a6@(-0x5a)"
  192.     : /* no output */
  193.     : "g" (a6), "g" (d1)
  194.     : "d0", "d1", "a0", "a1");
  195. }
  196. __inline static BPTR DupLock(BASE_PAR_DECL BPTR lock)
  197. {
  198.     BASE_EXT_DECL
  199.     register BPTR res __asm("d0");
  200.     register void *a6 __asm ("a6");
  201.     register BPTR d1 __asm("d1");
  202.  
  203.     a6 = BASE_NAME;
  204.     d1 = lock;
  205.     __asm volatile ("
  206.     jsr a6@(-0x60)"
  207.     : "=g" (res)
  208.     : "g" (a6), "g" (d1)
  209.     : "d0", "d1", "a0", "a1");
  210.     return res;
  211. }
  212. __inline static LONG Examine(BASE_PAR_DECL BPTR lock, struct FileInfoBlock* fileInfoBlock)
  213. {
  214.     BASE_EXT_DECL
  215.     register LONG res __asm("d0");
  216.     register void *a6 __asm ("a6");
  217.     register BPTR d1 __asm("d1");
  218.     register struct FileInfoBlock* d2 __asm("d2");
  219.  
  220.     a6 = BASE_NAME;
  221.     d1 = lock;
  222.     d2 = fileInfoBlock;
  223.     __asm volatile ("
  224.     jsr a6@(-0x66)"
  225.     : "=g" (res)
  226.     : "g" (a6), "g" (d1), "g" (d2)
  227.     : "d0", "d1", "a0", "a1", "d2");
  228.     return res;
  229. }
  230. __inline static LONG ExNext(BASE_PAR_DECL BPTR lock, struct FileInfoBlock* fileInfoBlock)
  231. {
  232.     BASE_EXT_DECL
  233.     register LONG res __asm("d0");
  234.     register void *a6 __asm ("a6");
  235.     register BPTR d1 __asm("d1");
  236.     register struct FileInfoBlock* d2 __asm("d2");
  237.  
  238.     a6 = BASE_NAME;
  239.     d1 = lock;
  240.     d2 = fileInfoBlock;
  241.     __asm volatile ("
  242.     jsr a6@(-0x6c)"
  243.     : "=g" (res)
  244.     : "g" (a6), "g" (d1), "g" (d2)
  245.     : "d0", "d1", "a0", "a1", "d2");
  246.     return res;
  247. }
  248. __inline static LONG Info(BASE_PAR_DECL BPTR lock, struct InfoData* parameterBlock)
  249. {
  250.     BASE_EXT_DECL
  251.     register LONG res __asm("d0");
  252.     register void *a6 __asm ("a6");
  253.     register BPTR d1 __asm("d1");
  254.     register struct InfoData* d2 __asm("d2");
  255.  
  256.     a6 = BASE_NAME;
  257.     d1 = lock;
  258.     d2 = parameterBlock;
  259.     __asm volatile ("
  260.     jsr a6@(-0x72)"
  261.     : "=g" (res)
  262.     : "g" (a6), "g" (d1), "g" (d2)
  263.     : "d0", "d1", "a0", "a1", "d2");
  264.     return res;
  265. }
  266. __inline static BPTR CreateDir(BASE_PAR_DECL char* name)
  267. {
  268.     BASE_EXT_DECL
  269.     register BPTR res __asm("d0");
  270.     register void *a6 __asm ("a6");
  271.     register char* d1 __asm("d1");
  272.  
  273.     a6 = BASE_NAME;
  274.     d1 = name;
  275.     __asm volatile ("
  276.     jsr a6@(-0x78)"
  277.     : "=g" (res)
  278.     : "g" (a6), "g" (d1)
  279.     : "d0", "d1", "a0", "a1");
  280.     return res;
  281. }
  282. __inline static BPTR CurrentDir(BASE_PAR_DECL BPTR lock)
  283. {
  284.     BASE_EXT_DECL
  285.     register BPTR res __asm("d0");
  286.     register void *a6 __asm ("a6");
  287.     register BPTR d1 __asm("d1");
  288.  
  289.     a6 = BASE_NAME;
  290.     d1 = lock;
  291.     __asm volatile ("
  292.     jsr a6@(-0x7e)"
  293.     : "=g" (res)
  294.     : "g" (a6), "g" (d1)
  295.     : "d0", "d1", "a0", "a1");
  296.     return res;
  297. }
  298. __inline static LONG IoErr(BASE_PAR_DECL void)
  299. {
  300.     BASE_EXT_DECL
  301.     register LONG res __asm("d0");
  302.     register void *a6 __asm ("a6");
  303.     a6 = BASE_NAME;
  304.     __asm volatile ("
  305.     jsr a6@(-0x84)"
  306.     : "=g" (res)
  307.     : "g" (a6)
  308.     : "d0", "d1", "a0", "a1");
  309.     return res;
  310. }
  311. __inline static struct    MsgPort* CreateProc(BASE_PAR_DECL char* name, LONG pri, BPTR segList, LONG stackSize)
  312. {
  313.     BASE_EXT_DECL
  314.     register struct    MsgPort* res __asm("d0");
  315.     register void *a6 __asm ("a6");
  316.     register char* d1 __asm("d1");
  317.     register LONG d2 __asm("d2");
  318.     register BPTR d3 __asm("d3");
  319.     register LONG d4 __asm("d4");
  320.  
  321.     a6 = BASE_NAME;
  322.     d1 = name;
  323.     d2 = pri;
  324.     d3 = segList;
  325.     d4 = stackSize;
  326.     __asm volatile ("
  327.     jsr a6@(-0x8a)"
  328.     : "=g" (res)
  329.     : "g" (a6), "g" (d1), "g" (d2), "g" (d3), "g" (d4)
  330.     : "d0", "d1", "a0", "a1", "d2", "d3", "d4");
  331.     return res;
  332. }
  333. __inline static void Exit(BASE_PAR_DECL LONG returnCode)
  334. {
  335.     BASE_EXT_DECL
  336.     register void *a6 __asm ("a6");
  337.     register LONG d1 __asm("d1");
  338.  
  339.     a6 = BASE_NAME;
  340.     d1 = returnCode;
  341.     __asm volatile ("
  342.     jsr a6@(-0x90)"
  343.     : /* no output */
  344.     : "g" (a6), "g" (d1)
  345.     : "d0", "d1", "a0", "a1");
  346. }
  347. __inline static BPTR LoadSeg(BASE_PAR_DECL char* fileName)
  348. {
  349.     BASE_EXT_DECL
  350.     register BPTR res __asm("d0");
  351.     register void *a6 __asm ("a6");
  352.     register char* d1 __asm("d1");
  353.  
  354.     a6 = BASE_NAME;
  355.     d1 = fileName;
  356.     __asm volatile ("
  357.     jsr a6@(-0x96)"
  358.     : "=g" (res)
  359.     : "g" (a6), "g" (d1)
  360.     : "d0", "d1", "a0", "a1");
  361.     return res;
  362. }
  363. __inline static void UnLoadSeg(BASE_PAR_DECL BPTR segment)
  364. {
  365.     BASE_EXT_DECL
  366.     register void *a6 __asm ("a6");
  367.     register BPTR d1 __asm("d1");
  368.  
  369.     a6 = BASE_NAME;
  370.     d1 = segment;
  371.     __asm volatile ("
  372.     jsr a6@(-0x9c)"
  373.     : /* no output */
  374.     : "g" (a6), "g" (d1)
  375.     : "d0", "d1", "a0", "a1");
  376. }
  377. __inline static struct    MsgPort* DeviceProc(BASE_PAR_DECL char* name)
  378. {
  379.     BASE_EXT_DECL
  380.     register struct    MsgPort* res __asm("d0");
  381.     register void *a6 __asm ("a6");
  382.     register char* d1 __asm("d1");
  383.  
  384.     a6 = BASE_NAME;
  385.     d1 = name;
  386.     __asm volatile ("
  387.     jsr a6@(-0xae)"
  388.     : "=g" (res)
  389.     : "g" (a6), "g" (d1)
  390.     : "d0", "d1", "a0", "a1");
  391.     return res;
  392. }
  393. __inline static LONG SetComment(BASE_PAR_DECL char* name, char* comment)
  394. {
  395.     BASE_EXT_DECL
  396.     register LONG res __asm("d0");
  397.     register void *a6 __asm ("a6");
  398.     register char* d1 __asm("d1");
  399.     register char* d2 __asm("d2");
  400.  
  401.     a6 = BASE_NAME;
  402.     d1 = name;
  403.     d2 = comment;
  404.     __asm volatile ("
  405.     jsr a6@(-0xb4)"
  406.     : "=g" (res)
  407.     : "g" (a6), "g" (d1), "g" (d2)
  408.     : "d0", "d1", "a0", "a1", "d2");
  409.     return res;
  410. }
  411. __inline static LONG SetProtection(BASE_PAR_DECL char* name, LONG mask)
  412. {
  413.     BASE_EXT_DECL
  414.     register LONG res __asm("d0");
  415.     register void *a6 __asm ("a6");
  416.     register char* d1 __asm("d1");
  417.     register LONG d2 __asm("d2");
  418.  
  419.     a6 = BASE_NAME;
  420.     d1 = name;
  421.     d2 = mask;
  422.     __asm volatile ("
  423.     jsr a6@(-0xba)"
  424.     : "=g" (res)
  425.     : "g" (a6), "g" (d1), "g" (d2)
  426.     : "d0", "d1", "a0", "a1", "d2");
  427.     return res;
  428. }
  429. __inline static LONG* DateStamp(BASE_PAR_DECL LONG* date)
  430. {
  431.     BASE_EXT_DECL
  432.     register LONG* res __asm("d0");
  433.     register void *a6 __asm ("a6");
  434.     register LONG* d1 __asm("d1");
  435.  
  436.     a6 = BASE_NAME;
  437.     d1 = date;
  438.     __asm volatile ("
  439.     jsr a6@(-0xc0)"
  440.     : "=g" (res)
  441.     : "g" (a6), "g" (d1)
  442.     : "d0", "d1", "a0", "a1");
  443.     return res;
  444. }
  445. __inline static void Delay(BASE_PAR_DECL LONG timeout)
  446. {
  447.     BASE_EXT_DECL
  448.     register void *a6 __asm ("a6");
  449.     register LONG d1 __asm("d1");
  450.  
  451.     a6 = BASE_NAME;
  452.     d1 = timeout;
  453.     __asm volatile ("
  454.     jsr a6@(-0xc6)"
  455.     : /* no output */
  456.     : "g" (a6), "g" (d1)
  457.     : "d0", "d1", "a0", "a1");
  458. }
  459. __inline static LONG WaitForChar(BASE_PAR_DECL BPTR file, LONG timeout)
  460. {
  461.     BASE_EXT_DECL
  462.     register LONG res __asm("d0");
  463.     register void *a6 __asm ("a6");
  464.     register BPTR d1 __asm("d1");
  465.     register LONG d2 __asm("d2");
  466.  
  467.     a6 = BASE_NAME;
  468.     d1 = file;
  469.     d2 = timeout;
  470.     __asm volatile ("
  471.     jsr a6@(-0xcc)"
  472.     : "=g" (res)
  473.     : "g" (a6), "g" (d1), "g" (d2)
  474.     : "d0", "d1", "a0", "a1", "d2");
  475.     return res;
  476. }
  477. __inline static BPTR ParentDir(BASE_PAR_DECL BPTR lock)
  478. {
  479.     BASE_EXT_DECL
  480.     register BPTR res __asm("d0");
  481.     register void *a6 __asm ("a6");
  482.     register BPTR d1 __asm("d1");
  483.  
  484.     a6 = BASE_NAME;
  485.     d1 = lock;
  486.     __asm volatile ("
  487.     jsr a6@(-0xd2)"
  488.     : "=g" (res)
  489.     : "g" (a6), "g" (d1)
  490.     : "d0", "d1", "a0", "a1");
  491.     return res;
  492. }
  493. __inline static LONG IsInteractive(BASE_PAR_DECL BPTR file)
  494. {
  495.     BASE_EXT_DECL
  496.     register LONG res __asm("d0");
  497.     register void *a6 __asm ("a6");
  498.     register BPTR d1 __asm("d1");
  499.  
  500.     a6 = BASE_NAME;
  501.     d1 = file;
  502.     __asm volatile ("
  503.     jsr a6@(-0xd8)"
  504.     : "=g" (res)
  505.     : "g" (a6), "g" (d1)
  506.     : "d0", "d1", "a0", "a1");
  507.     return res;
  508. }
  509. __inline static LONG Execute(BASE_PAR_DECL char* string, BPTR file, BPTR file)
  510. {
  511.     BASE_EXT_DECL
  512.     register LONG res __asm("d0");
  513.     register void *a6 __asm ("a6");
  514.     register char* d1 __asm("d1");
  515.     register BPTR d2 __asm("d2");
  516.     register BPTR d3 __asm("d3");
  517.  
  518.     a6 = BASE_NAME;
  519.     d1 = string;
  520.     d2 = file;
  521.     d3 = file;
  522.     __asm volatile ("
  523.     jsr a6@(-0xde)"
  524.     : "=g" (res)
  525.     : "g" (a6), "g" (d1), "g" (d2), "g" (d3)
  526.     : "d0", "d1", "a0", "a1", "d2", "d3");
  527.     return res;
  528. }
  529. #ifdef DOTDOTDOT
  530. __inline static LONG Printf(BASE_PAR_DECL char* string, ...  stream)
  531. {
  532.     BASE_EXT_DECL
  533.     register LONG res __asm("d0");
  534.     register void *a6 __asm ("a6");
  535.     register char* a0 __asm("a0");
  536.     register ... a1 __asm("a1");
  537.  
  538.     a6 = BASE_NAME;
  539.     a0 = string;
  540.     a1 =  stream;
  541.     __asm volatile ("
  542.     jsr a6@(-0xe4)"
  543.     : "=g" (res)
  544.     : "g" (a6), "g" (a0), "g" (a1)
  545.     : "d0", "d1", "a0", "a1");
  546.     return res;
  547. }
  548. __inline static LONG FPrintf(BASE_PAR_DECL BPTR file, char* string, ... stream)
  549. {
  550.     BASE_EXT_DECL
  551.     register LONG res __asm("d0");
  552.     register void *a6 __asm ("a6");
  553.     register BPTR d0 __asm("d0");
  554.     register char* a0 __asm("a0");
  555.     register ... a1 __asm("a1");
  556.  
  557.     a6 = BASE_NAME;
  558.     d0 = file;
  559.     a0 = string;
  560.     a1 = stream;
  561.     __asm volatile ("
  562.     jsr a6@(-0xea)"
  563.     : "=g" (res)
  564.     : "g" (a6), "g" (d0), "g" (a0), "g" (a1)
  565.     : "d0", "d1", "a0", "a1");
  566.     return res;
  567. }
  568. #endif
  569. #endif
  570. __inline static LONG Puts(BASE_PAR_DECL char* string)
  571. {
  572.     BASE_EXT_DECL
  573.     register LONG res __asm("d0");
  574.     register void *a6 __asm ("a6");
  575.     register char* a1 __asm("a1");
  576.  
  577.     a6 = BASE_NAME;
  578.     a1 = string;
  579.     __asm volatile ("
  580.     jsr a6@(-0xf0)"
  581.     : "=g" (res)
  582.     : "g" (a6), "g" (a1)
  583.     : "d0", "d1", "a0", "a1");
  584.     return res;
  585. }
  586. __inline static LONG ReadLine(BASE_PAR_DECL char* buffer)
  587. {
  588.     BASE_EXT_DECL
  589.     register LONG res __asm("d0");
  590.     register void *a6 __asm ("a6");
  591.     register char* a0 __asm("a0");
  592.  
  593.     a6 = BASE_NAME;
  594.     a0 = buffer;
  595.     __asm volatile ("
  596.     jsr a6@(-0xf6)"
  597.     : "=g" (res)
  598.     : "g" (a6), "g" (a0)
  599.     : "d0", "d1", "a0", "a1");
  600.     return res;
  601. }
  602. __inline static LONG GADS(BASE_PAR_DECL char* line, LONG len, char* help, char** args, char* tplate)
  603. {
  604.     BASE_EXT_DECL
  605.     register LONG res __asm("d0");
  606.     register void *a6 __asm ("a6");
  607.     register char* a0 __asm("a0");
  608.     register LONG d0 __asm("d0");
  609.     register char* a1 __asm("a1");
  610.     register char** a2 __asm("a2");
  611.     register char* a3 __asm("a3");
  612.  
  613.     a6 = BASE_NAME;
  614.     a0 = line;
  615.     d0 = len;
  616.     a1 = help;
  617.     a2 = args;
  618.     a3 = tplate;
  619.     __asm volatile ("
  620.     jsr a6@(-0xfc)"
  621.     : "=g" (res)
  622.     : "g" (a6), "g" (a0), "g" (d0), "g" (a1), "g" (a2), "g" (a3)
  623.     : "d0", "d1", "a0", "a1", "a2", "a3");
  624.     return res;
  625. }
  626. __inline static LONG Atol(BASE_PAR_DECL char* string)
  627. {
  628.     BASE_EXT_DECL
  629.     register LONG res __asm("d0");
  630.     register void *a6 __asm ("a6");
  631.     register char* a0 __asm("a0");
  632.  
  633.     a6 = BASE_NAME;
  634.     a0 = string;
  635.     __asm volatile ("
  636.     jsr a6@(-0x102)"
  637.     : "=g" (res)
  638.     : "g" (a6), "g" (a0)
  639.     : "d0", "d1", "a0", "a1");
  640.     return res;
  641. }
  642. __inline static ULONG EscapeString(BASE_PAR_DECL char* string)
  643. {
  644.     BASE_EXT_DECL
  645.     register ULONG res __asm("d0");
  646.     register void *a6 __asm ("a6");
  647.     register char* a0 __asm("a0");
  648.  
  649.     a6 = BASE_NAME;
  650.     a0 = string;
  651.     __asm volatile ("
  652.     jsr a6@(-0x108)"
  653.     : "=g" (res)
  654.     : "g" (a6), "g" (a0)
  655.     : "d0", "d1", "a0", "a1");
  656.     return res;
  657. }
  658. __inline static LONG CheckAbort(BASE_PAR_DECL void(*func)())
  659. {
  660.     BASE_EXT_DECL
  661.     register LONG res __asm("d0");
  662.     register void *a6 __asm ("a6");
  663.     register void(*a1)() __asm("a1");
  664.  
  665.     a6 = BASE_NAME;
  666.     a1 = func;
  667.     __asm volatile ("
  668.     jsr a6@(-0x10e)"
  669.     : "=g" (res)
  670.     : "g" (a6), "g" (a1)
  671.     : "d0", "d1", "a0", "a1");
  672.     return res;
  673. }
  674. __inline static LONG CheckBreak(BASE_PAR_DECL LONG masks, void(*func)())
  675. {
  676.     BASE_EXT_DECL
  677.     register LONG res __asm("d0");
  678.     register void *a6 __asm ("a6");
  679.     register LONG d1 __asm("d1");
  680.     register void(*a1)() __asm("a1");
  681.  
  682.     a6 = BASE_NAME;
  683.     d1 = masks;
  684.     a1 = func;
  685.     __asm volatile ("
  686.     jsr a6@(-0x114)"
  687.     : "=g" (res)
  688.     : "g" (a6), "g" (d1), "g" (a1)
  689.     : "d0", "d1", "a0", "a1");
  690.     return res;
  691. }
  692. __inline static BYTE* Getenv(BASE_PAR_DECL char* string, char* buffer, LONG size)
  693. {
  694.     BASE_EXT_DECL
  695.     register BYTE* res __asm("d0");
  696.     register void *a6 __asm ("a6");
  697.     register char* a0 __asm("a0");
  698.     register char* a1 __asm("a1");
  699.     register LONG d0 __asm("d0");
  700.  
  701.     a6 = BASE_NAME;
  702.     a0 = string;
  703.     a1 = buffer;
  704.     d0 = size;
  705.     __asm volatile ("
  706.     jsr a6@(-0x11a)"
  707.     : "=g" (res)
  708.     : "g" (a6), "g" (a0), "g" (a1), "g" (d0)
  709.     : "d0", "d1", "a0", "a1");
  710.     return res;
  711. }
  712. __inline static BOOL Setenv(BASE_PAR_DECL char* varname, char* value)
  713. {
  714.     BASE_EXT_DECL
  715.     register BOOL res __asm("d0");
  716.     register void *a6 __asm ("a6");
  717.     register char* a0 __asm("a0");
  718.     register char* a1 __asm("a1");
  719.  
  720.     a6 = BASE_NAME;
  721.     a0 = varname;
  722.     a1 = value;
  723.     __asm volatile ("
  724.     jsr a6@(-0x120)"
  725.     : "=g" (res)
  726.     : "g" (a6), "g" (a0), "g" (a1)
  727.     : "d0", "d1", "a0", "a1");
  728.     return res;
  729. }
  730. __inline static BYTE* FileRequest(BASE_PAR_DECL struct FileRequester* FileRequester)
  731. {
  732.     BASE_EXT_DECL
  733.     register BYTE* res __asm("d0");
  734.     register void *a6 __asm ("a6");
  735.     register struct FileRequester* a0 __asm("a0");
  736.  
  737.     a6 = BASE_NAME;
  738.     a0 = FileRequester;
  739.     __asm volatile ("
  740.     jsr a6@(-0x126)"
  741.     : "=g" (res)
  742.     : "g" (a6), "g" (a0)
  743.     : "d0", "d1", "a0", "a1");
  744.     return res;
  745. }
  746. __inline static void CloseWindowSafely(BASE_PAR_DECL struct Window* Window1, LONG Window2)
  747. {
  748.     BASE_EXT_DECL
  749.     register void *a6 __asm ("a6");
  750.     register struct Window* a0 __asm("a0");
  751.     register LONG a1 __asm("a1");
  752.  
  753.     a6 = BASE_NAME;
  754.     a0 = Window1;
  755.     a1 = Window2;
  756.     __asm volatile ("
  757.     jsr a6@(-0x12c)"
  758.     : /* no output */
  759.     : "g" (a6), "g" (a0), "g" (a1)
  760.     : "d0", "d1", "a0", "a1");
  761. }
  762. __inline static struct    MsgPort* CreatePort(BASE_PAR_DECL const char* name, LONG pri)
  763. {
  764.     BASE_EXT_DECL
  765.     register struct    MsgPort* res __asm("d0");
  766.     register void *a6 __asm ("a6");
  767.     register const char* a0 __asm("a0");
  768.     register LONG d0 __asm("d0");
  769.  
  770.     a6 = BASE_NAME;
  771.     a0 = name;
  772.     d0 = pri;
  773.     __asm volatile ("
  774.     jsr a6@(-0x132)"
  775.     : "=g" (res)
  776.     : "g" (a6), "g" (a0), "g" (d0)
  777.     : "d0", "d1", "a0", "a1");
  778.     return res;
  779. }
  780. __inline static void DeletePort(BASE_PAR_DECL struct MsgPort* port)
  781. {
  782.     BASE_EXT_DECL
  783.     register void *a6 __asm ("a6");
  784.     register struct MsgPort* a1 __asm("a1");
  785.  
  786.     a6 = BASE_NAME;
  787.     a1 = port;
  788.     __asm volatile ("
  789.     jsr a6@(-0x138)"
  790.     : /* no output */
  791.     : "g" (a6), "g" (a1)
  792.     : "d0", "d1", "a0", "a1");
  793. }
  794. __inline static LONG SendPacket(BASE_PAR_DECL LONG action, LONG* args, struct MsgPort* handler)
  795. {
  796.     BASE_EXT_DECL
  797.     register LONG res __asm("d0");
  798.     register void *a6 __asm ("a6");
  799.     register LONG d0 __asm("d0");
  800.     register LONG* a0 __asm("a0");
  801.     register struct MsgPort* a1 __asm("a1");
  802.  
  803.     a6 = BASE_NAME;
  804.     d0 = action;
  805.     a0 = args;
  806.     a1 = handler;
  807.     __asm volatile ("
  808.     jsr a6@(-0x13e)"
  809.     : "=g" (res)
  810.     : "g" (a6), "g" (d0), "g" (a0), "g" (a1)
  811.     : "d0", "d1", "a0", "a1");
  812.     return res;
  813. }
  814. __inline static void InitStdPacket(BASE_PAR_DECL LONG action, LONG* args, struct DosPacket* packet, struct MsgPort* replyport)
  815. {
  816.     BASE_EXT_DECL
  817.     register void *a6 __asm ("a6");
  818.     register LONG d0 __asm("d0");
  819.     register LONG* a0 __asm("a0");
  820.     register struct DosPacket* a1 __asm("a1");
  821.     register struct MsgPort* a2 __asm("a2");
  822.  
  823.     a6 = BASE_NAME;
  824.     d0 = action;
  825.     a0 = args;
  826.     a1 = packet;
  827.     a2 = replyport;
  828.     __asm volatile ("
  829.     jsr a6@(-0x144)"
  830.     : /* no output */
  831.     : "g" (a6), "g" (d0), "g" (a0), "g" (a1), "g" (a2)
  832.     : "d0", "d1", "a0", "a1", "a2");
  833. }
  834. __inline static ULONG PathName(BASE_PAR_DECL BPTR lock, char* buffer, LONG componentcount)
  835. {
  836.     BASE_EXT_DECL
  837.     register ULONG res __asm("d0");
  838.     register void *a6 __asm ("a6");
  839.     register BPTR d0 __asm("d0");
  840.     register char* a0 __asm("a0");
  841.     register LONG d1 __asm("d1");
  842.  
  843.     a6 = BASE_NAME;
  844.     d0 = lock;
  845.     a0 = buffer;
  846.     d1 = componentcount;
  847.     __asm volatile ("
  848.     jsr a6@(-0x14a)"
  849.     : "=g" (res)
  850.     : "g" (a6), "g" (d0), "g" (a0), "g" (d1)
  851.     : "d0", "d1", "a0", "a1");
  852.     return res;
  853. }
  854. __inline static ULONG Assign(BASE_PAR_DECL char* logical, char* physical)
  855. {
  856.     BASE_EXT_DECL
  857.     register ULONG res __asm("d0");
  858.     register void *a6 __asm ("a6");
  859.     register char* a0 __asm("a0");
  860.     register char* a1 __asm("a1");
  861.  
  862.     a6 = BASE_NAME;
  863.     a0 = logical;
  864.     a1 = physical;
  865.     __asm volatile ("
  866.     jsr a6@(-0x150)"
  867.     : "=g" (res)
  868.     : "g" (a6), "g" (a0), "g" (a1)
  869.     : "d0", "d1", "a0", "a1");
  870.     return res;
  871. }
  872. __inline static void* DosAllocMem(BASE_PAR_DECL LONG size)
  873. {
  874.     BASE_EXT_DECL
  875.     register void* res __asm("d0");
  876.     register void *a6 __asm ("a6");
  877.     register LONG d0 __asm("d0");
  878.  
  879.     a6 = BASE_NAME;
  880.     d0 = size;
  881.     __asm volatile ("
  882.     jsr a6@(-0x156)"
  883.     : "=g" (res)
  884.     : "g" (a6), "g" (d0)
  885.     : "d0", "d1", "a0", "a1");
  886.     return res;
  887. }
  888. __inline static void DosFreeMem(BASE_PAR_DECL void* dosblock)
  889. {
  890.     BASE_EXT_DECL
  891.     register void *a6 __asm ("a6");
  892.     register void* a1 __asm("a1");
  893.  
  894.     a6 = BASE_NAME;
  895.     a1 = dosblock;
  896.     __asm volatile ("
  897.     jsr a6@(-0x15c)"
  898.     : /* no output */
  899.     : "g" (a6), "g" (a1)
  900.     : "d0", "d1", "a0", "a1");
  901. }
  902. __inline static ULONG BtoCStr(BASE_PAR_DECL char* cstr, BSTR bstr, LONG maxlength)
  903. {
  904.     BASE_EXT_DECL
  905.     register ULONG res __asm("d0");
  906.     register void *a6 __asm ("a6");
  907.     register char* a0 __asm("a0");
  908.     register BSTR d0 __asm("d0");
  909.     register LONG d1 __asm("d1");
  910.  
  911.     a6 = BASE_NAME;
  912.     a0 = cstr;
  913.     d0 = bstr;
  914.     d1 = maxlength;
  915.     __asm volatile ("
  916.     jsr a6@(-0x162)"
  917.     : "=g" (res)
  918.     : "g" (a6), "g" (a0), "g" (d0), "g" (d1)
  919.     : "d0", "d1", "a0", "a1");
  920.     return res;
  921. }
  922. __inline static ULONG CtoBStr(BASE_PAR_DECL char* cstr, BSTR bstr, LONG maxlength)
  923. {
  924.     BASE_EXT_DECL
  925.     register ULONG res __asm("d0");
  926.     register void *a6 __asm ("a6");
  927.     register char* a0 __asm("a0");
  928.     register BSTR d0 __asm("d0");
  929.     register LONG d1 __asm("d1");
  930.  
  931.     a6 = BASE_NAME;
  932.     a0 = cstr;
  933.     d0 = bstr;
  934.     d1 = maxlength;
  935.     __asm volatile ("
  936.     jsr a6@(-0x168)"
  937.     : "=g" (res)
  938.     : "g" (a6), "g" (a0), "g" (d0), "g" (d1)
  939.     : "d0", "d1", "a0", "a1");
  940.     return res;
  941. }
  942. __inline static struct    DeviceList* GetDevInfo(BASE_PAR_DECL struct DeviceList* devnode)
  943. {
  944.     BASE_EXT_DECL
  945.     register struct    DeviceList* res __asm("d0");
  946.     register void *a6 __asm ("a6");
  947.     register struct DeviceList* a2 __asm("a2");
  948.  
  949.     a6 = BASE_NAME;
  950.     a2 = devnode;
  951.     __asm volatile ("
  952.     jsr a6@(-0x16e)"
  953.     : "=g" (res)
  954.     : "g" (a6), "g" (a2)
  955.     : "d0", "d1", "a0", "a1", "a2");
  956.     return res;
  957. }
  958. __inline static BOOL FreeTaskResList(BASE_PAR_DECL void)
  959. {
  960.     BASE_EXT_DECL
  961.     register BOOL res __asm("d0");
  962.     register void *a6 __asm ("a6");
  963.     a6 = BASE_NAME;
  964.     __asm volatile ("
  965.     jsr a6@(-0x174)"
  966.     : "=g" (res)
  967.     : "g" (a6)
  968.     : "d0", "d1", "a0", "a1");
  969.     return res;
  970. }
  971. #ifdef DOTDOTDOT
  972. __inline static void ArpExit(BASE_PAR_DECL LONG rc, ... result2)
  973. {
  974.     BASE_EXT_DECL
  975.     register void *a6 __asm ("a6");
  976.     register LONG d0 __asm("d0");
  977.     register ... d2 __asm("d2");
  978.  
  979.     a6 = BASE_NAME;
  980.     d0 = rc;
  981.     d2 = result2;
  982.     __asm volatile ("
  983.     jsr a6@(-0x17a)"
  984.     : /* no output */
  985.     : "g" (a6), "g" (d0), "g" (d2)
  986.     : "d0", "d1", "a0", "a1", "d2");
  987. }
  988. #endif
  989. #ifdef PRIVATE
  990. __inline static void* ArpAlloc(BASE_PAR_DECL LONG size)
  991. {
  992.     BASE_EXT_DECL
  993.     register void* res __asm("d0");
  994.     register void *a6 __asm ("a6");
  995.     register LONG d0 __asm("d0");
  996.  
  997.     a6 = BASE_NAME;
  998.     d0 = size;
  999.     __asm volatile ("
  1000.     jsr a6@(-0x180)"
  1001.     : "=g" (res)
  1002.     : "g" (a6), "g" (d0)
  1003.     : "d0", "d1", "a0", "a1");
  1004.     return res;
  1005. }
  1006. __inline static void* ArpAllocMem(BASE_PAR_DECL LONG size, LONG requirements)
  1007. {
  1008.     BASE_EXT_DECL
  1009.     register void* res __asm("d0");
  1010.     register void *a6 __asm ("a6");
  1011.     register LONG d0 __asm("d0");
  1012.     register LONG d1 __asm("d1");
  1013.  
  1014.     a6 = BASE_NAME;
  1015.     d0 = size;
  1016.     d1 = requirements;
  1017.     __asm volatile ("
  1018.     jsr a6@(-0x186)"
  1019.     : "=g" (res)
  1020.     : "g" (a6), "g" (d0), "g" (d1)
  1021.     : "d0", "d1", "a0", "a1");
  1022.     return res;
  1023. }
  1024. __inline static BPTR ArpOpen(BASE_PAR_DECL char* name, LONG mode)
  1025. {
  1026.     BASE_EXT_DECL
  1027.     register BPTR res __asm("d0");
  1028.     register void *a6 __asm ("a6");
  1029.     register char* d1 __asm("d1");
  1030.     register LONG d2 __asm("d2");
  1031.  
  1032.     a6 = BASE_NAME;
  1033.     d1 = name;
  1034.     d2 = mode;
  1035.     __asm volatile ("
  1036.     jsr a6@(-0x18c)"
  1037.     : "=g" (res)
  1038.     : "g" (a6), "g" (d1), "g" (d2)
  1039.     : "d0", "d1", "a0", "a1", "d2");
  1040.     return res;
  1041. }
  1042. __inline static BPTR ArpDupLock(BASE_PAR_DECL BPTR lock)
  1043. {
  1044.     BASE_EXT_DECL
  1045.     register BPTR res __asm("d0");
  1046.     register void *a6 __asm ("a6");
  1047.     register BPTR d1 __asm("d1");
  1048.  
  1049.     a6 = BASE_NAME;
  1050.     d1 = lock;
  1051.     __asm volatile ("
  1052.     jsr a6@(-0x192)"
  1053.     : "=g" (res)
  1054.     : "g" (a6), "g" (d1)
  1055.     : "d0", "d1", "a0", "a1");
  1056.     return res;
  1057. }
  1058. __inline static BPTR ArpLock(BASE_PAR_DECL char* name, LONG mode)
  1059. {
  1060.     BASE_EXT_DECL
  1061.     register BPTR res __asm("d0");
  1062.     register void *a6 __asm ("a6");
  1063.     register char* d1 __asm("d1");
  1064.     register LONG d2 __asm("d2");
  1065.  
  1066.     a6 = BASE_NAME;
  1067.     d1 = name;
  1068.     d2 = mode;
  1069.     __asm volatile ("
  1070.     jsr a6@(-0x198)"
  1071.     : "=g" (res)
  1072.     : "g" (a6), "g" (d1), "g" (d2)
  1073.     : "d0", "d1", "a0", "a1", "d2");
  1074.     return res;
  1075. }
  1076. __inline static void* RListAlloc(BASE_PAR_DECL struct ResList* reslist, LONG size)
  1077. {
  1078.     BASE_EXT_DECL
  1079.     register void* res __asm("d0");
  1080.     register void *a6 __asm ("a6");
  1081.     register struct ResList* a0 __asm("a0");
  1082.     register LONG d0 __asm("d0");
  1083.  
  1084.     a6 = BASE_NAME;
  1085.     a0 = reslist;
  1086.     d0 = size;
  1087.     __asm volatile ("
  1088.     jsr a6@(-0x19e)"
  1089.     : "=g" (res)
  1090.     : "g" (a6), "g" (a0), "g" (d0)
  1091.     : "d0", "d1", "a0", "a1");
  1092.     return res;
  1093. }
  1094. #endif
  1095. __inline static struct    Process* FindCLI(BASE_PAR_DECL LONG clinum)
  1096. {
  1097.     BASE_EXT_DECL
  1098.     register struct    Process* res __asm("d0");
  1099.     register void *a6 __asm ("a6");
  1100.     register LONG d0 __asm("d0");
  1101.  
  1102.     a6 = BASE_NAME;
  1103.     d0 = clinum;
  1104.     __asm volatile ("
  1105.     jsr a6@(-0x1a4)"
  1106.     : "=g" (res)
  1107.     : "g" (a6), "g" (d0)
  1108.     : "d0", "d1", "a0", "a1");
  1109.     return res;
  1110. }
  1111. __inline static BOOL QSort(BASE_PAR_DECL void* base, LONG rsize, LONG bsize, int(*comp)())
  1112. {
  1113.     BASE_EXT_DECL
  1114.     register BOOL res __asm("d0");
  1115.     register void *a6 __asm ("a6");
  1116.     register void* a0 __asm("a0");
  1117.     register LONG d0 __asm("d0");
  1118.     register LONG d1 __asm("d1");
  1119.     register int(*a1)() __asm("a1");
  1120.  
  1121.     a6 = BASE_NAME;
  1122.     a0 = base;
  1123.     d0 = rsize;
  1124.     d1 = bsize;
  1125.     a1 = comp;
  1126.     __asm volatile ("
  1127.     jsr a6@(-0x1aa)"
  1128.     : "=g" (res)
  1129.     : "g" (a6), "g" (a0), "g" (d0), "g" (d1), "g" (a1)
  1130.     : "d0", "d1", "a0", "a1");
  1131.     return res;
  1132. }
  1133. __inline static BOOL PatternMatch(BASE_PAR_DECL char* pattern, char* string)
  1134. {
  1135.     BASE_EXT_DECL
  1136.     register BOOL res __asm("d0");
  1137.     register void *a6 __asm ("a6");
  1138.     register char* a0 __asm("a0");
  1139.     register char* a1 __asm("a1");
  1140.  
  1141.     a6 = BASE_NAME;
  1142.     a0 = pattern;
  1143.     a1 = string;
  1144.     __asm volatile ("
  1145.     jsr a6@(-0x1b0)"
  1146.     : "=g" (res)
  1147.     : "g" (a6), "g" (a0), "g" (a1)
  1148.     : "d0", "d1", "a0", "a1");
  1149.     return res;
  1150. }
  1151. __inline static LONG FindFirst(BASE_PAR_DECL char* pattern, struct AnchorPath* AnchorPath)
  1152. {
  1153.     BASE_EXT_DECL
  1154.     register LONG res __asm("d0");
  1155.     register void *a6 __asm ("a6");
  1156.     register char* d0 __asm("d0");
  1157.     register struct AnchorPath* a0 __asm("a0");
  1158.  
  1159.     a6 = BASE_NAME;
  1160.     d0 = pattern;
  1161.     a0 = AnchorPath;
  1162.     __asm volatile ("
  1163.     jsr a6@(-0x1b6)"
  1164.     : "=g" (res)
  1165.     : "g" (a6), "g" (d0), "g" (a0)
  1166.     : "d0", "d1", "a0", "a1");
  1167.     return res;
  1168. }
  1169. __inline static LONG FindNext(BASE_PAR_DECL struct AnchorPath* AnchorPath)
  1170. {
  1171.     BASE_EXT_DECL
  1172.     register LONG res __asm("d0");
  1173.     register void *a6 __asm ("a6");
  1174.     register struct AnchorPath* a0 __asm("a0");
  1175.  
  1176.     a6 = BASE_NAME;
  1177.     a0 = AnchorPath;
  1178.     __asm volatile ("
  1179.     jsr a6@(-0x1bc)"
  1180.     : "=g" (res)
  1181.     : "g" (a6), "g" (a0)
  1182.     : "d0", "d1", "a0", "a1");
  1183.     return res;
  1184. }
  1185. __inline static void FreeAnchorChain(BASE_PAR_DECL struct AnchorPath* AnchorPath)
  1186. {
  1187.     BASE_EXT_DECL
  1188.     register void *a6 __asm ("a6");
  1189.     register struct AnchorPath* a0 __asm("a0");
  1190.  
  1191.     a6 = BASE_NAME;
  1192.     a0 = AnchorPath;
  1193.     __asm volatile ("
  1194.     jsr a6@(-0x1c2)"
  1195.     : /* no output */
  1196.     : "g" (a6), "g" (a0)
  1197.     : "d0", "d1", "a0", "a1");
  1198. }
  1199. __inline static ULONG CompareLock(BASE_PAR_DECL BPTR lock1, BPTR lock2)
  1200. {
  1201.     BASE_EXT_DECL
  1202.     register ULONG res __asm("d0");
  1203.     register void *a6 __asm ("a6");
  1204.     register BPTR d0 __asm("d0");
  1205.     register BPTR d1 __asm("d1");
  1206.  
  1207.     a6 = BASE_NAME;
  1208.     d0 = lock1;
  1209.     d1 = lock2;
  1210.     __asm volatile ("
  1211.     jsr a6@(-0x1c8)"
  1212.     : "=g" (res)
  1213.     : "g" (a6), "g" (d0), "g" (d1)
  1214.     : "d0", "d1", "a0", "a1");
  1215.     return res;
  1216. }
  1217. __inline static struct    ResList* FindTaskResList(BASE_PAR_DECL void)
  1218. {
  1219.     BASE_EXT_DECL
  1220.     register struct    ResList* res __asm("d0");
  1221.     register void *a6 __asm ("a6");
  1222.     a6 = BASE_NAME;
  1223.     __asm volatile ("
  1224.     jsr a6@(-0x1ce)"
  1225.     : "=g" (res)
  1226.     : "g" (a6)
  1227.     : "d0", "d1", "a0", "a1");
  1228.     return res;
  1229. }
  1230. __inline static struct    ResList* CreateTaskResList(BASE_PAR_DECL void)
  1231. {
  1232.     BASE_EXT_DECL
  1233.     register struct    ResList* res __asm("d0");
  1234.     register void *a6 __asm ("a6");
  1235.     a6 = BASE_NAME;
  1236.     __asm volatile ("
  1237.     jsr a6@(-0x1d4)"
  1238.     : "=g" (res)
  1239.     : "g" (a6)
  1240.     : "d0", "d1", "a0", "a1");
  1241.     return res;
  1242. }
  1243. __inline static void FreeResList(BASE_PAR_DECL struct ResList* freelist)
  1244. {
  1245.     BASE_EXT_DECL
  1246.     register void *a6 __asm ("a6");
  1247.     register struct ResList* a1 __asm("a1");
  1248.  
  1249.     a6 = BASE_NAME;
  1250.     a1 = freelist;
  1251.     __asm volatile ("
  1252.     jsr a6@(-0x1da)"
  1253.     : /* no output */
  1254.     : "g" (a6), "g" (a1)
  1255.     : "d0", "d1", "a0", "a1");
  1256. }
  1257. __inline static void FreeTrackedItem(BASE_PAR_DECL struct DefaultTracker* item)
  1258. {
  1259.     BASE_EXT_DECL
  1260.     register void *a6 __asm ("a6");
  1261.     register struct DefaultTracker* a1 __asm("a1");
  1262.  
  1263.     a6 = BASE_NAME;
  1264.     a1 = item;
  1265.     __asm volatile ("
  1266.     jsr a6@(-0x1e0)"
  1267.     : /* no output */
  1268.     : "g" (a6), "g" (a1)
  1269.     : "d0", "d1", "a0", "a1");
  1270. }
  1271. #ifdef PRIVATE
  1272. __inline static struct    DefaultTracker* GetTracker(BASE_PAR_DECL void)
  1273. {
  1274.     BASE_EXT_DECL
  1275.     register struct    DefaultTracker* res __asm("d0");
  1276.     register void *a6 __asm ("a6");
  1277.     a6 = BASE_NAME;
  1278.     __asm volatile ("
  1279.     jsr a6@(-0x1e6)"
  1280.     : "=g" (res)
  1281.     : "g" (a6)
  1282.     : "d0", "d1", "a0", "a1");
  1283.     return res;
  1284. }
  1285. #endif
  1286. __inline static void* GetAccess(BASE_PAR_DECL struct DefaultTracker* tracker)
  1287. {
  1288.     BASE_EXT_DECL
  1289.     register void* res __asm("d0");
  1290.     register void *a6 __asm ("a6");
  1291.     register struct DefaultTracker* a1 __asm("a1");
  1292.  
  1293.     a6 = BASE_NAME;
  1294.     a1 = tracker;
  1295.     __asm volatile ("
  1296.     jsr a6@(-0x1ec)"
  1297.     : "=g" (res)
  1298.     : "g" (a6), "g" (a1)
  1299.     : "d0", "d1", "a0", "a1");
  1300.     return res;
  1301. }
  1302. __inline static void FreeAccess(BASE_PAR_DECL struct DefaultTracker* tracker)
  1303. {
  1304.     BASE_EXT_DECL
  1305.     register void *a6 __asm ("a6");
  1306.     register struct DefaultTracker* a1 __asm("a1");
  1307.  
  1308.     a6 = BASE_NAME;
  1309.     a1 = tracker;
  1310.     __asm volatile ("
  1311.     jsr a6@(-0x1f2)"
  1312.     : /* no output */
  1313.     : "g" (a6), "g" (a1)
  1314.     : "d0", "d1", "a0", "a1");
  1315. }
  1316. __inline static void FreeDAList(BASE_PAR_DECL struct DirectoryEntry* node)
  1317. {
  1318.     BASE_EXT_DECL
  1319.     register void *a6 __asm ("a6");
  1320.     register struct DirectoryEntry* a1 __asm("a1");
  1321.  
  1322.     a6 = BASE_NAME;
  1323.     a1 = node;
  1324.     __asm volatile ("
  1325.     jsr a6@(-0x1f8)"
  1326.     : /* no output */
  1327.     : "g" (a6), "g" (a1)
  1328.     : "d0", "d1", "a0", "a1");
  1329. }
  1330. __inline static struct    DirectoryEntry* AddDANode(BASE_PAR_DECL char* data, struct DirectoryEntry** dalist, LONG length, LONG id)
  1331. {
  1332.     BASE_EXT_DECL
  1333.     register struct    DirectoryEntry* res __asm("d0");
  1334.     register void *a6 __asm ("a6");
  1335.     register char* a0 __asm("a0");
  1336.     register struct DirectoryEntry** a1 __asm("a1");
  1337.     register LONG d0 __asm("d0");
  1338.     register LONG d1 __asm("d1");
  1339.  
  1340.     a6 = BASE_NAME;
  1341.     a0 = data;
  1342.     a1 = dalist;
  1343.     d0 = length;
  1344.     d1 = id;
  1345.     __asm volatile ("
  1346.     jsr a6@(-0x1fe)"
  1347.     : "=g" (res)
  1348.     : "g" (a6), "g" (a0), "g" (a1), "g" (d0), "g" (d1)
  1349.     : "d0", "d1", "a0", "a1");
  1350.     return res;
  1351. }
  1352. __inline static ULONG AddDADevs(BASE_PAR_DECL struct DirectoryEntry** dalist, LONG select)
  1353. {
  1354.     BASE_EXT_DECL
  1355.     register ULONG res __asm("d0");
  1356.     register void *a6 __asm ("a6");
  1357.     register struct DirectoryEntry** a0 __asm("a0");
  1358.     register LONG d0 __asm("d0");
  1359.  
  1360.     a6 = BASE_NAME;
  1361.     a0 = dalist;
  1362.     d0 = select;
  1363.     __asm volatile ("
  1364.     jsr a6@(-0x204)"
  1365.     : "=g" (res)
  1366.     : "g" (a6), "g" (a0), "g" (d0)
  1367.     : "d0", "d1", "a0", "a1");
  1368.     return res;
  1369. }
  1370. __inline static LONG Strcmp(BASE_PAR_DECL char* s1, char* s2)
  1371. {
  1372.     BASE_EXT_DECL
  1373.     register LONG res __asm("d0");
  1374.     register void *a6 __asm ("a6");
  1375.     register char* a0 __asm("a0");
  1376.     register char* a1 __asm("a1");
  1377.  
  1378.     a6 = BASE_NAME;
  1379.     a0 = s1;
  1380.     a1 = s2;
  1381.     __asm volatile ("
  1382.     jsr a6@(-0x20a)"
  1383.     : "=g" (res)
  1384.     : "g" (a6), "g" (a0), "g" (a1)
  1385.     : "d0", "d1", "a0", "a1");
  1386.     return res;
  1387. }
  1388. __inline static LONG Strncmp(BASE_PAR_DECL char* s1, char* s2, LONG count)
  1389. {
  1390.     BASE_EXT_DECL
  1391.     register LONG res __asm("d0");
  1392.     register void *a6 __asm ("a6");
  1393.     register char* a0 __asm("a0");
  1394.     register char* a1 __asm("a1");
  1395.     register LONG d0 __asm("d0");
  1396.  
  1397.     a6 = BASE_NAME;
  1398.     a0 = s1;
  1399.     a1 = s2;
  1400.     d0 = count;
  1401.     __asm volatile ("
  1402.     jsr a6@(-0x210)"
  1403.     : "=g" (res)
  1404.     : "g" (a6), "g" (a0), "g" (a1), "g" (d0)
  1405.     : "d0", "d1", "a0", "a1");
  1406.     return res;
  1407. }
  1408. #ifdef PRIVATE
  1409. __inline static BYTE Toupper(BASE_PAR_DECL BYTE character)
  1410. {
  1411.     BASE_EXT_DECL
  1412.     register BYTE res __asm("d0");
  1413.     register void *a6 __asm ("a6");
  1414.     register BYTE d0 __asm("d0");
  1415.  
  1416.     a6 = BASE_NAME;
  1417.     d0 = character;
  1418.     __asm volatile ("
  1419.     jsr a6@(-0x216)"
  1420.     : "=g" (res)
  1421.     : "g" (a6), "g" (d0)
  1422.     : "d0", "d1", "a0", "a1");
  1423.     return res;
  1424. }
  1425. #endif
  1426. __inline static LONG SyncRun(BASE_PAR_DECL char* name, char* command, BPTR input, BPTR output)
  1427. {
  1428.     BASE_EXT_DECL
  1429.     register LONG res __asm("d0");
  1430.     register void *a6 __asm ("a6");
  1431.     register char* a0 __asm("a0");
  1432.     register char* a1 __asm("a1");
  1433.     register BPTR d0 __asm("d0");
  1434.     register BPTR d1 __asm("d1");
  1435.  
  1436.     a6 = BASE_NAME;
  1437.     a0 = name;
  1438.     a1 = command;
  1439.     d0 = input;
  1440.     d1 = output;
  1441.     __asm volatile ("
  1442.     jsr a6@(-0x21c)"
  1443.     : "=g" (res)
  1444.     : "g" (a6), "g" (a0), "g" (a1), "g" (d0), "g" (d1)
  1445.     : "d0", "d1", "a0", "a1");
  1446.     return res;
  1447. }
  1448. __inline static LONG ASyncRun(BASE_PAR_DECL char* name, char* command, struct ProcessControlBlock* pcb)
  1449. {
  1450.     BASE_EXT_DECL
  1451.     register LONG res __asm("d0");
  1452.     register void *a6 __asm ("a6");
  1453.     register char* a0 __asm("a0");
  1454.     register char* a1 __asm("a1");
  1455.     register struct ProcessControlBlock* a2 __asm("a2");
  1456.  
  1457.     a6 = BASE_NAME;
  1458.     a0 = name;
  1459.     a1 = command;
  1460.     a2 = pcb;
  1461.     __asm volatile ("
  1462.     jsr a6@(-0x222)"
  1463.     : "=g" (res)
  1464.     : "g" (a6), "g" (a0), "g" (a1), "g" (a2)
  1465.     : "d0", "d1", "a0", "a1", "a2");
  1466.     return res;
  1467. }
  1468. __inline static BPTR LoadPrg(BASE_PAR_DECL char* name)
  1469. {
  1470.     BASE_EXT_DECL
  1471.     register BPTR res __asm("d0");
  1472.     register void *a6 __asm ("a6");
  1473.     register char* d1 __asm("d1");
  1474.  
  1475.     a6 = BASE_NAME;
  1476.     d1 = name;
  1477.     __asm volatile ("
  1478.     jsr a6@(-0x228)"
  1479.     : "=g" (res)
  1480.     : "g" (a6), "g" (d1)
  1481.     : "d0", "d1", "a0", "a1");
  1482.     return res;
  1483. }
  1484. __inline static BOOL PreParse(BASE_PAR_DECL char* source, char* dest)
  1485. {
  1486.     BASE_EXT_DECL
  1487.     register BOOL res __asm("d0");
  1488.     register void *a6 __asm ("a6");
  1489.     register char* a0 __asm("a0");
  1490.     register char* a1 __asm("a1");
  1491.  
  1492.     a6 = BASE_NAME;
  1493.     a0 = source;
  1494.     a1 = dest;
  1495.     __asm volatile ("
  1496.     jsr a6@(-0x22e)"
  1497.     : "=g" (res)
  1498.     : "g" (a6), "g" (a0), "g" (a1)
  1499.     : "d0", "d1", "a0", "a1");
  1500.     return res;
  1501. }
  1502. __inline static BOOL StamptoStr(BASE_PAR_DECL struct DateTime* datetime)
  1503. {
  1504.     BASE_EXT_DECL
  1505.     register BOOL res __asm("d0");
  1506.     register void *a6 __asm ("a6");
  1507.     register struct DateTime* a0 __asm("a0");
  1508.  
  1509.     a6 = BASE_NAME;
  1510.     a0 = datetime;
  1511.     __asm volatile ("
  1512.     jsr a6@(-0x234)"
  1513.     : "=g" (res)
  1514.     : "g" (a6), "g" (a0)
  1515.     : "d0", "d1", "a0", "a1");
  1516.     return res;
  1517. }
  1518. __inline static BOOL StrtoStamp(BASE_PAR_DECL struct DateTime* datetime)
  1519. {
  1520.     BASE_EXT_DECL
  1521.     register BOOL res __asm("d0");
  1522.     register void *a6 __asm ("a6");
  1523.     register struct DateTime* a0 __asm("a0");
  1524.  
  1525.     a6 = BASE_NAME;
  1526.     a0 = datetime;
  1527.     __asm volatile ("
  1528.     jsr a6@(-0x23a)"
  1529.     : "=g" (res)
  1530.     : "g" (a6), "g" (a0)
  1531.     : "d0", "d1", "a0", "a1");
  1532.     return res;
  1533. }
  1534. __inline static struct    ResidentProgramNode* ObtainResidentPrg(BASE_PAR_DECL char* name)
  1535. {
  1536.     BASE_EXT_DECL
  1537.     register struct    ResidentProgramNode* res __asm("d0");
  1538.     register void *a6 __asm ("a6");
  1539.     register char* a0 __asm("a0");
  1540.  
  1541.     a6 = BASE_NAME;
  1542.     a0 = name;
  1543.     __asm volatile ("
  1544.     jsr a6@(-0x240)"
  1545.     : "=g" (res)
  1546.     : "g" (a6), "g" (a0)
  1547.     : "d0", "d1", "a0", "a1");
  1548.     return res;
  1549. }
  1550. __inline static struct    ResidentProgramNode* AddResidentPrg(BASE_PAR_DECL BPTR Segment, char* name)
  1551. {
  1552.     BASE_EXT_DECL
  1553.     register struct    ResidentProgramNode* res __asm("d0");
  1554.     register void *a6 __asm ("a6");
  1555.     register BPTR d1 __asm("d1");
  1556.     register char* a0 __asm("a0");
  1557.  
  1558.     a6 = BASE_NAME;
  1559.     d1 = Segment;
  1560.     a0 = name;
  1561.     __asm volatile ("
  1562.     jsr a6@(-0x246)"
  1563.     : "=g" (res)
  1564.     : "g" (a6), "g" (d1), "g" (a0)
  1565.     : "d0", "d1", "a0", "a1");
  1566.     return res;
  1567. }
  1568. __inline static LONG RemResidentPrg(BASE_PAR_DECL char* name)
  1569. {
  1570.     BASE_EXT_DECL
  1571.     register LONG res __asm("d0");
  1572.     register void *a6 __asm ("a6");
  1573.     register char* a0 __asm("a0");
  1574.  
  1575.     a6 = BASE_NAME;
  1576.     a0 = name;
  1577.     __asm volatile ("
  1578.     jsr a6@(-0x24c)"
  1579.     : "=g" (res)
  1580.     : "g" (a6), "g" (a0)
  1581.     : "d0", "d1", "a0", "a1");
  1582.     return res;
  1583. }
  1584. __inline static void UnLoadPrg(BASE_PAR_DECL BPTR segment)
  1585. {
  1586.     BASE_EXT_DECL
  1587.     register void *a6 __asm ("a6");
  1588.     register BPTR d1 __asm("d1");
  1589.  
  1590.     a6 = BASE_NAME;
  1591.     d1 = segment;
  1592.     __asm volatile ("
  1593.     jsr a6@(-0x252)"
  1594.     : /* no output */
  1595.     : "g" (a6), "g" (d1)
  1596.     : "d0", "d1", "a0", "a1");
  1597. }
  1598. __inline static LONG LMult(BASE_PAR_DECL LONG a, LONG b)
  1599. {
  1600.     BASE_EXT_DECL
  1601.     register LONG res __asm("d0");
  1602.     register void *a6 __asm ("a6");
  1603.     register LONG d0 __asm("d0");
  1604.     register LONG d1 __asm("d1");
  1605.  
  1606.     a6 = BASE_NAME;
  1607.     d0 = a;
  1608.     d1 = b;
  1609.     __asm volatile ("
  1610.     jsr a6@(-0x258)"
  1611.     : "=g" (res)
  1612.     : "g" (a6), "g" (d0), "g" (d1)
  1613.     : "d0", "d1", "a0", "a1");
  1614.     return res;
  1615. }
  1616. __inline static LONG LDiv(BASE_PAR_DECL LONG a, LONG b)
  1617. {
  1618.     BASE_EXT_DECL
  1619.     register LONG res __asm("d0");
  1620.     register void *a6 __asm ("a6");
  1621.     register LONG d0 __asm("d0");
  1622.     register LONG d1 __asm("d1");
  1623.  
  1624.     a6 = BASE_NAME;
  1625.     d0 = a;
  1626.     d1 = b;
  1627.     __asm volatile ("
  1628.     jsr a6@(-0x25e)"
  1629.     : "=g" (res)
  1630.     : "g" (a6), "g" (d0), "g" (d1)
  1631.     : "d0", "d1", "a0", "a1");
  1632.     return res;
  1633. }
  1634. __inline static LONG LMod(BASE_PAR_DECL LONG a, LONG b)
  1635. {
  1636.     BASE_EXT_DECL
  1637.     register LONG res __asm("d0");
  1638.     register void *a6 __asm ("a6");
  1639.     register LONG d0 __asm("d0");
  1640.     register LONG d1 __asm("d1");
  1641.  
  1642.     a6 = BASE_NAME;
  1643.     d0 = a;
  1644.     d1 = b;
  1645.     __asm volatile ("
  1646.     jsr a6@(-0x264)"
  1647.     : "=g" (res)
  1648.     : "g" (a6), "g" (d0), "g" (d1)
  1649.     : "d0", "d1", "a0", "a1");
  1650.     return res;
  1651. }
  1652. __inline static ULONG CheckSumPrg(BASE_PAR_DECL struct ResidentProgramNode* ResidentNode)
  1653. {
  1654.     BASE_EXT_DECL
  1655.     register ULONG res __asm("d0");
  1656.     register void *a6 __asm ("a6");
  1657.     register struct ResidentProgramNode* d0 __asm("d0");
  1658.  
  1659.     a6 = BASE_NAME;
  1660.     d0 = ResidentNode;
  1661.     __asm volatile ("
  1662.     jsr a6@(-0x26a)"
  1663.     : "=g" (res)
  1664.     : "g" (a6), "g" (d0)
  1665.     : "d0", "d1", "a0", "a1");
  1666.     return res;
  1667. }
  1668. __inline static void TackOn(BASE_PAR_DECL char* pathname, char* filename)
  1669. {
  1670.     BASE_EXT_DECL
  1671.     register void *a6 __asm ("a6");
  1672.     register char* a0 __asm("a0");
  1673.     register char* a1 __asm("a1");
  1674.  
  1675.     a6 = BASE_NAME;
  1676.     a0 = pathname;
  1677.     a1 = filename;
  1678.     __asm volatile ("
  1679.     jsr a6@(-0x270)"
  1680.     : /* no output */
  1681.     : "g" (a6), "g" (a0), "g" (a1)
  1682.     : "d0", "d1", "a0", "a1");
  1683. }
  1684. __inline static BYTE* BaseName(BASE_PAR_DECL char* name)
  1685. {
  1686.     BASE_EXT_DECL
  1687.     register BYTE* res __asm("d0");
  1688.     register void *a6 __asm ("a6");
  1689.     register char* a0 __asm("a0");
  1690.  
  1691.     a6 = BASE_NAME;
  1692.     a0 = name;
  1693.     __asm volatile ("
  1694.     jsr a6@(-0x276)"
  1695.     : "=g" (res)
  1696.     : "g" (a6), "g" (a0)
  1697.     : "d0", "d1", "a0", "a1");
  1698.     return res;
  1699. }
  1700. __inline static struct    ResidentProgramNode* ReleaseResidentPrg(BASE_PAR_DECL BPTR segment)
  1701. {
  1702.     BASE_EXT_DECL
  1703.     register struct    ResidentProgramNode* res __asm("d0");
  1704.     register void *a6 __asm ("a6");
  1705.     register BPTR d1 __asm("d1");
  1706.  
  1707.     a6 = BASE_NAME;
  1708.     d1 = segment;
  1709.     __asm volatile ("
  1710.     jsr a6@(-0x27c)"
  1711.     : "=g" (res)
  1712.     : "g" (a6), "g" (d1)
  1713.     : "d0", "d1", "a0", "a1");
  1714.     return res;
  1715. }
  1716. #ifdef PRIVATE
  1717. #ifdef DOTDOTDOT
  1718. __inline static LONG SPrintf(BASE_PAR_DECL char* file, char* string, ... stream)
  1719. {
  1720.     BASE_EXT_DECL
  1721.     register LONG res __asm("d0");
  1722.     register void *a6 __asm ("a6");
  1723.     register char* d0 __asm("d0");
  1724.     register char* a0 __asm("a0");
  1725.     register ... a1 __asm("a1");
  1726.  
  1727.     a6 = BASE_NAME;
  1728.     d0 = file;
  1729.     a0 = string;
  1730.     a1 = stream;
  1731.     __asm volatile ("
  1732.     jsr a6@(-0x282)"
  1733.     : "=g" (res)
  1734.     : "g" (a6), "g" (d0), "g" (a0), "g" (a1)
  1735.     : "d0", "d1", "a0", "a1");
  1736.     return res;
  1737. }
  1738. #endif
  1739. __inline static LONG GetKeywordIndex(BASE_PAR_DECL char* char *, char* char *)
  1740. {
  1741.     BASE_EXT_DECL
  1742.     register LONG res __asm("d0");
  1743.     register void *a6 __asm ("a6");
  1744.     register char* a0 __asm("a0");
  1745.     register char* a1 __asm("a1");
  1746.  
  1747.     a6 = BASE_NAME;
  1748.     a0 = char *;
  1749.     a1 = char *;
  1750.     __asm volatile ("
  1751.     jsr a6@(-0x288)"
  1752.     : "=g" (res)
  1753.     : "g" (a6), "g" (a0), "g" (a1)
  1754.     : "d0", "d1", "a0", "a1");
  1755.     return res;
  1756. }
  1757. __inline static struct    Library* ArpOpenLibrary(BASE_PAR_DECL char* name, LONG vers)
  1758. {
  1759.     BASE_EXT_DECL
  1760.     register struct    Library* res __asm("d0");
  1761.     register void *a6 __asm ("a6");
  1762.     register char* a1 __asm("a1");
  1763.     register LONG d0 __asm("d0");
  1764.  
  1765.     a6 = BASE_NAME;
  1766.     a1 = name;
  1767.     d0 = vers;
  1768.     __asm volatile ("
  1769.     jsr a6@(-0x28e)"
  1770.     : "=g" (res)
  1771.     : "g" (a6), "g" (a1), "g" (d0)
  1772.     : "d0", "d1", "a0", "a1");
  1773.     return res;
  1774. }
  1775. __inline static struct    FileRequester* ArpAllocFreq(BASE_PAR_DECL void)
  1776. {
  1777.     BASE_EXT_DECL
  1778.     register struct    FileRequester* res __asm("d0");
  1779.     register void *a6 __asm ("a6");
  1780.     a6 = BASE_NAME;
  1781.     __asm volatile ("
  1782.     jsr a6@(-0x294)"
  1783.     : "=g" (res)
  1784.     : "g" (a6)
  1785.     : "d0", "d1", "a0", "a1");
  1786.     return res;
  1787. }
  1788. #endif
  1789. #undef BASE_EXT_DECL
  1790. #undef BASE_PAR_DECL
  1791. #undef BASE_NAME
  1792.