{"id":71107,"date":"2021-11-05T07:26:56","date_gmt":"2021-11-05T07:26:56","guid":{"rendered":"https:\/\/papersspot.com\/blog\/2021\/11\/05\/parity-bit-adding-program\/"},"modified":"2021-11-05T07:26:56","modified_gmt":"2021-11-05T07:26:56","slug":"parity-bit-adding-program","status":"publish","type":"post","link":"https:\/\/papersspot.com\/blog\/2021\/11\/05\/parity-bit-adding-program\/","title":{"rendered":"Parity-Bit Adding Program"},"content":{"rendered":"<p>Write a program in 68K assembly code that adds an odd parity to each ASCII character. Your code must satisfy the following specifications: <br \/> Define the following 64 characters in the SRC address. <br \/> SRC: DC.B &#8216;Computing and Software Systems, University of Washington Bothell&#8217; <br \/> Define the 64-byte space. <br \/>Read each of the 64 characters, (i.e., each byte) into D0, check the number of 1s in it, set 1 to the MSB with &#8220;ORI.B #$80, D0&#8221; to create an odd parity, and save it to the 64-byte space defined above. <br \/>You need to use ROL.B to count the number 1s in D0. Check with SCS.B if a carry occurs. For this purpose use D1. <br \/>Use D0 &#8211; D4 as well as A0 &#8211; A1 registers as follows: <br \/>You also need to use &#8220;LSR.B #1, D2&#8221; to check if the number of 1s in D2 is even. <br \/> DST: DC.B 64 <br \/> D0: reads the next character from SRC. <br \/> D1: checks with &#8220;SCS.B D1&#8221; if a carry was generated <br \/> D2: counts the number of 1s of the character D0 has. <br \/> D3: counts down from 64 to 0, (i.e., used for a loop to read the 64 characters). <br \/> D4: counts down from 8 to 0, (i.e., used for a loop to examine the lowest 8 bits in D0). <br \/> A0: points to the next character to read into D0 <br \/> A1: points to the next space to write the character (with\/without a parity) from D0 <\/p>\n<p> ORG $1000 <br \/> START: ; first instruction of program <br \/> MOVEA #SRC, A0 ; A0: points to the next charcater to read into D0 <br \/> MOVEA #DST, A1 ; A1: points to the space to write D0&#8217;s content <br \/> ; ADD YOUR ODD PARITY GENERATION CODE HERE <br \/> * Put program code here <br \/> SIMHALT ; halt simulator <br \/> * Put variables and constants here <br \/> SRC: <br \/> DC.B &#8216;Computing and Software Systems, University of Washington Bothell&#8217; ;64 bytes <br \/> DST: <br \/> DS.B 64 <br \/> END START ; last line of source <br \/> Submit the followings: <br \/> Attach the source file (.X68) (If no source file, then you got zero point for this question) <br \/>Test your program and report the result with your user input. Capture the images of output window and memory view to support your results. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Write a program in 68K assembly code that adds an odd parity to each ASCII character. Your code must satisfy the following specifications: Define the following 64 characters in the SRC address. SRC: DC.B &#8216;Computing and Software Systems, University of Washington Bothell&#8217; Define the 64-byte space. Read each of the 64 characters, (i.e., each byte) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[10],"class_list":["post-71107","post","type-post","status-publish","format-standard","hentry","category-research-paper-writing","tag-writing"],"_links":{"self":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts\/71107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/comments?post=71107"}],"version-history":[{"count":0,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts\/71107\/revisions"}],"wp:attachment":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/media?parent=71107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/categories?post=71107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/tags?post=71107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}