comparison bootrom.notes @ 13:e0ce45f043c0

boot ROM re: continuing plowing through the serial protocol code
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Wed, 24 Apr 2013 22:48:12 +0000
parents 25b016d16602
children 3443b1b08af4
comparison
equal deleted inserted replaced
12:25b016d16602 13:e0ce45f043c0
52 52
53 <i 53 <i
54 54
55 <p 55 <p
56 56
57 Followed by 9 bytes:
58 1 byte: goes into var at 800518
59 1 byte: goes into var at 800521
60 2 bytes: 16-bit MSB-first value goes into var at 800522
61 1 byte: goes into var at 800525
62 4 bytes: 32-bit MSG-first value goes into var at 80051C
63
57 <w 64 <w
65
66 Followed by:
67 1 byte: block number (of this block)
68 1 byte: total # of blocks
69 2 bytes: # of payload bytes in this block (MSB first)
70 4 bytes: load address for this block (MSB first)
71 data
72
73 for a single block (both bytes after <w set to 01), the maximum allowed
74 payload length is 1015 (0x3F7) bytes.
58 75
59 RAM layout: 76 RAM layout:
60 77
61 800000 7 words: 78 800000 7 words:
62 soft-vector pointers: by default the following 7 words at 79 soft-vector pointers: by default the following 7 words at
69 is copied to and run here. 86 is copied to and run here.
70 800100: the last word of the above routine 87 800100: the last word of the above routine
71 800104: word initialized to 0x0001D4C0 - tells the 0x2c8 routine 88 800104: word initialized to 0x0001D4C0 - tells the 0x2c8 routine
72 how long to wait for a character 89 how long to wait for a character
73 800108: byte initialized to 0x01 90 800108: byte initialized to 0x01
91 80010C: all bytes of a '<w' command after these two command chars
92 are stored starting here
93 80050B: the above buffer ends here
74 94
95 800518: byte variable receives the first parameter byte after '<p'
96 80051C: 32-bit var set by the '<p' command
75 800520: byte variable filled every time the 0xfb4 routine is called 97 800520: byte variable filled every time the 0xfb4 routine is called
76 holds the ID of the UART on which '<' came in, or FF if none 98 holds the ID of the UART on which '<' came in, or FF if none
99 800521: byte variable receives the 2nd parameter byte after '<p'
100 800522: 16-bit var set by the '<p' command
77 800524: byte variable filled every time the 0xfb4 routine is called 101 800524: byte variable filled every time the 0xfb4 routine is called
78 filled with a copy of 800534 102 filled with a copy of 800534
103 800525: byte var set by the '<p' command
79 104
80 80052C: byte following the '<c' command is extended to a half-word and 105 80052C: byte following the '<c' command is extended to a half-word and
81 written here 106 written here
82 107
83 800534: byte initialized to 0x00, then may be set to 1 by the 0xfb4 108 800534: byte initialized to 0x00, then may be set to 1 by the 0xfb4
84 routine if it selects /1 clock mode. 109 routine if it selects /1 clock mode.
85 800538: word holds the argument of the '<b' command 110 800538: word holds the argument of the '<b' command
111 80053C: byte indicates validity of the received '<w' command:
112 0 means valid, 1 means something bad
86 113
87 8005C0: appears to be the intended low address (bottom) of the stack 114 8005C0: appears to be the intended low address (bottom) of the stack
88 80074C: top of the stack (initial value loaded into SP) 115 80074C: top of the stack (initial value loaded into SP)
116 800750: lowest address at which user code may be loaded