{"id":1798,"date":"2025-05-08T14:17:06","date_gmt":"2025-05-08T12:17:06","guid":{"rendered":"https:\/\/www.pagetable.com\/?p=1798"},"modified":"2025-05-13T15:16:54","modified_gmt":"2025-05-13T13:16:54","slug":"6502-illegal-opcodes-in-the-siemens-pc-100-assembly-manual-1980","status":"publish","type":"post","link":"https:\/\/www.pagetable.com\/?p=1798","title":{"rendered":"6502 Illegal Opcodes in the Siemens PC 100 Assembly Manual (1980)"},"content":{"rendered":"<p>The 6502&rsquo;s <a href=\"https:\/\/www.pagetable.com\/?p=39\">&ldquo;illegal&rdquo; opcodes<\/a> were of intense interest to home computer enthusiasts, and analyses were published in <a href=\"https:\/\/www.atarimagazines.com\/compute\/issue41\/Extra_Instructions.php\">various<\/a> <a href=\"https:\/\/www.64er-magazin.de\/8503\/opcodes.html\">magazines<\/a>. But one would have never expected a company like Siemens to document illegal opcodes in a programming manual from 1980.<\/p>\n<h2 id=\"the-pc-100-assembly-manual\">The PC 100 Assembly Manual<\/h2>\n<p>The Siemens PC 100 is basically a Rockwell AIM-65 single-board computer in a case, featuring a 6502 processor, integrated keyboard, LED display, and thermal printer, tailored for educational and development purposes with localized documentation and modified ROMs.<\/p>\n<p>Siemens&#8217; German-language manuals  were largely based on Rockwell&rsquo;s originals, but shuffled the contents. Of particular interest is the assembly manual:<\/p>\n<p><a href=\"docs\/pc100_illop\/Assembler-Handbuch Personal-Computer PC 100.pdf\"><img fetchpriority=\"high\" decoding=\"async\" src=\"docs\/pc100_illop\/Assembler-Handbuch Personal-Computer PC 100.jpg\" width=\"300\" height=\"436\" alt=\"\"\/ style=\"border: 1px solid black;\"><br \/>Siemens Assembler-Handbuch Personal-Computer PC 100, Ausgabe 1980\/1981<\/a><br \/>(124 pages, 17 MB)<\/a><\/p>\n<p>It consists of:<\/p>\n<table>\n<thead>\n<tr>\n<th> Assembler-Handbuch <\/th>\n<th> Rockwell                      <\/th>\n<th> Description           <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> Chapters 1\u20139       <\/td>\n<td> <a href=\"https:\/\/archive.org\/details\/AIM65UsersGuide\/page\/n148\/mode\/1up\">User&rsquo;s Guide, Chapter 5<\/a>       <\/td>\n<td> Assembler Reference   <\/td>\n<\/tr>\n<tr>\n<td> Chapter 10         <\/td>\n<td> <a href=\"https:\/\/archive.org\/details\/r-6500-microcomputer-system-programming-manual\/page\/n200\/mode\/1up\">Programming Manual, Appendix B<\/a> <\/td>\n<td> 6502 Reference        <\/td>\n<\/tr>\n<tr>\n<td> Chapter 11         <\/td>\n<td> <a href=\"https:\/\/archive.org\/details\/AIM65UsersGuide\/page\/n64\/mode\/1up\">User&rsquo;s Guide, Chapter 3<\/a>       <\/td>\n<td> Monitor Reference     <\/td>\n<\/tr>\n<tr>\n<td> Chapter 12         <\/td>\n<td> \u2013                             <\/td>\n<td> Tables                <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"-special-instructions-\">&ldquo;Special Instructions&rdquo;<\/h2>\n<p>The 6502 Reference has three extra pages at the end describing &ldquo;Sonderbefehle&rdquo; (&ldquo;special instructions&rdquo;) that were not in the original MOS\/Rockwell 6502 reference that this chapter is a translation of. We can assume this was original research by Siemens.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"docs\/pc100_illop\/pc100_asm_082.png\" height=\"995\" width=\"669\" alt=\"\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"docs\/pc100_illop\/pc100_asm_083.png\" height=\"995\" width=\"669\" alt=\"\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"docs\/pc100_illop\/pc100_asm_084.png\" height=\"995\" width=\"669\" alt=\"\" \/><\/p>\n<p>Here is the translated transcription:<\/p>\n<p><!-- \n\n<div style=\"border: 1px solid black;\"> --><\/p>\n<p><strong>10.3 Special Instructions<\/strong><\/p>\n<p>The microprocessor recognizes a number of special instructions that are largely unknown but can provide valuable assistance to the user in program development. The chosen mnemonics in the following tables are merely recommendations for effectively representing these instructions.<\/p>\n<p><em>Note:<\/em><br \/>\n<em>These instructions are not part of the specification and may be changed at any time without notice. The special commands cannot be decoded by the assembler program and must be programmed using the .BYT directive (see Chapter 10.2).<\/em><\/p>\n<p><strong>AAX<\/strong> Logical &ldquo;AND&rdquo; operation between the accumulator and X-register, with result storage.<\/p>\n<p><strong>Operation<\/strong> A \u2227 X \u2192 M with Zero Page und (A) \u2227 X \u2227 $02 \u2192 M with Absolute<\/p>\n<p><strong>Flags<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th> N <\/th>\n<th> Z <\/th>\n<th> C <\/th>\n<th> I <\/th>\n<th> D <\/th>\n<th> V <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> \u2013 <\/td>\n<td> \u2013 <\/td>\n<td> \u2013 <\/td>\n<td> \u2013 <\/td>\n<td> \u2013 <\/td>\n<td> \u2013 <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<thead>\n<tr>\n<th> Addressing Mode                 <\/th>\n<th> Assembler Mnemonic <\/th>\n<th> OP CODE <\/th>\n<th> No. Bytes <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> Zero Page                       <\/td>\n<td> AAX Oper           <\/td>\n<td> 87      <\/td>\n<td> 2         <\/td>\n<\/tr>\n<tr>\n<td> Zero Page, Y                    <\/td>\n<td> AAX+16 Oper        <\/td>\n<td> 97      <\/td>\n<td> 2         <\/td>\n<\/tr>\n<tr>\n<td> X-Reg. \u2227 $02<br \/>Absolute        <\/td>\n<td> AAX+23 Oper        <\/td>\n<td> 9E      <\/td>\n<td> 3         <\/td>\n<\/tr>\n<tr>\n<td> X-Reg. \u2227 Accu \u2227 $02<br \/>Absolute <\/td>\n<td> AAX+24 Oper        <\/td>\n<td> 9F      <\/td>\n<td> 3         <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>DCM<\/strong> Decrement memory location by one and compare result with accumulator.<\/p>\n<p><strong>Operation<\/strong> M &#8211; 1 \u2192 M and A &#8211; M<\/p>\n<p><strong>Flags<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th> N <\/th>\n<th> Z <\/th>\n<th> C <\/th>\n<th> I <\/th>\n<th> D <\/th>\n<th> V <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> V <\/td>\n<td> V <\/td>\n<td> V <\/td>\n<td> \u2013 <\/td>\n<td> \u2013 <\/td>\n<td> \u2013 <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<thead>\n<tr>\n<th> Addressing Mode  <\/th>\n<th> Assembler Mnemonic <\/th>\n<th> OP CODE <\/th>\n<th> No. Bytes <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> Zero Page        <\/td>\n<td> DCM Oper           <\/td>\n<td> C7      <\/td>\n<td> 2         <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>LAX<\/strong> Load accumulator and X register<\/p>\n<p><strong>Operation<\/strong> M \u2192 A and M \u2192 X<\/p>\n<p><strong>Flags<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th> N <\/th>\n<th> Z <\/th>\n<th> C <\/th>\n<th> I <\/th>\n<th> D <\/th>\n<th> V <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> V <\/td>\n<td> V <\/td>\n<td> &#8211; <\/td>\n<td> \u2013 <\/td>\n<td> \u2013 <\/td>\n<td> \u2013 <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<thead>\n<tr>\n<th> Addressing Mode <\/th>\n<th> Assembler Mnemonic   <\/th>\n<th> OP CODE <\/th>\n<th> No. Bytes <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> Immediate       <\/td>\n<td> LAX Oper             <\/td>\n<td> AB      <\/td>\n<td> 2         <\/td>\n<\/tr>\n<tr>\n<td> Zero Page       <\/td>\n<td> LAX-4 Oper           <\/td>\n<td> A7      <\/td>\n<td> 2         <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>ISB<\/strong> Increment memory cell by one and subtract result from accumulator<\/p>\n<p><strong>Operation<\/strong> M + 1 \u2192 M and A &#8211; M \u2192 A<\/p>\n<p><strong>Flags<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th> N <\/th>\n<th> Z <\/th>\n<th> C <\/th>\n<th> I <\/th>\n<th> D <\/th>\n<th> V <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> V <\/td>\n<td> V <\/td>\n<td> V <\/td>\n<td> \u2013 <\/td>\n<td> \u2013 <\/td>\n<td> \u2013 <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<thead>\n<tr>\n<th> Addressing Mode <\/th>\n<th> Assembler Mnemonic   <\/th>\n<th> OP CODE <\/th>\n<th> No. Bytes <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> Zero Page       <\/td>\n<td> ISB Oper             <\/td>\n<td> E7      <\/td>\n<td> 2         <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><em>Note:<\/em><br \/>\n<em>The instructions LAX Immediate, AAX X reg $02 and AAX X reg accu $02 are not always processed correctly.<\/em><\/p>\n<p><strong>10.4 Programming in Assembly Language<\/strong><\/p>\n<p>Since the special instructions mentioned above cannot be decoded by the assembler program, they must be programmed using the .BYT directive.<\/p>\n<\/div>\n<h2 id=\"analysis\">Analysis<\/h2>\n<table>\n<thead>\n<tr>\n<th> Opcodes <\/th>\n<th> Siemens<br \/>Mnemonic <\/th>\n<th> Modern<br \/>Mnemonic <\/th>\n<th> Comment <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> 87\/97 <\/td>\n<td> AAX <\/td>\n<td> SAX <\/td>\n<td> Correct. Also exists with izx\/abs addressing modes. <\/td>\n<\/tr>\n<tr>\n<td> 9E\/9F <\/td>\n<td> AAX <\/td>\n<td> SHX\/SHA<\/td>\n<td> It&rsquo;s aby, not abs. Also, their constant ($02) is actually the high-byte of the instruction address. (It should not be grouped with the other &ldquo;AAX&rdquo; opcodes.) <\/td>\n<\/tr>\n<tr>\n<td> C7 <\/td>\n<td> DCM <\/td>\n<td> DCP <\/td>\n<td> Correct. Also exists with zpx\/izx\/izy\/abs\/abx\/aby addressing modes. <\/td>\n<\/tr>\n<tr>\n<td> AB <\/td>\n<td> LAX <\/td>\n<td> LAX <\/td>\n<td> Basically correct. The documented unstability comes from bits of the A register sometimes bleeding into the calculation. (<a href=\"https:\/\/www.nesdev.org\/wiki\/Visual6502wiki\/6502_Opcode_8B_(XAA,_ANE%29\">More info<\/a>) <\/td>\n<\/tr>\n<tr>\n<td> A7 <\/td>\n<td> LAX <\/td>\n<td> LAX <\/td>\n<td> Correct. Also exists with zpy\/izx\/izy\/abs\/aby addressing modes. <\/td>\n<\/tr>\n<tr>\n<td> E7 <\/td>\n<td> ISB <\/td>\n<td> ISC <\/td>\n<td> Correct. Also exists zpx\/izx\/izy\/abs\/abx\/aby addressing modes. <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>All in all:<\/p>\n<ul>\n<li>They got the ones they designated as &ldquo;stable&rdquo; right, but were missing many addressing modes.<\/li>\n<li>They got 9E\/9F wrong (which they designated as &ldquo;unstable&rdquo;), probably by not testing enough inputs combinations.<\/li>\n<li>They got AB right (actually unstable), but they did not research the root of the instability further.<\/li>\n<\/ul>\n<p>We can assume that this is either original research by a Siemens author \u2013 or they copied it from some other source. If the information had come from MOS or Rockwell, they would surely have<\/p>\n<ul>\n<li>listed all addressing modes.<\/li>\n<li>not added a statement like <em>&ldquo;The instructions [&hellip;] and [&hellip;] are not always processed correctly.&rdquo;<\/em> \u2013 or better yet, omitted the unstable ones.<\/li>\n<\/ul>\n<h2 id=\"credits\">Credits<\/h2>\n<p>Thanks to Gerald Schiepeck for his AIM-65 and PC 100 exhibition at the <a href=\"https:\/\/www.vcfe.org\/D\/\">VCFE 2025<\/a>, and Marco Baye for bringing the section in the assembly manual to my attention.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The 6502&rsquo;s &ldquo;illegal&rdquo; opcodes were of intense interest to home computer enthusiasts, and analyses were published in various magazines. But one would have never expected a company like Siemens to document illegal opcodes in a programming manual from 1980. The PC 100 Assembly Manual The Siemens PC 100 is basically a Rockwell AIM-65 single-board computer &#8230; <a title=\"6502 Illegal Opcodes in the Siemens PC 100 Assembly Manual (1980)\" class=\"read-more\" href=\"https:\/\/www.pagetable.com\/?p=1798\" aria-label=\"Read more about 6502 Illegal Opcodes in the Siemens PC 100 Assembly Manual (1980)\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,5,20],"tags":[],"class_list":["post-1798","post","type-post","status-publish","format-standard","hentry","category-2","category-archeology","category-literature"],"_links":{"self":[{"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/posts\/1798","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1798"}],"version-history":[{"count":2,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/posts\/1798\/revisions"}],"predecessor-version":[{"id":1800,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/posts\/1798\/revisions\/1800"}],"wp:attachment":[{"href":"https:\/\/www.pagetable.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1798"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1798"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}