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
42f951
Commit
42f951
2026-03-29 14:20:27
Bob Green
: -/-
programming/handling interrupts.md
..
@@ 23,11 23,10 @@
#include <stdio.h>
#include <machine.h>
-
#define LEDS1 0xa0
-
#define LEDS2 0x50
-
static unsigned int ticks = 0;
+
void twiddle_thumbs(void);
+
void ISR isr(void) {
ticks++;
@@ 38,6 37,7 @@
static int lednum = 2;
static int delta = 1;
+
/* create simple visual effect with some of the leds */
clear_led(lednum);
lednum += delta;
@@ 60,8 60,9 @@
_pit_set_counter(1000);
*pit_tsr = 1;
-
set_isr_vector(ivr, isr);
+
set_isr_handler(ivr, isr);
+
/* Wait for a keypress */
while (!_char_available()) {
printf("%08x\r", ticks);
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