Working memory viewer
This commit is contained in:
2
bfckr.c
2
bfckr.c
@@ -107,7 +107,7 @@ void print_memoryviewer(bf_code_t *bf)
|
|||||||
|
|
||||||
// print the adresses beneath the memory cells
|
// print the adresses beneath the memory cells
|
||||||
for(int i=(mp-7); i<(mp+8); i++) {
|
for(int i=(mp-7); i<(mp+8); i++) {
|
||||||
printf("%03d ", ((i<0 || i>MEMORY_SIZE) ? 0 : abs(i-mp)));
|
printf("%03d ", ((i<0 || i>MEMORY_SIZE) ? 0 : (mp+i)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user