home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games 1995 January / amigagames-1995-01.iso / archive / userbox / publicdomain / ged313.lha / Install / data / main / GoldED / arexx / a68k.ged next >
Text File  |  1993-08-16  |  2KB  |  76 lines

  1. /* $VER: 0.9, ©1993 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'                              /* lock GUI, gain access   */
  9. OPTIONS FAILAT 6                            /* ignore warnings         */
  10. SIGNAL ON SYNTAX                            /* ensure clean exit       */
  11.  
  12. /* ------------------------- INSERT YOUR CODE HERE: ------------------ */
  13.  
  14. 'QUERY CAT'
  15. isGerman = (result = "deutsch")
  16.  
  17. 'QUERY ANYTEXT'
  18.  
  19. if (result = 'TRUE') then 
  20.  
  21.     do
  22.  
  23.         'QUERY DOC VAR OLDNAME'             /* remember current file name */
  24.         'SAVE ALL NAME="t:test.asm"'        /* create temorary file */
  25.  
  26.         shell                               /* address shell */
  27.  
  28.         'a68k t:test.asm -ot:test.o'
  29.  
  30.         if (RC = 0) then
  31.             'blink t:test.o'
  32.  
  33.         ok = (RC = 0)
  34.  
  35.         shell                               /* address host (GoldED) */
  36.  
  37.         'NAME NEW ' || oldname              /* restore old file name */
  38.  
  39.         if (ok) then do
  40.  
  41.             if (isGerman) then
  42.                 'REQUEST BODY="A68K fertig. Programm starten ?" BUTTON="_starten|_abbrechen"'
  43.             else
  44.                 'REQUEST BODY="A68K done. Run program ?" BUTTON="_run|_cancel"'
  45.  
  46.             if (result = 1) then do
  47.  
  48.                 'QUERY CON VAR CON'
  49.  
  50.                 shell
  51.                 't:test >' || CON
  52.                 shell
  53.  
  54.             end
  55.         end
  56.     end
  57.  
  58. else do
  59.  
  60.     if (isGerman) then
  61.         'REQUEST BODY="Kein Text vorhanden ?!"'
  62.     else
  63.         'REQUEST BODY="Text buffer is empty ?!"'
  64. end
  65.  
  66. /* ---------------------------- END OF YOUR CODE ----------------------- */
  67.  
  68. 'UNLOCK' /* VERY important: unlock GUI */
  69. EXIT
  70.  
  71. SYNTAX:
  72.  
  73. SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
  74. 'UNLOCK'
  75. EXIT
  76.