Description
Purpose: Become familiar with the tool chain → the assembler, linker, and debugger. Refresh concepts regarding data representation including binary, decimal, and hex. Display values in memory for integers, reals, and characters. Points: 25 Assignment: Part A: Write a simple assembly language program to compute the following formulas: bAns1 = bVar1 + bVar2 bAns2 = bVar1 – bVar2 wAns1 = wVar1 + wVar2 wAns2 = wVar1 – wVar2 dAns1 = dVar1 + dVar2 dAns2 = dVar1 – dVar2 Declare the following variables in the data segment (after the “.data”). bVar1 db 59 bVar2 db 21 bAns1 db 0 bAns2 db 0 wVar1 dw 2681 wVar2 dw 1432 wAns1 dw 0 wAns2 dw 0 dVar1 dd 164641512 dVar2 dd 112356789 dVar3 dd -46524 dAns1 dd 0 dAns2 dd 0 qVar1 dq 142455214619 flt1 dd -19.125 flt2 dd 11.25 eVal dd 2.71828 myClass db “CS-218”, NULL saying db “Its not a bug, its a feature.”, NULL myName db “your name goes here”, NULL Be sure to replace the “your name goes here” with your actual name (in quotes). Fail to replace your name will result in a 10% penalty. Part B: Complete the Assignment #2 – Data Representation Worksheet on the class web page. Note, the data representation worksheet will not be accepted late. Submission: • All source files must assemble and execute on Ubuntu with yasm. • Submit source files ◦ Submit a copy of the program source file via the on-line submission • Once you submit, the system will score the project and provide feedback. ◦ If you do not get full score, you can (and should) correct and resubmit. ◦ You can re-submit an unlimited number of times before the due date/time. • Late submissions will be accepted for a period of 24 hours after the due date/time for any given assignment. Late submissions will be subject to a ~2% reduction in points per an hour late. If you submit 1 minute – 1 hour late -2%, 1-2 hours late -4%, … , 23-24 hours late -50%. This means after 24 hours late submissions will receive an automatic 0. Program Header Block All source files must include your name, section number, assignment, NSHE number, and program description. The required format is as follows: ; Name: ; NSHE ID: ; Section: