home *** CD-ROM | disk | FTP | other *** search
/ Amiga Times / AmigaTimes.iso / programme / GoldED / arexx / a68k.ged < prev    next >
Encoding:
Text File  |  1998-10-06  |  1.8 KB  |  82 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.  
  10. if (RC ~= 0) then
  11.     exit
  12.  
  13. OPTIONS FAILAT 6                            /* ignore warnings         */
  14.  
  15. SIGNAL ON SYNTAX                            /* ensure clean exit       */
  16.  
  17. /* ------------------------- INSERT YOUR CODE HERE: ------------------ */
  18.  
  19. 'QUERY CAT'
  20. isGerman = (result = "deutsch")
  21.  
  22. 'QUERY ANYTEXT'
  23.  
  24. if (result = 'TRUE') then 
  25.  
  26.     do
  27.  
  28.         'QUERY DOC VAR OLDNAME'             /* remember current file name */
  29.         'SAVE ALL NAME="t:test.asm"'        /* create temorary file */
  30.  
  31.         shell                               /* address shell */
  32.  
  33.         'a68k t:test.asm -ot:test.o'
  34.  
  35.         if (RC = 0) then
  36.             'blink t:test.o'
  37.  
  38.         ok = (RC = 0)
  39.  
  40.         shell                               /* address host (GoldED) */
  41.  
  42.         'NAME NEW ' || oldname              /* restore old file name */
  43.  
  44.         if (ok) then do
  45.  
  46.             if (isGerman) then
  47.                 'REQUEST BODY="A68K fertig. Programm starten ?" BUTTON="!STARTEN|_Abbruch"'
  48.             else
  49.                 'REQUEST BODY="A68K done. Run program ?" BUTTON="!RUN|_Cancel"'
  50.  
  51.             if (result = 1) then do
  52.  
  53.                 shell
  54.                 't:test'
  55.                 shell
  56.  
  57.             end
  58.         end
  59.     end
  60.  
  61. else do
  62.  
  63.     if (isGerman) then
  64.         'REQUEST PROBLEM="Kein Text vorhanden ?!"'
  65.     else
  66.         'REQUEST PROBLEM=="Text buffer is empty ?!"'
  67. end
  68.  
  69. /* ---------------------------- END OF YOUR CODE ----------------------- */
  70.  
  71. 'UNLOCK' /* VERY important: unlock GUI */
  72.  
  73. exit
  74.  
  75. SYNTAX:
  76.  
  77. SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
  78.  
  79. 'UNLOCK'
  80.  
  81. exit
  82.