<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>kim-1 &#8211; Retro Computing</title>
	<atom:link href="http://retro.hansotten.nl/category/kim-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://retro.hansotten.nl</link>
	<description>About small SBC systems</description>
	<lastBuildDate>Sun, 02 Aug 2026 14:32:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>http://retro.hansotten.nl/wp-content/uploads/2020/10/cropped-kim1-as-32x32.jpg</url>
	<title>kim-1 &#8211; Retro Computing</title>
	<link>http://retro.hansotten.nl</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>KB-9, MOS TECH BASIC for the 6502</title>
		<link>http://retro.hansotten.nl/kb-9-mos-tech-basic-for-the-6502/</link>
		
		<dc:creator><![CDATA[hanso]]></dc:creator>
		<pubDate>Sun, 02 Aug 2026 14:30:16 +0000</pubDate>
				<category><![CDATA[6502]]></category>
		<category><![CDATA[kim-1]]></category>
		<guid isPermaLink="false">http://retro.hansotten.nl/?p=21973</guid>

					<description><![CDATA[With a scan of manuals by Gerben Voort, and a third photo of a cassette with KB-9, time to refresh the KB-9 pages. See also:A demo of the new facilities in the KIM-1 Simulator 2.2.1A demo of the new facilities in the KIM-1 Simulator 2.2.1 Scroll, copy paste of the console. New versions of KIM-...KIM-1 [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>With a scan of manuals by Gerben Voort, and a third photo of a cassette with KB-9, time <a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/kim-1-software/microsoft-kb-9-basic/" data-wpel-link="internal">to refresh the KB-9 pages.<div id="attachment_21760" style="width: 664px" class="wp-caption aligncenter"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-21760" src="http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-1024x674.jpg" alt="" width="654" height="430" class="size-large wp-image-21760" srcset="http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-1024x674.jpg 1024w, http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-300x198.jpg 300w, http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-150x99.jpg 150w, http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-768x506.jpg 768w, http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-1536x1011.jpg 1536w, http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-2048x1349.jpg 2048w, http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-2x1.jpg 2w" sizes="(max-width: 654px) 100vw, 654px" /><p id="caption-attachment-21760" class="wp-caption-text">Thanks Gerben Voort</p></div>  </a></p>
<!-- relpost-thumb-wrapper --><div class="relpost-thumb-wrapper"><!-- filter-class --><div class="relpost-thumb-container"><h3>See also:</h3><div style="clear: both"></div><div style="clear: both"></div><!-- relpost-block-container --><div class="relpost-block-container relpost-block-column-layout" style="--relposth-columns: 3;--relposth-columns_t: 2; --relposth-columns_m: 2"><a href="http://retro.hansotten.nl/kim-1-simulator-2-2-0/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/pastescroll.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">A demo of the new facilities in the KIM-1 Simulator 2.2.1</h2><div class="relpost_card_exerpt">A demo of the new facilities in the KIM-1 Simulator 2.2.1 

Scroll, copy paste of the console.

New versions of KIM-...</div></div></div></a><a href="http://retro.hansotten.nl/kim-1-connectors-beware-the-chinese-cheap-variants/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2025/09/307-044-500-202.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">KIM-1 connectors: beware the Chinese cheap variants!</h2><div class="relpost_card_exerpt">The KIM-1 needs 2 edge connectors.

The specifications are: card edge; PIN: 44; 3.96mm 

When you search for those, ...</div></div></div></a><a href="http://retro.hansotten.nl/magazines-compute-and-compute-ii/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2025/09/best-of-micro2-front.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">Magazines: Compute! and Compute II</h2><div class="relpost_card_exerpt">The pages om Magazines had an update.

MICRO has its own page with all Best of MICRO pfds.
Compute! and Compute II ar...</div></div></div></a><a href="http://retro.hansotten.nl/mtu-documents-update/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2025/07/k10085c2025-07-06-0001s.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">All documents in the MTU pages are now clean and higher quality, about 50 new PDFs.</h2><div class="relpost_card_exerpt">I got hold a about 10 cm of MTU documents. Several I already had in PDF format, some not available yet.
I took the oppo...</div></div></div></a></div><!-- close relpost-block-container --><div style="clear: both"></div></div><!-- close filter class --></div><!-- close relpost-thumb-wrapper -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>MOS TECH BASIC versions</title>
		<link>http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/kim-1-software/microsoft-kb-9-basic/mos-tech-basic-versions/</link>
		
		<dc:creator><![CDATA[hanso]]></dc:creator>
		<pubDate>Sun, 02 Aug 2026 13:41:55 +0000</pubDate>
				<category><![CDATA[6502]]></category>
		<category><![CDATA[kim-1]]></category>
		<guid isPermaLink="false">http://retro.hansotten.nl/?page_id=21962</guid>

					<description><![CDATA[Despite all the versions you see on the download page, there is only one official and original binary known of the MOS TECH BASIC for the 6502 KIM and that is my V1.1 (ID 01) loaded from my original tape. There is another tape known recently, owned by my friend Gerben Voort, and we hope [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Despite all the versions you see on the <a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/kim-1-software/microsoft-kb-9-basic/kb-9-downloads/" data-wpel-link="internal">download page</a>, there is only one official and original  binary known of the MOS TECH BASIC for the 6502 KIM and that is my V1.1 (ID 01) loaded from my original tape. There is another tape known recently, owned by my friend Gerben Voort,  and  we hope to be able to read that tape.</p>
<p>Every other version is a derivate, in the 80ties or in the past years. </p>
<p>There are also sources of Microsoft Basic for the 6502. <a href="https://github.com/microsoft/BASIC-M6502" data-wpel-link="external">The official source</a>, in PDP-11 MACRO source format has been declared open not so long ago.<br />
The title is &#8216;M6502 8K VER 1.1 BY MICRO-SOFT&#8217;. Yes the name of the company was originally MICRO-SOFT!</p>
<p>Many years before the official source, Michael Steyl of pagetable.com reconstructed the source, based upon my binary dump. <a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/kim-1-software/microsoft-kb-9-basic/how-to-build-and-adapt-kb-9-and-kb-6/" data-wpel-link="internal">A perfect start to create derivate versions</a>! </p>
<p><strong>Versions known in the 80ties</strong></p>
<ul>
<li><strong>KB-9</strong><br />
Created by Microsoft, only distributed by Johnson Computers (afaik). Binary available.<br />
On the tape label: 2000-4260 ID #01 St 4065<br />
Oldest known documentation available, scanned.</li>
<li><strong>KB-6</strong><br />
Mentioned in the documentation of ID #01. Not available.<br />
6 digit precision floating point, smaller in size. </li>
<li><strong>KB-9 ID #101</strong><br />
Distributed by Johnson Computers<br />
On the tape label: 2000-437D ID #101 St 4065 S/N 217 and 233. Binary not available (yet).<br />
Mentioned in the documentation of the versions distributed by Johnson Computer with ID #101. Binary not available. Two versions of the documentation known and scanned.<br />
This version seems to be the V1.1 KB-9 with added Hypertape and BLOCKMOVE routines at the end of the binary. With the alternative start addresses the hypertape routine can be moved to $0200 or $0300 and the SAVE command patched to the hypertape routine. Or with the standard start at $4065 hypertape can be skipped.<br />
All KB-9 internal addresses are the same. </li>
<li><strong>KB-9P</strong><br />
Mentioned in the documentation of the versions distributed by Johnson Computer with ID #101, Binary not available.<br />
KB-9P is a stripped version of KB-9  fit for burning into a ROM. SIN-COS-ATN is not available.
</li>
</ul>
<p><div id="attachment_8817" style="width: 746px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-8817" src="http://retro.hansotten.nl/wp-content/uploads/2021/11/cassettemsbasic.jpg" alt="" width="736" height="442" class="size-full wp-image-8817" srcset="http://retro.hansotten.nl/wp-content/uploads/2021/11/cassettemsbasic.jpg 736w, http://retro.hansotten.nl/wp-content/uploads/2021/11/cassettemsbasic-300x180.jpg 300w, http://retro.hansotten.nl/wp-content/uploads/2021/11/cassettemsbasic-150x90.jpg 150w, http://retro.hansotten.nl/wp-content/uploads/2021/11/cassettemsbasic-2x1.jpg 2w" sizes="(max-width: 736px) 100vw, 736px" /><p id="caption-attachment-8817" class="wp-caption-text">My MSBasic for the KIM-1 cassette</p></div><br />
<div id="attachment_17156" style="width: 752px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-17156" src="http://retro.hansotten.nl/wp-content/uploads/2024/11/kb9-sn217.jpg" alt="" width="742" height="515" class="size-full wp-image-17156" srcset="http://retro.hansotten.nl/wp-content/uploads/2024/11/kb9-sn217.jpg 742w, http://retro.hansotten.nl/wp-content/uploads/2024/11/kb9-sn217-300x208.jpg 300w, http://retro.hansotten.nl/wp-content/uploads/2024/11/kb9-sn217-150x104.jpg 150w, http://retro.hansotten.nl/wp-content/uploads/2024/11/kb9-sn217-1x1.jpg 1w" sizes="(max-width: 742px) 100vw, 742px" /><p id="caption-attachment-17156" class="wp-caption-text">Another MOS TECH BASIC for KIM-1, lower serial number</p></div><br />
<div id="attachment_21760" style="width: 664px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-21760" src="http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-1024x674.jpg" alt="" width="654" height="430" class="size-large wp-image-21760" srcset="http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-1024x674.jpg 1024w, http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-300x198.jpg 300w, http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-150x99.jpg 150w, http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-768x506.jpg 768w, http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-1536x1011.jpg 1536w, http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-2048x1349.jpg 2048w, http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-2x1.jpg 2w"  sizes="(max-width: 654px) 100vw, 654px" /><p id="caption-attachment-21760" class="wp-caption-text">Thanks Gerben Voort</p></div><br />
<a href="http://retro.hansotten.nl/wp-content/uploads/2021/11/p10.png" data-wpel-link="internal"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-8815" src="http://retro.hansotten.nl/wp-content/uploads/2021/11/p10-775x1024.png" alt="" width="654" height="864" srcset="http://retro.hansotten.nl/wp-content/uploads/2021/11/p10-775x1024.png 775w, http://retro.hansotten.nl/wp-content/uploads/2021/11/p10-227x300.png 227w, http://retro.hansotten.nl/wp-content/uploads/2021/11/p10-113x150.png 113w, http://retro.hansotten.nl/wp-content/uploads/2021/11/p10-768x1015.png 768w, http://retro.hansotten.nl/wp-content/uploads/2021/11/p10-1162x1536.png 1162w, http://retro.hansotten.nl/wp-content/uploads/2021/11/p10-1549x2048.png 1549w, http://retro.hansotten.nl/wp-content/uploads/2021/11/p10-1x1.png 1w"  sizes="(max-width: 654px) 100vw, 654px" /></a></p>
<!-- relpost-thumb-wrapper --><div class="relpost-thumb-wrapper"><!-- filter-class --><div class="relpost-thumb-container"><h3>See also:</h3><div style="clear: both"></div><div style="clear: both"></div><!-- relpost-block-container --><div class="relpost-block-container relpost-block-column-layout" style="--relposth-columns: 3;--relposth-columns_t: 2; --relposth-columns_m: 2"><a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/kim-1-related-hardware/terc-kim-1-interface-set/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/20260524_150837-scaled.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">TERC KIM-1 Interface set</h2><div class="relpost_card_exerpt">A recent acquisition, the TERC (Technical Education Research Centers) KIM-1 Interface set. An educational tool to work w...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/6502-tester-nmos-cmos-1-8mhz/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/6502testers1.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">6502 tester NMOS CMOS 1-8MHz</h2><div class="relpost_card_exerpt">The 6502 W65C02 6502C CPU tester NMOS / CMOS 1-8MHz is a CPU tester for 40 pin 6502/65C02 and WD65C02 and Sally. 

The...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/20901-2/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/mc6800mcs6502.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">680x/650x Test system</h2><div class="relpost_card_exerpt">The 680x/650x Test system allows to test, with the CPU itself performing the test, the MC680X and MCS650X families.

T...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/backbit-chip-tester-pro-v2/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2025/11/chip-tester-pro-6530.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">Backbit Chip Tester PRO V2</h2><div class="relpost_card_exerpt">A simple tio use and effective component test and ROM dump can be done with the wonderful Backbit Chiptester Pro V2.

...</div></div></div></a></div><!-- close relpost-block-container --><div style="clear: both"></div></div><!-- close filter class --></div><!-- close relpost-thumb-wrapper -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to build and adapt KB-9 and KB-6</title>
		<link>http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/kim-1-software/microsoft-kb-9-basic/how-to-build-and-adapt-kb-9-and-kb-6/</link>
		
		<dc:creator><![CDATA[hanso]]></dc:creator>
		<pubDate>Sat, 01 Aug 2026 14:48:41 +0000</pubDate>
				<category><![CDATA[6502]]></category>
		<category><![CDATA[kim-1]]></category>
		<guid isPermaLink="false">http://retro.hansotten.nl/?page_id=21923</guid>

					<description><![CDATA[Sources of KB-9 Microsoft Basic v1.1 Microsoft BASIC for 6502 Original Source Code [1978], article on Pagetable, local copy Original source in MAC format Create your own Version of Microsoft BASIC for 6502, article on Pagetable, local copy, sources in CC65 (CA65 assembler) Version 2 sources at the github site of Eduardo Casino, master branch [&#8230;]]]></description>
										<content:encoded><![CDATA[<h3>Sources of KB-9 Microsoft Basic v1.1</h3>
<ul>
<li>Microsoft BASIC for 6502 Original Source Code [1978], article on <a href="https://www.pagetable.com/?p=774" data-wpel-link="external">Pagetable</a><a>, </a><a href="http://retro.hansotten.nl/uploads/files/MicrosoftBASICpagetable.pdf" data-wpel-link="internal">local copy</a></li>
<li>
<a href="http://retro.hansotten.nl/uploads/files/M6502.MAC.txt" data-wpel-link="internal">Original source in MAC format</a></li>
<li>Create your own Version of Microsoft BASIC for 6502, article on <a href="https://www.pagetable.com/?p=46" data-wpel-link="external">Pagetable</a><a>, </a><a href="http://retro.hansotten.nl/uploads/files/CreateBASICpagetable.com.pdf" data-wpel-link="internal">local copy</a><a>, </a><a href="http://retro.hansotten.nl/uploads/files/msbasic-master.zip" data-wpel-link="internal"> sources in CC65 (CA65 assembler) </a></li>
<li><a href="https://github.com/eduardocasino/msbasic/tree/master" data-wpel-link="external">Version 2 sources at the github site of Eduardo Casino, master branch</a> (there is also the KIMIEC branch, with Save and Load to a 1541 floopy drive)</li>
</ul>
<h3>Adapt KB-9, first step make it faster and smaller</h3>
<p>In the previous section the pagetable article was shown, with resources to recreate from source many 6502 Basic&#8217;s, like KB-9.</p>
<p>Here an example how I, quick and dirty, used this to create a KB-9 named V1.2 which is smaller and faster than the original.</p>
<p>This is how to prepare for it (Windows, can be done also on Linux)</p>
<ol>
<li>Download and unpack the <a href="https://github.com/mist64/msbasic" data-wpel-link="external">archive of pagetable</a> in a folder on your PC.</li>
<li>Download and unpack the CC65 package, a C compiler, from which only the assembler and linker is used.<a href="https://cc65.github.io/" data-wpel-link="external"> I used the Windows binaries</a>.</li>
<li>Copy CA65.EXE, LD65.EXE and longbranch.mac from the CC65 package to the folder where you unpacked the MS Basic source.</li>
</ol>
<p>Do the adaptations as described below or your own:</p>
<ol>
<li>To save you the work I have collected the adaptations described above  in <a href="http://retro.hansotten.nl/uploads/files/KB9v12source.zip" data-wpel-link="internal">this archive for your convenience here</a>.</li>
<li>Change whatever you like in the source. It is quite a complicated construction, with macros for every variant, so look carefully at the listing file what really is produced.<br />
Start with no adaptations and then go on studying the listing file and testing. The <a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/kim-1-simulator/" data-wpel-link="internal">KIM-1 Simulator </a>is a good tool for testing! Load the symbol table file to see what is where.</li>
<li>Assemble and link with this simple batch file makekb9v2.bat, resulting in an object, a binary, a listing file and a symbol label file.</li>
</ol>
<pre class="brush: plain; title: ; notranslate">
ca65 -D kb9 msbasic.s -o tmp/kb9v2.o -l tmp/kb9v2.lst
ld65 -C kb9.cfg tmp/kb9v2.o -o tmp/kb9v2.bin -Ln tmp/kb9v2.lbl
</pre>
</li>
<li>Repeat step 4 and 5 until you are satisfied with the adaptations. The articles listed are a good source of inspiration.</li>
</ol>
<p><strong>These are the adaptations done in V1.2</strong> use the ROR instruction and suppress nulls sent to the terminal and Clear decimal and fix GET</strong><br />
I changed this:</p>
<ul>
<li style="list-style-type: none;">
<ul>In define_kim.s make a comment of the following two lines:</ul>
</li>
</ul>
<pre class="brush: plain; title: ; notranslate">
;CONFIG_NULL := 1                     
;CONFIG_ROR_WORKAROUND := 1             ; patch HO 2021
</pre>
<ul>
<li>In init.s add this line at label COLD_START
<pre class="brush: plain; title: ; notranslate">
COLD_START:
.ifdef SYM1
        jsr     ACCESS
.endif
.ifdef KBD
  .
  .
  .
.else
  .ifndef CBM2
        cld                     ; patch for KIM-1 HO 2021
        ldx     #$FF
        stx     CURLIN+1
</pre>
<p>Change line 493 init.s</p>
<pre class="brush: plain; title: ; notranslate">
  .ifdef KIM
        .byte   &quot;MOS TECH 6502 BASIC V1.2&quot;
</pre>
</li>
<li> do the fix in the <a href="#get">&#8220;GET handling</a> (see below)</li>
<li> <a href="#backspace">Add backspace handling</a> to correct typing errors</li>
<li>Change the version number in inline.s line 493 to &#8220;MOS TECH 6502 BASIC V1.2</li>
</ul>
<p>Assemble and link with the batch file makekb9v2.bat, this will deliver in the folder tmp<br />
&#8211; kb9v2.bin file : load as usual at $20001<br />
&#8211; kb9v12.lbl text file<br />
&#8211; kb9v12lst textfile</p>
<p>Start KB9 V2 now at location $3FB1, label COLD_START (used to be $4065, so we gained some RAM), see the lbl file for other addresses.</p>
<h3>KB-6</h3>
<p>I know KB-6 existed. The &#8216;6&#8217; stands for the precision in digits of the floating point number. In the documentation KB-6 is described.<br />
Never seen a version in the wild. So the reconstruction here is not checked with the original, addresses in the reconstruction from the linker differ from the documentation.<br />
Perhaps the ROR workaround or the insertion of CLD in the init.s caused this.</p>
<p>KB-6 can be &#8216;reconstructed&#8217; since other versions of 6 digit Microsoft Basic are in the &#8216;pagetable sources&#8217;.<br />
It takes one define added in define_kim.s, changes on the original file are now:</p>
<pre class="brush: plain; title: ; notranslate">
; CONFIG_NULL := 1                      ; patch HO 2021
;CONFIG_ROR_WORKAROUND := 1             ; patch HO 2021
CONFIG_SMALL := 1                       ; patch H0 2021
</pre>
<p>Assemble and link as above, replace kb9v12 with kb6v12 in the batch file. See the archive for a working batch file.<br />
COLD_START moves to $3D50, size shrinks to 8K.</p>
<p>As you can see in the following screenshots it works! Note the number of digits is less, as expected. It should be faster also.</p>
<div id="attachment_8869" style="width: 932px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8869" class="wp-image-8869 size-full" src="http://retro.hansotten.nl/wp-content/uploads/2021/11/KIMKB9TEST.jpg" alt="" width="922" height="504" srcset="http://retro.hansotten.nl/wp-content/uploads/2021/11/KIMKB9TEST.jpg 922w, http://retro.hansotten.nl/wp-content/uploads/2021/11/KIMKB9TEST-300x164.jpg 300w, http://retro.hansotten.nl/wp-content/uploads/2021/11/KIMKB9TEST-150x82.jpg 150w, http://retro.hansotten.nl/wp-content/uploads/2021/11/KIMKB9TEST-768x420.jpg 768w, http://retro.hansotten.nl/wp-content/uploads/2021/11/KIMKB9TEST-2x1.jpg 2w"  sizes="(max-width: 922px) 100vw, 922px" /><p id="caption-attachment-8869" class="wp-caption-text">Microsoft Basic for the KIM-1 KB-9</p></div>
<p><div id="attachment_8870" style="width: 932px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8870" class="wp-image-8870 size-full" src="http://retro.hansotten.nl/wp-content/uploads/2021/11/KIMKB6TEST.jpg" alt="" width="922" height="504" srcset="http://retro.hansotten.nl/wp-content/uploads/2021/11/KIMKB6TEST.jpg 922w, http://retro.hansotten.nl/wp-content/uploads/2021/11/KIMKB6TEST-300x164.jpg 300w, http://retro.hansotten.nl/wp-content/uploads/2021/11/KIMKB6TEST-150x82.jpg 150w, http://retro.hansotten.nl/wp-content/uploads/2021/11/KIMKB6TEST-768x420.jpg 768w, http://retro.hansotten.nl/wp-content/uploads/2021/11/KIMKB6TEST-2x1.jpg 2w"  sizes="(max-width: 922px) 100vw, 922px" /><p id="caption-attachment-8870" class="wp-caption-text">Microsoft Basic for the KIM-1 KB-6, less precision, smaller program size</p></div><br />
<a name="get"></a></p>
<h3>The GET bug</h3>
<p>The bug was described and fixed first by an article in the <a href="http://retro.hansotten.nl/wp-content/uploads/2019/12/6502_user_notes_14.pdf.017.jpg" data-wpel-link="internal">KIM User notes 17</a> </p>
<p>From the pagetable sources:<br />
BUG: The beq/bne L2AF8 below is supposed to be always taken. For this to happen,  the last load must be a 0 for beq and != 0 for bne.<br />
The original Microsoft code had ldx/ldy/bne here, which was only correct for a non-ZP INPUTBUFFER. Commodore fixed it in CBMBASIC V1 by swapping the ldx and the ldy. It was broken on KIM, but okay on APPLE and CBM2, because these used a non-ZP INPUTBUFFER. Microsoft fixed this somewhere after KIM and before MICROTAN, by using beq instead of bne in the ZP case.</p>
<pre class="brush: plain; title: ; notranslate">
  .ifdef CBM1
     ldy  &gt;(INPUTBUFFER-1)
     ldx  &lt;(INPUTBUFFER-1)
  .else 
     ldx  &gt;(INPUTBUFFER-1)
     ldy  &lt;(INPUTBUFFER-1)
..
     beq 08
</pre>
<p>You can easily fix this in KB9 by changing the branch in $2AEE from $D0 (bne) to $F0 (beq).<br />
I have fixed this in the source of KB9V2 (KB6 does not have the GET statement) .</p>
<h3>Use the backspace key to correct typing errors </h3>
<p>Correcting typing errors can be done with the _ key ($5F).  On a video terminal, like we use nowadays it can be done with backspace.<br />
The way characters are handled by the input routine do not allow to just replace the compare with _ (C9 5F) with 08 for backspace.</p>
<p>A trick by Jim W4JBM can be used to reuse the BELL handling (07) to a backspace.<br />
Replace in inline.s </p>
<pre class="brush: plain; title: ; notranslate">
INLINAIM:
    .endif
    .ifndef CONFIG_NO_LINE_EDITING
        cmp     #$07
        beq     L2443
</pre>
<p>with </p>
<pre class="brush: plain; title: ; notranslate">
INLINAIM:
    .ifndef CONFIG_NO_LINE_EDITING
        cmp     #$08 
        beq     L2420

In the original KB9.BIN you can do that with
poke 9260,8
poke 9262,241
</pre>
<p><img loading="lazy" decoding="async" src="http://retro.hansotten.nl/wp-content/uploads/2023/06/User-function-kb9v12.jpg" alt="" width="1623" height="926" class="aligncenter size-full wp-image-13932" srcset="http://retro.hansotten.nl/wp-content/uploads/2023/06/User-function-kb9v12.jpg 1623w, http://retro.hansotten.nl/wp-content/uploads/2023/06/User-function-kb9v12-300x171.jpg 300w, http://retro.hansotten.nl/wp-content/uploads/2023/06/User-function-kb9v12-1024x584.jpg 1024w, http://retro.hansotten.nl/wp-content/uploads/2023/06/User-function-kb9v12-150x86.jpg 150w, http://retro.hansotten.nl/wp-content/uploads/2023/06/User-function-kb9v12-768x438.jpg 768w, http://retro.hansotten.nl/wp-content/uploads/2023/06/User-function-kb9v12-1536x876.jpg 1536w, http://retro.hansotten.nl/wp-content/uploads/2023/06/User-function-kb9v12-2x1.jpg 2w"  sizes="(max-width: 1623px) 100vw, 1623px" /></p>
<p><strong>V2 adaptations to V1.2 by Eduardo Casino</strong><br />
(after applying all above)<br />
The start address is moved to $2000 by changing this in header.s</p>
<pre class="brush: plain; title: ; notranslate">
		.segment &quot;HEADER&quot;
.ifdef KBD
        jmp     LE68C
        .byte   $00,$13,$56
.endif
.ifdef KIM
        jmp     COLD_START
.endif
.ifdef AIM65
        jmp     COLD_START
        jmp     RESTART
        .word   AYINT,GIVAYF
.endif
.ifdef SYM1
        jmp     PR_WRITTEN_BY
.endif
</pre>
<p>Change line 493 init.s</p>
<pre class="brush: plain; title: ; notranslate">
  .ifdef KIM
        .byte   &quot;MOS TECH 6502 BASIC V2.0&quot;
</pre>
<p>Assemble and link with </p>
<pre class="brush: plain; title: ; notranslate">
ca65 -D kb9 msbasic.s -o tmp/kb9v2.o -l tmp/kb9v2.lst
ld65 -C kb9.cfg tmp/kb9v2.o -o tmp/kb9v2.bin -Ln tmp/kb9v2.lbl
</pre>
<p><strong>KB6 V2</strong><br />
Change this in defines_kim.s (after applying all above)<br />
CONFIG_SMALL := 1</p>
<p>Assemble and link with </p>
<pre class="brush: plain; title: ; notranslate">
ca65 -D kb9 msbasic.s -o tmp/kb6v2.o -l tmp/kb6v2.lst
ld65 -C kb9.cfg tmp/kb6v2.o -o tmp/kb6v2.bin -Ln tmp/kb6v2.lbl
</pre>
<p>See the downloads for the binary files.</p>
<p><div id="attachment_17156" style="width: 752px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-17156" src="http://retro.hansotten.nl/wp-content/uploads/2024/11/kb9-sn217.jpg" alt="" width="742" height="515" class="size-full wp-image-17156" srcset="http://retro.hansotten.nl/wp-content/uploads/2024/11/kb9-sn217.jpg 742w, http://retro.hansotten.nl/wp-content/uploads/2024/11/kb9-sn217-300x208.jpg 300w, http://retro.hansotten.nl/wp-content/uploads/2024/11/kb9-sn217-150x104.jpg 150w, http://retro.hansotten.nl/wp-content/uploads/2024/11/kb9-sn217-1x1.jpg 1w"  sizes="(max-width: 742px) 100vw, 742px" /><p id="caption-attachment-17156" class="wp-caption-text">Another MOS TECH BASIC for KIM-1, lower serial number</p></div><br />
<div id="attachment_21760" style="width: 664px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-21760" src="http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-1024x674.jpg" alt="" width="654" height="430" class="size-large wp-image-21760" srcset="http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-1024x674.jpg 1024w, http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-300x198.jpg 300w, http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-150x99.jpg 150w, http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-768x506.jpg 768w, http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-1536x1011.jpg 1536w, http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-2048x1349.jpg 2048w, http://retro.hansotten.nl/wp-content/uploads/2026/07/kb9-cassette-GV-20260727_120703-2x1.jpg 2w"  sizes="(max-width: 654px) 100vw, 654px" /><p id="caption-attachment-21760" class="wp-caption-text">Thanks Gerben Voort</p></div></p>
<p><a href="http://retro.hansotten.nl/wp-content/uploads/2021/11/cassettemsbasic.jpg" data-wpel-link="internal"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8817" src="http://retro.hansotten.nl/wp-content/uploads/2021/11/cassettemsbasic.jpg" alt="" width="736" height="442" srcset="http://retro.hansotten.nl/wp-content/uploads/2021/11/cassettemsbasic.jpg 736w, http://retro.hansotten.nl/wp-content/uploads/2021/11/cassettemsbasic-300x180.jpg 300w, http://retro.hansotten.nl/wp-content/uploads/2021/11/cassettemsbasic-150x90.jpg 150w, http://retro.hansotten.nl/wp-content/uploads/2021/11/cassettemsbasic-2x1.jpg 2w"  sizes="(max-width: 736px) 100vw, 736px" /></a></p>
<!-- relpost-thumb-wrapper --><div class="relpost-thumb-wrapper"><!-- filter-class --><div class="relpost-thumb-container"><h3>See also:</h3><div style="clear: both"></div><div style="clear: both"></div><!-- relpost-block-container --><div class="relpost-block-container relpost-block-column-layout" style="--relposth-columns: 3;--relposth-columns_t: 2; --relposth-columns_m: 2"><a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/kim-1-related-hardware/terc-kim-1-interface-set/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/20260524_150837-scaled.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">TERC KIM-1 Interface set</h2><div class="relpost_card_exerpt">A recent acquisition, the TERC (Technical Education Research Centers) KIM-1 Interface set. An educational tool to work w...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/6502-tester-nmos-cmos-1-8mhz/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/6502testers1.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">6502 tester NMOS CMOS 1-8MHz</h2><div class="relpost_card_exerpt">The 6502 W65C02 6502C CPU tester NMOS / CMOS 1-8MHz is a CPU tester for 40 pin 6502/65C02 and WD65C02 and Sally. 

The...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/20901-2/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/mc6800mcs6502.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">680x/650x Test system</h2><div class="relpost_card_exerpt">The 680x/650x Test system allows to test, with the CPU itself performing the test, the MC680X and MCS650X families.

T...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/backbit-chip-tester-pro-v2/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2025/11/chip-tester-pro-6530.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">Backbit Chip Tester PRO V2</h2><div class="relpost_card_exerpt">A simple tio use and effective component test and ROM dump can be done with the wonderful Backbit Chiptester Pro V2.

...</div></div></div></a></div><!-- close relpost-block-container --><div style="clear: both"></div></div><!-- close filter class --></div><!-- close relpost-thumb-wrapper -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Bug in the TTY KIM-1 monitor?</title>
		<link>http://retro.hansotten.nl/bug-tty/</link>
		
		<dc:creator><![CDATA[hanso]]></dc:creator>
		<pubDate>Thu, 23 Jul 2026 13:36:54 +0000</pubDate>
				<category><![CDATA[6502]]></category>
		<category><![CDATA[kim-1]]></category>
		<guid isPermaLink="false">http://retro.hansotten.nl/?p=21631</guid>

					<description><![CDATA[The KIM-1 monitor surprises me every time I dive into it. The KIM-1 Explained is nearing completion. The KIM-1 explained There is a bug in the TTY CLI, it accepts characters as &#8216;;&#8217; and &#8216;:&#8217; as valid hex and translates to A..F. KIM 0200 A9 ;; 00BB 00 :: 00AA 00 ???? FFFF 1C More [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>The KIM-1 monitor surprises me every time I dive into it.<br />
<strong>The KIM-1 Explained is nearing completion. </strong><a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/the-kim-1-monitor-explained/" data-wpel-link="internal">The KIM-1 explained</a></p>
<p>There is a bug in the TTY CLI, it accepts characters as &#8216;;&#8217; and &#8216;:&#8217; as valid hex and translates to A..F. </p>
<pre class="brush: plain; title: ; notranslate">
KIM
0200 A9 ;;
00BB 00 ::
00AA 00 ????
FFFF 1C
</pre>
<p>More about this innocent feature here: <a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/the-kim-1-monitor-explained/getbyt-and-pack/" data-wpel-link="internal">PRTBYT, GETBYT and PACK</a></p>
<!-- relpost-thumb-wrapper --><div class="relpost-thumb-wrapper"><!-- filter-class --><div class="relpost-thumb-container"><h3>See also:</h3><div style="clear: both"></div><div style="clear: both"></div><!-- relpost-block-container --><div class="relpost-block-container relpost-block-column-layout" style="--relposth-columns: 3;--relposth-columns_t: 2; --relposth-columns_m: 2"><a href="http://retro.hansotten.nl/kim-1-simulator-2-2-0/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/pastescroll.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">A demo of the new facilities in the KIM-1 Simulator 2.2.1</h2><div class="relpost_card_exerpt">A demo of the new facilities in the KIM-1 Simulator 2.2.1 

Scroll, copy paste of the console.

New versions of KIM-...</div></div></div></a><a href="http://retro.hansotten.nl/kim-1-connectors-beware-the-chinese-cheap-variants/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2025/09/307-044-500-202.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">KIM-1 connectors: beware the Chinese cheap variants!</h2><div class="relpost_card_exerpt">The KIM-1 needs 2 edge connectors.

The specifications are: card edge; PIN: 44; 3.96mm 

When you search for those, ...</div></div></div></a><a href="http://retro.hansotten.nl/magazines-compute-and-compute-ii/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2025/09/best-of-micro2-front.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">Magazines: Compute! and Compute II</h2><div class="relpost_card_exerpt">The pages om Magazines had an update.

MICRO has its own page with all Best of MICRO pfds.
Compute! and Compute II ar...</div></div></div></a><a href="http://retro.hansotten.nl/mtu-documents-update/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2025/07/k10085c2025-07-06-0001s.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">All documents in the MTU pages are now clean and higher quality, about 50 new PDFs.</h2><div class="relpost_card_exerpt">I got hold a about 10 cm of MTU documents. Several I already had in PDF format, some not available yet.
I took the oppo...</div></div></div></a></div><!-- close relpost-block-container --><div style="clear: both"></div></div><!-- close filter class --></div><!-- close relpost-thumb-wrapper -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PRTBYT, GETBYT and PACK</title>
		<link>http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/the-kim-1-monitor-explained/getbyt-and-pack/</link>
		
		<dc:creator><![CDATA[hanso]]></dc:creator>
		<pubDate>Thu, 23 Jul 2026 09:34:48 +0000</pubDate>
				<category><![CDATA[6502]]></category>
		<category><![CDATA[kim-1]]></category>
		<guid isPermaLink="false">http://retro.hansotten.nl/?page_id=21611</guid>

					<description><![CDATA[PRTBYT takes a byte and sends it to the serial TY as two hex ascii characters The byte is entered in A, two characters are printed and A is saved. 0914 1E3B ; 0915 1E3B ; PRINT 1 HEX BYTE AS 2 ASCII CHAR&#38;#039;S 0916 1E3B ; 0917 1E3B 85 FC PRTBYT STA TEMP 0918 [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>PRTBYT</strong> takes a byte and sends it to the serial TY as two hex ascii characters<br />
The byte is entered in A, two characters are printed and A is saved.</p>
<pre class="brush: plain; title: ; notranslate">
0914   1E3B             ;		
0915   1E3B             ;       PRINT 1 HEX BYTE AS 2 ASCII CHAR&amp;#039;S
0916   1E3B             ;   
0917   1E3B 85 FC       PRTBYT  STA   TEMP                             
0918   1E3D 4A                  LSR   A           ; SHIFT CHAR RIGHT 4 BITS
0919   1E3E 4A                  LSR   A
0920   1E3F 4A                  LSR   A
0921   1E40 4A                  LSR   A
0922   1E41 20 4C 1E            JSR   HEXTA       ; CONVERT TO HEX AND PRINT
0923   1E44 A5 FC               LDA   TEMP        ; GET OTHER HALF
0924   1E46 20 4C 1E            JSR   HEXTA       ; CONVERT TO HEX AND PRINT
0925   1E49 A5 FC               LDA   TEMP        ; RESTORE BYTE IN A AND RETURN
0926   1E4B 60                  RTS   
0927   1E4C             ;
0928   1E4C 29 0F       HEXTA   AND   #$0F        ; MASK HI 4 BITS
0929   1E4E C9 0A               CMP   #$0A
0930   1E50 18                  CLC   
0931   1E51 30 02               BMI   HEXTA1
0932   1E53 69 07               ADC   #$07        ; ALPHA HEX
0933   1E55 69 30       HEXTA1  ADC   #$30        ; DEC HEX
0934   1E57 4C A0 1E            JMP   OUTCH       ; PRINT CHAR
</pre>
<p><strong>What is happening here?</strong></p>
<ul>
<li>The byte in A is saved (917)</li>
<li>the high nibble is shifted to the lower nibble (918-921)</li>
<li>the nibble is converted to hex (922, calls hexta)</li>
<li>the byte is restored and the low nibble converted to hex</li>
<li>A is restored</li>
<ul>
<li>hexta masks off low nibble (928)</li>
<li>convert A..F to ascii (929-932)</li>
<li>convert hex to ascii and print(933-934) </li>
</ul
</ul>
<p><strong>GETBYT and PACK</strong></p>
<pre class="brush: plain; title: ; notranslate">
1148   1F9D             ;		
1149   1F9D             ;       GET 2 HEX CHAR&amp;#039;S AND PACK 
1150   1F9D             ;       INTO INL AND INH
1151   1F9D             ;       X PRESERVED Y RETURNED = 0
1152   1F9D             ;       NON-HEX WILL BE LOADED AS NEAREST HEX EQU
1153   1F9D             ;
1154   1F9D 20 5A 1E    GETBYT  JSR   GETCH
1155   1FA0 20 AC 1F            JSR   PACK
1156   1FA3 20 5A 1E            JSR   GETCH
1157   1FA6 20 AC 1F            JSR   PACK
1158   1FA9 A5 F8               LDA   INL
1159   1FAB 60                  RTS
1160   1FAC             ;		
1161   1FAC             ;       SHIFT CHAR IN A INTO
1162   1FAC             ;       INL AND INH 
1163   1FAC             ;
1164   1FAC C9 30       PACK    CMP   #$30       ; CHECK FOR HEX 
1165   1FAE 30 1B               BMI   UPDAT2
1166   1FB0 C9 47               CMP   #$47       ; NOT HEX EXIT
1167   1FB2 10 17               BPL   UPDAT2
1168   1FB4 C9 40               CMP   #$40       ; CONVERT TO HEX
1169   1FB6 30 03               BMI   UPDATE
1170   1FB8 18                  CLC   
1171   1FB9 69 09               ADC   #$09
1172   1FBB 2A          UPDATE  ROL   A
1173   1FBC 2A                  ROL   A
1174   1FBD 2A                  ROL   A
1175   1FBE 2A                  ROL   A
1176   1FBF A0 04               LDY   #$04       ; SHIFT INTO I/O BUFFER
1177   1FC1 2A          UPDAT1  ROL   A
1178   1FC2 26 F8               ROL   INL
1179   1FC4 26 F9               ROL   INH
1180   1FC6 88                  DEY   
1181   1FC7 D0 F8               BNE   UPDAT1
1182   1FC9 A9 00               LDA   #$00       ; A=0 IF HEX NUM
1183   1FCB 60          UPDAT2  RTS
</pre>
<p><strong>What is happening here?</strong></p>
<p>GETBYT<br />
The GETBYT routine is used in the TTY part of the KIM-1 monitor to enter two hex characters (0..9 and A..F) and pack it into one byte.</p>
<ul>
<li>read the first character (1154)</li>
<li>pack it into INL lower nibble (1155)</li>
<li>read the second character (1156)</li>
<li>pack it into INL, shifting the lower nibble to high and shifting in the second nibble (1157)</li>
<li> return byte from INL to A</li>
</ul>
<p>PACK</p>
<ul>
<li>check if < '0' and error out with A > 0  (1164-1165)</li>
<li>check if > &#8216;F&#8217; and error out with A > 0 (1166-1167)</li>
<li>if A..F add $09 (1168-1171)</li>
<li>shift in nibble via INH and INL</li>
<li>return zero if valid hex but with invalid Z flag</li>
</ul>
<p>Note that the range between &#8216;9&#8217; and &#8216;A&#8217; is not checked,  so those are taken as valid hex characters.<br />
The PACK routine accepts &#8216;:&#8217;– &#8216;?&#8217;, $3A .. $3F as valid hex characters A ..F. </p>
<pre class="brush: plain; title: ; notranslate">
KIM
0200 A9 ;;
00BB 00 ::
00AA 00 ????
FFFF 1C
</pre>
<p>The ASCII encoding is arranged so that adding 9 to &#8216;A&#8217;–&#8217;F&#8217; aligns them perfectly with the desired hexadecimal nibble after four left rotates. This avoids a separate subtraction of &#8216;A&#8217; and addition of 10.  </p>
<p>The following demo with PRTBYT and GETBYT illustrates how this could be done in a user program.</p>
<pre class="brush: plain; title: ; notranslate">
0001   0000             ;
0002   0000             ; GETBYTC with error checking
0003   0000             ; illustrates shortcomings in PACK
0004   0000             ; - G and ; and possibly more accepted without error
0005   0000             ;
0006   0000             ;
0007   0000             ; KIM
0008   0000             ; 0000 00 200
0009   0000             ; 0200 A9 G
0010   0000             ; &gt;12=12
0011   0000             ; &gt;33=33
0012   0000             ; &gt;H?
0013   0000             ; &gt;G?
0014   0000             ; &gt;::=AA
0015   0000             ; &gt;;;=BB
0016   0000             ; &gt;AB=AB
0017   0000             ; &gt;CD=CD
0018   0000             ; &gt;EE=EE
0019   0000             ; &gt;
0020   0000             
0021   0000             ; KIM-1 defines
0022   0000             ;
0023   0000             PACK 	= 	$1FAC		; pack hex character into INL, shift in
0024   0000             PRTBYT	= 	$1E3B		; print byte as 2 hex characters
0025   0000             GETCH	=	$1E5A		; receive character from TTY serial
0026   0000             OUTCH	= 	$1EA0		; send character via TTY serial
0027   0000             INL		= 	$F8	
0028   0000             INH		= 	$F9
0029   0000             ;
0030   0200             	.org $0200
0031   0200             
0032   0200             ; demo code
0033   0200             ;
0034   0200 A9 00       LOOP 	LDA	#$00
0035   0202 85 F8       		STA INL			; zero hex byte
0036   0204 85 F9       		STA	INH
0037   0206 20 42 02    		JSR CRLF
0038   0209 A9 3E       		LDA #&#039;&gt;&#039;		; prompt
0039   020B 20 A0 1E    		JSR OUTCH
0040   020E 20 28 02    		JSR GETBYTC
0041   0211 90 08       		BCC	OK 
0042   0213 A9 3F       		LDA #&#039;?&#039;		; error
0043   0215 20 A0 1E    		JSR OUTCH
0044   0218 4C 00 02    		JMP LOOP
0045   021B             ;		
0046   021B 48          OK		PHA
0047   021C A9 3D       		LDA	#&#039;=&#039;
0048   021E 20 A0 1E    		JSR OUTCH
0049   0221 68          		PLA
0050   0222 20 3B 1E    		JSR PRTBYT
0051   0225 4C 00 02    		JMP LOOP		; repeat	
0052   0228             ;
0053   0228             ; subroutine GETBYTC
0054   0228             ; read 2 hex characters from TTY input
0055   0228             ; pack into one byte
0056   0228             ; Returns: carry clear if hex OK, A == hex byte
0057   0228             ; clobbers X and Y
0058   0228             ;
0059   0228             
0060   0228             
0061   0228 20 5A 1E    GETBYTC	JSR	GETCH		; read character
0062   022B 20 AC 1F    		JSR	PACK		; pack into INL
0063   022E C9 00       		CMP #$00		; restore z flag
0064   0230 D0 0E       		BNE EGETB		; A = 0 if hex number
0065   0232 20 5A 1E    		JSR	GETCH		; read second character
0066   0235 20 AC 1F    		JSR	PACK		; pack into INL
0067   0238 C9 00       		CMP #$00		; restore z flag
0068   023A D0 04       		BNE EGETB		; A = 0 if hex number
0069   023C A5 F8       		LDA	INL
0070   023E 18          		CLC
0071   023F 60          		RTS
0072   0240 38          EGETB	SEC
0073   0241 60          		RTS
0074   0242             		
0075   0242 A9 0D       CRLF	LDA 	#$0D
0076   0244 20 A0 1E    		JSR 	OUTCH
0077   0247 A9 0A       		LDA 	#$0A
0078   0249 20 A0 1E    		JSR		OUTCH 
0079   024C 60          		RTS
0080   024D             
0081   024D             		.END
0082   024D             		
0083   024D             
tasm: Number of errors = 0
</pre>
<!-- relpost-thumb-wrapper --><div class="relpost-thumb-wrapper"><!-- filter-class --><div class="relpost-thumb-container"><h3>See also:</h3><div style="clear: both"></div><div style="clear: both"></div><!-- relpost-block-container --><div class="relpost-block-container relpost-block-column-layout" style="--relposth-columns: 3;--relposth-columns_t: 2; --relposth-columns_m: 2"><a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/kim-1-related-hardware/terc-kim-1-interface-set/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/20260524_150837-scaled.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">TERC KIM-1 Interface set</h2><div class="relpost_card_exerpt">A recent acquisition, the TERC (Technical Education Research Centers) KIM-1 Interface set. An educational tool to work w...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/6502-tester-nmos-cmos-1-8mhz/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/6502testers1.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">6502 tester NMOS CMOS 1-8MHz</h2><div class="relpost_card_exerpt">The 6502 W65C02 6502C CPU tester NMOS / CMOS 1-8MHz is a CPU tester for 40 pin 6502/65C02 and WD65C02 and Sally. 

The...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/20901-2/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/mc6800mcs6502.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">680x/650x Test system</h2><div class="relpost_card_exerpt">The 680x/650x Test system allows to test, with the CPU itself performing the test, the MC680X and MCS650X families.

T...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/backbit-chip-tester-pro-v2/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2025/11/chip-tester-pro-6530.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">Backbit Chip Tester PRO V2</h2><div class="relpost_card_exerpt">A simple tio use and effective component test and ROM dump can be done with the wonderful Backbit Chiptester Pro V2.

...</div></div></div></a></div><!-- close relpost-block-container --><div style="clear: both"></div></div><!-- close filter class --></div><!-- close relpost-thumb-wrapper -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Programming tips</title>
		<link>http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/the-kim-1-monitor-explained/programming-tips/</link>
		
		<dc:creator><![CDATA[hanso]]></dc:creator>
		<pubDate>Wed, 22 Jul 2026 14:22:03 +0000</pubDate>
				<category><![CDATA[6502]]></category>
		<category><![CDATA[kim-1]]></category>
		<guid isPermaLink="false">http://retro.hansotten.nl/?page_id=21591</guid>

					<description><![CDATA[Some tips that I learned programming for the KIM-1 and the 6502. ALWAYS CHECK YOU DO NOT FORGET IMMEDIATE ACCESS SYNTAX! It so easy an common to forget the &#8216;#&#8217; in your assembler code. Assemblers will not complain and make it absolute or zeropage addressing and you will search for hours! TTY routines Do not [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Some tips that I learned programming for the KIM-1 and the 6502.</p>
<p>ALWAYS CHECK YOU DO NOT FORGET IMMEDIATE ACCESS SYNTAX!<br />
It so easy an common to forget the &#8216;#&#8217; in your assembler code.  Assemblers will not complain and make it absolute or zeropage addressing and you will search for hours!</p>
<h2>TTY routines</h2>
<h3>Do not use the CRLF routine at $1E2F  in the monitor</h3>
<p>This routine sends the CR and LF to the TTY output vai OUTCH. Nice, you will need that often in a console program.<br />
But if you read the <a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/the-kim-1-monitor-explained/print-string/" data-wpel-link="internal">page on printing a string</a> you see this routine also sends out 6 Null ($00) characters, this takes a lot of wasted time!</p>
<p>Just make your own subroutine</p>
<pre class="brush: plain; title: ; notranslate">
LDA #$0D   ; CR
JSR OUTCH
LDA #$0A   ; LF
JSR OUTCH
RTS
</pre>
<p>Note that this destroys A and Y!</p>
<p><strong>GETCH gets a character to serial TTY</strong>.<br />
Blocking, it waits indefinitely for a character to arrive and A will have the value.<br />
The routine also kills the Y register, returns with Y = $FF.<br />
Also, in LED Display and Keyboard mode, it returns with A = $01 and X = 8.<br />
Save Y before calling GETCH, and restore Y when it returns.</p>
<p><strong>OUTCH sends a character to serial TTY</strong><br />
No handshaking, no hardware flow control, it just spits out the character.<br />
A destroyed, Y=FF, X preserved.<br />
Save at least Y, and saving A is recommended.</p>
<h3>SPACE print a blank</h3>
<p>This just calls OUTCH with A = $20, so read OUTCH for the side effects.</p>
<h3>PRTBYT Print A as two hex characters</h3>
<p>Uses OUTCH, so Y is lost. A is preserved.</p>
<h3>GETBYT and GETBYTC</h3>
<p>X saved, Y = 0, A is hex character<br />
Reads two hex characters (0..9 A..F) and tries to pack them in A.<br />
<a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/the-kim-1-monitor-explained/getbyt-and-pack/" data-wpel-link="internal">See the page on PRTBYT,GETBYT and PACK for an error checking alternative GETBYTC to GETBYT.</a><br />
Note that due to an incomplete check &#8216;:&#8217;– &#8216;?&#8217;, $3A .. $3F are accepted as valid hex characters A ..F. </p>
<pre class="brush: plain; title: ; notranslate">
KIM
0200 A9 ;;
00BB 00 ::
00AA 00 ????
FFFF 1C
</pre>
<h3>The audio tape routines</h3>
<p>The DUMPT and LOADT routines are OK to call interactively to dump and load KIM-1 files on tape.<br />
The cannot be called as subroutines. when finished they return to the KIM-1 monitor.<br />
DUMPT return with $0000 as current address pointer in the KIM-1 monitor.<br />
LOADT returns it status via the current address pointer in the KIM-1 monitor, $0000 is success, $FFFF is a loading error.</p>
<p>What you can do is:<br />
&#8211; Have code at $0000 to return to your program (Warm start entry), so the user just has to press G<br />
&#8211; instruct the user what to do if DUMPT returns $FFFF</p>
<p>The better solution is to incorporate <a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/the-kim-1-monitor-explained/hypertape-dump/" data-wpel-link="internal">Hypertape as callable subroutine</a>. </p>
<h3>Return to the KIM-1 monitor</h3>
<p>The preferred location to call to enter the KIM-1 monitor form a user program is START at $1C4F</p>
<h3> Reading the keyboard and lighting the display</h3>
<p>Fill F9, FA, FB with the values to show on the LED displays<br />
Call SCAND<br />
Call SCAND to debounce<br />
CaLl GETKEY<br />
Now check the key in A:<br />
&#8211; above $14 : no key<br />
&#8211; 14 = PC<br />
&#8211; 13 = GO<br />
&#8211; 12 = +<br />
&#8211; 11 = DA<br />
&#8211; 10 = AD<br />
&#8211; 0 ..9 A &#8211; F keys<br />
Handle key and loop back to the begin</p>
<!-- relpost-thumb-wrapper --><div class="relpost-thumb-wrapper"><!-- filter-class --><div class="relpost-thumb-container"><h3>See also:</h3><div style="clear: both"></div><div style="clear: both"></div><!-- relpost-block-container --><div class="relpost-block-container relpost-block-column-layout" style="--relposth-columns: 3;--relposth-columns_t: 2; --relposth-columns_m: 2"><a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/kim-1-related-hardware/terc-kim-1-interface-set/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/20260524_150837-scaled.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">TERC KIM-1 Interface set</h2><div class="relpost_card_exerpt">A recent acquisition, the TERC (Technical Education Research Centers) KIM-1 Interface set. An educational tool to work w...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/6502-tester-nmos-cmos-1-8mhz/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/6502testers1.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">6502 tester NMOS CMOS 1-8MHz</h2><div class="relpost_card_exerpt">The 6502 W65C02 6502C CPU tester NMOS / CMOS 1-8MHz is a CPU tester for 40 pin 6502/65C02 and WD65C02 and Sally. 

The...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/20901-2/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/mc6800mcs6502.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">680x/650x Test system</h2><div class="relpost_card_exerpt">The 680x/650x Test system allows to test, with the CPU itself performing the test, the MC680X and MCS650X families.

T...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/backbit-chip-tester-pro-v2/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2025/11/chip-tester-pro-6530.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">Backbit Chip Tester PRO V2</h2><div class="relpost_card_exerpt">A simple tio use and effective component test and ROM dump can be done with the wonderful Backbit Chiptester Pro V2.

...</div></div></div></a></div><!-- close relpost-block-container --><div style="clear: both"></div></div><!-- close filter class --></div><!-- close relpost-thumb-wrapper -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>TTY operation summary</title>
		<link>http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/the-kim-1-monitor-explained/tty-operation-summary/</link>
		
		<dc:creator><![CDATA[hanso]]></dc:creator>
		<pubDate>Tue, 21 Jul 2026 09:50:12 +0000</pubDate>
				<category><![CDATA[6502]]></category>
		<category><![CDATA[kim-1]]></category>
		<guid isPermaLink="false">http://retro.hansotten.nl/?page_id=21551</guid>

					<description><![CDATA[KIM-1 TTY command summary &#8211; Connect the application connector with a TTY switch &#8211; Serial port in your terminal emulator settings 9600 bps (or less, 4800 or 2400 work best), 8N1 &#8211; Add character and line delay in your terminal emulator, see the TTY problems page &#8211; Press Enter (or any key with odd ASCII [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>KIM-1 TTY command summary</strong></p>
<p>&#8211; Connect the application connector <a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/the-kim-1-monitor-explained/sigma-kb-tty-selection/" data-wpel-link="internal">with a TTY switch</a><br />
&#8211; Serial port in your terminal emulator settings 9600 bps (or less, 4800 or 2400 work best), 8N1<br />
&#8211; Add character and line delay in your terminal emulator, <a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/the-kim-1-monitor-explained/serial-file-transfer-issues/" data-wpel-link="internal">see the TTY problems page</a><br />
&#8211; Press Enter (or <a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/the-kim-1-monitor-explained/sigma-kb-tty-selection/" data-wpel-link="internal">any key with odd ASCII value</a> after Reset to initialize serial bit rate. </p>
<p>After startup give the NMI and IRQ/BRK vector a known value</p>
<p><strong>NMI Initialization for Single Step and Stop</strong><br />
17FA 00<br />
17FB 1C </p>
<p><strong>IRQ Initialization for BRK </strong><br />
17FE 00<br />
17FF 1C </p>
<p>Make sure you are not in decimal mode:<br />
00F1 00</p>
<p>Machine Context saved/restored by ST/GO<br />
00EF PC low<br />
00F0 PC high<br />
00F1 Status Register (flags)<br />
00F2 Stack Pointer<br />
00F3 A<br />
00F4 Y<br />
00F5 X </p>
<p><strong>Breakpoints</strong><br />
&#8211; Write BRK instruction ($00) at desired address, program will be stopped here.<br />
&#8211; ST button: Pressing will invoke NMI interrupt.<br />
&#8211; Single Step: Set SST switch to on, type G to step one instruction from current location. </p>
<p><strong>Cassette Load and Save</strong> </p>
<p>12 Volt power source is only required when reading tapes </p>
<p><strong>Save to tape</strong><br />
&#8211; Store $00 in $00F1 (to ensure CPU is in binary mode).<br />
&#8211; Save start address (low/high) in $17F5, $17F6.<br />
&#8211; Save end address+1 (low/high) in $17F7, $17F8.<br />
&#8211; Write tape ID ($01-$FE) in $17F9.<br />
&#8211; Start tape in record mode.<br />
&#8211; Run address $1800 (DUMPT) to save. </p>
<p><strong>Load from tape</strong><br />
&#8211; Store $00 in $00F1 (to ensure CPU is in binary mode).<br />
&#8211; Write tape ID ($01-$FE, $00 loads any ID, $FF loads using start address values (low/high) in $17F5, $17F6) to $17F9.<br />
&#8211; Run address $1873 (LOADT) to load.<br />
&#8211; success of load: current address is 0000, error is FFFF</p>
<p><strong>TTY commands </strong></p>
<pre class="brush: plain; title: ; notranslate">
&lt;hex address&gt;         Show data at current address 
                      (hex characters shifted in to the left) 
&lt;hex data&amp;&gt;.          Write to current address 
&lt;Return&gt;              Next address 
&lt;Line Feed&gt;           Move to previous address  (CTRL/J)
L                     Load program from paper (error if ERR KIM is displayed)
Q                     Save memory to paper tape, saves from current address 
                      to end address stored at $17F7 (low), $17F8 (high) 
G                     Start program at current address 
                      (note: set F1 00 if not in SST mode) 
RUB OUT               restart the KIM-1 monitor
</pre>
<p>Note that pressing RUB OUT in current terminal emulators is not a standard key. I have done it with <a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/the-kim-1-monitor-explained/kim-1-and-rub-out/" data-wpel-link="internal">some customization in Teraterm for Windows</a>.<br />
In the KIM-1 Simulator the RUBOUT is patched to CTRL-G.</p>
<!-- relpost-thumb-wrapper --><div class="relpost-thumb-wrapper"><!-- filter-class --><div class="relpost-thumb-container"><h3>See also:</h3><div style="clear: both"></div><div style="clear: both"></div><!-- relpost-block-container --><div class="relpost-block-container relpost-block-column-layout" style="--relposth-columns: 3;--relposth-columns_t: 2; --relposth-columns_m: 2"><a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/kim-1-related-hardware/terc-kim-1-interface-set/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/20260524_150837-scaled.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">TERC KIM-1 Interface set</h2><div class="relpost_card_exerpt">A recent acquisition, the TERC (Technical Education Research Centers) KIM-1 Interface set. An educational tool to work w...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/6502-tester-nmos-cmos-1-8mhz/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/6502testers1.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">6502 tester NMOS CMOS 1-8MHz</h2><div class="relpost_card_exerpt">The 6502 W65C02 6502C CPU tester NMOS / CMOS 1-8MHz is a CPU tester for 40 pin 6502/65C02 and WD65C02 and Sally. 

The...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/20901-2/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/mc6800mcs6502.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">680x/650x Test system</h2><div class="relpost_card_exerpt">The 680x/650x Test system allows to test, with the CPU itself performing the test, the MC680X and MCS650X families.

T...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/backbit-chip-tester-pro-v2/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2025/11/chip-tester-pro-6530.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">Backbit Chip Tester PRO V2</h2><div class="relpost_card_exerpt">A simple tio use and effective component test and ROM dump can be done with the wonderful Backbit Chiptester Pro V2.

...</div></div></div></a></div><!-- close relpost-block-container --><div style="clear: both"></div></div><!-- close filter class --></div><!-- close relpost-thumb-wrapper -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Serial interface with RTS CTS handshake</title>
		<link>http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/the-kim-1-monitor-explained/serial-interface-with-rts-cts-handshake/</link>
		
		<dc:creator><![CDATA[hanso]]></dc:creator>
		<pubDate>Sat, 18 Jul 2026 15:07:49 +0000</pubDate>
				<category><![CDATA[6502]]></category>
		<category><![CDATA[kim-1]]></category>
		<guid isPermaLink="false">http://retro.hansotten.nl/?page_id=21532</guid>

					<description><![CDATA[To use a HEathkit H14 matrix printer in 1980 I have written a serial send character routine, inspired by OUTCH on Port B pin 0. The first version was simple, like OUTCH, at low speed to let the printer have time to do its work. The second version added RTS/CTS handshaking via a second Port [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>To use a HEathkit H14 matrix printer in 1980 I have written a serial send character routine, inspired by OUTCH on Port B pin 0.<br />
The first version was simple, like OUTCH, at low speed to let the printer have time to do its work.<br />
The second version added RTS/CTS handshaking via a second Port B pin as input.<br />
<a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/kim-1-articles/kim-1-printer-output-rs232-h14/" data-wpel-link="internal">Both were published in the Dutch KIM Club magazine</a> in 1980 and 1981, together with a parallel keyboard routine and integration into the MICO ADE Editor/Assembler.</p>
<p>Here I present the drivers, in a more general format to have a second serial output on the KIM-1 optionally with handshake.</p>
<p>The hardware to adapt the KIM-1 to the RS232C levels can be kept simple. Here some examples:</p>
<p><img loading="lazy" decoding="async" src="http://retro.hansotten.nl/wp-content/uploads/2026/07/fig1-1024x352.jpg" alt="" width="654" height="225" class="aligncenter size-large wp-image-21533" srcset="http://retro.hansotten.nl/wp-content/uploads/2026/07/fig1-1024x352.jpg 1024w, http://retro.hansotten.nl/wp-content/uploads/2026/07/fig1-300x103.jpg 300w, http://retro.hansotten.nl/wp-content/uploads/2026/07/fig1-150x52.jpg 150w, http://retro.hansotten.nl/wp-content/uploads/2026/07/fig1-768x264.jpg 768w, http://retro.hansotten.nl/wp-content/uploads/2026/07/fig1-1536x527.jpg 1536w, http://retro.hansotten.nl/wp-content/uploads/2026/07/fig1-2048x703.jpg 2048w, http://retro.hansotten.nl/wp-content/uploads/2026/07/fig1-3x1.jpg 3w"  sizes="(max-width: 654px) 100vw, 654px" /></p>
<p><img loading="lazy" decoding="async" src="http://retro.hansotten.nl/wp-content/uploads/2026/07/fig2-1024x808.jpg" alt="" width="654" height="516" class="aligncenter size-large wp-image-21534" srcset="http://retro.hansotten.nl/wp-content/uploads/2026/07/fig2-1024x808.jpg 1024w, http://retro.hansotten.nl/wp-content/uploads/2026/07/fig2-300x237.jpg 300w, http://retro.hansotten.nl/wp-content/uploads/2026/07/fig2-150x118.jpg 150w, http://retro.hansotten.nl/wp-content/uploads/2026/07/fig2-768x606.jpg 768w, http://retro.hansotten.nl/wp-content/uploads/2026/07/fig2-1x1.jpg 1w, http://retro.hansotten.nl/wp-content/uploads/2026/07/fig2.jpg 1152w"  sizes="(max-width: 654px) 100vw, 654px" /></p>
<p><a href="http://retro.hansotten.nl/uploads/files/KIM1serial RTSCTS.zip" data-wpel-link="internal">You can find the sources in TASM32 format here.</a> </p>
<pre class="brush: plain; title: ; notranslate">

0001   0000             ;
0002   0000             ; Serial output for example to drive a printer connected to a KIM-1
0003   0000             ; 1980 Original by Hans Otten
0004   0000             ; 2026 Cleaned of MICRO ADE artefacts and converted to TASM 
0005   0000             ;
0006   0000             ; Original in MICRO ADE syntax, curent version TASM32 Hans Otten, 2026
0007   0000             ;
0008   0000             ; Serial output routine (inspired by OUTCH in KIM-1 monitor) 
0009   0000             ; 
0010   0000             ; Send a byte in RS232C format via a PIA bit
0011   0000             ; 
0012   0000             ; Choose MASK0 and MASK1 so any pin of a PIA can be ued
0013   0000             ; Choose OUT for any PIA 6520/6521/6522/6530/6820/21. A 6522 VIA needs other initialization
0014   0000             ;
0015   0000             ; The baud rate is determined by using the following table for calling delay routine
0016   0000             ; BAUD    A   Y
0017   0000             ;   75   189  10
0018   0000             ;  110    80  0A
0019   0000             ;  300    9C  03
0020   0000             ;  600    D8  01
0021   0000             ; 1200    71  01
0022   0000             ; 2400        4C
0023   0000             ; 4800        22
0024   0000             ; 9600        14
0025   0000             ;
0026   0000             ; Use the second delay routine if only one value is given, w.o.w. above 1200 baud.
0027   0000             ;
0028   0000             ; In the following driver pin PB0 of the KIM-1 is chosen as output, and a baudrate of 4800. 
0029   0000             ; Adapt OUT, TI, TII, MSKO, MASKI and choose the applicable delay routine
0030   0000             ;
0031   0000             ; Serial driver without handshake via PB0 KIM-1  
0032   0000             ; Original Hans Otten KIM Kenner 12
0033   0000             ;
0034   0000             ;
0035   0000             ; Zeropage used, only during sending character
0036   0000             ;
0037   0000             CHAR	= $FE
0038   0000             TEMP	= $FD 
0039   0000             TMPX	= $FC
0040   0000             ;
0041   0000             MASKI	= $01				; set PB0 bit 0 of port for serial OUT 
0042   0000             MASKO	= $FE				; clear PB	 
0043   0000             ;
0044   0000             ; Port PBO address
0045   0000             ;
0046   0000             OUT		=  $1702	; PBDD data Port B
0047   0000             OUTD	=  $1703	; PBD  data direction Port B
0048   0000             
0049   0000             ;
0050   0200             		.ORG 	$0200
0051   0200             ;		
0052   0200 48          OUTPR	PHA					; save character
0053   0201 84 FD       		STY		TEMP		; save Y
0054   0203 86 FC       		STX		TMPX		; save X
0055   0205 85 FE       		STA		CHAR		; save character to send
0056   0207 AD 03 17    		LDA 	OUTD		;
0057   020A 09 01       		ORA		#MASKI		;
0058   020C 8D 03 17    		STA 	OUTD		; set Port B PB0 as output
0059   020F AD 02 17    		LDA		OUT			;
0060   0212 09 01       		ORA		#MASKI		; 
0061   0214 8D 02 17    		STA		OUT			; 
0062   0217 20 51 02    		JSR		TDELAY		; send out startbit 1
0063   021A A2 08       		LDX		#$08		; 8N1 8 databits
0064   021C AD 02 17    NEXTB	LDA		OUT			
0065   021F 46 FE       		LSR		CHAR		; lsb in carry
0066   0221 B0 04       		BCS		ONE			; bit is 1?
0067   0223 09 01       		ORA		#MASKI		; 
0068   0225 90 02       		BCC		BOUT			; set bit
0069   0227 29 FE       ONE		AND		#MASKO		; bit is 0
0070   0229 8D 02 17    BOUT	STA		OUT			; set bit
0071   022C 20 51 02    		JSR		TDELAY		; wait bit time
0072   022F CA          		DEX					; next bit
0073   0230 D0 EA       		BNE		NEXTB		;
0074   0232 AD 02 17    		LDA		OUT			; stop bit
0075   0235 29 FE       		AND		#MASKO		; is zero	
0076   0237 8D 02 17    		STA 	OUT		
0077   023A 20 51 02    		JSR 	TDELAY
0078   023D             ;		JSR		TDELAY		; if you want 2 stop bits
0079   023D A6 FC       		LDX		TMPX		; resatore X, Y, A
0080   023F A4 FD       		LDY		TEMP
0081   0241 68          		PLA
0082   0242 60          		RTS
0083   0243             
0084   0243             ;
0085   0243             ; 	Delay for 110 baud A, Y from table
0086   0243             ;
0087   0243 A0 0A       DELAY	LDY		#$0A		
0088   0245 A9 80       OLOOP	LDA		#$80
0089   0247 38          ILOOP	SEC
0090   0248 E9 01       		SBC		#$01		; inner loop A*7 -1
0091   024A D0 FB       		BNE		ILOOP
0092   024C EA          		NOP
0093   024D 88          		DEY
0094   024E D0 F5       		BNE		OLOOP		; 
0095   0250 60          		RTS
0096   0251             	
0097   0251 A0 0E       TDELAY	LDY		#14			; time = Y+5 -1
0098   0253 88          TDLOOP	DEY
0099   0254 D0 FD       		BNE 	TDLOOP
0100   0256 60          		RTS
0101   0257             		
0102   0257             		.END



Label        Value      Label        Value      Label        Value
------------------      ------------------      ------------------
BOUT          0229      CHAR          00FE      DELAY         0243      
ILOOP         0247      MASKI         0001      MASKO         00FE      
NEXTB         021C      OUT           1702      OUTD          1703      
OUTPR         0200      ONE           0227      OLOOP         0245      
TEMP          00FD      TMPX          00FC      TDELAY        0251      
TDLOOP        0253      

tasm: Number of errors = 0


0001   0000             ;
0002   0000             ; Serial output for example to drive e.g. a serial interface printer connected to a KIM-1
0003   0000             ; 1980 Original by Hans Otten
0004   0000             ; 1981 adapted to RTS CTS handshaking
0005   0000             ; 2026 Cleaned of MICRO ADE artefacts and converted to TASM 
0006   0000             ;
0007   0000             ; Original in MICRO ADE syntax, curent version TASM32 Hans Otten, 2026
0008   0000             ;
0009   0000             ; Serial output routine (inspired by OUTCH in KIM-1 monitor) 
0010   0000             ; 
0011   0000             ; Send a byte in RS232C format via a PIA bit
0012   0000             ; 
0013   0000             ; Choose MASK0 and MASK1 so any pin of a Port can be used for serial output
0014   0000             ; Chsooe MSKCTS to select a pin for input of the RTS/CTA handshake line.
0015   0000             ; Assumed both pins are on the same port.
0016   0000             ; Choose OUT for any PIA 6520/6521/6522/6530/6820/21. A 6522 VIA needs other initialization
0017   0000             ;
0018   0000             ; The baud rate is determined by using the following table for calling delay routine
0019   0000             ; BAUD    A   Y
0020   0000             ;   75   189  10
0021   0000             ;  110    80  0A
0022   0000             ;  300    9C  03
0023   0000             ;  600    D8  01
0024   0000             ; 1200    71  01
0025   0000             ; 2400        4C
0026   0000             ; 4800        22
0027   0000             ; 9600        14
0028   0000             ;
0029   0000             ; Use the second delay routine if only one value is given, w.ow above 1200 baud.
0030   0000             ;
0031   0000             ; In the following driver pin PB0 of the KIM-1 is chosen as output, and a baudrate of 4800
0032   0000             ; For RTS/CTS handling pin PB1 is used as input
0033   0000             ; Adapt OUT, TI, TII, MASKO, MASKI and MSKCTS and choose the applicable delay routine
0034   0000             ;
0035   0000             ; Serial driver with via PB0 KIM-1  
0036   0000             ; Original Hans Otten PGJ de Beer KIM Kenner 19
0037   0000             ;
0038   0000             ; Zeropage used, only during sending character
0039   0000             ;
0040   0000             CHAR	= $FE
0041   0000             TEMP	= $FD 
0042   0000             TMPX	= $FC
0043   0000             ;
0044   0000             MASKI	= $01				; set PB0 bit 0 of port for serial OUT 
0045   0000             MASKO	= $FE				; clear PB	 
0046   0000             MSKCTS  = $02				; isolate RTS CTS pin, here PB1
0047   0000             MSKCTI	= $FD 
0048   0000             ;
0049   0000             ; Port PBO, PB1 addresses
0050   0000             ;
0051   0000             OUT		=  $1702	; PBDD data  Port B
0052   0000             OUTD	=  $1703	; PBD  data direction Port B
0053   0000             
0054   0000             ;
0055   0300             		.ORG 	$0300
0056   0300             ;		
0057   0300 08          OUTPR	PHP
0058   0301 48          		PHA					; save character
0059   0302 84 FD       		STY		TEMP		; save Y
0060   0304 86 FC       		STX		TMPX		; save X
0061   0306 85 FE       		STA		CHAR		; save character to send
0062   0308 AD 03 17    		LDA 	OUTD		;
0063   030B 09 01       		ORA		#MASKI		; output pin serial
0064   030D 29 FD       		AND		#MSKCTI		; input pin RTS
0065   030F 8D 03 17    		STA 	OUTD		; set Port B PB0 as output, PB1 as input
0066   0312 AD 02 17    BUFF	LDA		OUT
0067   0315 29 02       		AND		#MSKCTS		; is RTS active?
0068   0317 F0 F9       		BEQ		BUFF		; wait
0069   0319 AD 02 17    		LDA		OUT			;
0070   031C 09 01       		ORA		#MASKI		; 
0071   031E 8D 02 17    		STA		OUT			; 
0072   0321 20 5B 03    		JSR		TDELAY		; send out startbit 1
0073   0324 A2 08       		LDX		#$08		; 8N1 8 databits
0074   0326 AD 02 17    NEXTB	LDA		OUT			
0075   0329 46 FE       		LSR		CHAR		; lsb in carry
0076   032B B0 04       		BCS		ONE			; bit is 1?
0077   032D 09 01       		ORA		#MASKI		; 
0078   032F 90 02       		BCC		BOUT			; set bit
0079   0331 29 FE       ONE		AND		#MASKO		; bit is 0
0080   0333 8D 02 17    BOUT	STA		OUT			; set bit
0081   0336 20 5B 03    		JSR		TDELAY		; wait bit time
0082   0339 CA          		DEX					; next bit
0083   033A D0 EA       		BNE		NEXTB		;
0084   033C AD 02 17    		LDA		OUT			; stop bit
0085   033F 29 FE       		AND		#MASKO		; is zero	
0086   0341 8D 02 17    		STA 	OUT		
0087   0344 20 5B 03    		JSR 	TDELAY
0088   0347             ;		JSR		TDELAY		; if you want 2 stop bits
0089   0347 A6 FC       		LDX		TMPX		; resatore X, Y, A
0090   0349 A4 FD       		LDY		TEMP
0091   034B 68          		PLA
0092   034C 60          		RTS
0093   034D             
0094   034D             ;
0095   034D             ; 	Delay for 110 baud A, Y from table
0096   034D             ;
0097   034D A0 0A       DELAY	LDY		#$0A		
0098   034F A9 80       OLOOP	LDA		#$80
0099   0351 38          ILOOP	SEC
0100   0352 E9 01       		SBC		#$01		; inner loop A*7 -1
0101   0354 D0 FB       		BNE		ILOOP
0102   0356 EA          		NOP
0103   0357 88          		DEY
0104   0358 D0 F5       		BNE		OLOOP		; 
0105   035A 60          		RTS
0106   035B             	
0107   035B A0 0E       TDELAY	LDY		#14			; time = Y+5 -1
0108   035D 88          TDLOOP	DEY
0109   035E D0 FD       		BNE 	TDLOOP
0110   0360 60          		RTS
0111   0361             		
0112   0361             		.END



Label        Value      Label        Value      Label        Value
------------------      ------------------      ------------------
BUFF          0312      BOUT          0333      CHAR          00FE      
DELAY         034D      ILOOP         0351      MASKI         0001      
MASKO         00FE      MSKCTS        0002      MSKCTI        00FD      
NEXTB         0326      OUT           1702      OUTD          1703      
OUTPR         0300      ONE           0331      OLOOP         034F      
TEMP          00FD      TMPX          00FC      TDELAY        035B      
TDLOOP        035D      

tasm: Number of errors = 0


</pre>
<!-- relpost-thumb-wrapper --><div class="relpost-thumb-wrapper"><!-- filter-class --><div class="relpost-thumb-container"><h3>See also:</h3><div style="clear: both"></div><div style="clear: both"></div><!-- relpost-block-container --><div class="relpost-block-container relpost-block-column-layout" style="--relposth-columns: 3;--relposth-columns_t: 2; --relposth-columns_m: 2"><a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/kim-1-related-hardware/terc-kim-1-interface-set/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/20260524_150837-scaled.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">TERC KIM-1 Interface set</h2><div class="relpost_card_exerpt">A recent acquisition, the TERC (Technical Education Research Centers) KIM-1 Interface set. An educational tool to work w...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/6502-tester-nmos-cmos-1-8mhz/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/6502testers1.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">6502 tester NMOS CMOS 1-8MHz</h2><div class="relpost_card_exerpt">The 6502 W65C02 6502C CPU tester NMOS / CMOS 1-8MHz is a CPU tester for 40 pin 6502/65C02 and WD65C02 and Sally. 

The...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/20901-2/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/mc6800mcs6502.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">680x/650x Test system</h2><div class="relpost_card_exerpt">The 680x/650x Test system allows to test, with the CPU itself performing the test, the MC680X and MCS650X families.

T...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/backbit-chip-tester-pro-v2/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2025/11/chip-tester-pro-6530.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">Backbit Chip Tester PRO V2</h2><div class="relpost_card_exerpt">A simple tio use and effective component test and ROM dump can be done with the wonderful Backbit Chiptester Pro V2.

...</div></div></div></a></div><!-- close relpost-block-container --><div style="clear: both"></div></div><!-- close filter class --></div><!-- close relpost-thumb-wrapper -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>KIM-1 monitor data storage</title>
		<link>http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/the-kim-1-monitor-explained/kim-1-monitor-data-storage/</link>
		
		<dc:creator><![CDATA[hanso]]></dc:creator>
		<pubDate>Fri, 17 Jul 2026 10:41:26 +0000</pubDate>
				<category><![CDATA[6502]]></category>
		<category><![CDATA[kim-1]]></category>
		<guid isPermaLink="false">http://retro.hansotten.nl/?page_id=21525</guid>

					<description><![CDATA[The 6530-002 and 6530-003 software use these data areas. When your program wants to sue these locations, be aware they can be altered by the monitor or you can make the monitor misbehave. Reading is OK, writing there requires you know what the monitor does there. 0069 00EF .ORG $00EF 0070 00EF ; MPU REG. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>The 6530-002 and 6530-003 software use these data areas.</p>
<p>When your program wants to sue these locations, be aware they can be altered by the monitor or you can make the monitor misbehave.<br />
Reading is OK, writing there requires you know what the monitor does there.</p>
<pre class="brush: plain; title: ; notranslate">
0069   00EF                        .ORG $00EF      
0070   00EF             ;       	MPU REG.  SAVX AREA IN PAGE 0   
0071   00EF             ;
0072   00EF             PCL     .BLOCK  1          ; PROGRAM CNT LOW
0073   00F0             PCH     .BLOCK  1          ; PROGRAM CNT HI
0074   00F1             PREG    .BLOCK  1          ; CURRENT STATUS REG.
0075   00F2             SPUSER  .BLOCK  1          ; CURRENT STACK POINT
0076   00F3             ACC     .BLOCK  1          ; ACCUMULATOR
0077   00F4             YREG    .BLOCK  1          ; Y INDEX
0078   00F5             XREG    .BLOCK  1          ; X INDEX
0079   00F6             ;
0080   00F6             ;       KIM FIXED AREA IN PAGE 0  
0081   00F6             ;
0082   00F6             CHKHI   .BLOCK  1
0083   00F7             CHKSUM  .BLOCK  1
0084   00F8             INL     .BLOCK  1          ; INPUT BUFFER
0085   00F9             INH     .BLOCK  1          ; INPUT BUFFER
0086   00FA             POINTL  .BLOCK  1          ; LSB OF OPEN CELL
0087   00FB             POINTH  .BLOCK  1          ; MSB OF OPEN CELL
0088   00FC             TEMP    .BLOCK  1
0089   00FD             TMPX    .BLOCK  1
0090   00FE             CHAR    .BLOCK  1
0091   00FF             MODE    .BLOCK  1
0092   0100             ;
0093   0100             ;       KIM FIXED AREA IN PAGE 23  (in 6530-002 RAM)
0095   17E7                     .ORG $17E7
0096   17E7             CHKL    .BLOCK  1
0097   17E8             CHKH    .BLOCK  1          ; CHKSUM
0098   17E9             SAVX    .BLOCK  3          
0099   17EC             VEB     .BLOCK  6          ; VOLATILE EXEC BLOCK (6-B)
0100   17F2             CNTL30  .BLOCK  1          ; TTY DELAY
0101   17F3             CNTH30  .BLOCK  1          ; TTY DELAY
0102   17F4             TIMH    .BLOCK  1
0103   17F5             SAL     .BLOCK  1          ; LOW STARTING ADDRESS
0104   17F6             SAH     .BLOCK  1          ; HI STARTING ADDRESS
0105   17F7             EAL     .BLOCK  1          ; LOW ENDING ADDRESS
0106   17F8             EAH     .BLOCK  1          ; HI ENDING ADDRESS
0107   17F9             ID      .BLOCK  1          ; 
0108   17FA             ;
0109   17FA             ;       INTERRUPT VECTORS 
0110   17FA             ;
0111   17FA             NMIV    .BLOCK  2          ; STOP VECTOR (STOP=1C00)
0112   17FC             RSTV    .BLOCK  2          ; RST VECTOR
0113   17FE             IRQV    .BLOCK  2          ; IRQ VECTOR (BRK=1C00)
</pre>
<!-- relpost-thumb-wrapper --><div class="relpost-thumb-wrapper"><!-- filter-class --><div class="relpost-thumb-container"><h3>See also:</h3><div style="clear: both"></div><div style="clear: both"></div><!-- relpost-block-container --><div class="relpost-block-container relpost-block-column-layout" style="--relposth-columns: 3;--relposth-columns_t: 2; --relposth-columns_m: 2"><a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/kim-1-related-hardware/terc-kim-1-interface-set/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/20260524_150837-scaled.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">TERC KIM-1 Interface set</h2><div class="relpost_card_exerpt">A recent acquisition, the TERC (Technical Education Research Centers) KIM-1 Interface set. An educational tool to work w...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/6502-tester-nmos-cmos-1-8mhz/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/6502testers1.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">6502 tester NMOS CMOS 1-8MHz</h2><div class="relpost_card_exerpt">The 6502 W65C02 6502C CPU tester NMOS / CMOS 1-8MHz is a CPU tester for 40 pin 6502/65C02 and WD65C02 and Sally. 

The...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/20901-2/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/mc6800mcs6502.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">680x/650x Test system</h2><div class="relpost_card_exerpt">The 680x/650x Test system allows to test, with the CPU itself performing the test, the MC680X and MCS650X families.

T...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/backbit-chip-tester-pro-v2/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2025/11/chip-tester-pro-6530.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">Backbit Chip Tester PRO V2</h2><div class="relpost_card_exerpt">A simple tio use and effective component test and ROM dump can be done with the wonderful Backbit Chiptester Pro V2.

...</div></div></div></a></div><!-- close relpost-block-container --><div style="clear: both"></div></div><!-- close filter class --></div><!-- close relpost-thumb-wrapper -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Dump to tape</title>
		<link>http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/the-kim-1-monitor-explained/dump-to-tape/</link>
		
		<dc:creator><![CDATA[hanso]]></dc:creator>
		<pubDate>Mon, 13 Jul 2026 12:02:12 +0000</pubDate>
				<category><![CDATA[6502]]></category>
		<category><![CDATA[kim-1]]></category>
		<guid isPermaLink="false">http://retro.hansotten.nl/?page_id=21445</guid>

					<description><![CDATA[DUMPT dumps via bitbanging a KIM-1 audio tape file. Very straight forward well commented source. See also the user manual, which explains the technique quite well. 0119 1800 ; DUMP MEMORY TO TAPE 0120 1800 0121 1800 A9 AD DUMPT LDA #$AD ; LOAD ABSOLUTE INST 0122 1802 8D EC 17 STA VEB 0123 1805 [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>DUMPT dumps via bitbanging a KIM-1 audio tape file.</p>
<p>Very straight forward well commented source.<br />
See also the user manual, which explains the technique quite well.</p>
<pre class="brush: plain; title: ; notranslate">
0119   1800             ;       DUMP MEMORY TO TAPE 
0120   1800               
0121   1800 A9 AD       DUMPT   LDA   #$AD         ; LOAD ABSOLUTE INST
0122   1802 8D EC 17            STA   VEB
0123   1805 20 32 19            JSR   INTVEB
0124   1808             ;             
0125   1808 A9 27               LDA   #$27         ; TURN OFF DATAIN PB5
0126   180A 8D 42 17            STA   SBD          
0127   180D A9 BF               LDA   #$BF         ; CONVERT PB7 TO OUTPUT
0128   180F 8D 43 17            STA   PBDD         
0129   1812             ;                          
0130   1812 A2 64               LDX   #$64         ; 100 CHARS
0131   1814 A9 16       DUMPT1 LDA    #$16         ; SYNC CHAR&#039;S
0132   1816 20 7A 19            JSR   OUTCHT       
0133   1819 CA                  DEX                
0134   181A D0 F8               BNE   DUMPT1       
0135   181C             ;                         
0136   181C             
0137   181C A9 2A       	LDA   #$2A         ; START CHAR
0138   181E 20 7A 19            JSR   OUTCHT        
0139   1821             ;
0140   1821 AD F9 17            LDA   ID           ; OUTPUT ID
0141   1824 20 61 19            JSR   OUTBT         
0142   1827             ;
0143   1827 AD F5 17            LDA   SAL          ; OUTPUT STARTING
0144   182A 20 5E 19            JSR   OUTBTC       ; ADDRESS
0145   182D AD F6 17            LDA   SAH           
0146   1830 20 5E 19            JSR   OUTBTC        
0147   1833             ;
0148   1833 AD ED 17    DUMPT2  LDA   VEB+1        ; CHECK FOR LAST
0149   1836 CD F7 17            CMP   EAL          ; DATA BYTE
0150   1839 AD EE 17            LDA   VEB+2         
0151   183C ED F8 17            SBC   EAH           
0152   183F 90 24               BCC   DUMPT4        
0153   1841             ;
0154   1841 A9 2F               LDA   #$2F;        ; OUTPUT END OF DATA CHAR
0155   1843 20 7A 19            JSR   OUTCHT        
0156   1846 AD E7 17            LDA   CHKL         ; LAST BYTE HAS BEEN
0157   1849 20 61 19            JSR   OUTBT        ; OUT PUT    NOW OUTPUT
0158   184C AD E8 17            LDA   CHKH         ; CHKSUM
0159   184F 20 61 19            JSR   OUTBT         
0160   1852             ;
0161   1852             ;
0162   1852 A2 02               LDX   #$02         ; 2 CHAR&#039;S
0163   1854 A9 04       DUMPT3  LDA   #$04         ; EOT CHAR
0164   1856 20 7A 19            JSR   OUTCHT        
0165   1859 CA                  DEX                 
0166   185A D0 F8               BNE   DUMPT3   
0167   185C             		
0168   185C A9 00               LDA   #$00         ; DISPLAY 0000
0169   185E 85 FA               STA   POINTL       ; FOR NORMAL EXIT
0170   1860 85 FB               STA   POINTH        
0171   1862 4C 4F 1C            JMP   START         
0172   1865             ;
0173   1865 20 EC 17    DUMPT4  JSR   VEB          ; DATA BYTE OUTPUT
0174   1868 20 5E 19            JSR   OUTBTC  
0175   186B             ;		
0176   186B 20 EA 19            JSR   INCVEB
0177   186E 4C 33 18            JMP   DUMPT2
</pre>
<!-- relpost-thumb-wrapper --><div class="relpost-thumb-wrapper"><!-- filter-class --><div class="relpost-thumb-container"><h3>See also:</h3><div style="clear: both"></div><div style="clear: both"></div><!-- relpost-block-container --><div class="relpost-block-container relpost-block-column-layout" style="--relposth-columns: 3;--relposth-columns_t: 2; --relposth-columns_m: 2"><a href="http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/kim-1-related-hardware/terc-kim-1-interface-set/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/20260524_150837-scaled.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">TERC KIM-1 Interface set</h2><div class="relpost_card_exerpt">A recent acquisition, the TERC (Technical Education Research Centers) KIM-1 Interface set. An educational tool to work w...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/6502-tester-nmos-cmos-1-8mhz/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/6502testers1.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">6502 tester NMOS CMOS 1-8MHz</h2><div class="relpost_card_exerpt">The 6502 W65C02 6502C CPU tester NMOS / CMOS 1-8MHz is a CPU tester for 40 pin 6502/65C02 and WD65C02 and Sally. 

The...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/20901-2/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2026/05/mc6800mcs6502.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">680x/650x Test system</h2><div class="relpost_card_exerpt">The 680x/650x Test system allows to test, with the CPU itself performing the test, the MC680X and MCS650X families.

T...</div></div></div></a><a href="http://retro.hansotten.nl/what-cpu-is-this-6502-and-other-component-testers/backbit-chip-tester-pro-v2/" class="relpost-block-single" data-wpel-link="internal"><div class="relpost-custom-block-single"><div class="relpost-block-single-image rpt-lazyload" aria-hidden="true" role="img" data-bg="http://retro.hansotten.nl/wp-content/uploads/2025/11/chip-tester-pro-6530.jpg" style="background: transparent no-repeat scroll 0% 0%; width: 150px; height: 150px; aspect-ratio: 1/1;"></div><div class="relpost-block-single-text"  style="height: 125px;font-family: Arial;  font-size: 12px;  color: #333333;"><h2 class="relpost_card_title">Backbit Chip Tester PRO V2</h2><div class="relpost_card_exerpt">A simple tio use and effective component test and ROM dump can be done with the wonderful Backbit Chiptester Pro V2.

...</div></div></div></a></div><!-- close relpost-block-container --><div style="clear: both"></div></div><!-- close filter class --></div><!-- close relpost-thumb-wrapper -->]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
