Here's a description of FileCore hard disc boot blocks:

The boot block is at location &c00-&e00 on the disc.

The PRM page 1014 gives a description of the boot block and defect list contained in it, but does not explain the check byte at the end of the boot block. The last byte of the boot block is a check sum byte whose value is calculated as follows:
Perform an 8 bit add with carry on each of the other bytes in the block, starting with value 0.

In assembler this is what it looks like: ; entry: R0=start, R1=block length
; exit: R0,R1 preserved, R2=checksum

CheckSum ROUT

 STMFD R13!, {R1, LR}
 ADDS LR, R0, R1 ;->end+1 C=0
 SUB R1, LR, #1 ;->check byte
 MOV R2, #0
 B %FT20
10
 LDRB LR, [R1,#-1] ! ;get next byte
 ADC R2, R2, LR ;add into checksum
 MOVS R2, R2, LSL #24 ;bit 8 = carry
 MOV R2, R2, LSR #24
20
 TEQS R0, R1
 BNE %BT10 ;loop until done
 LDMFD R13!, {R1, LR}

Note that the checksum doesn't include the last byte!

AltStyle によって変換されたページ (->オリジナル) /