mirror of
https://github.com/tjboldt/ProDOS-Utilities.git
synced 2024-05-29 00:41:30 +00:00
21 lines
329 B
Go
21 lines
329 B
Go
package prodos
|
|
|
|
import "fmt"
|
|
|
|
func DumpBlock(buffer []byte) {
|
|
for i := 0; i < len(buffer); i += 16 {
|
|
for j := i; j < i+16; j++ {
|
|
fmt.Printf("%02X ", buffer[j])
|
|
}
|
|
for j := i; j < i+16; j++ {
|
|
c := buffer[j] & 127
|
|
if c >= 32 {
|
|
fmt.Printf("%c", c)
|
|
} else {
|
|
fmt.Printf(".")
|
|
}
|
|
}
|
|
fmt.Printf("\n")
|
|
}
|
|
}
|