while searching for information related to bare metal Go uses, I discovered the Go Bare Bones tutorial.
It contains incorrect information regarding pointer arithmetic in Go.
Which is false, and there is actually another example which makes use of the way Go allows for pointer use# Go doesn't allow you to directly access memory or use pointers. A trick to get
# around this is to have a function that takes a 32bit value and returns it.
# Take a look at 'terminal.go' to see how we use this to access video memory.
Code: Select all
func terminalPutEntryAt(c byte, color uint8, x uint8, y uint8){
index := y * VGA_WIDTH + x
addr := (*uint16)(unsafe.Pointer(buffer + 2 * uintptr(index)))
*addr = makeVGAEntry(c, color)
}
So I would like to make the Wiki reflect the right way of using Go features.
What is the Wiki update process?