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
Examples
Duart
7d878f
Commit
7d878f
2026-03-19 08:25:14
Bob Green
: -/-
programming/examples/duart.md
..
@@ 4,61 4,9 @@
### PIT
#### vasm
```asm
-
/* PI/T Timer Register Addresses */
-
pit_base equ $af0001
-
pit_pgcr equ pit_base
-
pit_psrr equ pit_base+2
-
pit_paddr equ pit_base+4
-
pit_pbddr equ pit_base+6
-
pit_pcddr equ pit_base+8
-
pit_pivr equ pit_base+10
-
pit_pacr equ pit_base+12
-
pit_pbcr equ pit_base+14
-
pit_padr equ pit_base+16
-
pit_pbdr equ pit_base+18
-
pit_paar equ pit_base+20
-
pit_pbar equ pit_base+22
-
pit_pcdr equ pit_base+24
-
pit_psr equ pit_base+26
-
-
pit_tcr equ pit_base+32
-
pit_tivr equ pit_base+34
-
pit_cprh equ pit_base+38
-
pit_cprm equ pit_base+40
-
pit_cprl equ pit_base+42
-
pit_cntrh equ pit_base+46
-
pit_cntrm equ pit_base+48
-
pit_cntrl equ pit_base+50
-
pit_tsr equ pit_base+52
```
#### gcc
```c
-
/* PI/T Timer Register Addresses */
-
#define pit_base ((unsigned char*) 0xaf0001)
-
-
#define pit_pgcr ((unsigned char*) pit_base)
-
#define pit_psrr ((unsigned char*) pit_base+2)
-
#define pit_paddr ((unsigned char*) pit_base+4)
-
#define pit_pbddr ((unsigned char*) pit_base+6)
-
#define pit_pcddr ((unsigned char*) pit_base+8)
-
#define pit_pivr ((unsigned char*) pit_base+10)
-
#define pit_pacr ((unsigned char*) pit_base+12)
-
#define pit_pbcr ((unsigned char*) pit_base+14)
-
#define pit_padr ((unsigned char*) pit_base+16)
-
#define pit_pbdr ((unsigned char*) pit_base+18)
-
#define pit_paar ((unsigned char*) pit_base+20)
-
#define pit_pbar ((unsigned char*) pit_base+22)
-
#define pit_pcdr ((unsigned char*) pit_base+24)
-
#define pit_psr ((unsigned char*) pit_base+26)
-
#define pit_tcr ((unsigned char*) pit_base+32)
-
#define pit_tivr ((unsigned char*) pit_base+34)
-
#define pit_cprh ((unsigned char*) pit_base+38)
-
#define pit_cprm ((unsigned char*) pit_base+40)
-
#define pit_cprl ((unsigned char*) pit_base+42)
-
#define pit_cntrh ((unsigned char*) pit_base+46)
-
#define pit_cntrm ((unsigned char*) pit_base+48)
-
#define pit_cntrl ((unsigned char*) pit_base+50)
-
#define pit_tsr ((unsigned char*) pit_base+52)
```
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