📄 pmapp.htm
字号:
<title>PMON Application</title> <h1 align=center>PMON Application</h1><!--INDEX "PMON Application" -->A PMON application (also known as a client), is a program that hasbeen compiled using the <a href="tools/pmcc.htm">pmcc</a> command and thendownloaded to the target board.<p><h2>Client Memory Map</h2><!--INDEX "Client Memory Map" --><dl><dd>When the program to be downloaded (client) is linked, the .text, .data,and .bss sections are all placed one behind the other starting at0x80020000 (except ATMizer-I). The heap grows upward from the end ofthe .bss section, and the stack grows down from the top of memory. Thisstack area is only used by the client. PMON uses a stack that islocated inside its .bss section. Heap overflow is indicated when theheap pointer crosses the stack pointer.<pre> HIGH MEMORY +---------------+ | | | stack | | | v | | | +---------------+ | | | ^ | | heap | | | | +---------------+ | bss | +---------------+ | data | +---------------+ LOW MEMORY | text | +---------------+</pre></dl><h2>PMON I/O operations</h2><!--INDEX "PMON I/O operations" --><dl><dd>Downloaded client programs perform all their I/O via PMON (unless theyaccess the DUART directly). Therefore if you write a program containingcalls to printf. These references will be resolved by a stub of codein the module lib/crt1.s. This stub uses a vector table, that is located at 0x200 bytes from the start of the PMON PROM, to transfercontrol to <a href="printf.htm">PMON's printf function</a>.<p><pre> ========> hello.c <======== main() { printf("Hello world!\n"); } ========> part of crt1.s <======== .globl printf .ent printf printf: li t0,TBLBASE+20 lw t0,(t0) j t0 .end printf</pre>Where <samp>TBLBASE</samp> is 0xa0c00200 for the ATMizer, and 0xbfc00200 forall other processors.<p>The file crt1.s allows a client program to access a number of target-dependentservices provided by the PROM Monitor. The linkage mechanism for allthese services is the <a href="vecttbl.htm">vector table</a>. </dl></dl><p><hr><b>Navigation:</b> <a href="index.htm">Document Home</a> | <a href="doctoc.htm">Document Contents</a> | <a href="docindex.htm">Document Index</a> <p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -