User`s manual

Rabbit 4000 Designer’s Handbook rabbit.com 87
80 73 01;PEAHR = 0x01 (preset PE4 as /A0)
80 75 10;PEFR = 0x10 (PE4 is alternate output)
80 77 10;PEDDR = 0x10 (set PE4 as output)
80 1D 20;MACR = 0x20 (set basic 16-bit operation for /CS1)
80 C4 00;SACR = 0x00 (use pport C for Rx, 8-bit async mode, IRQ off)
80 A0 01;TACSR = 0x01 (enable timer A main clock)
;Address 1000
21 21 00;ld hl, 0x0021
00; nop
2B; dec hl
2B; dec hl
2B; dec hl
2B; dec hl (HL = 0x001D, i.e. MACR)
1E 1E; ld e, 0x1E
1C; inc e
1C; inc e (E = 0x20)
7B; ld a, e
7B; ld a, e (A = 0x20)
D3; ioi
D3 77; ioi ld (hl), a (enable basic 16-bit operation on /CS1)
77; ld (hl), a (harmless write into write-protected MB0CR quadrant)
00; nop
00; nop (allow time for 16-bit memory bus to start up)
3E 24; ld a, 0x24
D3 32 1D 00;ioi ld (MACR), a (set basic 16-bit operation for /CS0 and /CS1)
3E 05; ld a, 0x05
D3 32 14 00;ioi ld (MB0CR), a (4WS, /OE1, /CS1)
;3E 40; ld a, 0x00
;D3 32 16 00;ioi ld (MB2CR), a (4WS, /OE0, /CS0)
3E 80; ld a, 0x80
D3 32 10 00;ioi ld (MMIDR), a (enable 16-bit I/O space)
3E C0; ld a, 0xC0
D3 32 20 04;ioi ld (EDMR), a (enable R4000 instructions)
31 00 E0;ld sp, 0xE000
; Insert Rabbit 4000 diagnostic code after this comment.