User`s manual
Rabbit 4000 Designer’s Handbook rabbit.com 85
3. The opcodes and their data are in the 2nd column of the Assembly window. Since we want each triplet
loaded to RAM beginning at address zero, create the following sequence of triplets.
; code to be loaded in SRAM
00 00 21
00 01 01
00 02 00
00 03 06
00 04 10
00 05 7E
00 06 29
00 07 10
00 08 FC
00 09 C3
00 0A 00
00 0B 00
4. The code to be loaded in SRAM must be flanked by triplets to configure internal peripherals and a trip-
let to exit the cold boot upon completion.
80 14 05 ; MB0CR: Map SRAM on /CS1 /OE1 /WE1 to Bank 0
80 09 51 ; ready watchdog for disable
80 09 54 ; disable watchdog timer
.
. ; code to be loaded in SRAM goes here
.
80 24 80 ; Terminate boot strap, start executing code at address zero
The program, serialIO.exe, has the ability to automatically increment the address. Instead of typing
in all the addresses, you can use some special comments. They are case sensitive and must be at the begin-
ning of the line with no space between the semicolon and the first letter of the special comment.
;Address nnnn
;Triplet
The first special comment tells the program to start at address nnnn and increment the address for each
transmitted data byte. The second special comment disables the automatic address mode and directs the
program to send exactly what is in the file. The triplets shown in #3 may be rewritten as:
;Address 0000
21 01 00 ;ld hl,1
06 10 ;ld b,16
7E ;ld a,hl
29 ;add hl,hl
10 FC ;djnz loop
C3 00 00 ;jp 0
;Triplet
5. The following code is required make diagnostics work for 16-bit data transfers:
\\Header Block
; Insert Rabbit 4000 diagnostic code after this comment.
3E 84; ld a, 0x84