Good, I'm doing a work in assembley.
where I have to reverse the string using recursion:
Only by using the following commands:
- LOCO, Lodder, ADDD, SUBD, LODL, ADDL, subl, PUSH, POP, PSHI, POPI, CALL, Retn ...

trabid:. string "hello world"


main:
.
...
...

rec: # recursive function that I will reverse the string!

ps: I already have a print function that does the string, etc ...
Objective: To appear in the output "dlrow olleh"


someone help me? Thank-_ _

What have you tried so far? What have you thought about trying?

From the forum rules:
- Do provide evidence of having done some work yourself if posting questions from assignments.

Edited 4 Years Ago by Ezzaral: n/a

What have you tried so far? What have you thought about trying?

From the forum rules:
- Do provide evidence of having done some work yourself if posting questions from assignments.

already made ​​many functions such as counting the pixels of a black and white string, the string to print a screen, the problem is that I have to use recursion and do not know: /

In contrast to regular re-iteration in a repetitive procedure
a recursive function calls itself over and over again to perform its
operation. It takes parameters just as any other function and has a condition
upon which its recursion will stop.

Edited 4 Years Ago by NotNull: n/a

Before we proceed, could you also tell us the assembly program you are using (e.g., MASM, GAS, NASM, FASM, etc.)? Each assembler uses a different variation on the assembly language syntax, and some of them are quite different from the others.

For that matter, while some of the mnemonics you mention look like the GAS versions, but others don't seem familiar at all, which makes me wonder what the CPU you are targeting is.

Edited 4 Years Ago by Schol-R-LEA: n/a

This article has been dead for over six months. Start a new discussion instead.