+-----------------------------------------------+ | | | Amiga E v2.1b | | Compiler for The E Language | | By Wouter van Oortmerssen | | | | Utility.doc | | | +-----------------------------------------------+ This document describes the functioning of the programs in the sources/ directory, and most important: the utilities found there. All of these programs are suplied in the form of an E-sourcecode, some also as executable (while being part of the compiler support utilities, rather than an example source) NOTE: the bigger programs in the Sources/Other and Sources/Projects directory have separate docs in the Docs/Utilities dir, others just have no documentation at all. contents: Utilities/ShowModule.e ShowHunk.e ShowChunk.e Iconvert.e Pragma2Module.e DirQuick.e D.e Watch.e Mem.e QuickLaunch.e SuperVisor.e Nkript.e /Bin/ecompile.rexx Examples/GadToolDemo.e AppMenuItem.e Req.e Reqtools.e Asl.e Ereq.e GetArgs.e WbArg.e ReadArgs.e Helloworld.e Shell.e Colourscreen.e 24bitColourDemo.e Other/Pyth.e Avail.e Draw.e Vd.e Talk.e Projects/Forth.e Pi.e RewriteGfx.e Yax.e +---------------------------------------+ | SHOWMODULE.E | +---------------------------------------+ sources/utilities/showmodule.e, bin/showmodule As you might have noticed, E's equivalent for "includes", modules, are binary files, much like those usually suplied with Modula2 compilers, for example. To display the contents of such a file in readable ascii form, you may use showmodule: showmodule examples: 1> showmodule emodules:intuition/intuition.m 1> showmodule >gadtools.txt emodules:gadtools.m note that showmodule by default outputs to the console, and may be interrupted at any point by . +---------------------------------------+ | SHOWHUNK.E | +---------------------------------------+ sources/utilities/showhunk.e, bin/showhunk Displays all types of executable files, and also object ".o" files as generated by (other) compilers/assemblers. will show you the (very simple) structure of executables generated by EC, but also support complex overlay-files. also dumps labels (like XREF's and XDEF's) showhunk like: 1> showhunk helloworld 1> showhunk dpaint +---------------------------------------+ | SHOWCHUNK.E | +---------------------------------------+ sources/utilities/showchunk.e shows the inner structure of all types of IFF files. does not display or play anything, but reports on a great number of chunks. this way you may find out how some animation is build up, or who is the author of a certain SMUS masterpiece. supports ILBM, ANIM, SMUS, 8SVX, FTXT, PREF, MDBI for now. showchunk 1> showchunk mypic.iff +---------------------------------------+ | ICONVERT.E | | PRAGMA2MODULE.E | +---------------------------------------+ sources/utilities/iconvert.e, bin/iconvert sources/utilities/pragma2module.e, bin/pragma2module These two utilities are for advanced E-programmers only. if you don't feel like one (yet), skip this part. Iconvert will convert structure and constant definitions in assembly ".i" files to E modules, and pragma2module will do the same for SAS/C pragma library definition files. ofcourse, all commodores includes have already been converted this way, but say you find a nice PD library that you may want to use with E, you will need these utilities. most libraries come with various includes defining, most obvious, the library calls of the library, as well as the constants and structures (OBJECTs in E) that it uses. say that it is called "tools.library", then it will probably feature: pragmas/tools_pragmas.h includes/tools.h includes/tools.i then do: 1> pragma2module tools_pragmas.h rename the resulting "tools_pragmas.m" to "tools.m" and put it in emodules:, check with ShowModule if all went well. Now, in your program you may use tools.library: MODULE 'tools' PROC main() IF (toolsbase:=Openlibrary('tools.library',37))=NIL THEN error() toolsfunc() ...etc. convert tools.i with Iconvert to another tools.m, which you place in emodules:libraries, for example. Iconvert needs an assembler like the PD A68k to do the hard work of understanding the actual assembly. 1> iconvert tools.i see with showmodule what became of the ".i" file. use in your program with: MODULE 'libraries/tools' DEF x:toolsobj, y=TOOLS_CONST converting with Iconvert may require some assembly expertise, as Iconvert relies on the correct format of the ".i" file, just like commodores assembly includes. About 10% of the ".i" files need to be patched by hand to be "convertable". definitions that Iconvert judges correctly are amongst others