Well, if we suppose you are targeting the x86 architecture and want to output to the console every byte, it would looks like...
Code:
// Save the context first
mov ebx, lowestMemoryAdressToPrint
mov ecx, highestMemoryAdressToPrint
sub ecx, lowestMemoryAdressToPrint
xor eax, eax
beg:
// Well i don't know how you call your subroutine, but the value you are interested
// is at byte ptr [ebx][eax]
inc eax
cmp eax, ecx
jne beg
// Restore the contexte
I didn't test and it shouldn't works since it's been a while i have written assembly and i feel quite lazy right now. By the way, your question isn't clear. Which architecture are you targeting ? What have you done so far ? And it might also help if you tell us which tools are you using (are you using a compiler like VS or GCC or simply an assembler like MASM?).