DoStuff Wiki
Attachments
History
Blame
View Source
Documentation
About An Otter Wiki
Toggle dark mode
Login
Home
A - Z
Changelog
Page Index
Hardware
Backplane
Board Features
Memory Map
News
20260512 - Increased Cpu Speed
Programming
Examples
Duart
PIT
Handling Interrupts
Machine Library
MMU
Reference Material
Runtime
Toolchains
Project Ideas
Operating System
Gloworm Port
Linux Port
Atari Vector Generator
Ethernet Card
Keyboard Controller
Monitor
BIOS
Books
Datasheets
Getting Connected
Home
Specs and Tech Notes
Programming
Machine Library
398ef5
Commit
398ef5
2026-05-21 09:41:14
Bob Green
: -/-
programming/machine library.md
..
@@ 72,3 72,11 @@
```C
```
+
+
## Safe Memory Access
+
+
```C
+
int peek(uint8_t *addr);
+
int poke(uint8_t *addr, uint8_t val);
+
```
+
`peek()` attempts to read a byte from memory, returning the value read, or -1 if the read failed due to a Bus Error. Similarly, `poke()` attempts to write a byte to memory, returning -1 on a Bus Error.
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9