Assignmernt cs501
Assignmernt cs501
LDR R0, 114 ; Load initial account balance (3000 cents) from memory address 114 into register R0
MOV R1, #2000 ; Load bonus amount (2000 cents, representing $20.00) into register R1
ADD R0, R0, R1 ; Add bonus to account balance in R0 (3000 + 2000 = 5000)
LDR R2, 118 ; Load salary deductions ( 1500 cents) from memory address 118 into register R2
SUB R3, R0, R2 ; Compute new balance after deductions, store result in R3(5000 – 1500 = 3500)
Task B:
In task B, we apply a penalty of 500 cents ( representing $5.00) to the balance obtained in Task A.
Code
SUB R3, R3, R4 ; Deduct penalty from the balance in R3 (3500 – 500 = 3000)
; At this point, R3 holds the final balance of 3000 cents ( representing $30.00)
So, after all adjustments, the final balance is 3000 cents, which represents $30.00