This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:fall2021:cprog:projects:cbf0 [2021/09/12 13:22] – wedge | haas:fall2021:cprog:projects:cbf0 [2021/09/12 13:26] (current) – [Process] wedge | ||
---|---|---|---|
Line 396: | Line 396: | ||
< | < | ||
- | address <- 0 | + | address <- zero |
byte <- readfromfile | byte <- readfromfile | ||
- | ascii[0] <- byte | + | ascii[zero] <- byte |
- | count <- 1 | + | count <- one |
loop as long as there is still data in the file | loop as long as there is still data in the file | ||
display the address in hex | display the address in hex | ||
Line 406: | Line 406: | ||
endif | endif | ||
- | loop as long as count is less than 16 | + | loop as long as count is less than sixteen |
byte <- readfromfile | byte <- readfromfile | ||
if there is still data in the file | if there is still data in the file | ||
Line 413: | Line 413: | ||
let count increment by one | let count increment by one | ||
else | else | ||
- | loop as long as count is less than 16 | + | loop as long as count is less than sixteen |
display a space | display a space | ||
endloop | endloop | ||
Line 420: | Line 420: | ||
endloop | endloop | ||
| | ||
- | loop index from 0 to count | + | loop index from zero to count |
if ascii[index] is a printable character | if ascii[index] is a printable character | ||
display ascii[index] as an ASCII character | display ascii[index] as an ASCII character | ||
else | else | ||
- | display | + | display |
endif | endif | ||
endloop | endloop | ||
display a newline | display a newline | ||
+ | let count be equal to zero | ||
+ | let address be incremented by sixteen | ||
endloop | endloop | ||
</ | </ |