From 31d35b15dcea47862828e15a0e4fb32e23b618db Mon Sep 17 00:00:00 2001 From: simon987 Date: Thu, 30 Jul 2020 18:33:54 -0400 Subject: [PATCH] Document ORG instruction --- Assembler-directives.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Assembler-directives.md b/Assembler-directives.md index 874a529..a2b7302 100644 --- a/Assembler-directives.md +++ b/Assembler-directives.md @@ -111,4 +111,16 @@ It can only be used in combination with the `DW` directive // NOT IMPLEMENTED ## 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 +```