mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-24 13:05:51 +00:00
Document ORG instruction
parent
33011133b4
commit
31d35b15dc
@ -111,4 +111,16 @@ It can only be used in combination with the `DW` directive
|
|||||||
// NOT IMPLEMENTED
|
// NOT IMPLEMENTED
|
||||||
|
|
||||||
## ORG
|
## ORG
|
||||||
// TODO
|
|
||||||
|
The `ORG` directive lets you change where your code is copied during assembly. By default, assembled code is copied at `0x200`
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```asm
|
||||||
|
ORG 0x8000
|
||||||
|
my_var: DW 0x1234
|
||||||
|
|
||||||
|
.text
|
||||||
|
MOV A, [my_var] ; Value of A is now 0x8000
|
||||||
|
brk
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user