Commit 8b70b5

2026-06-02 13:03:34 Bob Green: -/-
programming/runtime.md ..
@@ 5,7 5,7 @@
| Address | Size | Variable Name |Comment |
| ------- | ------- | ------- | ------- |
| `0x03fffe` | ~256k | `_STACK_SIZE` |Stack (SSP). Grows towards 0. At round about 0x0000400 it would start stomping all over the memory area used by the monitor |
- | `0x040000` | n/a | `_RUN_ADDRESS` | Start of user program (.text), followed by initialised data (.data) and then unititialised data (.bss). The .bss area is initialised to all zeroes before main() is called. |
+ | `0x040000` | n/a | `_RUN_ADDRESS` | Start of user program (.text), followed by initialised data (.data) and then unititialised data (.bss). |
You can override the values at link time by using the linker option:
@@ 14,10 14,17 @@
```
You can use this option as many times as needed.
- ## In Detail
- ### Heap
+ ## Before calling main()
+ ### Banner Message
+ If the code is running in ROM, a banner message will be printed, similar to the following:
+ ```
+ Mega-680x0 Computer System
+ Code is running in ROM
+ 68030 Processor running at ~40MHz
+ ```
- `crt0` allocates all free memory from the end of the .bss area to the end of ram to the heap (malloc/free).
+ ### Heap
+ All free memory from the end of the .bss area to the end of ram to the heap (malloc/free).
### Global Variables
crt0 sets the following global variables:
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9