From 8ec82ef5208a4664fc00699c69549105ce9ec46a Mon Sep 17 00:00:00 2001 From: Karol Stasiak Date: Fri, 31 Jul 2020 01:57:10 +0200 Subject: [PATCH] 6809: Document direct addressing mode --- docs/lang/assembly6809.md | 5 +++++ docs/various/asmdiff.md | 2 ++ 2 files changed, 7 insertions(+) diff --git a/docs/lang/assembly6809.md b/docs/lang/assembly6809.md index 78108e45..6da6d449 100644 --- a/docs/lang/assembly6809.md +++ b/docs/lang/assembly6809.md @@ -42,6 +42,11 @@ but you need to be careful with using absolute vs immediate addressing: } return result } + +To use the direct addressing mode, prepend the argument with `<`: + + CLR <$6f // clears the byte $6f in the direct page + CLR $6f // clears the byte $006f (absolute address!) Any assembly opcode can be prefixed with `?`, which allows the optimizer change it or elide it if needed. Opcodes without that prefix will be always compiled as written. diff --git a/docs/various/asmdiff.md b/docs/various/asmdiff.md index e3efc369..82e9751a 100644 --- a/docs/various/asmdiff.md +++ b/docs/various/asmdiff.md @@ -30,5 +30,7 @@ Colons are required in label declarations. * 6809: `0,X` is assembled the same as `,X`. +* 6502: To enforce direct-page addressing, prepend the argument with `<`: `