Motorola MSC8101 ADS User's Guide Page 315

  • Download
  • Add to my manuals
  • Print
  • Page
    / 346
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 314
Bootloader Program C-7
;move the size into d6
move.l d4,d6
;move the address into r3
move.l d5,r3
;; check if the finished bit is set ,if it is set clear it
;; and the sticky bit . ( it means there was an error and
;; the blocks are being loaded for the second time)
move.w HCR,d4
bmtsts.w #$8000,d4.l
jf continue_loading_16
move.w HCR,d4
and #$6fff,d4.l
move.w d4,HCR
continue_loading_16
;if (size == 0 ) in the beginning of a block it means no more blocks
;then jump to the address loaded in r3 (from d5 )
tsteq d6
jt end_of_loading_16
load_loop_16
;if (size ==2 ) it is a special case so goto load_last_long_2_16
move.l #$00000002,d4
cmpeq d4,d6
jt load_last_long_2_16
;load 2 data words
jsr load_from_fifo
;load the first 2 data words (4 bytes) to the address
move.l d4,(r3)
;increment the address by 4 bytes
adda #$4,r3
;load the second 2 data words (4 bytes) to the address
move.l d5,(r3)
;increment the address by 4 bytes
adda #$4,r3
;CALCULATE_CHECKSUM
eor d4,d7
eor d5,d7
;decrease the size by 4 words
sub #$4,d6
;jump to loading the next words
jmp load_loop_16
Page view 314
1 2 ... 310 311 312 313 314 315 316 317 318 319 320 ... 345 346

Comments to this Manuals

No comments