Boot-Loader Source Code Listing
C-6
* Test for INT3 and, if set exclusively, proceed with serial boot load. Else,
* load AR3 with 1000h if INT0, 810000h if INT1 900000h if INT2. Also load ,
* appropriate boot strobe pointer ––> AR2 and force the boot strobe value to
* reflect 32bit memory width. If (INT0 or INT1 or INT2) and INT3, turn on the
* handshake mode.
*================================================================================*
wait1 LDI IF,R0
AND 0Fh,R0 ; clean
CMPI 8,R0 ; test for INT3
BEQ serial ;*******; serial boot load mode
LDI AR7,AR2
ADDI 60h,AR2 ; 808060h (IOSTRB) ––> AR2
TSTB 2,R0 ; test for INT1
LDINZ 4080h,AR3 ; 810000h / 2**9
BNZ exit3 ;*******;
ADDI 4,AR2 ; 808064h (STRB0) ––> AR2
TSTB 1,R0 ; test for INT0
LDINZ 8,AR3 ; 001000h / 2**9
BNZ exit3 ;*******;
ADDI 4,AR2 ; 808068h (STRB1) ––> AR2
TSTB 4,R0 ; test for INT2
LDINZ 4800h,AR3 ; 900000h / 2**9
BZ wait1 ;*******;
exit3 TSTB 8,R0 ;*; test#1 – INT3 asserted
BZ exit2 ;*; test#2 – INXF1 low (not used)
TSTB 80h,IOF ;*; enable handshake mode if
LDI 6,IOF ;*; test#1 passed
exit2 LDI 0Fh,R2
LSH 16,R2 ; force boot data size to 32
OR *AR2,R2 ; force boot mem width to 32
STI R2,*AR2
LSH 9,AR3 ; boot mem start addr ––> AR3
* xx000001 – 1 bit
*================================================== xx000010 – 2 bit
* Process MEMORY WIDTH control word (32 bits long) xx000100 – 4 bit
*================================================== xx001000 – 8 bit
* xx010000 – 16 bit
* xx100000 – 32 bit
LDI read_mc,AR0 ; use memory to read cntrl words
; read_mc ––> AR0
LDI 1,R5 ; mem width = 1 (init)
LDI 32,AR6 ; mem reads = 32 (init)
CALLU read_m ; read memory once (1st read)
loop2 TSTB 1,R6
BNZ label4
LSH –1,R6 ; look at next bit
LSH –1,AR6 ; decr mem reads
LSH 1,R5 ; incr mem width ––> R5
BU loop2 ;*******;