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
Handling Interrupts
3dedcc
Commit
3dedcc
2026-03-29 14:01:16
Bob Green
: -/-
programming/handling interrupts.md
..
@@ 4,4 4,16 @@
```c
__attribute__((interrupt)) duart_interrupt(void) {
/* Handle the interrupt */
+
+
}
```
+
But there's a macro in `machine.h` to help, so you could replace the above with:
+
```c
+
#include <machine.h>
+
+
ISR duart_interrupt(void) {
+
/* Handle the interrupt */
+
+
}
+
```
+
gcc knows that functions declared using either of the above methods should end with the `rte` rather than `rts` instruction.
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