Microsoft Word - 22W CST8216 Lab Assignment 4 - Lab Week Twelve Instructions and Problem Details.docx CST8216 Processor Architecture Lab Exercises Last Revision Winter 2022 Page 1 of 4 © 2022 D. Haley...

1 answer below »

22W CST8216 Lab Assignment 4 - Lab Week Twelve Instructions and Problem Details




Microsoft Word - 22W CST8216 Lab Assignment 4 - Lab Week Twelve Instructions and Problem Details.docx CST8216 Processor Architecture Lab Exercises Last Revision Winter 2022 Page 1 of 4 © 2022 D. Haley 22W CST8216 Lab Assignment 4 - Lab Week Twelve Instructions       Assignment 4 (100 marks) – Lab Week 12 – Tying it all Together Approximate time to complete: 3 – 4 hours.   Due Date:    By 11:30 PM Thursday, April 14, 2022– Assignment 4 – Submission Link for Lab Week 12 – Assignment 4  This is a HARD SUBMISSION DATE/TIME and NO late submissions will be accepted and your group will receive a mark of zero (0).  This link is for the submission of the following files:  22W_ISBN_Validation_Driver.asm, Sum_Products.asm and Validate_ISBN.asm  You must also submit ISBN_Validation_Test_Plan.docx via this link. Do NOT use a compressed file to submit your Assignment.   This lab exercise may be optionally performed by up to THREE students in the same lab section working as a group  (students pick their own partners). Also, ensure all student names/numbers are on all program listings and  documentation for all students to receive credit for the work (No name, no credit). There is only ONE submission  required per group of students – ENSURE THAT EVERYONE IN THE GROUP KNOWS WHO IS SUBMITTING THE  SOLUTIONS.  Notes:  1. If your name/student number is missing on the submitted code listings, no credit will be given for  the submission.  2. If your submission is submitted in a compressed file (e.g. zip), it will not be marked.  Purpose of the LAB: The purpose of this lab is to further your understanding of 68HCS12 Assembly Language and Lecture theory by tying all  of our past learning together in a culminating assignment – ISBN Validation.    In previous labs, you wrote code to convert an ASCII character to a Digit. In another lab, you copied an array while  skipping a given value in the array. The next lab you wrote a subroutine that converts an array of ASCII characters to  an array of Digits, skipping a certain ASCII character in the ASCII array.    This lab uses material from previous Lectures, your previous experience in completing the course assignments, plus  Week 11’s lecture material to perform ISBN validation on a series of 6 ISBNs contained in an external file. To do so,  you will complete the provide starter code and display the results of the ISBN validation on the Simulator’s HEX  Displays.    This lab also builds upon Stack Operations and Subroutines, which you used for a previous lab with a counter and a  Subroutine to perform String to Digit conversion.    Because some students may not have completed all of the previous assignment that used the  ISBN_String_Conversion Subroutine, the CST8216 68HCS12 API Booklet ‐ Updated for 22W A4.pdf document  contains information on a new subroutine that must be used with this assignment – ISBN_String_Conversion.   You will have to read the API document in order to incorporate the Subroutine into this assignment, using  the provided API_A4.s19 file.  Each lab section has a compressed file set that must be used for this assignment. I recommend that you read  the contents of these file sets this week. CST8216 Processor Architecture Lab Exercises Last Revision Winter 2022 Page 2 of 4 © 2022 D. Haley 22W CST8216 Lab Assignment 4 - Lab Week Twelve Instructions       The Problem Details for this assignment are on the pages following this one.  Lab Week 12 – Assignment 4 – Problem Details  Congratulations! The CST8216 Book Publishing Company have contracted you to write a software application that automates the current manual process used to validate International Standard Book Numbers (ISBNs). These are unique IBSNs used by "thousands and thousands" of Book Merchants to validate the authenticity of purchased books. The uniqueness of these IBSNs that they are either 13 or 10 Digits in length; however, we have been contracted to validate only those ISBNs that are 10 Digits in length, noting that the length does not include any hyphens “-“ in the ISBN. For example, the Joyce Farrell text used in CST8116 has an ISBN-10 of “1-337-10207-5”, which we treat as a String. For IBSN validation, we analyze the “digits” form of the ISBN, which in this case would be 1337102075. In the case of the Almy text used for this portion of CST8216, it has an ISBN-10 of “1463738501”, which we treated as a String. For IBSN validation, we analyze the “digits” form of the ISBN, which in the case of the Almy text would be 1463738501. The Current Manual Process of ISBN-10 Validation   Some of the sources of information used for this assignment were based loosely upon,  https://isbn-information.com/the-10-digit-isbn.html and https://www.instructables.com/How-to-verify-a-ISBN/ noting that these sources use a “10 to 1” Method of Validation, but we will use a “1 to 10” Method. Once the Book Publishing Company has received a shipment of textbooks, a manual check of the IBSN is conducted using a “pencil and paper” method to perform the calculations required to validate the authenticity of the ISBN. Here are the steps: Extract the Digits “Extracted Numbers” from the “ISBN to Validate”. For each Digit (D), multiply it by the Multiplier (M) to obtain (DxM). Then, Sum the Products (SOPs) of all the (DxM) values and divide the SOPs by 11 ($0B). If the Remainder = $00 (0), then the ISBN is Valid; otherwise, the ISBN is Not Valid. Joyce Farrell Text example – valid ISBN: Remainder is zero (0). Almy Text example – valid ISBN: Remainder is zero (0). If, for example, one of the numbers in the ISBN was incorrect, then the validation would produce the following example results: Non-Authorized Version of Joyce Farrell Text example – Invalid ISBN: Remainder is not zero (0). Confirmation of Valid ISBN <== calculated valid results 1 to 10 method=""><== change these values to get valid/invalid results digit (d) 1 3 3 7 1 0 2 0 7 5 base 10: sum of products (sops) 176 multiplier (m) 1 2 3 4 5 6 7 8 9 10 base 16: sops $b0 base 10: product (dxm) 1 6 9 28 5 0 14 0 63 50 base 10: sops/11 16.0 base 16: product (dxm) $01 $06 $09 $1c $05 $00 $0e $00 $3f $32 base 16: sops/$0b $10 remainder $00 result valid isbn isbn to validate extracted numbers 13371020751‐337‐10207‐5 confirmation of valid isbn 1 to 10 method digit (d) 1 4 6 3 7 3 8 5 0 1 base 10: sum of products (sops) 198 multiplier (m) 1 2 3 4 5 6 7 8 9 10 base 16: sops $c6 base 1: product (dxm) 1 8 18 12 35 18 56 40 0 10 base 10: sops/11 18.0 base 16: product (dxm) $01 $08 $12 $0c $23 $12 $38 $28 $00 $0a base 16: sops/$0b $12 remainder $00 result valid isbn isbn to validate extracted numbers 14637385011463738501 1 to 10 method digit (d) 1 3 3 7 1 0 2 1 7 5 base 10: sum of products (sops) 184 multiplier (m) 1 2 3 4 5 6 7 8 9 10 base 16: sops $b8 base 10: product (dxm) 1 6 9 28 5 0 14 8 63 50 base 10: sops/11 16.7 base 16: product (dxm) $01 $06 $09 $1c $05 $00 $0e $08 $3f $32 base 16: sops/$0b $10 remainder $08 result invalid isbn 13371021751‐337‐10217‐5 cst8216 processor architecture lab exercises last revision winter 2022 page 3 of 4 © 2022 d. haley 22w cst8216 lab assignment 4 - lab week twelve instructions       the future automated process of isbn validation    in the business of software engineering many manual processes are automated to improve efficiency, risk management and customer satisfaction. in a fully implemented system, we could scan isbns using a device such as the one depicted to the right. however, before adding such a device to our system, we would first have to prove that the functionality of the software is correct. as such, we will simulate the actual reading of the isbns using an external data file that contains exactly six isbns, which we will read into our assembly language program. note that the illustrated data file contains the isbns from a previous lab and is not the file you will use for your submission. rather, each lab section will have its own data file for isbn validation.  as we iterate through the values, we will keep track of the number of valid isbns and the number of invalid isbns. an example result, using the isbn.txt file from a previous assignment (illustrated to the right) is illustrated below. development requirements and constraints – the test plan the first thing you should do is to create a test plan of your program run before any code is written. it must contain the calculations that prove the validity of your results using the provided isbn-10 validation algorithm. your test plan must be based upon the file of isbns for your lab section. students having trouble with this assignment will be asked to provide their test plan prior to receiving any assistance. here are some sample results of the validation of the isbns from a previous assignment – your assignment submission would use the lab section specific data file and you must validate all six isbns and summarize the results as shown below. note that you have been provided with a 22w assignment 4 - isbn validation - blank sheet.xlxs file to complete and hand in with your submission. summary of test case calculations (expected results)    file name used:  isbn.txt  (use the name of your lab section’s file here)  list the isbns in their string below                fcc "0‐684‐84438‐5"    fcc "9971‐5‐0210‐0"    fcc "93‐80954‐21‐4"    fcc "0‐584‐84328‐5"    fcc "950‐425‐059‐0"    fcc "960‐425‐059‐0"    expected results from calculated values above:  number of valid isbns:       2  number of invalid isbns:  4      cst8216 processor architecture lab exercises last revision winter 2022 page 4 of 4 © 2022 d. haley 22w cst8216 lab assignment 4 - lab week twelve instructions       development requirements and constraints – coding    you must use the supplied starter code for 22w_ibsn_validation_driver.asm as your starting point. as you will see, some of the code has been predefined for your mandatory use and annotated “do not change” within that file. there is also an algorithm provided to assist you in coding your solution. pay particular attention to the labels number_of_valid_isbns and number_of_invalid_isbns and how they are used; otherwise, the supplied code that outputs the results to the hex displays will not correctly function. starter code is also supplied for the two subroutines that you must write – sum_products.asm and validate_isbn.asm, using the isbn 1 to 10 method for validation as outlined in this document and by following the instructions contained in the starter code files. in addition, you should review the subroutines – rule set for cst8216 – 29 march 2022 update.pdf document to ensure that you are conforming to best practices for coding subroutines. it is included in this assignment package development requirements and constraints – program output  using the isbn.txt file from an earlier lab, the test plan provide us with the following expected results:   number of valid isbns:     2  number of invalid isbns:  4    a screen shot of the program output on the hex displays is illustrated.     your solution to your provided isbns should also display a certain number of valid  isbns as well as a certain number of invalid isbns.     note that if the program is run more than once in the simulator – e.g. file  reset,  then clicking on go, the same valid results must be correctly calculated by your  solution and correctly displayed on the hex displays. approach to development  there are at least a couple of methods one can use in software development:  the “big bang” approach where all of the code is written at once and then “fingers are crossed” hoping that the code works first time; or   the “incremental” approach where you “code a bit, test a bit.” that is, you start off with the starter code in the driver program, then add functionality to it as you go along.  o in this assignment, you may wish one group member to code sum_products.asm and write a small driver program to send it one array to test the subroutine’s functionality against the test plan.   o in parallel, you could have another group member code validate_isbn.asm and write another small driver program to send in a sop value to test the subroutine’s functionality against the test plan.   o once you have that functionality working you can incorporate it into the driver program then start looking at the iteration portion of the driver where it must loop through all of the isbns, updating the valid and invalid results as appropriate. invalid results="" digit (d)="" 1="" 3="" 3="" 7="" 1="" 0="" 2="" 0="" 7="" 5="" base 10: sum of products (sops)="" 176="" multiplier (m)="" 1="" 2="" 3="" 4="" 5="" 6="" 7="" 8="" 9="" 10="" base 16: sops="" $b0="" base 10: product (dxm)="" 1="" 6="" 9="" 28="" 5="" 0="" 14="" 0="" 63="" 50="" base 10: sops/11="" 16.0="" base 16: product (dxm)="" $01="" $06="" $09="" $1c="" $05="" $00="" $0e="" $00="" $3f="" $32="" base 16: sops/$0b="" $10="" remainder="" $00="" result="" valid isbn="" isbn to validate="" extracted numbers="" 13371020751‐337‐10207‐5="" confirmation of valid isbn="" 1 to 10 method="" digit (d)="" 1="" 4="" 6="" 3="" 7="" 3="" 8="" 5="" 0="" 1="" base 10: sum of products (sops)="" 198="" multiplier (m)="" 1="" 2="" 3="" 4="" 5="" 6="" 7="" 8="" 9="" 10="" base 16: sops="" $c6="" base 1: product (dxm)="" 1="" 8="" 18="" 12="" 35="" 18="" 56="" 40="" 0="" 10="" base 10: sops/11="" 18.0="" base 16: product (dxm)="" $01="" $08="" $12="" $0c="" $23="" $12="" $38="" $28="" $00="" $0a="" base 16: sops/$0b="" $12="" remainder="" $00="" result="" valid isbn="" isbn to validate="" extracted numbers="" 14637385011463738501="" 1 to 10 method="" digit (d)="" 1="" 3="" 3="" 7="" 1="" 0="" 2="" 1="" 7="" 5="" base 10: sum of products (sops)="" 184="" multiplier (m)="" 1="" 2="" 3="" 4="" 5="" 6="" 7="" 8="" 9="" 10="" base 16: sops="" $b8="" base 10: product (dxm)="" 1="" 6="" 9="" 28="" 5="" 0="" 14="" 8="" 63="" 50="" base 10: sops/11="" 16.7="" base 16: product (dxm)="" $01="" $06="" $09="" $1c="" $05="" $00="" $0e="" $08="" $3f="" $32="" base 16: sops/$0b="" $10="" remainder="" $08="" result="" invalid isbn="" 13371021751‐337‐10217‐5="" cst8216="" processor="" architecture="" lab="" exercises="" last="" revision="" winter="" 2022="" page="" 3="" of="" 4="" ©="" 2022="" d.="" haley="" 22w="" cst8216="" lab="" assignment="" 4="" -="" lab="" week="" twelve="" instructions=""  =""  =""  ="" the future automated process of isbn validation =""  ="" in="" the="" business="" of="" software="" engineering="" many="" manual="" processes="" are="" automated="" to="" improve="" efficiency,="" risk="" management="" and="" customer="" satisfaction.="" in="" a="" fully="" implemented="" system,="" we="" could="" scan="" isbns="" using="" a="" device="" such="" as="" the="" one="" depicted="" to="" the="" right.="" however,="" before="" adding="" such="" a="" device="" to="" our="" system,="" we="" would="" first="" have="" to="" prove="" that="" the="" functionality="" of="" the="" software="" is="" correct.="" as="" such,="" we="" will="" simulate="" the="" actual="" reading="" of="" the="" isbns="" using="" an="" external="" data="" file="" that="" contains="" exactly="" six="" isbns,="" which="" we="" will="" read="" into="" our="" assembly="" language="" program.="" note="" that="" the="" illustrated="" data="" file="" contains="" the="" isbns="" from="" a="" previous="" lab="" and="" is="" not="" the="" file="" you="" will="" use="" for="" your="" submission.="" rather,="" each="" lab="" section="" will="" have="" its="" own="" data="" file="" for="" isbn="" validation. ="" as="" we="" iterate="" through="" the="" values,="" we="" will="" keep="" track="" of="" the="" number="" of="" valid="" isbns="" and="" the="" number="" of="" invalid="" isbns.="" an="" example="" result,="" using="" the="" isbn.txt="" file="" from="" a="" previous="" assignment="" (illustrated="" to="" the="" right)="" is="" illustrated="" below.="" development="" requirements="" and="" constraints="" –="" the="" test="" plan="" the="" first="" thing="" you="" should="" do="" is="" to="" create="" a="" test="" plan="" of="" your="" program="" run="" before="" any="" code="" is="" written.="" it="" must="" contain="" the="" calculations="" that="" prove="" the="" validity="" of="" your="" results="" using="" the="" provided="" isbn-10="" validation="" algorithm.="" your="" test="" plan="" must="" be="" based="" upon="" the="" file="" of="" isbns="" for="" your="" lab="" section.="" students="" having="" trouble="" with="" this="" assignment="" will="" be="" asked="" to="" provide="" their="" test="" plan="" prior="" to="" receiving="" any="" assistance.="" here="" are="" some="" sample="" results="" of="" the="" validation="" of="" the="" isbns="" from="" a="" previous="" assignment="" –="" your="" assignment="" submission="" would="" use="" the="" lab="" section="" specific="" data="" file="" and="" you="" must="" validate="" all="" six="" isbns="" and="" summarize="" the="" results="" as="" shown="" below.="" note="" that="" you="" have="" been="" provided="" with="" a="" 22w="" assignment="" 4="" -="" isbn="" validation="" -="" blank="" sheet.xlxs="" file="" to="" complete="" and="" hand="" in="" with="" your="" submission.="" summary of test case calculations (expected results) =""  ="" file name used:  isbn.txt  (use the name of your lab section’s file here) ="" list the isbns in their string below =""  =""  =""  =""  =""  =""  =""  ="" fcc "0‐684‐84438‐5" =""  ="" fcc "9971‐5‐0210‐0" =""  ="" fcc "93‐80954‐21‐4" =""  ="" fcc "0‐584‐84328‐5" =""  ="" fcc "950‐425‐059‐0" =""  ="" fcc "960‐425‐059‐0" =""  ="" expected results from calculated values above: ="" number of valid isbns:    =""  ="" 2 ="" number of invalid isbns: ="" 4 =""  =""  ="" cst8216="" processor="" architecture="" lab="" exercises="" last="" revision="" winter="" 2022="" page="" 4="" of="" 4="" ©="" 2022="" d.="" haley="" 22w="" cst8216="" lab="" assignment="" 4="" -="" lab="" week="" twelve="" instructions=""  =""  =""  ="" development requirements and constraints – coding =""  ="" you="" must="" use="" the="" supplied="" starter="" code="" for="" 22w_ibsn_validation_driver.asm="" as="" your="" starting="" point.="" as="" you="" will="" see,="" some="" of="" the="" code="" has="" been="" predefined="" for="" your="" mandatory="" use="" and="" annotated="" “do="" not="" change”="" within="" that="" file.="" there="" is="" also="" an="" algorithm="" provided="" to="" assist="" you="" in="" coding="" your="" solution.="" pay="" particular="" attention="" to="" the="" labels="" number_of_valid_isbns="" and="" number_of_invalid_isbns="" and="" how="" they="" are="" used;="" otherwise,="" the="" supplied="" code="" that="" outputs="" the="" results="" to="" the="" hex="" displays="" will="" not="" correctly="" function.="" starter="" code="" is="" also="" supplied="" for="" the="" two="" subroutines="" that="" you="" must="" write="" –="" sum_products.asm="" and="" validate_isbn.asm,="" using="" the="" isbn="" 1="" to="" 10="" method="" for="" validation="" as="" outlined="" in="" this="" document="" and="" by="" following="" the="" instructions="" contained="" in="" the="" starter="" code="" files.="" in="" addition,="" you="" should="" review="" the="" subroutines="" –="" rule="" set="" for="" cst8216="" –="" 29="" march="" 2022="" update.pdf="" document="" to="" ensure="" that="" you="" are="" conforming="" to="" best="" practices="" for="" coding="" subroutines.="" it="" is="" included="" in="" this="" assignment="" package="" development requirements and constraints – program output ="" using="" the="" isbn.txt="" file="" from="" an="" earlier="" lab,="" the="" test="" plan="" provide="" us="" with="" the="" following="" expected="" results:=""  ="" number of valid isbns:    ="" 2 ="" number of invalid isbns: ="" 4 =""  ="" a screen shot of the program output on the hex displays is illustrated.  =""  ="" your solution to your provided isbns should also display a certain number of valid ="" isbns as well as a certain number of invalid isbns.    ="" note that if the program is run more than once in the simulator – e.g. file  reset, ="" then clicking on go, the same valid results must be correctly calculated by your ="" solution and correctly displayed on the hex displays.="" approach to development ="" there="" are="" at="" least="" a="" couple="" of="" methods="" one="" can="" use="" in="" software="" development:="" ="" the="" “big="" bang”="" approach="" where="" all="" of="" the="" code="" is="" written="" at="" once="" and="" then="" “fingers="" are="" crossed”="" hoping="" that="" the="" code="" works="" first="" time;="" or ="" ="" the="" “incremental”="" approach="" where="" you="" “code="" a="" bit,="" test="" a="" bit.”="" that="" is,="" you="" start="" off="" with="" the="" starter="" code="" in="" the="" driver="" program,="" then="" add="" functionality="" to="" it="" as="" you="" go="" along. ="" o="" in="" this="" assignment,="" you="" may="" wish="" one="" group="" member="" to="" code="" sum_products.asm="" and="" write="" a="" small="" driver="" program="" to="" send="" it="" one="" array="" to="" test="" the="" subroutine’s="" functionality="" against="" the="" test="" plan.=""  ="" o="" in="" parallel,="" you="" could="" have="" another="" group="" member="" code="" validate_isbn.asm="" and="" write="" another="" small="" driver="" program="" to="" send="" in="" a="" sop="" value="" to="" test="" the="" subroutine’s="" functionality="" against="" the="" test="" plan.=""  ="" o="" once="" you="" have="" that="" functionality="" working="" you="" can="" incorporate="" it="" into="" the="" driver="" program="" then="" start="" looking="" at="" the="" iteration="" portion="" of="" the="" driver="" where="" it="" must="" loop="" through="" all="" of="" the="" isbns,="" updating="" the="" valid="" and="" invalid="" results="" as="">
Answered 6 days AfterApr 07, 2022

Answer To: Microsoft Word - 22W CST8216 Lab Assignment 4 - Lab Week Twelve Instructions and Problem...

Gaurav answered on Apr 13 2022
96 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here