home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / Editor / GED403R.LZX / Install / Install.run / GOLDEDDATA / arexx / a68k.ged next >
Encoding:
Text File  |  1996-07-26  |  1.8 KB  |  77 lines

  1. /* $VER: 1.0, ©1996 Dietmar Eilert. Assemble & link file using A68K    */
  2.  
  3. OPTIONS RESULTS                             /* enable return codes     */
  4.  
  5. if (LEFT(ADDRESS(), 6) ~= "GOLDED") then    /* not started by GoldEd ? */
  6.     address 'GOLDED.1'
  7.  
  8. 'LOCK CURRENT RELEASE=4'                    /* lock GUI, gain access   */
  9. if (RC ~= 0) then
  10.     exit
  11.  
  12. OPTIONS FAILAT 6                            /* ignore warnings         */
  13. SIGNAL ON SYNTAX                            /* ensure clean exit       */
  14.  
  15. /* ------------------------- INSERT YOUR CODE HERE: ------------------ */
  16.  
  17. 'QUERY CAT'
  18. isGerman = (result = "deutsch")
  19.  
  20. 'QUERY ANYTEXT'
  21.  
  22. if (result = 'TRUE') then 
  23.  
  24.     do
  25.  
  26.         'QUERY DOC VAR OLDNAME'             /* remember current file name */
  27.         'SAVE ALL NAME="t:test.asm"'        /* create temorary file */
  28.  
  29.         shell                               /* address shell */
  30.  
  31.         'a68k t:test.asm -ot:test.o'
  32.  
  33.         if (RC = 0) then
  34.             'blink t:test.o'
  35.  
  36.         ok = (RC = 0)
  37.  
  38.         shell                               /* address host (GoldED) */
  39.  
  40.         'NAME NEW ' || oldname              /* restore old file name */
  41.  
  42.         if (ok) then do
  43.  
  44.             if (isGerman) then
  45.                 'REQUEST BODY="A68K fertig. Programm starten ?" BUTTON="!STARTEN|_Abbruch"'
  46.             else
  47.                 'REQUEST BODY="A68K done. Run program ?" BUTTON="!RUN|_Cancel"'
  48.  
  49.             if (result = 1) then do
  50.  
  51.                 shell
  52.                 't:test'
  53.                 shell
  54.  
  55.             end
  56.         end
  57.     end
  58.  
  59. else do
  60.  
  61.     if (isGerman) then
  62.         'REQUEST PROBLEM="Kein Text vorhanden ?!"'
  63.     else
  64.         'REQUEST PROBLEM=="Text buffer is empty ?!"'
  65. end
  66.  
  67. /* ---------------------------- END OF YOUR CODE ----------------------- */
  68.  
  69. 'UNLOCK' /* VERY important: unlock GUI */
  70. EXIT
  71.  
  72. SYNTAX:
  73.  
  74. SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
  75. 'UNLOCK'
  76. EXIT
  77.