diff --git a/Assembler-directives.md b/Assembler-directives.md index 5c6e519..7735241 100644 --- a/Assembler-directives.md +++ b/Assembler-directives.md @@ -125,8 +125,15 @@ someBigStaticMemoryBlock: DW 100 DUP(0x20), 0 It can only be used in combination with the `DW` directive ## Sections -// TODO +Sections are useful to organize your code. +There is currently two section, `.text` and `.data`. By default, the .data section implicitly starts at the beginning of your code and ends where the `.text` section starts, but you are allowed to reorder them as you wish. You must explicitly specify where the `.text` section starts. + +At the beginning of each tick, your code is executed starting at the first instruction after the `.text` directive until it reaches the `BRK` instruction (See [Execution cycle](https://github.com/simon987/Much-Assembly-Required/wiki/CPU#execution-cycle). + +Notes: +* There is nothing stopping you from executing code in the `.data` section (or to store variables in the `.text` section) +* There is no padding in between sections ## ORG