<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=Z80%3ADebugging</id>
	<title>Z80:Debugging - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=Z80%3ADebugging"/>
	<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=Z80:Debugging&amp;action=history"/>
	<updated>2026-06-04T01:12:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=Z80:Debugging&amp;diff=92&amp;oldid=prev</id>
		<title>KermMartian: Adjusted lowercase z80</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=Z80:Debugging&amp;diff=92&amp;oldid=prev"/>
		<updated>2016-02-03T21:12:10Z</updated>

		<summary type="html">&lt;p&gt;Adjusted lowercase z80&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 21:12, 3 February 2016&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-l58&quot;&gt;Line 58:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 58:&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;= Conclusion =&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;= Conclusion =&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;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; 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;Now that we have the major bugs out of the program, it&#039;s time to move forward with releasing your program. Note that writing a working program is only part of the project, there are [[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;z80&lt;/del&gt;:Optimization|still other parts]] that need to be addressed.&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;Now that we have the major bugs out of the program, it&#039;s time to move forward with releasing your program. Note that writing a working program is only part of the project, there are [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Z80&lt;/ins&gt;:Optimization|still other parts]] that need to be addressed.&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;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;{{lowercase}}&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;{{lowercase}}&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;z80 &lt;/del&gt;Assembly]]&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;Z80 &lt;/ins&gt;Assembly]]&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;z80 &lt;/del&gt;Heaven]]&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;Z80 &lt;/ins&gt;Heaven]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>KermMartian</name></author>
	</entry>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=Z80:Debugging&amp;diff=58&amp;oldid=prev</id>
		<title>KermMartian: Created page with &quot;Everyone hates bugs. They make your program not work how you want it to, and just might trigger you to stick a sharp pointy object into your computer during debugging. Serious...&quot;</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=Z80:Debugging&amp;diff=58&amp;oldid=prev"/>
		<updated>2016-02-03T20:18:26Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Everyone hates bugs. They make your program not work how you want it to, and just might trigger you to stick a sharp pointy object into your computer during debugging. Serious...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Everyone hates bugs. They make your program not work how you want it to, and just might trigger you to stick a sharp pointy object into your computer during debugging. Seriously, though, debugging a program is no fun. However, there are a few ways to get around the simple mistakes that might make debugging less of a pain.&lt;br /&gt;
&lt;br /&gt;
= Types of bugs =&lt;br /&gt;
&lt;br /&gt;
There are a few general categories of bugs. By knowing what kind of bug you have will provide a huge leap towards fixing the problem.&lt;br /&gt;
&lt;br /&gt;
== Compilation bugs ==&lt;br /&gt;
&lt;br /&gt;
This simply means that the compiler can&amp;#039;t compile the code. This is usually the result of a typo or trying to do something not allowed by the compiler.&lt;br /&gt;
&lt;br /&gt;
=== Common mistakes ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    loop:&lt;br /&gt;
     djnx loop       ;as opposed to djnz loop&lt;br /&gt;
     ld a,hl          ; illegal instruction&lt;br /&gt;
     jr label         ; No definition of label in program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are usually the easiest bugs to fix. All that it requires usually is a simple change in lettering to make the compiler happy.&lt;br /&gt;
&lt;br /&gt;
== Run-time errors ==&lt;br /&gt;
&lt;br /&gt;
These are errors that you may experience when you actually run the program. An example for higher-level programming is trying to divide by 0.&lt;br /&gt;
&lt;br /&gt;
=== Common Mistakes ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    push hl&lt;br /&gt;
     ret               ;returned to pushed hl value, not last value of program counter&lt;br /&gt;
     ld hl,label&lt;br /&gt;
     jr label              ;accidentally jumped to a variable instead of actual code&lt;br /&gt;
    label:&lt;br /&gt;
     .db $FF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please note that while your calculator may run into run-time errors, it will not throw any error messages unless you implement them into the code. The normal course of action usually a crash, followed by a ram reset.&lt;br /&gt;
&lt;br /&gt;
== Logic Errors ==&lt;br /&gt;
&lt;br /&gt;
The most difficult of all errors to fix are logic errors. Logic errors are those that compile and run correctly, but don&amp;#039;t give you the results that you want.&lt;br /&gt;
&lt;br /&gt;
== Common Mistakes ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ; trying to multiply by 4&lt;br /&gt;
     ld a,6&lt;br /&gt;
     add a,a&lt;br /&gt;
     add a,b            ; oops, accidentally added the wrong values together&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reason logic errors are so difficult to fix is that they are very hard to detect, and even though you may be able to narrow down the section of code that is causing the problem, you still have to go through that section one line at a time to find the reason for the error.&lt;br /&gt;
&lt;br /&gt;
= Beta Testing =&lt;br /&gt;
&lt;br /&gt;
Trying to find error all by yourself is an extremely tough position. Instead, you can invite your friends, family, etc. to help. Give them the program and have them test it out. If they run into any errors, they can tell you the problem, and will make your job that much easier.&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Now that we have the major bugs out of the program, it&amp;#039;s time to move forward with releasing your program. Note that writing a working program is only part of the project, there are [[z80:Optimization|still other parts]] that need to be addressed.&lt;br /&gt;
&lt;br /&gt;
{{lowercase}}&lt;br /&gt;
[[Category:z80 Assembly]]&lt;br /&gt;
[[Category:z80 Heaven]]&lt;/div&gt;</summary>
		<author><name>KermMartian</name></author>
	</entry>
</feed>