Learning Objective: After completing the project, the student will have gained familiarity, understanding and mastery of programming a realistic but simple application in Assembly Language:
a. Using Idea-Edit-Assemble-Execute-Debug cycle
b. Using the basic instructions from the x86 ISA: ADD, SUB, INC, DEC, MOV, CMP, JCond instructions, MUL, DIV,
Background, Scenario or Use Case:
The Use Case (Inventory Tracking) presented in Project 1 is extended in several directions.
Recall the Use Case:
Consider an enterprise (Idea Lifestyles, Inc.) with a single Retail Store. Ideal Lifestyles also has 5 separate Warehouses. The stock available for sale at the Retail Store is replenished on a periodic basis, (may be hourly, daily, weekly, biweekly, monthly, quarterly), by the transfer or transportation (freight or logistics) from each of the Warehouses. Each Warehouse-to-Store transfer consists of the shipment zero or more of units of the 5 distinct items that are sold by Ideal Lifestyles.
The purpose of the assembly program is to do Inventory Tracking, Monitoring and Management of the shipments received at the Retail Store, from the Warehouses, during each replenishment phase or run.
One can represent the shipment activity as follows:
From Warehouse 1: Item(1,1) Item(1,2) Item(1,3) Item(1, 4) Item(1,5)
From Warehouse 2: Item(2,1) Item(2,2) Item(2,3) Item(2, 4) Item(2,5)
From Warehouse 3: Item(3,1) Item(3,2) Item(3,3) Item(3, 4) Item(3,5)
From Warehouse 4: Item(4,1) Item(4,2) Item(4,3) Item(4, 4) Item(4,5)
From Warehouse 5: Item(5,1) Item(5,2) Item(4,3) Item(5, 4) Item(5,5)
The entry Item(j, k) indicates that how many units of item type k were ship from Warehouse j to the Retail store.
Assume the available stock (Avail(j, k)) at each Warehouse (j), for each item type (k), before a particular replenishment shipment is given by:
At Warehouse 1: Avail(1,1) Avail(1,2) Avail(1,3) Avail(1, 4) Avail(1,5)
At Warehouse 2: Avail(2,1) Avail(2,2) Avail(2,3) Avail(2, 4) Avail(2,5)
At Warehouse 3: Avail(3,1) Avail(3,2) Avail(3,3) Avail(3, 4) Avail(3,5)
At Warehouse 4: Avail(4,1) Avail(4,2) Avail(4,3) Avail(4, 4) Avail(4,5)
At Warehouse 5: Avail(5,1) Avail(5,2) Avail(4,3) Avail(5, 4) Avail(5,5)
For the new Project,
Assume the following unit prices are available to the item types sold by Ideal Lifestyles, Inc.:
Price(1) Price(2) Price(3) Price(4) Price(5)
Assume the following quantities of items are initially available at the Retail Store, BEFORE a particular set of shipments from the Warehouses:
InStore(1) InStore(2) InStore(3) InStore(4) InStore(5)
1.Compute how much the Inventory is worth:
a. Calculate the (monetary) of the inventory in the Retail Store before the next set of shipments arrive from the Warehouses.
b .Calculate the value of the stock transferred from each Warehouse to the Retail Store, for each item type.
c. Calculate the value of the stock, for each item type, remaining at each Warehouse, after there has been a shipment to the Retail Store.
d. Calculate the average value of each item type per warehouse, for a shipment scenario
2.Use the following decision tables to help the Ideal Lifestyles executives manage their enterprise:
a. Retail Store Decision Support. For each item type
Amount of Stock in Store BEFORE there is shipment from the Warehouses:
Amount <100 units "Order 10,000 units from all Warehouses"
Amount 100 - 1000 units "Order 5000 units from all Warehouses"
Amount 1001 - 5000 units "Order 1000 units from each Warehouse"
Amount 5001 - 10000 units "Order 500 units from each Warehouse"
Amount > 10000 units "Decrease the unit price by 20%"
b.Warehouse Decision Support. For each item type
Amount of Stock remaining AFTER a shipment has gone from Warehouse to Retail Store:
Amount <100 units "DANGER: Inventory TOO LOW. Replenish: 5000 units"
Amount 100 - 1000 units "DANGER: Inventory LOW. Replenish: 1000 units"
Amount 1001 - 5000 units "Replenish: 500 units"
Amount 5001 - 10000 units "Inventory Level ACCEPTABLE"
Amount > 10000 units "Decrease the unit price by 30%"
3. Write a "mini-report" to present your work, following a format such as the ff.
Solution Idea: place pseudo-code in the Appendix for the Idea
Design Implementation: place source code in the Appendix for the Implementation
Results: place screenshots in the Appendix
Discussion: touch on any aspect you think is significant and interesting
Summary and Conclusions
Acknowledgments: in anyone has helped you significantly
References: if any
ii. Source Code (make sure to include comments to document your intentions)
iii. Screen shots of Program execution, make sure to include results of appropriate Test Cases and Test Runs:
x. At least one Screen Dump of all the Registers at various stages in the code execution.
4. (Extra Credit): Extend your code to handle the following scenario.
Before each shipment (run), the Retail Store requests (demands) the amount of units of each item type to be shipped from each warehouse. If the amount of units requested for any item type is larger than the available stock at a warehouse, the warehouse ships all the units of that item type that it has on hand, but records or logs a negative number indicating the deficit that has to be backordered.
a. Compute the value of the shipment amounts based on shipment requests and available stock. Then compute the average per warehouse.
b. Compute the value of the stock remaining of each type remaining after shipment, based on shipment requests. Then compute the average per warehouse.
c. Make sure to include various Test Cases