Another bug in NS430 bootcode
authorDan White <dan@whiteaudio.com>
Mon, 23 Apr 2012 18:58:20 +0000 (13:58 -0500)
committerDan White <dan@whiteaudio.com>
Mon, 23 Apr 2012 18:58:20 +0000 (13:58 -0500)
rom-label.asm

index cd7acd860254abcdd010ac53a76c745debc40017..e23e554a994796211ba8d85c4e8a8e6a46ae876a 100644 (file)
@@ -388,6 +388,7 @@ init:
     3172:       7c 46           mov.b   @r6+,   r12     
     3174:       54 40 3f 40     mov.b   __bss_start, r4 ;0x403f, r4   ;PC rel. 0x071b7
     3178:       00 40           brpc            
+;   3176:       3f 40 00 40     mov #16384, r15
     317a:       8f 43 00 00     mov     #0,     0(r15)  ;r3 As==00, CRCDI_L(r15)
     317e:       2f 53           incd    r15             
     3180:       3f 90 9f 4b     cmp     #19359, r15     ;#0x4b9f
@@ -448,6 +449,11 @@ main:
     31da:       b2 40 3e 00     mov     #62,    &PAPER  ;#0x003e
     31de:       0c 1a 
     31e0:       b0 12 76 31     call    #0x3176 
+; FIXME: ^^^ BUG ^^^ BUG ^^^ BUG ^^^ BUG ^^^ BUG ^^^ BUG ^^^
+; *** IN FABBED CHIP: ***
+; The call to #0x3176 should be init() or #0x3172.
+; As-is, this jumps into the middle of a 3-word instruction within init().
+; -> Death by foot-shooting.
 
 ;setup SPI0
 ; SPI_En = 1