friday’s lecture again
DESCRIPTION
Friday’s lecture again. Using E-TDD environment. Build the tests you want to pass Build the code Test the code. Using E-TDD environment. Using the C++ tests, build the ASM tests (cut and paste is all that is needed) - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/1.jpg)
Friday’s lecture again
![Page 2: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/2.jpg)
Using E-TDD environment
• Build the tests you want to pass
• Build the code
• Test the code
![Page 3: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/3.jpg)
![Page 4: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/4.jpg)
![Page 5: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/5.jpg)
![Page 6: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/6.jpg)
Using E-TDD environment
• Using the C++ tests, build the ASM tests (cut and paste is all that is needed)
• Build the ASM stubs (Makes sure that you can load the load into the processor
• Test the code stub – program will run but fail the tests as only stubs
• Build the code
• Test the code
![Page 7: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/7.jpg)
![Page 8: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/8.jpg)
![Page 9: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/9.jpg)
Build the stub 1Find the name mangling needed
• Just build the code
• VDSP will tell you the necessary name-mangled names
• Cut and paste the names
![Page 10: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/10.jpg)
Build the stub 2
![Page 11: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/11.jpg)
![Page 12: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/12.jpg)
![Page 13: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/13.jpg)
Expect error messagesBut not these ones
Code reviewMissing a ; at end of line
![Page 14: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/14.jpg)
Need to learn to READAnd listen to assembler
That semicolon is notthe one that was missing
There is one semicolon too manyin the define statement
![Page 15: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/15.jpg)
Less errors
But I am still notlistening to the assembler
![Page 16: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/16.jpg)
Look on reference sheet
R0 *= R1;
Page 2, column 3
![Page 17: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/17.jpg)
![Page 18: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/18.jpg)
![Page 19: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/19.jpg)
AssembledBut failed tests
What of GS is happening
![Page 20: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/20.jpg)
![Page 21: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/21.jpg)
![Page 22: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/22.jpg)
![Page 23: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/23.jpg)
Build the ASM test by cut-and-paste
![Page 24: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/24.jpg)
Stubs assemble
But unexpected messages
![Page 25: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/25.jpg)
Build the ASM test by cut-and-paste CORRECTLY
![Page 26: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/26.jpg)
![Page 27: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/27.jpg)
Wrong method
Incoming parameters – come in R0Outgoing parameters – go in R0
Return values – go in R0
Same problem on the MIPS
![Page 28: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/28.jpg)
![Page 29: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/29.jpg)
![Page 30: Friday’s lecture again](https://reader035.vdocuments.site/reader035/viewer/2022062806/56814f01550346895dbc9369/html5/thumbnails/30.jpg)