⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 asem_51.doc

📁 Free 8051 asm compiler for linux new host platforms: Win32 and Linux macro processing dramatica
💻 DOC
📖 第 1 页 / 共 5 页
字号:
        file             extension        ------------------------------        <hex>            .HEX        <bin>            .BINIf you want a file name to have no extension, terminate it with a '.'!Instead of file names you may also specify device names to redirect theoutput to character I/O ports. Device names may be terminated with a ':'!It is not checked, whether the device is existing or suitable for the task.The binary file output can also be controlled with the options /OFFSET,/FILL and /LENGTH.Normally the first byte in the binary file is the first byte of the HEXrecord with the lowest load address. If a number of dummy bytes is to beinserted on top of the file (e.g. for alignment in an EPROM image), thiscan be performed with the /OFFSET option:        /OFFSET:1000would insert 4096 dummy bytes before the first byte of the first HEX recordloaded. The offset must always be specified as a hex number. The defaultoffset is 0.Since there may be peepholes between the HEX records, a fill byte value canbe defined with the /FILL option:        /FILL:0would fill all peepholes between the HEX records with zero bytes as well asall the dummy bytes that might have been inserted with the /OFFSET or /LENGTHoption. The fill byte value must always be specified as a hex number.The default fill byte is the EPROM-friendly FFH.By default the last byte in the binary file is the last byte of the HEXrecord with the highest load address. If the binary file should have awell defined length, then a number of dummy bytes can be appended to thefile (e.g. for exactly matching an EPROM length), this can be performedwith the /LENGTH option:        /LENGTH:8000would append as many dummy bytes behind the last byte of the file, that thetotal file length becomes exactly 32768 bytes. The file length must alwaysbe specified as a hex number.When HEXBIN has been invoked with all the above options, it may display afile conversion report like this:        Hex File Converter HEXBIN V2.3                     offset:     1000H bytes              first address:     9000H               last address:     A255H        fill peepholes with:       00H        binary image length:     8000H bytesThe /QUIET option suppresses this console output, while error messages aredisplayed regardless.Options may be abbreviated as long as they remain unique!Examples:  0.)      HEXBIN     When invoked without parameters, HEXBIN displays a help screen:           Hex File Converter HEXBIN V2.3           usage:       HEXBIN <hexfile> [<binary>] [options]           options:     /OFFSET:offset                        /LENGTH:length                        /FILL:fillbyte                        /QUIET  1.)      HEXBIN PROGRAM     will convert the Intel-HEX file PROGRAM.HEX to a pure binary image file     PROGRAM.BIN.  2.)      HEXBIN TARZAN.OBJ JUNGLE/FILL:E5     will convert the Intel-HEX file TARZAN.OBJ to a binary image file     JUNGLE.BIN and fill all peepholes between the HEX file records with     the binary value E5H.  3.)      HEXBIN PROJECT EPROM. /off:8000 /length:10000 /f:0     will convert the Intel-HEX file PROJECT.HEX to a binary image file     EPROM, insert 32K dummy bytes on top of file, fill all peepholes     and the dummy bytes with nulls, and extend the file to exactly 64K.When terminating HEXBIN returns an exit code to the operating system:     situation                           ERRORLEVEL     ----------------------------------------------     no errors                               0     conversion errors detected              1     fatal runtime error                     2There is also a Win32 console-mode version of HEXBIN: HEXBINW.EXE!HEXBINW is functionally identical to HEXBIN, but can handle long file names.II.2 Linux Implementation-------------------------Until version 1.2, ASEM-51 was available for MS-DOS only.To get rid of the original DOS "look and feel", many interfaces to theoperating system had to be modified or rewritten, e.g. command lineprocessing, console I/O, file handling, UNIX environment, and memorymanagement. Furthermore, the general behaviour of the programs had to beadapted to UNIX conventions.A certain rest of DOS flavour may still be remaining though.On the other hand, the Linux binaries are able to read ASCII files in bothDOS and UNIX format. However, ASCII files are always written in UNIX format.All these differences make it necessary to describe the Linux implementationin a separate section!II.2.1 Files------------Your ASEM-51 distribution archive for Linux should contain the followinggroups of files:1.)  asem_51.doc        ASEM-51 User's Manual, ASCII format        docs.htm        index file of the ASEM-51 documentation, HTML format           *.htm        further pages of the HTML documentation           *.gif        GIF images referenced by HTML pages           *.jpg        JPEG images referenced by HTML pages        asem            assembler (Linux 386)        asem.1          man-page for asem      hexbin            hex-to-binary conversion utility (Linux 386)      hexbin.1          man-page for hexbin        demo.a51        a sample 8051 assembler program           *.mcu        processor definition files of 8051 derivatives                        (for a detailed list of MCU files see chapter                         "VI. Support of 8051 Derivatives")2.)   boot51.doc        BOOT-51 User's Manual, ASCII format      boot51.htm        index file of the BOOT-51 documentation, HTML format      boot51.a51        BOOT-51 assembler source (for ASEM-51 V1.3 and up)      customiz          BOOT-51 customization utility (Linux 386)      customiz.1        man-page for customiz      boot              shell script for application program upload      boot.1            man-page for boot      upload            called by boot only (generic version)      upload.new        "new" upload (optimized for stty 2.0 or later)      reset51           program to reset the target system via PC ports      reset51.1         man-page for reset51      blink.a51         sample test program for BOOT-513.)   README.1ST        quick information, ASCII format     license.doc        ASEM-51 License Agreement, ASCII format     release.130        ASEM-51 Release Notes, ASCII format     support.doc        ASEM-51 Support Guide, ASCII format     install.sh         creates a proper ASEM-51 installation under Linux    uninst51.sh         deletes all files of the ASEM-51 package (Linux)II.2.2 Installation under Linux-------------------------------ASEM-51 for Linux is available as a tar archive and an rpm package.If you have got the rpm package, login as root and simply type   rpm -i asem51-1.3-1.i386.rpmThe rpm package has been tested on S.u.S.E.-Linux only, but should alsowork on other Linux distributions that meet the FHS directory standard.If you have got the tar archive, perform the following steps:   gzip -d asem51-1.3-ELF.tar.gz   tar xvf asem51-1.3-ELF.tar   cd asem51   sh install.shIf you are installing ASEM-51 as root (preferred), the installation scriptinstall.sh will install the whole package in /usr/local/share/asem-51/1.3,and establish some symbolic links in /usr/local/bin and /usr/local/man/man1.If you are installing ASEM-51 under another user-id, install.sh tries toinstall the software in your home directory under ~/asem-51/1.3, andestablish some symbolic links in ~/bin and ~/man/man1.For details see the messages, install.sh is displaying on the console,and do some fine-tuning accordingly:If you haven't installed ASEM-51 as root, it may be necessary to add~/bin to your PATH, and ~/man to your MANPATH.To specify a search path for the include files *.mcu provided, you candefine an optional environment variable ASEM51INC.For this, bash, ksh, and sh users should insert the following lines intotheir .profile file:    ASEM51INC=/usr/local/share/asem-51/1.3/mcu    export ASEM51INCcsh, tcsh, and zsh users should insert the following line into their.login file respectively:    setenv ASEM51INC /usr/local/share/asem-51/1.3/mcuIf you have installed ASEM-51 in your home directory, ASEM51INC shouldpoint to ~/asem-51/1.3/mcu of course.To read the HTML manuals, invoke your web browser and bookmark the index page    /usr/local/share/asem-51/1.3/html/docs.htm    (installation as root)    ~/asem-51/1.3/html/docs.htm                   (local installation)Note that you cannot reset your 8051 target system with a PC printer port,if you haven't installed ASEM-51 as root!(For details see the BOOT-51 documentation provided.)If you have installed ASEM-51, but you don't like it, you can easilyuninstall it. If you have installed the rpm package, simply type    rpm -e asem51If you have installed the generic tar archive, be sure to uninstallASEM-51 under the same user-id you previously used for installation! Run    uninst51.shand that's it.II.2.3 Linux Command Line Operation-----------------------------------Under Linux, the assembler is invoked by typing:asem [<options>] <source> [<object> [<listing>]]where <source> is the 8051 assembler source, <object> is the outputfile, and <listing> is the assembler list file.All file names that are specified explicitly, are left unchanged.The parameters <object> and <listing> are optional. When omitted, the<object> file name is derived from the <source> file name, but withextension ".hex" (or ".omf"). When the <listing> file name is omitted,it is derived from the <object> file name, but with extension ".lst":        file             extension        -----------------------------------------------        <object>         .hex    (with -o option: .omf)        <listing>        .lstInstead of file names you may also specify device names to redirect theoutput to I/O devices. Device names are assumed to start with "/dev/".Of course no extensions will be added to device names!It is not checked, whether the device is existing or suitable for the task.Although it is possible to read the source file from a character deviceinstead of a file, this cannot be recommended: Since ASEM-51 is a two-passassembler, it always reads the source file twice!The maximum length of a file parameter is limited to 255 characters!asem recognizes the following options:     short options             |  long options     --------------------------+--------------------------------     -i path1:path2:path3      |  --includes=path1:path2:path3     -d symbol[:value[:type]]  |  --define=symbol[:value[:type]]     -o                        |  --omf-51     -c                        |  --columns     -v                        |  --verboseThe short and long options in the same row are equivalent.Long options may be abbreviated as long as they remain unique.All option names are case-sensitive!When the --includes option is used, the assembler searches the specifiedpath for include files that cannot be found in the working directory.The path may be any number of directories separated by ':' characters.The directories will be searched from left to right.The path, specified with the --includes option, is searched before thepath, defined with the (optional) environment variable ASEM51INC!The maximum path length is limited to 255 characters.The --define option is useful for selecting particular program variantsfrom the command line that have been implemented with conditional assembly.It allows to define a symbol with a value and a segment type in thecommand line. Value and type are optional. The segment type of the symboldefaults to NUMBER, if omitted. The symbol value defaults to 0, if omitted.The symbol value may be any numerical constant. The symbol type must be oneof the following characters:             C   =   CODE             D   =   DATA             I   =   IDATA             X   =   XDATA             B   =   BIT             N   =   NUMBER    (default)By default, ASEM-51 generates an object file in Intel-HEX format. Whenthe --omf-51 option is specified, an absolute OMF-51 module is generated.Examples:  0.)      asem     When invoked without parameters, the assembler displays a help screen:           MCS-51 Family Macro Assembler ASEM-51 V1.3           usage:     asem [options] <source> [<object> [<listing>]]           options:   -i   --includes=path1:path2:path3                      -d   --define=symbol[:value[:type]]                      -o   --omf-51                      -c   --columns                      -v   --verbose  1.)      asem program.a51     will assemble the 8051 assembly language program program.a51 and     produce an Intel-HEX file program.hex and a listing program.lst.  2.)      asem tarzan.asm jane jungle.prn     will assemble the 8051 assembly language program tarzan.asm and     produce an Intel-HEX file jane and a listing jungle.prn.  3.)      asem project eprom     will assemble the 8051 assembly language program project and

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -