Well, if we suppose you are targeting the x86 architecture and want to output to the console every byte, it would looks like...
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?).
// Save the context first
mov ebx, lowestMemoryAdressToPrint
mov ecx, highestMemoryAdressToPrint
sub ecx, lowestMemoryAdressToPrint
xor eax, eax
// Well i don't know how you call your subroutine, but the value you are interested
// is at byte ptr [ebx][eax]
cmp eax, ecx
// Restore the contexte