Question: This code that I wrote in C needs to be written in ARMv8 assembly language. Please help. void towers (int n, char source, char dest,
This code that I wrote in C needs to be written in ARMv8 assembly language. Please help.
void towers (int n, char source, char dest, char spare){ if(n==1){ print("move %<->%", source, dest); return; } towers(n-1), source, spare, dest); towers(1, sourcce, dest, spare); towers(n-1, spare, dest, source); } int main(){ printf("enter the number of towers:"); scanf_s("%d, &n"); if (n<1){ break; } towers(n, 'a', 'b', 'c'); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
