Using the Windows Starter Visual Studio project create the following two programs.
1. Write a program that will loop three times and raise the number 25 to the third power (25pts).
(25*25*25) Note: Make sure you have a large enough memory for the final number
2. Write a program using a whileSum that adds one to the index until it is five (25pts).
Sample:
mov sum, 0 ; sum := 0
mov ecx, 1 ; count := 1
whileA: cmp sum, 1000 ; sum < 1000 ?
jnl endwhileA ; exit if not
add sum, ecx ; add count to sum
inc ecx ; add 1 to count
jmp whileA ; repeat
endwhileA:
mov eax, nmbr
whileCount: cmp icount, 3
jnl endwhileCount
imul eax, 25
mov rslt, eax
add icount, 1
jmp whileCount
endwhileCount:
MUST FOLLOW THE INSTRUCTION


0 comments