<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="hu">
	<id>http://wiki.amigaspirit.hu/index.php?action=history&amp;feed=atom&amp;title=Amiga_Machine_Language_%28Chapter_3%29</id>
	<title>Amiga Machine Language (Chapter 3) - Laptörténet</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.amigaspirit.hu/index.php?action=history&amp;feed=atom&amp;title=Amiga_Machine_Language_%28Chapter_3%29"/>
	<link rel="alternate" type="text/html" href="http://wiki.amigaspirit.hu/index.php?title=Amiga_Machine_Language_(Chapter_3)&amp;action=history"/>
	<updated>2026-04-23T00:31:29Z</updated>
	<subtitle>Az oldal laptörténete a wikiben</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>http://wiki.amigaspirit.hu/index.php?title=Amiga_Machine_Language_(Chapter_3)&amp;diff=1169&amp;oldid=prev</id>
		<title>Chain-Q: initial import as separate page</title>
		<link rel="alternate" type="text/html" href="http://wiki.amigaspirit.hu/index.php?title=Amiga_Machine_Language_(Chapter_3)&amp;diff=1169&amp;oldid=prev"/>
		<updated>2009-05-25T13:25:40Z</updated>

		<summary type="html">&lt;p&gt;initial import as separate page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Új lap&lt;/b&gt;&lt;/p&gt;&lt;div&gt;      Chapter 3.&lt;br /&gt;
      ---------&lt;br /&gt;
      3.Working With Assemblers.&lt;br /&gt;
      -------------------------&lt;br /&gt;
        The instructions that you&amp;#039;ve learned so far are incomprehensible&lt;br /&gt;
        to the MC68000 processor.The letters MOVE mean absolutely nothing&lt;br /&gt;
        to the processor-it needs the instructions in binary form.Every&lt;br /&gt;
        instruction must be coded in a word-which normally takes a lot of&lt;br /&gt;
        work.&lt;br /&gt;
        An assembler does this work for you.An assembler is a program that&lt;br /&gt;
        translates the instructions from text into the coresponding binary&lt;br /&gt;
        instructions.The text that is translated is called Mnemonic or&lt;br /&gt;
        Memcode.Its a lot easier working with text instructions-or does&lt;br /&gt;
        $4280 mean more to you than CLR.L D0?&lt;br /&gt;
        This chapter is about working with assemblers.We&amp;#039;ll describe the&lt;br /&gt;
        following three:&lt;br /&gt;
      ASSEM;&lt;br /&gt;
        This is the assembler from the Amiga&amp;#039;s development package.This&lt;br /&gt;
        assembler is quite powerful,but it is clearly inferior to its two&lt;br /&gt;
        fellow compilers in some areas.&lt;br /&gt;
      AssemPro;&lt;br /&gt;
        This is the Abacus assembler.It has a debugger in addition to the&lt;br /&gt;
        assembler.This lets you test and correct programs.In our opinion,&lt;br /&gt;
        it is the best one to use for writing and testing practice&lt;br /&gt;
        programs.For this reason,we wrote the programs in this book with&lt;br /&gt;
        this assembler.&lt;br /&gt;
      KUMA-SEKA;&lt;br /&gt;
        This is a popular assembler which also has a debugger.&lt;br /&gt;
&lt;br /&gt;
        All assemblers perform a similar task-they translate memcode,so&lt;br /&gt;
        that you can write a runable program to disk.To test the program&lt;br /&gt;
        directly,you need a debugger which is something Assem doesn&amp;#039;t&lt;br /&gt;
        have.&lt;br /&gt;
 &lt;br /&gt;
      3.1.The Development Assembler.&lt;br /&gt;
      -----------------------------&lt;br /&gt;
        This assembler is a plain disk assembler.That means that it can&lt;br /&gt;
        only assemble text files that are on disk and write the result&lt;br /&gt;
        back to disk.You can&amp;#039;t make direct input or test run the new&lt;br /&gt;
        program.&lt;br /&gt;
        You can call ASSEM from the CLI by typing ASSEM followed by&lt;br /&gt;
        parameters that specify what you wish the assembler to do.&lt;br /&gt;
        In the simplest case,you call it like this:&lt;br /&gt;
&lt;br /&gt;
             ASSEM Source -O Destination&lt;br /&gt;
&lt;br /&gt;
        Source is the filename of the file containing the program text.&lt;br /&gt;
        Destination is the name of the file that contains the results of&lt;br /&gt;
        assembling after the process is over.The &amp;quot;-O&amp;quot;means that the&lt;br /&gt;
        following name is used for the object file.&lt;br /&gt;
        There are several other parameters that can be passed.These are&lt;br /&gt;
        written with their option(ie-O),so that the assembler knows what&lt;br /&gt;
        to do with the file that you&amp;#039;ve told it to use.The following&lt;br /&gt;
        possible options must be followed by a filename.&lt;br /&gt;
&lt;br /&gt;
            -O    Object file&lt;br /&gt;
            -V    Error messages that occur during assembling are written&lt;br /&gt;
                  to a file.If this isn&amp;#039;t given,the error messages appear&lt;br /&gt;
                  in the CLI window.&lt;br /&gt;
            -L    The output of the assembled program lines are sent to&lt;br /&gt;
                  this file.You can also use&amp;quot;PRT:&amp;quot;to have it printed.&lt;br /&gt;
            -H    This file is read in at the beginning of the assembled&lt;br /&gt;
                  file and assembled along with it.&lt;br /&gt;
            -E    A file is created that contains lines which have EQU&lt;br /&gt;
                  instructions.&lt;br /&gt;
            -C    This option isn&amp;#039;t followed by a filename but by another&lt;br /&gt;
                  option.You can also use OPT to do this.The following&lt;br /&gt;
                  options are available:&lt;br /&gt;
                  &lt;br /&gt;
                  OPT S  A symbol table is created which contains all the&lt;br /&gt;
                         labels and their values.&lt;br /&gt;
                  OPT X  A cross reference list is created(where labels&lt;br /&gt;
                         are used).&lt;br /&gt;
                  OPT W  A number must follow this option.It sets the&lt;br /&gt;
                         ammount of workspace to be reserved.&lt;br /&gt;
&lt;br /&gt;
        The assembler creates an object file.This is not runnable.To make&lt;br /&gt;
        it runnable,you need to call the linker,ALINK.This program can&lt;br /&gt;
        link several assembled or compiled object files together to make a&lt;br /&gt;
        runnable program.In the simplest case,you enter the following&lt;br /&gt;
        instruction in the CLI:&lt;br /&gt;
&lt;br /&gt;
             ALINK Source TO Destination&lt;br /&gt;
&lt;br /&gt;
        Source is the object file produced by the assembler.Destination is&lt;br /&gt;
        the name of the program.It can be started directly.&lt;br /&gt;
&lt;br /&gt;
      3.2.AssemPro.&lt;br /&gt;
      ------------&lt;br /&gt;
        Abacus&amp;#039;s AssemPro is a package which combines editor,assembler and&lt;br /&gt;
        debugger in an easy to use package.&lt;br /&gt;
        The AssemPro Program is divided into several windows-one for the&lt;br /&gt;
        assembler,the editor,the debugger and several help functions.&lt;br /&gt;
        Producing a program is very easy:&lt;br /&gt;
          &lt;br /&gt;
          1)  Write the program with the editor and then store it to disk.&lt;br /&gt;
          2)  Start the assembler,so that the program is translated.&lt;br /&gt;
          3)  If desired,start the debugger,load the program and test it.&lt;br /&gt;
&lt;br /&gt;
        Within the debugger you can work through parts of the program or&lt;br /&gt;
        even through single commands.As after each one of these steps the&lt;br /&gt;
        debugger shows you the state of the registers and flags in the&lt;br /&gt;
        status register,you can easily try the programs presented in this&lt;br /&gt;
        book.&lt;br /&gt;
        You need to load AssemPro only once when working with machine&lt;br /&gt;
        language programs.Thus you don&amp;#039;t need to save back and to between&lt;br /&gt;
        editor,assembler,linker and debugger.&lt;br /&gt;
        AssemPro has an especially interesting function:the reassembler.&lt;br /&gt;
        With this debugger function you are able to convert runnable&lt;br /&gt;
        programs into the source text of the program.Once you have made&lt;br /&gt;
        the source text,you can edit the program using the editor and&lt;br /&gt;
        assemble it again.AssemPro is equipped with functions other&lt;br /&gt;
        assemblers miss.There are however,some differences you should know&lt;br /&gt;
        about.As many programs you see were written for the K-SEKA,be&lt;br /&gt;
        aware of one difference:the EVEN command.AssemPro uses the ALIGN&lt;br /&gt;
        instruction.&lt;br /&gt;
        Note,that when entering and assembling one of the programs in&lt;br /&gt;
        AssemPro you must make sure that you place an END directive at the&lt;br /&gt;
        end of the source text.&lt;br /&gt;
        The following is an introduction into working with AssemPro and&lt;br /&gt;
        the programs in this book.&lt;br /&gt;
        &lt;br /&gt;
        Start AssemPro normally,next click on the editor window and start&lt;br /&gt;
        typing in your program.If the program is on disk already,load it&lt;br /&gt;
        by selecting the appropriate menu or by using the key combination&lt;br /&gt;
        right &amp;lt;AMIGA&amp;gt; key and &amp;lt;o&amp;gt;.To do this you only need to ckick on the&lt;br /&gt;
        filename in the displayed requester and click on the OK gadget.&lt;br /&gt;
        Once you have typed in or loaded the program into the editor,you&lt;br /&gt;
        can assemble it.It is best to save your source before assembling.&lt;br /&gt;
        You assemble your program by clicking on the assembler window&lt;br /&gt;
        displayed above the editor window and pressing &amp;lt;AMIGA&amp;gt; and &amp;lt;a&amp;gt;.You&lt;br /&gt;
        can then choose how to locate your program in the memory.Remember&lt;br /&gt;
        that data used by the co-processors must be located in CHIP RAM.&lt;br /&gt;
        By clicking OK you start the assembler process.If you additionally&lt;br /&gt;
        select &amp;quot;breakable&amp;quot;,you can cancel the process by pressing both&lt;br /&gt;
        shift keys.If any error occurs during assembling,AssemPro uses a&lt;br /&gt;
        window to tell you this.Use this window to correct the error and&lt;br /&gt;
        continue with &amp;quot;Save and try again&amp;quot;.&lt;br /&gt;
        Now the runnable program is located in the Amiga&amp;#039;s memory.Use the&lt;br /&gt;
        menu item &amp;quot;Save as&amp;quot;to save it on disk.If you want to store it on&lt;br /&gt;
        RAM disk,click the given filename and enter RAM: in front of this&lt;br /&gt;
        name.In addition you can click on the menu item &amp;quot;ICON&amp;quot;and choose&lt;br /&gt;
        if you only want the program itself on disk but the icon too.Use&lt;br /&gt;
        this icon to start the program at a later time from Workbench.&lt;br /&gt;
        To test-run the program,you move the debugger window to the &lt;br /&gt;
        foreground of the screen(for instance by clicking on the back&lt;br /&gt;
        gadget).Use &amp;quot;Load&amp;quot;in the debugger menu or &amp;lt;AMIGA&amp;gt; &amp;lt;o&amp;gt; to call the&lt;br /&gt;
        select file window,where you select the saved program.The program&lt;br /&gt;
        is then loaded into the memory and its shown disassembled.&lt;br /&gt;
        The highlighted line(orange)represents the current state of the &lt;br /&gt;
        program counter.This is the line where the processor reads its&lt;br /&gt;
        next instruction,provided you tell the processor so.There are&lt;br /&gt;
        three ways to do so.&lt;br /&gt;
        The first one is to start the program with &amp;quot;Start&amp;quot;.This&lt;br /&gt;
        alternative does not enable you to stop the program if anything&lt;br /&gt;
        goes wrong.&lt;br /&gt;
        The second possibility,&amp;quot;Start breakable&amp;quot;is better in this respect.&lt;br /&gt;
        After the program starts,it continuously displays the registers&lt;br /&gt;
        contents on the left side of the window.In addition to that you&lt;br /&gt;
        can cancel the process by pressing &amp;lt;ESC&amp;gt;.Note that this only works&lt;br /&gt;
        if your program doesn&amp;#039;t use the &amp;lt;ESC&amp;gt;key itself.&lt;br /&gt;
        The third possibility enables you to only partly run your program.&lt;br /&gt;
        You can do this by stepping through the program or by placing&lt;br /&gt;
        breakpoints throughout the program.You place these by clicking on &lt;br /&gt;
        the desired address and then pressing &amp;lt;AMIGA&amp;gt; &amp;lt;b&amp;gt;.&amp;quot;BREAKPOINT&amp;quot;is&lt;br /&gt;
        displayed where the command was displayed before.If you start the&lt;br /&gt;
        program now,it stops whenever it comes across any breakpoints.&lt;br /&gt;
        You can start a small part of the program by moving the mouse&lt;br /&gt;
        pointer to the orange line,clicking the left button and holding it&lt;br /&gt;
        down while you drag the mouse pointer downward.If you release the&lt;br /&gt;
        button,the processor works through this part of the program,&lt;br /&gt;
        stopping at the line,where you positioned the mouse pointer.This&lt;br /&gt;
        is a very useful method to step by step test a program.&lt;br /&gt;
        AssemPro as another helpful window:the Table.This window lists the&lt;br /&gt;
        valid address methods for instructions and the parameters of Amiga&lt;br /&gt;
        functions.This is extremely helpful whenever you are not sure&lt;br /&gt;
        about one of the instructions.&lt;br /&gt;
&lt;br /&gt;
      3.3.The K-SEKA Assembler.&lt;br /&gt;
      ------------------------&lt;br /&gt;
        The SEKA assembler,from KUMA,has a simple text editor and a&lt;br /&gt;
        debugger in addition to the assembler.This program is controlled&lt;br /&gt;
        by simple instructions and it is easy to use.It is also multi-&lt;br /&gt;
        functional and quick,so it is great for small test and example&lt;br /&gt;
        programs.You can use it to write bigger programs once you&amp;#039;ve got&lt;br /&gt;
        use to the editor.Now lets look at the editor.&lt;br /&gt;
        To load a program as source code(text)into the editor,enter&amp;quot;r&amp;quot;&lt;br /&gt;
        (read).The program asks you for the name of the file with the&lt;br /&gt;
        &amp;quot;&amp;lt;FILENAME&amp;gt;&amp;quot;prompt.You then enter the name of the text file.If you&lt;br /&gt;
        created the file with SEKA,the file is stored on disk with&amp;quot;.s&amp;quot; on&lt;br /&gt;
        the end of its name.You don&amp;#039;t need to include the&amp;quot;.s&amp;quot;when you load&lt;br /&gt;
        the file.Thats taken care of automatically.(&amp;quot;s&amp;quot;stands for source.)&lt;br /&gt;
        You can store programs you&amp;#039;ve just written or modified by using&lt;br /&gt;
        the&amp;quot;w&amp;quot;instruction.The program asks you for the name.If you enter&lt;br /&gt;
        &amp;quot;Test&amp;quot;,the file is written to the disk with&amp;quot;Test.s&amp;quot;as its name.&lt;br /&gt;
        This is a normal text file in ASCII format.&lt;br /&gt;
        There are two ways to enter or change a programs:using the line&lt;br /&gt;
        editor or the screen editor.You can enter the second by hitting&lt;br /&gt;
        the &amp;lt;ESC&amp;gt;key.The upper screen section is then reserved for the&lt;br /&gt;
        editor.You can move with the cursor keys and change the text&lt;br /&gt;
        easily.The lines that you enter are inserted into the existing&lt;br /&gt;
        text and automatically numbered.By hitting the &amp;lt;ESC&amp;gt;key again,you&lt;br /&gt;
        leave the screen editor. &lt;br /&gt;
        There&amp;#039;s really not much to say about this editor.It&amp;#039;s really just&lt;br /&gt;
        for simple insertions and changes.Other functions are called in&lt;br /&gt;
        normal instruction mode,the mode in which&amp;quot;&amp;gt;&amp;quot;is the input prompt.&lt;br /&gt;
        The following instructions are available to you for text editing&lt;br /&gt;
        (&amp;lt;n&amp;gt;stands for a number.The meaning of the instructions is in&lt;br /&gt;
        parenthesis.)&lt;br /&gt;
&lt;br /&gt;
        Instruction        Function&lt;br /&gt;
        ----------------------------------------------------------------&lt;br /&gt;
        t(Target)          Puts the cursor on the highest line in the&lt;br /&gt;
                           text.&lt;br /&gt;
        t&amp;lt;n&amp;gt;               Puts the cursor on line n.&lt;br /&gt;
        b(Bottom)          Puts the cursor on the last line in the text.&lt;br /&gt;
        u(Up)              Go up one line.&lt;br /&gt;
        u&amp;lt;n&amp;gt;               Go up n lines.&lt;br /&gt;
        d(Down)            Go down one line.&lt;br /&gt;
        d&amp;lt;n&amp;gt;               Go down n lines.&lt;br /&gt;
        z(Zap)             Deletes the current line.&lt;br /&gt;
        z&amp;lt;n&amp;gt;               Deletes n lines starting at the cursor line.&lt;br /&gt;
        e(Edit)            Lets you edit the current line(and only that&lt;br /&gt;
                           line).&lt;br /&gt;
        e&amp;lt;n&amp;gt;               Edit from line n.&lt;br /&gt;
        ftext(Find)        Searches for the text entered starting at the&lt;br /&gt;
                           current line.The case of a letter makes a&lt;br /&gt;
                           difference,so make sure to enter it correctly.&lt;br /&gt;
                           Blanks that appear after the f are looked for&lt;br /&gt;
                           as well!&lt;br /&gt;
        f                  Continues searching beyond the text that was&lt;br /&gt;
                           previously given.&lt;br /&gt;
        i(Insert)          Starts the line editor.Now you can enter a&lt;br /&gt;
                           program line by line.However,you can&amp;#039;t use the&lt;br /&gt;
                           cursor to move into another line.Line numbers&lt;br /&gt;
                           are generated automatically.The lines that&lt;br /&gt;
                           follow are moved down,not erased.&lt;br /&gt;
        ks(Kill Source)    The source text is deleted if you answer&amp;quot;y&amp;quot;&lt;br /&gt;
                           when the program asks if you are sure.Otherwise&lt;br /&gt;
                           nothing happens.&lt;br /&gt;
        o(Old)             Cancels the &amp;quot;ks&amp;quot;function and saves the old text&lt;br /&gt;
        p(Print)           Prints the current line.&lt;br /&gt;
        p&amp;lt;n&amp;gt;               Prints n lines starting at cursor line.&lt;br /&gt;
&lt;br /&gt;
        Those are the K-SEKA&amp;#039;s editor functions.In combination with the&lt;br /&gt;
        screen editor,they allow for simple text editing.You can,for&lt;br /&gt;
        example,delete the current line(and other lines)while working in&lt;br /&gt;
        the screen editor by hitting &amp;lt;ESC&amp;gt; to get into instruction mode&lt;br /&gt;
        and then entering&amp;quot;z&amp;quot;(or &amp;quot;z&amp;lt;n&amp;gt;&amp;quot;).&lt;br /&gt;
        If you&amp;#039;d like to edit all lines that contain &amp;quot;trap&amp;quot;,for example,&lt;br /&gt;
        you can do the following:&lt;br /&gt;
&lt;br /&gt;
           -Jump to the beginning of the text using &amp;quot;t&amp;quot;&lt;br /&gt;
           -Search for a &amp;quot;trap&amp;quot;instruction by entering &amp;quot;ftrap&amp;quot; in the&lt;br /&gt;
            first line.&lt;br /&gt;
           -Press &amp;lt;ESC&amp;gt; and edit the line.&lt;br /&gt;
           -Press &amp;lt;ESC&amp;gt; again to get into instruction mode.&lt;br /&gt;
           -Search using &amp;quot;f&amp;quot;,&amp;lt;ESC&amp;gt;,etc.until you get to the end of the&lt;br /&gt;
            text.&lt;br /&gt;
&lt;br /&gt;
        This sounds very clumsy,but in practise it works quite well and&lt;br /&gt;
        goes quickly.Experiment with the editor bit,so you can get use to&lt;br /&gt;
        it.&lt;br /&gt;
        Now here are the instructions for working with disks:&lt;br /&gt;
&lt;br /&gt;
        Instruction             Function&lt;br /&gt;
        -----------------------------------------------------------------&lt;br /&gt;
        v(View files)           Look at the disk&amp;#039;s directory.You can also&lt;br /&gt;
                                include the disk drive or subdirectory&lt;br /&gt;
                                that interests you.For example,&amp;quot;vc&amp;quot;causes&lt;br /&gt;
                                the &amp;quot;c&amp;quot;subdirectory to be listed and makes&lt;br /&gt;
                                it the current directory.&lt;br /&gt;
        kf(Kill file)           The program asks for the name of the file.&lt;br /&gt;
                                The file is deleted(and you aren&amp;#039;t asked&lt;br /&gt;
                                if your sure either-so be careful).&lt;br /&gt;
        r(Read)                 After inputting this instruction,you&amp;#039;ll be&lt;br /&gt;
                                asked which file to load(FILENAME&amp;gt;).The&lt;br /&gt;
                                file that you specify is then loaded.If&lt;br /&gt;
                                only &amp;quot;r&amp;quot;is entered,a text file is loaded&lt;br /&gt;
                                in the editor.&lt;br /&gt;
        ri(Read Image)          Loads a file into memory.After you&amp;#039;ve&lt;br /&gt;
                                entered the filename,SEKA asks for the&lt;br /&gt;
                                address the file should begin at in memory&lt;br /&gt;
                                (BEGIN&amp;gt;)and the highest address that&lt;br /&gt;
                                should be used for the file(END&amp;gt;).&lt;br /&gt;
        rx(Read from Auxillary) This works just like the &amp;quot;ri&amp;quot;function&lt;br /&gt;
                                except that it reads from the serial port&lt;br /&gt;
                                instead of from disk(You don&amp;#039;t need a file&lt;br /&gt;
                                name).&lt;br /&gt;
        rl(Read Link file)      This instruction reads in a SEKA created &lt;br /&gt;
                                link file.First you&amp;#039;ll be asked if you are&lt;br /&gt;
                                sure,because the text buffer is erased&lt;br /&gt;
                                when the link file is loaded.&lt;br /&gt;
        w(Write)                After entering this instruction,you&amp;#039;ll be &lt;br /&gt;
                                asked for the name of the file the text&lt;br /&gt;
                                should be written to.A&amp;quot;.s&amp;quot;is automatically&lt;br /&gt;
                                appended to the name,so that it can be &lt;br /&gt;
                                recognized as a SEKA file.&lt;br /&gt;
        wi(Write Image)         Stores a block of memory to disk after the&lt;br /&gt;
                                name,beginning and end are entered.&lt;br /&gt;
        wx(Write to Auxillary)  This is similar to&amp;quot;wi&amp;quot;;the only difference&lt;br /&gt;
                                is that the output is to the serial inter-&lt;br /&gt;
                                face.&lt;br /&gt;
        wl(Write Link file)     Asks for the name and then stores a link &lt;br /&gt;
                                file that was assembled with the&amp;quot;I&amp;quot;option&lt;br /&gt;
                                to disk.If this isn&amp;#039;t available,the&lt;br /&gt;
                                message &amp;quot;* * Link option not specified&amp;quot;&lt;br /&gt;
                                appears.&lt;br /&gt;
&lt;br /&gt;
        Once you&amp;#039;ve typed in or loaded a program,you can call the&lt;br /&gt;
        assembler and have the program translated.Just enter&amp;quot;a&amp;quot;to do so.&lt;br /&gt;
        You&amp;#039;ll then be asked which options you want to use.If you enter a&lt;br /&gt;
        &amp;lt;RETURN&amp;gt;,the program is assembled normally-ie the results of&lt;br /&gt;
        translating a program in memory is stored in memory.Then the&lt;br /&gt;
        program can be executed straight away.&lt;br /&gt;
        You can enter one or more of the following options,however:&lt;br /&gt;
&lt;br /&gt;
          v     The output of the results goes to the screen.&lt;br /&gt;
          p     or&lt;br /&gt;
          e     goes to the printer with a title line.&lt;br /&gt;
          h     The output stops after every page and waits for a key&lt;br /&gt;
                stroke.This is useful for controlling output to the screen&lt;br /&gt;
                or for putting new sheets of paper in the printer.&lt;br /&gt;
          o     This option allows the assembler to optimize all possible&lt;br /&gt;
                branch instructions.This allows the program code to be&lt;br /&gt;
                shorter than it would otherwise be.Several messages appear&lt;br /&gt;
                but you can ignore them.&lt;br /&gt;
          l     This option causes linkable code to be produced.You can&lt;br /&gt;
                save it with the&amp;quot;wl&amp;quot;instruction and read it with the &amp;quot;rl&amp;quot;&lt;br /&gt;
                instruction.&lt;br /&gt;
&lt;br /&gt;
        A symbol table is included at the end of the listing if desired.&lt;br /&gt;
        The table contains all labels and their values.It also contains&lt;br /&gt;
        macro names.A macro allows several instructions to be combined in&lt;br /&gt;
        to a single instruction.&lt;br /&gt;
        For example,suppose you wrote a routinethat outputs the text that &lt;br /&gt;
        register A0 points to.Every time you need to use the routine,you&lt;br /&gt;
        must type:&lt;br /&gt;
&lt;br /&gt;
            lea  text,a0      ;pointer to text in A0&lt;br /&gt;
            bsr  pline        ;output text&lt;br /&gt;
&lt;br /&gt;
        You can simplify this by defining a macro for this function.To do&lt;br /&gt;
        this,put the following at the beginning of the program:&lt;br /&gt;
&lt;br /&gt;
            print:macro     ;Macro with the name &amp;quot;Print&amp;quot;&lt;br /&gt;
             lea  ?1,a0     ;Parameter in A0&lt;br /&gt;
             bsr  pmsg      ;Output text&lt;br /&gt;
            endm            ;End of macro&lt;br /&gt;
&lt;br /&gt;
        Now,you can simply write the following in your program:&lt;br /&gt;
&lt;br /&gt;
            print text       ;Output text&lt;br /&gt;
&lt;br /&gt;
        This line is replaced using the macro during assembly.The&lt;br /&gt;
        parameter &amp;quot;text&amp;quot;is inserted where &amp;quot;?1&amp;quot;appears in the macro.You can&lt;br /&gt;
        have several parameters in a macro.You give them names like &amp;quot;?2&amp;quot;,&lt;br /&gt;
        &amp;quot;?3&amp;quot;,etc...&lt;br /&gt;
        You can also decide whether you&amp;#039;d like to see the macros in the&lt;br /&gt;
        output listing of the assembler.This is one of the pseudo-ops that&lt;br /&gt;
        are available in the assembler.The SEKA assembler has the&lt;br /&gt;
        following pseudo-ops:&lt;br /&gt;
&lt;br /&gt;
          dc      Defines one or more data items that should appear in&lt;br /&gt;
                  this location in the program.The word length can be&lt;br /&gt;
                  specified with .B,.W,or .L-and if this is left off, .B&lt;br /&gt;
                  is used.Text can be entered in question marks or&lt;br /&gt;
                  apostrophes.For example:dc.b &amp;quot;Hello&amp;quot;,10,13,0&lt;br /&gt;
          blk     Reserves a number of bytes,words or long words,depending&lt;br /&gt;
                  on whether .B,.W,or .L is chosen.The first parameter&lt;br /&gt;
                  specifies the number of words to be reserved.The second&lt;br /&gt;
                  (which is optional)is used to fill the memory area.For&lt;br /&gt;
                  example:blk.w 10,0&lt;br /&gt;
          org     The parameter that follows the org instruction is the&lt;br /&gt;
                  address from which the (absolute) program should be&lt;br /&gt;
                  assembled.For example: org $40000&lt;br /&gt;
          code    Causes the program to be assembled in relative mode,the&lt;br /&gt;
                  mode in which a program is assembled starting at address&lt;br /&gt;
                  0.The Amiga takes care of the new addressing after the&lt;br /&gt;
                  program is loaded.&lt;br /&gt;
          data    This means that from here on only data appear.This can&lt;br /&gt;
                  be left out.&lt;br /&gt;
          even    Makes the current address even by sometimes inserting a&lt;br /&gt;
                  fill byte.&lt;br /&gt;
          odd     The opposite of even-it makes the address odd.&lt;br /&gt;
          end     Assembling ends here.&lt;br /&gt;
          equ or  Used for establishing the value of a label&lt;br /&gt;
          =       For example: Value=123 or Value:equ 123&lt;br /&gt;
          list    Turns the output on again(after nlist).You can use the&lt;br /&gt;
                  following parameters to influence the output:&lt;br /&gt;
                    c    Macro calls&lt;br /&gt;
                    d    Macro definitions&lt;br /&gt;
                    e    Macro expansion of the program&lt;br /&gt;
                    x    Code expansions&lt;br /&gt;
                  For example: list e&lt;br /&gt;
          nlist   Turns off output.You can use the same parameters here as&lt;br /&gt;
                  with &amp;quot;list&amp;quot;.&lt;br /&gt;
          page    Causes the printer to execute a page feed,so that you&amp;#039;ll&lt;br /&gt;
                  start a new page.&lt;br /&gt;
          if      The following parameter decides whether you should&lt;br /&gt;
                  continue assembling.If it is zero,you won&amp;#039;t continue&lt;br /&gt;
                  assembling.&lt;br /&gt;
          else    If the &amp;quot;if&amp;quot;parameter is zero,you&amp;#039;ll begin assembling&lt;br /&gt;
                  here.&lt;br /&gt;
          endif   End of conditional assembling.&lt;br /&gt;
          macro   Start of a macro definition.&lt;br /&gt;
          endm    End of macro definition.&lt;br /&gt;
          ?n      The text in the macro that is replaced by the nth&lt;br /&gt;
                  parameter in the calling line.&lt;br /&gt;
          ?0      Generates a new three digit number for each macro call-&lt;br /&gt;
                  this is very useful for local labels.&lt;br /&gt;
                  For example: x?0:bsr pmsg&lt;br /&gt;
          illegal Produces an illegal machine language instruction.&lt;br /&gt;
          globl   Defines the following label as globel when the &amp;quot;I&amp;quot;option&lt;br /&gt;
                  of the assembler is chosen.&lt;br /&gt;
&lt;br /&gt;
        Once you&amp;#039;ve assembled your program,the program code is in memory.&lt;br /&gt;
        Using the &amp;quot;h&amp;quot;instruction,you can find out how large the program is&lt;br /&gt;
        and where it is located in memory.The beginning and end address is&lt;br /&gt;
        given in hex and the length in decimal(according to the last&lt;br /&gt;
        executed operations):&lt;br /&gt;
&lt;br /&gt;
           Work   The memory area defined in the beginning&lt;br /&gt;
           Src    Text in memory&lt;br /&gt;
           RelC   Relocation table of the program&lt;br /&gt;
           RelD   Relocation table of the memory area&lt;br /&gt;
           Code   Program code produced&lt;br /&gt;
           Data   The program&amp;#039;s memory area&lt;br /&gt;
&lt;br /&gt;
        You&amp;#039;ll find program in memory at the location given by Code.It&amp;#039;s a&lt;br /&gt;
        pain to have to enter this address whenever you want to start the&lt;br /&gt;
        program.It make&amp;#039;s good sense to mark the beginning of the program&lt;br /&gt;
        with a label(for example,&amp;quot;run:&amp;quot;).You can use the &amp;quot;g&amp;quot;instruction to&lt;br /&gt;
        run the program as follows:&lt;br /&gt;
&lt;br /&gt;
           g run&lt;br /&gt;
&lt;br /&gt;
        The&amp;quot;g&amp;quot;(GO)instruction is one of SEKA&amp;#039;s debugger instrucions.Heres&lt;br /&gt;
        an overview:&lt;br /&gt;
&lt;br /&gt;
         x    Output all registers.&lt;br /&gt;
         xr   Output and change of registers(ie xd0)&lt;br /&gt;
         gn   Jump to address n.You`ll be asked for break points,addresses&lt;br /&gt;
              at which the program should be terminate.&lt;br /&gt;
         jn   This is similar to the one above-a JSR is used to jump into&lt;br /&gt;
              the program.The program must end with a RTS instruction.&lt;br /&gt;
         qn   Output the memory starting at address n.You can also specify&lt;br /&gt;
              the word length.For example: q.w $10000&lt;br /&gt;
         nn   Disassembled output starting at address n.&lt;br /&gt;
         an   Direct assembling starting at address n.Direct program&lt;br /&gt;
              instructions are entered.&lt;br /&gt;
         nn   Modify the contents of memory starting at address n.Here too&lt;br /&gt;
              the word length can be given.You can terminate input with&lt;br /&gt;
              the &amp;lt;ESC&amp;gt; key.&lt;br /&gt;
         sn   Executes the program instruction that the PC points to.After&lt;br /&gt;
              you enter this instruction,n program steps are executed.&lt;br /&gt;
         f    Fill a memory area.You can choose the word width.All the&lt;br /&gt;
              needed parameters are asked for individually.&lt;br /&gt;
         c    Copies one memory area to another.All the needed parameters&lt;br /&gt;
              are asked for individually.&lt;br /&gt;
         ?    Outputs the value of an expression or a label.&lt;br /&gt;
              For example: ?run+$1000-256&lt;br /&gt;
         a    Sets an instruction sequence that is passed to the program&lt;br /&gt;
              when it starts as if it were started from CLI with this&lt;br /&gt;
              sequence.&lt;br /&gt;
         !    Leaves the SEKA assembler after being asked if your sure.&lt;br /&gt;
&lt;br /&gt;
        You saw some of the calculations like SEKA can make in the &amp;quot;?&amp;quot;&lt;br /&gt;
        example.You can also use them in programming.The folowing&lt;br /&gt;
        operations work in SEKA:&lt;br /&gt;
&lt;br /&gt;
           +  Addition&lt;br /&gt;
           -  Subtraction&lt;br /&gt;
           *  Multiplication&lt;br /&gt;
           /  Division&lt;br /&gt;
           &amp;amp;  Logic AND&lt;br /&gt;
           !  Logic OR&lt;br /&gt;
           ~  EXclusive OR (XOR) &lt;br /&gt;
&lt;br /&gt;
        These operations can also be combined.You can choose the counting&lt;br /&gt;
        system.A &amp;quot;$&amp;quot;stands for hexadecimal,&amp;quot;@&amp;quot;for octal,and &amp;quot;%&amp;quot;for binary.&lt;br /&gt;
        If these symbols aren`t used,the number is interpreted as a&lt;br /&gt;
        decimal number.&lt;br /&gt;
        Lets go back to the debugger.As mentioned,after entering &amp;quot;g&lt;br /&gt;
        address&amp;quot;,you`ll be asked for break points.You can enter up to 16&lt;br /&gt;
        addresses at which the program halts.If you don`t enter break&lt;br /&gt;
        points,but instead hit &amp;lt;RETURN&amp;gt;,the program must end with an&lt;br /&gt;
        ILLEGAL instruction.If it ends instead with a RTS,the next return&lt;br /&gt;
        address from the stack is retrieved and jumped to.This is usually&lt;br /&gt;
        address 4 which causes SEKA to come back with &amp;quot;**Illegal&lt;br /&gt;
        Instruction at $000004&amp;quot;,but theres no guarantee that it will.Your&lt;br /&gt;
        computor can end up so confused that it can`t function.&lt;br /&gt;
        The SEKA program puts an ILLEGAL instruction in the place&lt;br /&gt;
        specified as break points after saving the contents of these&lt;br /&gt;
        locations.If the processor hits an illegal instruction,it jumps&lt;br /&gt;
        back to the debugger by using the illegal instruction vector that&lt;br /&gt;
        SEKA set up earlier.Then SEKA repairs the modified memory&lt;br /&gt;
        locations and then displays the status line.Here you can find out&lt;br /&gt;
        where the program terminated.&lt;br /&gt;
        Using break points is a good technique for finding errors in the&lt;br /&gt;
        program.You can,for example,put a break point in front of a&lt;br /&gt;
        routine that you`re not sure about and start the program.When the&lt;br /&gt;
        program aborts at this spot,you can go through the routine step by&lt;br /&gt;
        step using the &amp;quot;s&amp;quot;option.Then you can watch what happens to the&lt;br /&gt;
        status line after each instruction and find the mistake.&lt;br /&gt;
        Program errors are called bugs.That`s why the program that finds&lt;br /&gt;
        them is called a debugger.&lt;/div&gt;</summary>
		<author><name>Chain-Q</name></author>
	</entry>
</feed>