Customer:Customer(string fname, string lname, int id, string ss)cfw_
firstName = fname;
1) Division case: On line 356, the original code says: if (d != 0) error("divide by zero");, the correct code should be: if (d = 0) error("divide by zero");
2) Percent case: On line 366, the original code says: left = i1/i2;, the correct code should be: l
mesg_0: .asciiz " is not a power of two"
mesg_1: .asciiz " is a power of two"
li $t0, 256 #number to test if its a power of two
addi $t1,$t0,-1 #subtract 1 to get inverted bits if t0 is power of 2
and $t1,$t0,$t1 #and t0 and t0-1, preser
Your first MIPS assembly program
Notice the stylized format of the code: 3 columns:
(1) Optional labels,
(2) Machine instructions, assembler directives and their operands,
(3) Optional comments: everything to the right of a '#' until end of li
.asciiz "Input number to count bits\n"
mesg_0: .asciiz " has "
mesg_1: .asciiz " bits for 1"
# Load effective address(mesg) to $a0
addi $v0, $0, 4 # Load constant 4 to reg v0
# Switch into the "kernel" to print
Lab Exercise (50 points): Modify the definition of struct Node by adding a pointer
to a previous node prev and redefine the functions: insert_after,
delete_after and display_list. Rename delete_after to delete in order
to delete the node pointed to by the
Lab Exercise (70 points) Write and test a class Customer
a. with the following members: private data members: the last_name,
first_name and SSN
b. constractors that allow you to initialize objects using only
a customer last_name,
SSN and all da
1. Lab exercise (10 points) The C+ program creates a singly linked list using the Node
struct defined below.
a. Read the code with understanding.
b. Re-type the code below and use it to build different linked list in the main()
.asciiz "Please input the
expression to evaluate in postfix form\n"
.asciiz "Error: item cannot be popped when
the stack is empty\n"
.asciiz "Error: Expression not