<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.temlib.org/AtariForumWiki/index.php?action=history&amp;feed=atom&amp;title=Earxtutchap8</id>
	<title>Earxtutchap8 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.temlib.org/AtariForumWiki/index.php?action=history&amp;feed=atom&amp;title=Earxtutchap8"/>
	<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=Earxtutchap8&amp;action=history"/>
	<updated>2026-05-13T17:02:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.2</generator>
	<entry>
		<id>https://www.temlib.org/AtariForumWiki/index.php?title=Earxtutchap8&amp;diff=13034&amp;oldid=prev</id>
		<title>&gt;Wongck at 15:31, 12 October 2011</title>
		<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=Earxtutchap8&amp;diff=13034&amp;oldid=prev"/>
		<updated>2011-10-12T15:31:30Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:31, 12 October 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l210&quot;&gt;Line 210:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 210:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Back to [[ASM_Tutorial]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Back to [[ASM_Tutorial]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Programming&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Making optimized assembly code by Earx&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>&gt;Wongck</name></author>
	</entry>
	<entry>
		<id>https://www.temlib.org/AtariForumWiki/index.php?title=Earxtutchap8&amp;diff=13033&amp;oldid=prev</id>
		<title>&gt;Silver Surfer: Added category</title>
		<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=Earxtutchap8&amp;diff=13033&amp;oldid=prev"/>
		<updated>2009-05-02T17:13:20Z</updated>

		<summary type="html">&lt;p&gt;Added category&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:13, 2 May 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l210&quot;&gt;Line 210:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 210:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Back to [[ASM_Tutorial]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Back to [[ASM_Tutorial]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Programming]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>&gt;Silver Surfer</name></author>
	</entry>
	<entry>
		<id>https://www.temlib.org/AtariForumWiki/index.php?title=Earxtutchap8&amp;diff=13032&amp;oldid=prev</id>
		<title>&gt;Zorro 2 at 08:14, 9 October 2006</title>
		<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=Earxtutchap8&amp;diff=13032&amp;oldid=prev"/>
		<updated>2006-10-09T08:14:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 04:14, 9 October 2006&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l208&quot;&gt;Line 208:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 208:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;code better readable.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;code better readable.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Back to [[ASM_Tutorial]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>&gt;Zorro 2</name></author>
	</entry>
	<entry>
		<id>https://www.temlib.org/AtariForumWiki/index.php?title=Earxtutchap8&amp;diff=13031&amp;oldid=prev</id>
		<title>&gt;Simonsunnyboy at 17:49, 6 October 2006</title>
		<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=Earxtutchap8&amp;diff=13031&amp;oldid=prev"/>
		<updated>2006-10-06T17:49:37Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
                           ___                    ___&lt;br /&gt;
                          /   \..__          __../   \&lt;br /&gt;
                         &amp;lt;&amp;lt; CHAPTER 8: STRUCTURISING &amp;gt;&amp;gt;&lt;br /&gt;
                          \___/                  \___/&lt;br /&gt;
&lt;br /&gt;
When making bigger and bigger demo's and games it, structurising is an&lt;br /&gt;
important issue. Contrary to what people say, even the most standard&lt;br /&gt;
assembler offers quite alot of functions for doing this:&lt;br /&gt;
&lt;br /&gt;
EQUates:&lt;br /&gt;
&lt;br /&gt;
A good first step in making your code more flexible is using equates. One is&lt;br /&gt;
defined by writing down this for instance:&lt;br /&gt;
&lt;br /&gt;
label:  EQU     1&lt;br /&gt;
label2: EQU     10&lt;br /&gt;
&lt;br /&gt;
Now if you use label in your code:&lt;br /&gt;
&lt;br /&gt;
        move.w  #label,d0&lt;br /&gt;
&lt;br /&gt;
This moves whatever value you coupled to &amp;quot;label&amp;quot; into d0. The assembler sees&lt;br /&gt;
the label and replaces it with the value.&lt;br /&gt;
&lt;br /&gt;
        move.w  #label*label2,d0&lt;br /&gt;
&lt;br /&gt;
This moves label multiplied by label into d0. The assembler has no problems&lt;br /&gt;
with statements like these. You can also add, subtract, and, or, divide&lt;br /&gt;
labels with eachother.&lt;br /&gt;
&lt;br /&gt;
Equates are very handy for bigger sourcecodes, where a certain value is used&lt;br /&gt;
very often. Equates make code more adaptable and often more readable.&lt;br /&gt;
&lt;br /&gt;
A good example is for instance the size of an effectwindow or the&lt;br /&gt;
screendimensions. If you change either, you have a lot of code rewrite. But&lt;br /&gt;
simply using EQU's solves the whole thing quite easily. Simply giving the&lt;br /&gt;
labels' values will do the trick.&lt;br /&gt;
&lt;br /&gt;
RS:&lt;br /&gt;
&lt;br /&gt;
RS is basicly only used for defining datastructures. I've found them quite&lt;br /&gt;
handy. They're defined like this:&lt;br /&gt;
&lt;br /&gt;
                RSRESET                         * Indicate a new structure.&lt;br /&gt;
headerid:       RS.L    1                       * 0 Headerid is one longword.&lt;br /&gt;
headerxsize:    RS.W    1                       * 4 Xsize is one word.&lt;br /&gt;
headerysize:    RS.W    1                       * 6 Ysize is one word.&lt;br /&gt;
headersize:     RS.B    0                       * 8 total size of header&lt;br /&gt;
&lt;br /&gt;
They basicly define offsets for datafield in structures. Now you can use&lt;br /&gt;
these offsets like this for instance:&lt;br /&gt;
&lt;br /&gt;
        lea     header_buffer,a0                * Get address of header.&lt;br /&gt;
        move.l  #&amp;quot;HEAD&amp;quot;,headerid(a0)            * Move headerid in header.&lt;br /&gt;
        move.w  #16,headerxsize(a0)             * Move xsize in header.&lt;br /&gt;
        move.w  #20,headerysize(a0)             * Move ysize in header.&lt;br /&gt;
        lea     headersize(a0),a0               * Get startaddress of data.&lt;br /&gt;
&lt;br /&gt;
Ofcourse this isn't very optimal code. The assembler just converts every&lt;br /&gt;
label to an offset. So every move is an offset move. You might want to use&lt;br /&gt;
&amp;quot;move ..,(a0)+&amp;quot; instead. That's ok, but you will lose out on easy&lt;br /&gt;
adaptability of the header.&lt;br /&gt;
&lt;br /&gt;
So using RS is only really handy in situations where speed is not the&lt;br /&gt;
leading issue and the code must be very readable.&lt;br /&gt;
&lt;br /&gt;
Directives:&lt;br /&gt;
&lt;br /&gt;
These are often used in combination with equates. Sometimes used to comment&lt;br /&gt;
a block of code when an equate doesn't have the right value.&lt;br /&gt;
&lt;br /&gt;
use_testmode:   EQU     1&lt;br /&gt;
&lt;br /&gt;
        IFNE    use_testmode&lt;br /&gt;
* These is additional code for the test mode.&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
        ELSE&lt;br /&gt;
* These are instructions for when the testmode is disabled.&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
        ENDC&lt;br /&gt;
&lt;br /&gt;
&amp;quot;IFNE&amp;quot; is such a directive which includes a block depending on what value&lt;br /&gt;
it tests. If the label isn't equal to zero (which it isn't), then the whole&lt;br /&gt;
part will be included in the code. This is again done by the assembler. This&lt;br /&gt;
is very nifty if your sourcecode can be assembled in different modes (for&lt;br /&gt;
instance for black/white or color).&lt;br /&gt;
&lt;br /&gt;
Another little trick which might be very essential for optimisin is the&lt;br /&gt;
&amp;quot;REPT&amp;quot; directive.&lt;br /&gt;
&lt;br /&gt;
        REPT    4&lt;br /&gt;
        move.l  d0,(a0)+&lt;br /&gt;
        ENDR&lt;br /&gt;
&lt;br /&gt;
This RePeaTs the instruction inbetween &amp;quot;REPT&amp;quot; and &amp;quot;ENDR&amp;quot; four times. This is&lt;br /&gt;
done the hardcoded way. So it will actually look like this in the final&lt;br /&gt;
executable:&lt;br /&gt;
&lt;br /&gt;
        move.l  d0,(a0)+&lt;br /&gt;
        move.l  d0,(a0)+&lt;br /&gt;
        move.l  d0,(a0)+&lt;br /&gt;
        move.l  d0,(a0)+&lt;br /&gt;
&lt;br /&gt;
REPT can also be used in conjunction with a label:&lt;br /&gt;
&lt;br /&gt;
times_to_repeat:        EQU     10&lt;br /&gt;
&lt;br /&gt;
        REPT    times_to_repeat&lt;br /&gt;
        move.l  d0,(a0)+&lt;br /&gt;
        ENDR&lt;br /&gt;
&lt;br /&gt;
Especially for making innerloops a bit more optimised this can be very, very&lt;br /&gt;
handy!&lt;br /&gt;
&lt;br /&gt;
Macro's:&lt;br /&gt;
&lt;br /&gt;
People either love 'em or hate 'em. (Hi evl! =)) Macro's pieces of code much&lt;br /&gt;
like the subroutines, but they aren't called, but directly put in the&lt;br /&gt;
executable by the assembler. Macro's can have parameters, so in fact you can&lt;br /&gt;
use them to make assembler a bit more like a highlevel language.&lt;br /&gt;
&lt;br /&gt;
stupid_macro:   MACRO&lt;br /&gt;
                move.l  \1,d0&lt;br /&gt;
                move.l  \2,d1&lt;br /&gt;
                ENDM&lt;br /&gt;
&lt;br /&gt;
* Actual program goes in here&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
        stupid_marco    #1,#2&lt;br /&gt;
&lt;br /&gt;
The problem is that the assembler replaces this with the code in the macro,&lt;br /&gt;
but it's mostly hard to know what exactly stands in the macro's. Knowing&lt;br /&gt;
your code is essential when debugging, so it can make your source harder to&lt;br /&gt;
comprehend.&lt;br /&gt;
&lt;br /&gt;
Oh the other hand, it is the faster solution, because it doesn't suffer from&lt;br /&gt;
a bsr/jsr, rts combination. So it is wise to use macro's only for very small&lt;br /&gt;
pieces of code where this overhead seems like alot.&lt;br /&gt;
&lt;br /&gt;
Using macro's in combination with IFxx directives, you can construct highly&lt;br /&gt;
optimised code for specific immediate-data parameters. Much like high-level&lt;br /&gt;
compilers do.&lt;br /&gt;
&lt;br /&gt;
But please don't implement complete &amp;gt;100-line routines in a macro. It simply&lt;br /&gt;
makes your code into a mess.&lt;br /&gt;
&lt;br /&gt;
Local labels:&lt;br /&gt;
&lt;br /&gt;
Perhaps one of the most used assembler options ever. And it's explained in&lt;br /&gt;
here!! =) (Duuhhh....)&lt;br /&gt;
&lt;br /&gt;
When you've got hundreds of labels already in your sourcecode you might run&lt;br /&gt;
out of new labels to use. To avoid your labels getting really big or&lt;br /&gt;
strange, you could use local labels.&lt;br /&gt;
&lt;br /&gt;
The nifty extra of local labels is that you can only reference them in a&lt;br /&gt;
local area in the code. That is: only inbetween two global labels. If you&lt;br /&gt;
use Turbo Assembler, you can skip this. It hasn't got this feature.&lt;br /&gt;
&lt;br /&gt;
******** :ExamplE: ********&lt;br /&gt;
&lt;br /&gt;
        bra     .local1                         * wrong!!&lt;br /&gt;
&lt;br /&gt;
global1:&lt;br /&gt;
        bra     .local2                         * correct&lt;br /&gt;
.local1:&lt;br /&gt;
        bra     .local2                         * correct&lt;br /&gt;
.local2:&lt;br /&gt;
        bra     .local1                         * correct&lt;br /&gt;
&lt;br /&gt;
global2:&lt;br /&gt;
        bra     .local1                         * wrong!!&lt;br /&gt;
&lt;br /&gt;
The local labels always have points &amp;quot;.&amp;quot; in front of them. As you can see you&lt;br /&gt;
can't reference local labels from behind another global label. Only between&lt;br /&gt;
two global labels it's possible. Ofcourse you can declare local labels with&lt;br /&gt;
the same names behind every new global label.&lt;br /&gt;
&lt;br /&gt;
Local labels are ideal for use in subroutines. If you force yourself to only&lt;br /&gt;
use local labels within a subroutine you can check more easily if there are&lt;br /&gt;
any references outside the subroutine perhaps causing bugs. Also it clears&lt;br /&gt;
up the code because using 50 characters long names isn't anybody's idea of&lt;br /&gt;
having fun.&lt;br /&gt;
&lt;br /&gt;
But beware that local labels don't show up in your debugger, so it might&lt;br /&gt;
actually only be good to use if you've already proven your subroutines work&lt;br /&gt;
bugfree. With debugging it's always better to use global labels, or at least&lt;br /&gt;
until your sure that routine is bugfree.&lt;br /&gt;
&lt;br /&gt;
Register equates:&lt;br /&gt;
&lt;br /&gt;
I haven't seen this used much or used this myself very often. using register&lt;br /&gt;
equates has the advantage of both keeping data in the internal registers&lt;br /&gt;
(=faster) as well as having easy names for the register (=more readable).&lt;br /&gt;
&lt;br /&gt;
I only recommend to use this when the algorithm uses loads of registers,&lt;br /&gt;
but not when the register gets a different function everytime. This because&lt;br /&gt;
you can map multiple equated to one register, so sometimes it becomes&lt;br /&gt;
unclear when a register is overwritten or not.&lt;br /&gt;
&lt;br /&gt;
A second disadvantage is the increased contrast between sourcecode and the&lt;br /&gt;
final code. This can make debugging more painful. Still, a nice way to make&lt;br /&gt;
code better readable.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>&gt;Simonsunnyboy</name></author>
	</entry>
</feed>