home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 13 / CDA13.ISO / cdactual / demobin / share / program / Asm / 8048.ZIP / HELP.PRN < prev    next >
Encoding:
Text File  |  1993-01-29  |  56.7 KB  |  1,600 lines

  1.  
  2.  
  3.  
  4.        ECopy and Use RestrictionsF
  5.  
  6.        The 8048 Assembler/Simulator/Programmer and this documentation
  7.        are Copyright (c) 1990-1993 Michael McCarrick.  This software is
  8.        Shareware (not Freeware), if you continue to use it you must
  9.        register it.  To register simply send $50.00 to:
  10.  
  11.                                 8048 Registration
  12.                              Attn. Michael McCarrick
  13.                                    P.O. Box 264
  14.                               Middleboro, MA 02346
  15.  
  16.        Please include your name and address so I can record your
  17.        registration properly.  If $50.00 will place a considerable
  18.        financial strain on you, then send the registration when you can.
  19.        Although non-registered user will not receive the same support as
  20.        registered users.  Registration entitles you to future updates,
  21.        up to but not including version 2.00.
  22.  
  23.  
  24.        EDisclaimerF
  25.  
  26.        The 8048 Assembler/Simulator/Programmer software and this
  27.        documentation are provided "AS IS", without warranty of any kind.
  28.        By using this program (the 8048 Assembler/Simulator/Programmer
  29.        software) you are assuming all liability for anything which might
  30.        occur.  What I mean is if anything happens to you, your computer,
  31.        any possession of yours, or anything else, due to the use of this
  32.        program, I am not liable.
  33.  
  34.        I have made every attempt to insure that this program operates
  35.        properly.  I have been using it for a number of years myself.
  36.        Due to the complexity of any program of this size, a change made
  37.        in one part of the program can and sometimes does inadvertently
  38.        generate problems in other areas.  Just be forewarned, save your
  39.        work regularly (BACK UP your software).
  40.  
  41.        I also reserve the right to stop support and releasing updates of
  42.        this software at any time.
  43.  
  44.  
  45.        EContacting the AuthorF
  46.  
  47.        You can send any questions or report any problems to me at:
  48.  
  49.                                 Michael McCarrick
  50.                                    P.O.Box 264
  51.                               Middleboro, MA 02346
  52.  
  53.        I can also be reached on CompuServe.
  54.        My CIS number is: 70401,2671
  55.  
  56.        I also operate a BBS and can be reached at:
  57.  
  58.                            (508)946-9864, 14400-8-N-1
  59.  
  60.  
  61.        E8048 Assembler/SimulatorF
  62.  
  63.        The 8048 Assembler/Simulator development system is an integrated
  64.        Editor, Assembler, Simulator and Programmer for the 8048 family
  65.        of micro-controllers.  The development of the 8048 program takes
  66.        on the following steps:
  67.  
  68.        1.  Enter/Edit the 8048 source code into the text buffer via the
  69.            Editor.
  70.  
  71.        2.  Assemble the source code by selecting Assemble from the main
  72.            menu.
  73.  
  74.        3.  If any errors are reported by step 2 restart at step 1.
  75.  
  76.        4.  Simulate the 8048 program by stepping through the execution
  77.            of each line of source code.
  78.  
  79.        5.  If logical errors are found in step 4 restart at step 1.
  80.  
  81.        The 8048 program contains the following modules:
  82.  
  83.        EFilesF: Load, Save, Save as, XMem file, Print, DOS Shell, Burn,
  84.        Info and Quit.
  85.  
  86.        EEditF: Edit text buffer.
  87.  
  88.        EAssembleF: Assemble the source in text buffer.
  89.  
  90.        ESimulateF: Simulate source in text buffer.
  91.  
  92.        EProgramF: Program, Blank check, Verify and Read chip.
  93.  
  94.        EOptionsF: Specify various system settings.
  95.  
  96.  
  97.        Each of these units are explained in greater detail in subsequent
  98.        pages of this manual.
  99.  
  100.  
  101.        EGetting HelpF
  102.  
  103.        You can receive help information from the 8048 program by
  104.        pressing the F1 function key.  This help screen is context
  105.        sensitive.  It will display information pertaining to the
  106.        location of the program your at when the F1 key is pressed.
  107.  
  108.        You can also receive global help (display the on-line manual) by
  109.        pressing the CTRL F1 key sequence.  When this key sequence is
  110.        pressed a help index will be displayed.  From this index choose
  111.        the help topic by highlighting it and pressing the ENTER key.
  112.        You will be positioned into the on-line manual at the location
  113.        you selected.  Use the cursor control keys to scroll through the
  114.        manual.
  115.  
  116.  
  117.        EFilesF
  118.  
  119.        The File menu allows you to load, save and print files as well as
  120.        exit the program.  The commands available from the File menu are:
  121.  
  122.  
  123.           ELoading a fileF
  124.  
  125.        To load a file (already on disk) into the text buffer perform the
  126.        following steps:
  127.  
  128.        1.  Select ELoadF from the Files menu.  You will be prompted to
  129.            enter the file name.
  130.  
  131.        2.  Type the file name and press the ENTER key.  If the extension
  132.            is omitted then .ASM is assumed.
  133.  
  134.        3.  You can also select a file from a list by entering a file
  135.            filter.  i.e. type *.LST to display a list of files ending
  136.            with .LST.  You can use any DOS wild card characters to
  137.            generate the list.  If you press ENTER on a blank line then
  138.            .ASM is assumed and files ending with .ASM will be displayed.
  139.  
  140.        Once the file list is displayed use the cursor keys to highlight
  141.        the file you want to load and press the ENTER key.
  142.  
  143.  
  144.           ESave a fileF
  145.  
  146.        To save a file in the text buffer perform the following steps:
  147.  
  148.        1.  Select ESaveF from the File menu.
  149.  
  150.        2.  If this is new text (not loaded from a file) then you will be
  151.            prompted to enter a file name.
  152.  
  153.        3.  If the text already has a name then it will be saved under
  154.            that name automatically.
  155.  
  156.  
  157.           ESave a File Under a New NameF
  158.  
  159.        To save a file in the text buffer under a new file name perform
  160.        the following steps:
  161.  
  162.        1.  Select ESaveF as from the File menu.
  163.  
  164.        2.  Enter the name of the file the text buffer is to be saved in.
  165.  
  166.  
  167.           EExternal Memory BufferF
  168.  
  169.        The simulator allows you to execute commands which deal with
  170.        external memory (MOVX A,@R1 and MOVX @R1,A).  You can optionally
  171.        load values into an internal buffer used to simulate the memory
  172.        configuration depicted below:
  173.  
  174.                    +----------+                   +----------+
  175.                    |       BUS|-------------------|AD0-AD7   |
  176.                    |       ALE|-------------------|ALE       |
  177.                    |  8048    |    +--------+     | 64k ROM  |
  178.                    |        P2|----|P2      |     |          |
  179.                    |      PROG|----|PROG  P4|-----|A8-A11    |
  180.                    +----------+    |      P5|-----|A12-A15   |
  181.                                    |  8243  |     +----------+
  182.                                    +--------+                 
  183.  
  184.  
  185.                           External Memory Configuration
  186.  
  187.        this buffer is read only and does not save values resulting from
  188.        the MOVX @R1,A instruction.  To load a hex file into this buffer
  189.        perform the following steps:
  190.  
  191.        1.  Select EXMem fileF from the main File menu.
  192.  
  193.  
  194.        2.  Enter the name of the file containing the data.  This file
  195.            must be in Intel Hex format.  Like the load command pressing
  196.            ENTER with no name specified will display a list of files
  197.            with the .HEX extension.
  198.  
  199.        Once the file is selected the memory buffer will be allocated.
  200.        If there is insufficient memory to allocate the buffer then an
  201.        error will result and the data will not be loaded.  Once the
  202.        buffer has been allocated each time the MOVX A,@R1 instruction is
  203.        executed in the simulator the values will be retrieved from this
  204.        buffer.  If the buffer is not allocated you will be prompted to
  205.        enter a value each time the instruction is executed.
  206.  
  207.  
  208.           EPrinting the Text BufferF
  209.  
  210.        The 8048 Assembler/Simulator allows you to print the text within
  211.        the editor from within the program.  Before you can use your
  212.        printer with this program you must specify which port your
  213.        printer is attached to.  To specify the printer port select
  214.        Options from the main menu, then Printer Port, and select which
  215.        port (1, 2 or 3).  Refer to the Options portion of this manual
  216.        for more information on setting the printer port.  To print the
  217.        text in the text buffer select Print from the File menu.
  218.  
  219.  
  220.           EDOS ShellF
  221.  
  222.        You can temporarily suspend the 8048 program and go to DOS by
  223.        selecting EDOS ShellF from the File menu.  To return to the 8048
  224.        program type EEXITF at the DOS prompt.
  225.  
  226.  
  227.           EBurnF
  228.  
  229.        This command executes the DOS command BURN with the name of the
  230.        currently loaded source file as a parameter.  You can use this
  231.        command to run a batch file which can execute any number of
  232.        commands.  I previously used this command to convert a hex file
  233.        (corresponding to the current source file) to an object, and
  234.        loaded software to program an 8748.  You can use this command for
  235.        any set of DOS commands you wish.
  236.  
  237.  
  238.           EInfoF
  239.  
  240.        Displays the status of the text buffer.  Information on the name
  241.        of the current file, the size of the file, the size of the text
  242.        buffer and the number of bytes in the buffer unused.
  243.  
  244.  
  245.           EExiting the ProgramF
  246.  
  247.        You can exit (quit) the 8048 program by selecting EQuitF from the
  248.        EFile Fmenu.  You can also exit by pressing <ALT><X>.
  249.  
  250.  
  251.        EEditorF
  252.  
  253.        You can edit the text in the text buffer by selecting EEditF from
  254.        the main menu.  The editor will also be invoked automatically
  255.        after loading a file.  The text buffer will be empty if you
  256.        haven't load a file.  The editor is a limited full screen editor.
  257.        The editor does not provide word wrap and does not scroll
  258.        horizontally (the cursor stops at the rightmost screen position).
  259.  
  260.  
  261.           ESingle key commandsF
  262.  
  263.        The editor has the following single key commands:
  264.  
  265.        E<INSERT>F: Pressing the INSERT key toggles between insert and over
  266.        type mode (notice the cursor change shape).  In insert mode the
  267.        character under the cursor will be pushed to the right and the
  268.        character typed will be inserted at the cursor location.  In
  269.        over-type mode the character typed will replace the character
  270.        under the cursor.
  271.  
  272.        E<DELETE>F: Pressing the DELETE key will remove the character under
  273.        the cursor.  All characters to the right will be moved one
  274.        location to the left.
  275.  
  276.        E<HOME>F: Pressing the HOME key moves the cursor to the start of
  277.        the current line.
  278.  
  279.        E<END>F: Pressing the END key will move the cursor to the END of
  280.        the current line.
  281.  
  282.        E<PAGE UP>F: Pressing the PAGE UP key will display the previous
  283.        page of text.  If you are at the top of the text buffer then
  284.        pressing PAGE UP will be ignored.
  285.  
  286.  
  287.        E<PAGE DOWN>F: Pressing the PAGE DOWN key will display the next
  288.        page of text.  If you are at the bottom of the text buffer then
  289.        pressing PAGE DOWN will be ignored.
  290.  
  291.        E<UP ARROW>F: Pressing the UP ARROW key moves the cursor up one
  292.        line.
  293.  
  294.        E<DOWN ARROW>F: Pressing the DOWN ARROW key moves the cursor down
  295.        one line.
  296.  
  297.        E<RIGHT ARROW>F: Pressing the RIGHT ARROW key moves the cursor one
  298.        location to the right.  If the cursor is at the end of a line
  299.        then it will be positioned to the start of the next line.
  300.  
  301.        E<LEFT ARROW>F: Pressing the left arrow key moves the cursor one
  302.        location to the left.  If the cursor is at the start of a line
  303.        then the cursor is moved to the end of the previous line.
  304.  
  305.  
  306.           ECompound key commandsF
  307.  
  308.        The editor also has the following compound key commands:
  309.  
  310.        E<CTLR><PAGE UP>F: Pressing the CTRL and PAGE UP key sequence will
  311.        move the cursor to the top of the text buffer.
  312.  
  313.        E<CTRL><PAGE DOWN>F: Pressing the CTRL and PAGE DOWN keys sequence
  314.        will move the cursor to the bottom of the text buffer.
  315.  
  316.        E<CTRL><Q> <CTRL><F>F: Find string.  This command prompts you for a
  317.        string of characters.  The cursor will be positioned just after
  318.        the first occurrence of the specified search string.
  319.  
  320.        E<CTRL><L>F: Repeat last find.  This command positions the cursor
  321.        just after the next occurrence of the string specified by the
  322.        last Find string command.
  323.  
  324.  
  325.           EBlock command sequencesF
  326.  
  327.        The editor has the following block manipulation commands:
  328.  
  329.        E<CTRL><K> <CTRL><B>F: Mark start of block.  This command places
  330.        the start of block pointer at the current cursor location.
  331.  
  332.        E<CTRL><K> <CTRL><K>F: Mark the end of block.  This command places
  333.        the end of block pointer at the current cursor location.
  334.  
  335.  
  336.        E<CTRL><K> <CTRL><Y>F: Delete block.  This command deletes the
  337.        currently marked block (all text from start of block to end of
  338.        block).
  339.  
  340.        E<CTRL><K> <CTRL><W>F: Write block.  This command writes the
  341.        currently marked block to a file you specify.
  342.  
  343.        E<CTRL><K> <CTRL><R>F: Read block.  This command copies the text
  344.        from a file you specify to the text buffer starting at the
  345.        current cursor location.
  346.  
  347.        E<CTRL><K> <CTRL><C>F: Copy block.  This command copies the
  348.        currently marked block of text to the current cursor location.
  349.  
  350.  
  351.        EAssemblerF
  352.  
  353.        The source entered/loaded into the text buffer is assembled by
  354.        selecting EAssembleF from the main menu.  The number of errors
  355.        found in the source will be displayed on the screen.
  356.  
  357.        If any errors are located pressing any key will position you into
  358.        the editor at the location of the line containing the first
  359.        error.
  360.  
  361.        NOTE: Some errors will generate additional errors, usually the
  362.        first error is the actual offense.  If you fix an error and are
  363.        unable to see the problem with a subsequent error try
  364.        re-assembling the source.
  365.  
  366.        Once an error is fixed pressing F8 will position you on the line
  367.        with the next error.  Pressing F7 will position you on the line
  368.        containing the previous error.  The F7 and F8 commands reflect
  369.        the number of the offending line at assemble time.  If you add a
  370.        new line or delete an existing line the offending line no longer
  371.        has the same line number as the one in the error list.  For this
  372.        reason if you add or delete lines containing errors re-assemble
  373.        the source to re-generate an accurate error/line number list.  If
  374.        no errors are reported you can simulate the source.
  375.  
  376.        Refer to Appendix B - 8048 source format, for a description of
  377.        the layout of an 8048 assembly language program.
  378.  
  379.  
  380.        ESimulatorF
  381.  
  382.        The simulator allows you to step through your source code
  383.        watching the registers, flags, ports and RAM memory change.  You
  384.        can step into, step over and execute to source lines.  The
  385.        simulator is entered by selecting ESimulateF from the main menu.
  386.  
  387.        The simulator screen has five windows: source, flags, registers,
  388.        RAM memory and ports.  The active window contains the cursor and
  389.        is the source window when you first enter the simulator.
  390.  
  391.        The flag window contains the status of each of the processors
  392.        flags.  The flags are defined as follows:
  393.  
  394.             CY - Carry flag
  395.             AC - Alternate carry flag
  396.             BS - Register bank select
  397.             F0 - user flag zero
  398.             F1 - user flag one
  399.             MB - Memory bank select
  400.             T0 - Test pin zero
  401.             T1 - Test pin one
  402.             INT - Interrupt pin
  403.             IE - External interrupt enable flag
  404.             TOVF - Timer overflow flag
  405.             TCIE - Timer counter interrupt enable flag
  406.             TCE - Timer counter enable flag
  407.             T0E - T0 clock output enable flag
  408.  
  409.        The Register window contains the values currently in the
  410.        processors registers.  The registers are defined as follows:
  411.  
  412.           AC - Accumulator
  413.  
  414.           R0-R7 - General purpose register set
  415.  
  416.           SP - Stack pointer
  417.  
  418.           PSW - Program status word (this register reflects the state of
  419.                  some flags)
  420.  
  421.           PC - Program counter
  422.  
  423.           TCNT - Timer counter
  424.  
  425.        The port window displays the values each of the processors ports
  426.        (internal and external).  Ports P1, P2 and BUS reflect the state
  427.  
  428.  
  429.        on the processors external ports.  P4, P5, P6 and P7 reflect the
  430.        state of a single external 8243 I/O expander.
  431.  
  432.        The memory window reflects the values in the processors internal
  433.        RAM.  The number of RAM locations are dependent on the chip type
  434.        specified in the options menu.
  435.  
  436.        You can move from one window to the next by pressing the TAB or
  437.        SHIFT TAB keys.  Pressing the TAB key moves from window to window
  438.        in the clock wise direction.  Pressing SHIFT TAB moves from
  439.        window to window in the counter clock wise direction.
  440.  
  441.        The flags, registers, memory locations and ports can be modified
  442.        by highlighting the item to be modified and pressing the ENTER
  443.        key.  A window will be open prompting you to enter the new value.
  444.        Entering a blank line will set the item to zero.  When a flag is
  445.        selected its value is toggled (1 to 0 and 0 to 1).
  446.  
  447.        You can also modify flags, registers, RAM memory and ports from
  448.        any window by typing the command.  Start typing the command and a
  449.        window will open into which you finish typing the command.  The
  450.        following are a list of the commands:
  451.  
  452.        FLAG flag i
  453.          flag: is the name of the flag to modify.
  454.          i: is the new state of the flag (0 or 1).
  455.  
  456.        REGISTER reg value
  457.          reg: is the name of the register to be modified.
  458.          value: is any value/equation between 0 and 255.
  459.  
  460.        RAM location value
  461.          location: is a RAM location between 0 and 255.
  462.          value: is any value/equation between 0 and 255.
  463.  
  464.        PORT Pp value
  465.          Pp: is one of the ports displayed in the port window.
  466.          value: is any value/equation between 0 and 255.
  467.  
  468.        Pressing F7 will cause the next instruction to be executed.  If
  469.        the instruction is a CALL then the simulator will step into the
  470.        subroutine.
  471.  
  472.        Pressing F8 will cause the next instruction to be executed.  If
  473.        the instruction is a CALL then the simulator will execute all
  474.        instructions below (within) the subroutine being called.  You can
  475.        break the program execution by pressing the ESC key.  Once the
  476.  
  477.  
  478.        ESC key is pressed the source line being executed will be
  479.        displayed with the cursor on it.
  480.  
  481.        You can also specify an output radix for each register, port and
  482.        memory location.  To specify a radix other than its default
  483.        perform the following steps:
  484.  
  485.        1.  Highlight the entry who's radix is to be changed.  Notice the
  486.            additional command F9-Radix displayed when the cursor is in
  487.            the register, port or memory windows.
  488.  
  489.        2.  Press the F9 function key, this will open a window prompting
  490.            you for the desired radix.
  491.  
  492.        3.  Select the radix Decimal, Hexidecimal, ASCII or Binary.
  493.  
  494.        Once you have changed the display radix for any of the entries
  495.        they can be saved as the default.  To save the new radix for each
  496.        entry select Save configuration from the main Options menu.
  497.  
  498.  
  499.        EProgramF
  500.  
  501.        This menu allows you to control the 8748 programmer connected to
  502.        your printer port.  Before using the programmer you must inform
  503.        the software which printer port the programmer is attached to.
  504.        To do this refer to the section Programmer port in the Options
  505.        section of this manual.
  506.  
  507.  
  508.           EProgramming an 8748/49F
  509.  
  510.        The Program command within the Program menu will program an
  511.        8748/49 in the programmers ZIF socket with the code generated
  512.        from the currently loaded source file.  To program an 8748/49
  513.        preform the following steps:
  514.  
  515.        1.  If the source code to program the 8748/49 with is not in the
  516.            editor then load it via the EFile/LoadF command.
  517.  
  518.        2.  Select EProgram Ffrom the main menu.  The Program menu will be
  519.            displayed.
  520.  
  521.        3.  Select EProgram Ffrom the Program menu.
  522.  
  523.        4.  If the source code has already been assembled then proceed to
  524.            the next step.  If the source file has not been assembled or
  525.            has been modified since the last assembly it will be
  526.  
  527.  
  528.            assembled automatically.  If errors are encountered you will
  529.            be positioned into the editor with the cursor on the line
  530.            containing the first error.  Fix the problem and repeat
  531.            starting at step 1, otherwise continue to the next step.
  532.  
  533.        5.  You will be prompted to insert the 8748/49 into the
  534.            programmers ZIF socket.  Insert the 8748/49 into the
  535.            programmer and press any key.
  536.  
  537.        6.  The programmer will then check for an ALE signal from the
  538.            chip to be programmed. If the ALE signal is not present then
  539.            an error will be displayed and the program operation will be
  540.            aborted.  An absent ALE signal can be due to a miss socketed
  541.            or a damaged chip.
  542.  
  543.        7.  If the ALE signal is present the programmer will start
  544.            programming the chip.  As each byte is programmed it is also
  545.            verified by reading it back from the programmed chip.  If the
  546.            byte has been programmed properly then the next byte will be
  547.            programmed.  If the byte read back is not the same as the
  548.            byte programmed then an error will be displayed indicating
  549.            the address where the program process failed.  This will
  550.            continue until all the bytes of the assembled source code
  551.            have been programmed into the chip.
  552.  
  553.        CAUTION: Once programming has begun do not remove the 8748/49
  554.        from the socket.  If you want to abort the programming of the
  555.        chip press the ESC key.  You can then remove the chip.  Also do
  556.        not turn the programmer ON or OFF while an 8748/49 is in the
  557.        socket.  Doing so may damage the chip.
  558.  
  559.  
  560.           EBlank checkF
  561.  
  562.        The Blank check command will verify that the 8748/49 in the
  563.        programmers socket has been completely erased.  This is
  564.        accomplished by reading each byte within the chips EPROM and
  565.        comparing it to zero.  To blank check and 8748/49 perform the
  566.        following steps:
  567.  
  568.        1.  Select EProgramF  from the main menu.  The Program menu will be
  569.            displayed.
  570.  
  571.        2.  Select EBlank check Ffrom the program menu.  You will be
  572.            prompted to insert the 8748/49 into the programmers ZIF
  573.            socket.
  574.  
  575.  
  576.        3.  Insert the chip to be blank checked into the programmers ZIF
  577.            socket and press any key.  The chip will then be blank
  578.            checked.  If any memory locations are not blank then the
  579.            address of the first none blank location will be displayed
  580.            and the blank check process will be aborted.  If the chip is
  581.            blank then an error will not be displayed.
  582.  
  583.        CAUTION: Once the blank check has begun do not remove the 8748/49
  584.        from the socket.  If you want to abort the blank check press the
  585.        ESC key.  You can then remove the chip.  Also do not turn the
  586.        programmer ON or OFF while an 8748/49 is in the socket. Doing so
  587.        may damage the chip.
  588.  
  589.  
  590.           EVerifyF
  591.  
  592.        The Verify command will compare the contents of the chip in the
  593.        programmer to the contents of the code buffer (which contains the
  594.        currently assembled source code).  To verify that a chip contains
  595.        the same code as what is currently in the code buffer perform the
  596.        following steps:
  597.  
  598.        1.  Select EProgramF  from the main menu.  The Program menu will be
  599.            displayed.
  600.  
  601.        2.  Select EVerifyF from the program menu.  You will be prompted to
  602.            insert the 8748/49 into the programmers ZIF socket.
  603.  
  604.        3.  Insert the chip to be verified into the programmers ZIF
  605.            socket and press any key.  The chip will then be verified
  606.            against the current contents of the code buffer.  If any
  607.            memory locations are not the same then the address of the
  608.            first error will be displayed and the verify process will be
  609.            aborted.  If the chip contains the same code as what is in
  610.            the code buffer then an error will not be displayed.
  611.  
  612.        CAUTION: Once the verify process has begun do not remove the
  613.        8748/49 from the socket.  If you want to abort the verify process
  614.        press the ESC key.  You can then remove the chip.  Also do not
  615.        turn the programmer ON or OFF while an 8748/49 is in the socket.
  616.        Doing so may damage the chip.
  617.  
  618.        Each value programmed into the 8748/49 is verified as it is
  619.        burned.  If no errors are reported during the program sequence
  620.        then the chip has been programmed properly.  For this reason a
  621.        separate verify pass is not normally necessary.
  622.  
  623.  
  624.           ERead chipF
  625.  
  626.        Selecting Read chip from the Program menu loads the values
  627.        programmed into the 8748/49 into the code buffer.  This code
  628.        buffer is written to a file called READ.HEX in Intel Hex format.
  629.        To read the contents of an 8748/49 perform the following steps:
  630.  
  631.        1.  Select EProgramF  from the main menu.  The Program menu will be
  632.            displayed.
  633.  
  634.        2.  Select ERead chipF from the program menu.  You will be prompted
  635.            to insert the 8748/49 into the programmers ZIF socket.
  636.  
  637.        3.  Insert the chip to be read into the programmers ZIF socket
  638.            and press any key.  The contents of the chip will then be
  639.            read and written to the READ.HEX file.  
  640.  
  641.        CAUTION: Once the read process has begun do not remove the
  642.        8748/49 from the socket.  If you want to abort the read process
  643.        press the ESC key.  You can then remove the chip.  Also do not
  644.        turn the programmer ON or OFF while an 8748/49 is in the socket.
  645.        Doing so may damage the chip.
  646.  
  647.  
  648.        EOptionsF
  649.  
  650.        The  options menu allows you to specify your system
  651.        configuration.  These options include: printer port,  monitor
  652.        type, which files are to be generated at assembly time,  editor
  653.        tab width, default simulator output radix,  home (8048 program)
  654.        directory, the target MPU type (8048, 8049 or 8050), the printer
  655.        port the programmer is connected too, and allows you to save the
  656.        new configuration as the default.
  657.  
  658.  
  659.           EPrinter portF
  660.  
  661.        Before you can use the Print command you must specify which
  662.        printer port to use when printing.  To select a printer port
  663.        perform the following steps:
  664.  
  665.        1.  Select EPrinter portF from the main Options menu.
  666.  
  667.        2.  Select 1, 2 or 3 for LPT1, LPT2 or LPT3 respectively.
  668.  
  669.  
  670.           EMonitor typeF
  671.  
  672.        If you are using a monochrome monitor you will need to inform the
  673.        program to display the screens for a monochrome monitor.  To set
  674.        the screens for a monochrome monitor perform the following steps:
  675.  
  676.        1.  Select EMonitorF from the main Options menu.
  677.  
  678.        2.  Select the monitor type EMonochromeF or EColorF.
  679.  
  680.  
  681.           EFile generationF
  682.  
  683.        You can have various files generated during assembly of your
  684.        source code.  These files do not need to be generated to simulate
  685.        the source code.  Generating each of these files will slow down
  686.        the assembly process.  Each of the selections from the EFileF
  687.        EgenerationF menu are:
  688.  
  689.        EGenerate list fileF: setting this option to YES will cause the
  690.        assembler to generate a listing file of your source code.  The
  691.        list file contains line number, address, hex code and source code
  692.        for each line of your source.  The list file will have the same
  693.        file name as the file loaded into the buffer with an .LST
  694.        extension
  695.  
  696.        EGenerate symbol fileF: setting this option to YES will cause the
  697.        assembler to generate a file containing the names and values of
  698.        the symbols and labels contained in your source code.  This file
  699.        will have the same name as your source code with an .SYM
  700.        extension.
  701.  
  702.        EGenerate instruction countF: setting this option to YES will cause
  703.        the assembler to generate a file containing a list of 8048
  704.        instructions and the number of times each one was used in your
  705.        source code.
  706.  
  707.        EGenerate hex fileF: setting this option to YES will cause the
  708.        assembler to generate a file containing the assembled values of
  709.        your source code.  This file is written in Intel hex format.
  710.  
  711.  
  712.           ETab widthF
  713.  
  714.        You can specify the tab width used in the editor by selecting ETabF
  715.        EwidthF from the main Options menu.  Then enter the number of
  716.        spaces.  The editor does not insert tab characters into the text
  717.  
  718.  
  719.        buffer but inserts an appropriate number of blanks to fill to the
  720.        next tab stop.
  721.  
  722.  
  723.           ESimulator output radixF
  724.  
  725.        You can have the simulator display values in decimal, hexidecimal
  726.        or ASCII.  To select the output radix perform the following
  727.        steps:
  728.  
  729.        1.  Select ESet output radixF from the main Options menu.
  730.  
  731.        2.  Select the output radix Decimal, Hexidecimal or ASCII.
  732.  
  733.  
  734.           EHome directoryF
  735.  
  736.        You can run the this program from the same directory or a
  737.        different directory than where the 8048.EXE program resides (home
  738.        directory).  If you run the program from a directory other than
  739.        its home directory you must inform the program where to locate
  740.        its support files (i.e. help files).  This is not required but
  741.        you will not be able to get on-line help if the program does not
  742.        know where to locate the help files.  To specify the home
  743.        directory perform the following steps:
  744.  
  745.        1.  Select EHome directoryF from the main Options menu.  A window
  746.            will open prompting you for the home directory.
  747.  
  748.        2.  Enter the drive and path of the home directory. i.e. if the
  749.            8048.EXE file is located on drive C: and in the 8048
  750.            directory enter
  751.  
  752.                                      C:\8048
  753.  
  754.  
  755.           EChip typeF
  756.  
  757.        Setting the chip type allows you to specify the target CPU type.
  758.        This is useful if the size of your program becomes greater than
  759.        the memory available in the target processor.  i.e. the 8748 only
  760.        has 1024 bytes of program memory, if the ending address of your
  761.        program is greater than 1023 then it will not fit in the 8748.
  762.        Select the target chip type by performing the following steps:
  763.  
  764.        1.  Select EChip typeF from the main Options menu.
  765.  
  766.  
  767.        2.  Select the target CPU 8748, 8749 or 8050.  Selecting 8050
  768.            will require that your code be programmed into an external
  769.            ROM and configured as required.  This program can only
  770.            program the 8748 and 8749.
  771.  
  772.  
  773.           EProgrammer portF
  774.  
  775.        Before you can use the Programmer you must specify which printer
  776.        port it is connected to.  To select a printer port perform the
  777.        following steps:
  778.  
  779.        1.  Select EProgrammer portF from the main Options menu.
  780.  
  781.        2.  Select 1, 2 or 3 for LPT1, LPT2 or LPT3 respectively.
  782.  
  783.  
  784.           ESave configurationF
  785.  
  786.        You can save any of the changes you make in the EOptionsF menu as
  787.        defaults.  To do this select ESave configurationF from the main
  788.        Options menu.  This configuration file will be saved in the
  789.        current directory.  When this program is started the
  790.        configuration file within the current directory will be loaded.
  791.        This will allow you to have a different configuration for each
  792.        project you are working on.
  793.  
  794.  
  795.        EAppendix A - 8048 source formatF
  796.  
  797.        The assembler mnemonics, labels and symbols are not case
  798.        sensitive.  i.e. LOOP is the same as loop.  Each line of the
  799.        source code is segmented into the following parts:
  800.  
  801.        ELABELF: Each line of source can contain an optional label.  Labels
  802.        may contain letters, digits and an under score (_) character.
  803.        The label must start with a alphabetic character and terminate
  804.        with a colon ":".  Labels can be a maximum of eight characters
  805.        long.  The first time a label is encountered its name along with
  806.        the current value of the program counter is added to the label
  807.        table.  When the label is used as an operand the value of the
  808.        program counter associated with that label is substituted.
  809.  
  810.        EOPCODEF: Opcodes can be either a 8048 mnemonic or an assembler
  811.        directive.  A list of mnemonics and their operands are given in
  812.        appendix A.  Appendix C contains a list of assembler directives.
  813.  
  814.  
  815.        Opcodes must be separated from labels and operands by at least
  816.        one blank.
  817.  
  818.        EOPERANDF: Operands are added after a mnemonic or directive to
  819.        indicate what the operation is to be performed on.
  820.  
  821.  
  822.        i.e. in the instruction:           MOV    R1,#10
  823.  
  824.  
  825.        the operands are R1 and #10.  Multiple operands must be separated
  826.        by a comma, as in the example just given.
  827.  
  828.        ECOMMENTF: Comments begin with a semicolon and instruct the
  829.        assemble to ignore all text from the semicolon to the end of the
  830.        line.
  831.  
  832.        ESYMBOLF: A symbol is a character string which represents a
  833.        specific value.  i.e. the source line
  834.  
  835.                                  CR    EQU    13
  836.  
  837.        instructs the assembler to equate the value 13 with the character
  838.        sequence CR.  Symbols must conform to the same requirements as
  839.        labels (but they are terminated with a blank instead of a colon).
  840.  
  841.        EEQUATIONSF: The assembler has a built in equation evaluator.
  842.        Opcodes requiring an immediate value or directives requiring a
  843.        value can be constructed into an equation.  i.e. in the following
  844.        source line
  845.                                  MOV    A,#8*4
  846.  
  847.        8 * 4 is the equation which will be evaluated.  Equations can be
  848.        comprised of numbers, labels, symbols, operators and
  849.        parenthesized sub-equation.
  850.  
  851.        Numbers must start with a digit between 0 and 9.  Binary,
  852.        hexidecimal and decimal numbers can be specified by terminating
  853.        with a B, H or D respectively.  If the radix is not specified
  854.        then decimal is assumed.  i.e. 11110011b, 0F3h, 243d and 243 all
  855.        represent the same value.  Values for ASCII characters can be
  856.        specified by surrounding the character with single quotes, i.e.
  857.        'a' will cause the ASCII value for the character to be
  858.        substituted.
  859.  
  860.        Labels and symbols can be used if previously defined or equated
  861.        to a value.  Labels and symbols not defined in the prior to their
  862.  
  863.  
  864.        use can be used in expressions if their value is not required on
  865.        the first assembler pass.  i.e. in the source lines
  866.  
  867.                                  DB   'hello',CR,LF
  868.                                  CR   EQU  13
  869.                                  LF   EQU  10
  870.  
  871.        the value of CR and LF are not needed on the first pass, their
  872.        values can be substituted on the second pass.  The only exception
  873.        is the DS (Define Space) directive. An example of this is
  874.  
  875.                                  DS   BUFSIZE
  876.                        BUFSIZE   EQU  20
  877.  
  878.        on the first pass the assembler must know how many bytes to
  879.        allocate for the DS (Define Space) directive in order for it to
  880.        continue determining address values for subsequent labels.  For
  881.        this reason labels and symbols used in the DS directive must be
  882.        defined prior to their use.
  883.  
  884.        The available operators are listed below in order of president
  885.  
  886.           () parenthesized sub-equations
  887.           ^ exponential
  888.           * multiplication
  889.           / division
  890.           % modular
  891.           + addition
  892.           - subtraction
  893.           +, - unary operations
  894.  
  895.  
  896.        EAppendix B - Assembler DirectivesF
  897.  
  898.        The following is a list of directives supported by the 8048
  899.        Assembler:
  900.  
  901.        EORGF: Originate.  Resets the program counter (at assembly time) to
  902.        a specific value.  i.e. the source line
  903.  
  904.  
  905.                                  ORG   7
  906.  
  907.  
  908.        resets the program counter to the value 7.
  909.  
  910.        EEQUF: Equates a value with a character string (Symbol).  i.e. the
  911.        source line
  912.  
  913.                             LF    EQU   10
  914.  
  915.        adds the symbol LF to the symbol table with the value 10.  Each
  916.        time LF is used as an operand the value 10 will be substituted.
  917.        A symbol can be equated only once in the same source file.
  918.  
  919.        ESETF: Like EQU, SET sets a symbol to a specific value.  A symbols
  920.        value can be modified at more than one location in the source
  921.        file by the SET command.
  922.  
  923.        EDBF: Define byte.  This directive places a value or string of
  924.        values at the current program counter location (one per memory
  925.        location).  i.e.
  926.  
  927.                             NUM: DB   10
  928.                             MSG: DB   'HELLO WORLD',13,10
  929.  
  930.        are legal usage's of the DB directive.  Each value (or values)
  931.        will occupy one memory location.
  932.  
  933.        EDWF: Define word.  This directive places a value or string of
  934.        values at the current program counter location one per 2 bytes of
  935.        memory.  i.e.
  936.  
  937.                             NUM: DW   10
  938.                             MSG: DW   'HELLO WORLD',13,10
  939.  
  940.        are legal usage's of the DW directive.  Each value (or values)
  941.        will occupy two memory locations (in LS MS order).
  942.  
  943.  
  944.        EDSF: Define space.  This directive will allocated a specified
  945.        number of memory locations starting at the current program
  946.        counter location.  i.e.
  947.  
  948.                             BUF: DS   10
  949.  
  950.        will allocate 10 bytes of memory starting at the location
  951.        associated with BUF.
  952.  
  953.        EPAGE rowsF: where rows is optional.  If omitted the listing file
  954.        is addvanced to the top of the next page.  If specified this
  955.        value indicates the number of lines per page in the listing file
  956.        (e.g. PAGE 66).  The default lines per page is 66.
  957.  
  958.        E%TITLE "title string": Fthis directive allows you to specify the
  959.        title to be displayed in the listing file.  You can change the
  960.        title as often as you like.  But since the title is displayed at
  961.        the top of the first page the last defined title in your source
  962.        file will be displayed.  This is due to the fact that the title
  963.        is displayed before any lines of the source file are processed
  964.        for the second assembly pass.  They have all been processed for
  965.        the first pass.  The quotes around the title string are required.
  966.        Every character after the first quotation mark to the character
  967.        just before the next quotation mark will be included in the
  968.        title.
  969.  
  970.        E%SUBTTL "subtitle string": Fthis directive allows you to specify
  971.        the subtitle to be displayed in the listing file.  This subtitle
  972.        is displayed starting will the second page and can be changed as
  973.        often as you like.  The last declared subtitle will be displayed
  974.        in the title block of each page (except the first page).
  975.  
  976.        E%TOPMAR val: Fallows you to specify the number of lines in the top
  977.        margin.  This value must be greater than 4 and must be less than
  978.        the page length minus the bottom margin (defined below).
  979.  
  980.        E%BOTMAR val: Fallows you to specify the number of lines in the
  981.        bottom margin.  This value must be greater than 0 and must be
  982.        less than the page length minus the top margin (defined above).
  983.  
  984.        EENDF: Instructs the assembler to stop assembling the source file
  985.        (ignore any text which follows the END directive).  The END
  986.        directive is not required, the assembler will stop assembling
  987.  
  988.  
  989.        either when it reaches an END directive or the end of the text
  990.        buffer.
  991.  
  992.  
  993.        EAppendix C - 8048 Instruction SetF
  994.  
  995.                              EInstruction Set SummaryF
  996.  
  997.             EMnemonicF       EDescriptionF                   E Bytes  CyclesF
  998.  
  999.        EAccumulatorF
  1000.          ADD A,R           Add register to A                  1    1
  1001.          ADD A,@R          Add data memory to A               1    1
  1002.          ADD A,#data       Add immediate to A                 2    2
  1003.          ADDC A,R          Add register with carry            1    1
  1004.          ADDC A,@R         Add data memory with carry         1    1
  1005.          ADDC A,#data      Add data memory with carry         2    2
  1006.          ANL A,R           And register to A                  1    1
  1007.          ANL A,@R          And data memory to A               1    1
  1008.          ANL A,#data       And immediate to A                 2    2
  1009.          ORL A,R `         Or register to A                   1    1
  1010.          ORL A,@R          Or data memory to A                1    1
  1011.          ORL A,#data       Or immediate to A                  2    2
  1012.          XRL A,R           XOR register to A                  1    1
  1013.          XRL A,@R          XOR data memory to A               1    1
  1014.          XRL A,#data       XOR immediate to A                 2    2
  1015.          INC A             Increment A                        1    1
  1016.          DEC A             Decrement A                        1    1
  1017.          CLR A             Clear A                            1    1
  1018.          CPL A             Complement A                       1    1
  1019.          DA A              Decimal adjust A                   1    1
  1020.          SWAP A            Swap nibbles of A                  1    1
  1021.          RL A              Rotate A left                      1    1
  1022.          RLC A             Rotate A left through carry        1    1
  1023.          RR A              Rotate A right                     1    1
  1024.          RRC A             Rotate A right through carry       1    1
  1025.  
  1026.  
  1027.        EInput/OutputF
  1028.          IN A,P            Input port to A                    1    2
  1029.          OUTL P,A          Output A to port                   1    2
  1030.          ANL P,#data       And immediate to port              2    2
  1031.          ORL P,#data       Or immediate to port               2    2
  1032.          INS A,BUS         Input BUS to A                     1    2
  1033.          OUTL BUS,A        Output A to BUS                    1    2
  1034.          ANL BUS,#data     And immediate to BUS               2    2
  1035.          ORL BUS,#data     Or immediate to BUS                2    2
  1036.          MOVD A,P          Input Expander port to BUS         1    2
  1037.          MOVD P,A          Output A to Expander port          1    2
  1038.          ANLD P,A          And A to Expander port             1    2
  1039.          ORLD P,A          Or A to Expander port              1    2
  1040.  
  1041.        ERegistersF
  1042.          INC R             Increment register                 1    1
  1043.          INC @R            Increment data memory              1    1
  1044.          DEC R             Decrement register                 1    1
  1045.  
  1046.        EBranchF
  1047.          JMP addr          Jump unconditional                 2    2
  1048.          JMPP @A           Jump indirect                      1    2
  1049.          DJNZ R,addr       Decrement register and jump        2    2
  1050.          JC addr           Jump on carry = 1                  2    2
  1051.          JNC addr          Jump on carry = 0                  2    2
  1052.          JZ addr           Jump on A Zero                     2    2
  1053.          JNZ addr          Jump on A not Zero                 2    2
  1054.          JT0 addr          Jump on T0 = 1                     2    2
  1055.          JNT0 addr         Jump on T0 = 0                     2    2
  1056.          JT1 addr          Jump on T1 = 1                     2    2
  1057.          JNT1 addr         Jump on T1 = 0                     2    2
  1058.          JF0 addr          Jump on F0 = 1                     2    2
  1059.          JF1 addr          Jump on F1 = 1                     2    2
  1060.          JTF addr          Jump on timer flag = 1             2    2
  1061.          JNI addr          Jump on INT = 0                    2    2
  1062.          JBb addr          Jump on Accumulator Bit            2    2
  1063.  
  1064.        ESubroutineF
  1065.          CALL addr         Jump to subroutine                 2    2
  1066.          RET               Return                             1    2
  1067.          RETR              Return and restore status          1    2
  1068.  
  1069.  
  1070.        EFlagsF
  1071.          CLR C             Clear Carry                        1    1
  1072.          CPL C             Complement Carry                   1    1
  1073.          CLR F0            Clear Flag 0                       1    1
  1074.          CPL F0            Complement Flag 0                  1    1
  1075.          CLR F1            Clear Flag 1                       1    1
  1076.          CPL F1            Complement Flag 1                  1    1
  1077.  
  1078.        EData MovesF
  1079.          MOV A,R           Move register to A                 1    1
  1080.          MOV A,@R          Move data memory to A              1    1
  1081.          MOV A,#data       Move immediate to A                2    2
  1082.          MOV R,A           Move A to register                 1    1
  1083.          MOV @R,A          Move A to data memory              1    1
  1084.          MOV R,#data       Move immediate to register         2    2
  1085.          MOV @R,#data      Move immediate to data memory      1    1
  1086.          MOV A,PSW         Move PSW to A                      1    1
  1087.          MOV PSW,A         Move A to PSW                      1    1
  1088.          XCH A,R           Exchange A and register            1    1
  1089.          XCH A,@R          Exchange A and data memory         1    1
  1090.          XCHD A,@R         Exchange nibble of A and mem       1    1
  1091.          MOVX A,@R         Move external data memory to A     1    2
  1092.          MOVX @R,A         Move A to external data memory     1    2
  1093.          MOVP A,@A         Move to A from current page        1    2
  1094.          MOVP3 A,@A        Move to A from Page 3              1    2
  1095.  
  1096.        ETimer/CounterF
  1097.          MOV A,T           Read Timer/Counter                 1    1
  1098.          MOV T,A           Load Timer/Counter                 1    1
  1099.          STRT T            Start Timer                        1    1
  1100.          STRT CNT          Start Counter                      1    1
  1101.          STOP TCNT         Stop Timer/Counter                 1    1
  1102.          EN TCNTI          Enable Timer/Counter Interrupt     1    1
  1103.          DIS TCNTI         Disable Timer Counter Int.         1    1
  1104.  
  1105.        EControlF
  1106.          EN I              Enable external Interrupt          1    1
  1107.          DIS I             Disable external Interrupt         1    1
  1108.          SEL RB0           Select register bank 0             1    1
  1109.          SEL RB1           Select register bank 1             1    1
  1110.          SEL MB0           Select memory bank 0               1    1
  1111.          SEL MB1           Select memory bank 1               1    1
  1112.          ENT0 CLK          Enable clock output on T0          1    1
  1113.  
  1114.  
  1115.          NOP               No Operation                       1    1
  1116.  
  1117.  
  1118.           ESymbols and Abbreviations UsedF
  1119.  
  1120.        A         Accumulator
  1121.        AC        Auxiliary Carry
  1122.        addr      12-Bit Program Memory Address
  1123.        Bb        Bit Designator (b = 0 - 7)
  1124.        BS        Bank Switch
  1125.        BUS       BUS Port
  1126.        C         Carry
  1127.        CLK       Clock
  1128.        CNT       Event Counter
  1129.        CRR       Conversion Result Register
  1130.        D         Mnemonic for 4-Bit Digit (Nibble)
  1131.        data      8-Bit Number or Expression
  1132.        DBF       Memory Bank Flip-Flop
  1133.        F0, F1    Flag 0, Flag 1
  1134.        I         Interrupt
  1135.        P         Mnemonic for "in-page" Operation
  1136.        PC        Program Counter
  1137.        Pp        Port Designator (p = 1, 2 or 4 - 7)
  1138.        PSW       Program Status Word
  1139.        Ri        Data memory Pointer (i = 0, or 1)
  1140.        Rr        Register Designator (r = 0 - 7)
  1141.        SP        Stack Pointer
  1142.        T         Timer
  1143.        TF        Timer Flag
  1144.        T0, T1    Test 0, Test 1
  1145.        X         Mnemonic for External RAM
  1146.        #         Immediate Data Prefix
  1147.        @         Indirect Address Prefix
  1148.        $         Current Value of Program Counter
  1149.        (X)       Contents of X
  1150.        ((X))     Contents of Location Addressed by X
  1151.        <-        Is Replaced by
  1152.  
  1153.  
  1154.        0-5**     0-5 in 8048AH/8748H
  1155.                   0-6 in 8049AH/8749H
  1156.                   0-7 in 8050AH
  1157.  
  1158.  
  1159.           EInstruction Set DefinitionsF
  1160.  
  1161.        ADD  A,Rr
  1162.          Add Register Contents to Accumulator
  1163.          (A) <- (A) +(Rr)
  1164.  
  1165.        ADD  A,@Ri
  1166.          Add Data Memory Contents to Accumulator
  1167.          (A) <- (A) + ((Ri))
  1168.  
  1169.        ADD  A,#data
  1170.          Add Immediate Data to Accumulator
  1171.          (A) <- (A) + data
  1172.  
  1173.        ADDC A,Rr
  1174.          Add Carry and Register Contents to Accumulator
  1175.          (A) <- (A) + (Rr) + (C)
  1176.  
  1177.        ADDC A,@Ri
  1178.          Add Carry and Data Memory Contents to Accumulator
  1179.          (A) <- (A) + ((Ri)) + (C)
  1180.  
  1181.        ADDC A,#data
  1182.          Add Carry and Immediate Data to Accumulator
  1183.          (A) <- (A) + data = (C)
  1184.  
  1185.        ANL A,Rr
  1186.          Logical AND Accumulator with Register Mask
  1187.          (A) <- (A) AND (Rr)
  1188.  
  1189.        ANL  A,@Ri
  1190.          Logical AND Accumulator with memory Mask
  1191.          (A) <- (A) AND ((Ri))
  1192.  
  1193.        ANL  A,#data
  1194.          Logical AND Accumulator with Immediate Mask
  1195.          (A) <- (A) AND data
  1196.  
  1197.        ANL  BUS,#data
  1198.          Logical AND BUS with Immediate Mask
  1199.          (BUS) <- (BUS) AND data
  1200.  
  1201.        ANL  Pp,#data
  1202.          Logical AND Port 1-2 with Immediate Mask
  1203.          (Pp) <- (Pp) AND data
  1204.  
  1205.  
  1206.        ANLD Pp,A
  1207.          Logical AND Port 4-7 with Accumulator Mask
  1208.          (Pp) <- (Pp) AND (A0-3)
  1209.  
  1210.        CALL address
  1211.          Subroutine Call
  1212.          ((SP)) <- (PC), (PSW4-7)
  1213.          (SP) <- (SP) + 1
  1214.          (PC8-10) <- (addr8-10)
  1215.          (PC0-7) <- (addr0-7)
  1216.          (PC11) <- DBF
  1217.  
  1218.        CLR  A
  1219.          Clear Accumulator
  1220.          (A) <- 0
  1221.  
  1222.        CLR C
  1223.          Clear Carry Bit
  1224.          (C) <- 0
  1225.  
  1226.        CLR F1
  1227.          Clear Flag 1
  1228.          (F1) <- 0
  1229.  
  1230.        CLR F0
  1231.          Clear Flag 0
  1232.          (F0) <- 0
  1233.  
  1234.        CPL A
  1235.          Complement Accumulator
  1236.          (A) <- NOT(A)
  1237.  
  1238.        CPL C
  1239.          Complement Carry Bit
  1240.          (C) <- NOT(C)
  1241.  
  1242.        CPL F0
  1243.          Complement Flag 0
  1244.          (F0) <- NOT(F0)
  1245.  
  1246.        CPL F1
  1247.          Complement Flag 1
  1248.          (F1) <- NOT(F1)
  1249.  
  1250.        DA A
  1251.          Decimal Adjust Accumulator
  1252.  
  1253.  
  1254.        DEC A
  1255.          Decrement Accumulator
  1256.          (A) <- (A) - 1
  1257.  
  1258.        DEC Rr
  1259.          Decrement Register
  1260.          (Rr) <- (Rr) - 1
  1261.  
  1262.        DIS I
  1263.          Disable External Interrupt
  1264.  
  1265.        DIS TCNTI
  1266.          Disable Timer/Counter Interrupt
  1267.  
  1268.        DJNZ Rr,address
  1269.          Decrement Register and Test
  1270.          (Rr) <- (Rr) - 1
  1271.          If (Rr) not 0
  1272.            (PC0-7) <- address
  1273.  
  1274.        EN I
  1275.          Enable External Interrupt
  1276.  
  1277.        EN TCNTI
  1278.          Enable Timer/Counter Interrupt
  1279.  
  1280.        ENT0 CLK
  1281.          Enable Clock Output
  1282.  
  1283.        IN A,Pp
  1284.          Input Port or Data to Accumulator
  1285.          (A) <- (Pp)
  1286.  
  1287.        INC A
  1288.          Increment Accumulator
  1289.          (A) <- (A) + 1
  1290.  
  1291.        INC Rr
  1292.          Increment Register
  1293.          (Rr) <- (Rr) + 1
  1294.  
  1295.        INC @Ri
  1296.          Increment Data Memory Location
  1297.          ((Ri)) <- ((Ri)) + 1
  1298.  
  1299.        INS A,BUS
  1300.          Strobed Input of BUS Data to Accumulator
  1301.          (A) <- (BUS)
  1302.  
  1303.  
  1304.        JBb address
  1305.          Jump If Accumulator Bit is Set
  1306.          If Bb = 1
  1307.            (PC0-7) <- address
  1308.          If Bb = 0
  1309.            (PC)=(PC)+2
  1310.  
  1311.        JC address
  1312.          Jump If Carry Is Set
  1313.          If C = 1
  1314.            (PC0-7) <- address
  1315.          If C = 0
  1316.            (PC) = (PC) + 2
  1317.  
  1318.        JF0 address
  1319.          Jump If Flag 0 Is Set
  1320.          If F0 = 1
  1321.            (PC0-7) <- address
  1322.          If F0 = 0
  1323.            (PC) = (PC) + 2
  1324.  
  1325.        JF1 address
  1326.          Jump If Flag 1 Is Set
  1327.          If F1 = 1
  1328.            (PC0-7) <- address
  1329.          If F1 = 0
  1330.            (PC) = (PC) + 2
  1331.  
  1332.        JMP address
  1333.          Direct Jump within 2K Block
  1334.          (PC8-10) <- address 8-10
  1335.          (PC0-7) <- address 0-7
  1336.          (PC11) <- DBF
  1337.  
  1338.        JMPP @A
  1339.          Indirect Jump within Page
  1340.          (PC0-7) <- ((A))
  1341.  
  1342.        JNC address
  1343.          Jump If Carry Is Not Set
  1344.          If C = 0
  1345.            (PC0-7) <- address
  1346.          If C = 1
  1347.            (PC) = (PC) + 2
  1348.  
  1349.  
  1350.        JNI address
  1351.          Jump If Interrupt Input Is Low
  1352.          If I = 0
  1353.            (PC0-7) <- address
  1354.          If I = 1
  1355.            (PC) = (PC) + 2
  1356.  
  1357.        JNT0 address
  1358.          Jump If Test 0 Is Low
  1359.          If T0 = 0
  1360.            (PC0-7) <- address
  1361.          If T0 = 1
  1362.            (PC) = (PC) + 2
  1363.  
  1364.        JNT1 address
  1365.          Jump If Test 1 Is Low
  1366.          If T1 = 0
  1367.            (PC0-7) <- address
  1368.          If T1 = 1
  1369.            (PC) = (PC) + 2
  1370.  
  1371.        JNZ address
  1372.          Jump If Accumulator Is Not Zero
  1373.          If A <> 0
  1374.            (PC0-7) <- address
  1375.          If A = 0
  1376.            (PC) = (PC) + 2
  1377.  
  1378.        JTF address
  1379.          Jump If Timer Flag Is Set
  1380.          If TF = 1
  1381.            (PC0-7) <- address
  1382.          If TF = 0
  1383.            (PC) = (PC) + 2
  1384.  
  1385.        JT0 address
  1386.          Jump If Test 0 Is High
  1387.          If T0 = 1
  1388.            (PC0-7) <- address
  1389.          If T0 = 0
  1390.            (PC) = (PC) + 2
  1391.  
  1392.  
  1393.        JT1 address
  1394.          Jump If Test 1 Is High
  1395.          If T1 = 1
  1396.            (PC0-7) <- address
  1397.          If T1 = 0
  1398.            (PC) = (PC) + 2
  1399.  
  1400.        JZ address
  1401.          Jump If Accumulator Is Zero
  1402.          If A = 0
  1403.            (PC0-7) <- address
  1404.          If A <> 0
  1405.            (PC) = (PC) + 2
  1406.  
  1407.        MOV A,#data
  1408.          Move Immediate Data to Accumulator
  1409.          (A) <- data
  1410.  
  1411.        MOV A,PSW
  1412.          Move PSW Contents to Accumulator
  1413.          (A) <- (PSW)
  1414.  
  1415.        MOV A,Rr
  1416.          Move Register Contents to Accumulator
  1417.          (A) <- (Rr)
  1418.  
  1419.        MOV A,@Ri
  1420.          Move Data Memory Contents to Accumulator
  1421.          (A) <- ((Ri))     ; i = 0-1
  1422.  
  1423.        MOV A,T
  1424.          Move Timer/Counter Contents to Accumulator
  1425.          (A) <- (T)
  1426.  
  1427.        MOV PSW,A
  1428.          Move Accumulator Contents to PSW
  1429.  
  1430.        MOV Rr,A
  1431.          Move Accumulator Contents to Register
  1432.          (Rr) <- (A)
  1433.  
  1434.        MOV Rr,#data
  1435.          Move Immediate Data to Register
  1436.          (Rr) <- data
  1437.  
  1438.  
  1439.        MOV @Ri,A
  1440.          Move Accumulator Contents to Data Memory
  1441.          ((Ri)) <- (A)
  1442.  
  1443.        MOV @Ri,#data
  1444.          Move Immediate Data to Data Memory
  1445.          ((Ri)) <- data
  1446.  
  1447.        MOV T,A
  1448.          Move Accumulator Contents to Timer/Counter
  1449.          (T) <- (A)
  1450.  
  1451.        MOVD A,Pp
  1452.          Move Port 4-7 Data to Accumulator
  1453.          (A0-3) <- (Pp)
  1454.          (A4-7) <- 0
  1455.  
  1456.        MOVD Pp,A
  1457.          Move Accumulator Data to Port 4-7
  1458.          (Pp) <- (A0-3)
  1459.  
  1460.        MOVP A,@A
  1461.          Move Current Page Data to Accumulator
  1462.          (A) <- ((PC8-11+A))
  1463.  
  1464.        MOVP3 A,@A
  1465.          Move Page 3 Data to Accumulator
  1466.          (A) <- ((300h+A))
  1467.  
  1468.        MOVX A,@Ri
  1469.          Move External-Data-Memory Contents to Accumulator
  1470.          (A) <- ((Ri))
  1471.  
  1472.        MOVX @Ri,A
  1473.          Move Accumulator Contents to External-Data-Memory
  1474.          ((Ri)) <- (A)
  1475.  
  1476.        NOP
  1477.          The NOP Instruction (No Operation)
  1478.  
  1479.        ORL A,Rr
  1480.          Logical OR Accumulator With Register Mask
  1481.          (A) <- (A) OR (Rr)
  1482.  
  1483.        ORL A,@Ri
  1484.          Logical OR Accumulator With Memory Mask
  1485.          (A) <- (A) OR ((Ri))
  1486.  
  1487.  
  1488.        ORL A,#data
  1489.          Logical OR Accumulator With Immediate Mask
  1490.          (A) <- (A) OR data
  1491.  
  1492.        ORL BUS,#data
  1493.          Logical OR BUS With Immediate Mask
  1494.          (BUS) <- (BUS) OR data
  1495.  
  1496.        ORL Pp,#data
  1497.          Logical OR Port 1 or 2 With Immediate Mask
  1498.          (Pp) <- (Pp) OR data
  1499.  
  1500.        ORLD Pp,A
  1501.          Logical OR Port 4-7 With Accumulator Mask
  1502.          (Pp) <- (Pp) OR (A0-3)
  1503.  
  1504.        OUTL BUS,A
  1505.          Output Accumulator Data to BUS
  1506.          (BUS) <- (A)
  1507.  
  1508.        OUTL Pp,A
  1509.          Output Accumulator Data to Port 1 or 2
  1510.          (Pp) <- (A)
  1511.  
  1512.        RET
  1513.          Return Without PSW Restore
  1514.          (SP) <- (SP)-1
  1515.          (PC) <- ((SP))
  1516.  
  1517.        RETR
  1518.          Return With PSW Restore
  1519.          (SP) <- (SP) - 1
  1520.          (PC) <- ((SP))
  1521.          (PSW4-7) <- ((SP))
  1522.  
  1523.        RL A
  1524.          Rotate Left Without Carry
  1525.          (An+1) <- (An)
  1526.          (A0) <- (A7)
  1527.  
  1528.        RLC A
  1529.          Rotate Left Through Carry
  1530.          (An+1) <- (An)    n=0-6
  1531.          (A0) <- (C)
  1532.          (C) <- (A7)
  1533.  
  1534.  
  1535.        RR A
  1536.          Rotate Right Without Carry
  1537.          (An) <- (An+1)
  1538.          (A7) <- (A0)
  1539.  
  1540.        RRC A
  1541.          Rotate Right Through Carry
  1542.          (An) <- (An+1)
  1543.          (A7) <- (C)
  1544.          (C) <- (A0)
  1545.  
  1546.        SEL MB0
  1547.          Select Memory Bank 0
  1548.          (DBF) <- 0
  1549.  
  1550.        SEL MB1
  1551.          Select Memory Bank 1
  1552.          (DBF) <- 1
  1553.  
  1554.        SEL RB0
  1555.          Select Register Bank 0
  1556.          (BS) <- 0
  1557.  
  1558.        SEL RB1
  1559.          Select Register Bank 1
  1560.          (BS) <- 1
  1561.  
  1562.        STOP TCNT
  1563.          Stop Timer/Event-Counter
  1564.  
  1565.        STRT CNT
  1566.          Start Event-Counter
  1567.  
  1568.        STRT T
  1569.          Start Timer
  1570.  
  1571.        SWAP A
  1572.          Swap Nibbles Within Accumulator
  1573.          (A4-7) <-> (A0-3)
  1574.  
  1575.        XCH A,Rr
  1576.          Exchange Accumulator-Register Contents
  1577.          (A) <-> (Rr)
  1578.  
  1579.        XCH A,@Ri
  1580.          Exchange Accumulator and Data Memory Contents
  1581.          (A) <-> ((Ri))
  1582.  
  1583.  
  1584.        XCHD A,@Ri
  1585.          Exchange Accumulator and Data Memory 4-Bit Data
  1586.          (A0-3) <-> ((Ri0-3))
  1587.  
  1588.        XRL A,Rr
  1589.          Logical XOR Accumulator With Register Mask
  1590.          (A) <- (A) XOR (Rr)
  1591.  
  1592.        XRL A,@Ri
  1593.          Logical XOR Accumulator With Memory Mask
  1594.          (A) <- (A) XOR ((Ri))
  1595.  
  1596.        XRL A,#data
  1597.          Logical XOR Accumulator With Immediate Mask
  1598.          (A) <- (A) XOR data
  1599.  
  1600.