mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-24 03:52:08 +00:00
Split register-indirect tokens
This allows whitespace between the brackets and the register. This also fixes #531 Note that `$ff00 + c` is still treated as a single token, because trying to use an expression on the left side causes a shift/reduce conflict. This isn't great, but most people seem to be either used to it as-is, or using the new `ldh a, [c]` syntax. If this causes problems with a lexer rewrite, it'll be deprecated; but for now, keep it around, as the support is clunky but bearable.
This commit is contained in:
@@ -155,6 +155,8 @@ ENDM
|
||||
ld [$ABCD],a
|
||||
ldh [$ff00+$DB],a
|
||||
ld [$ff00+c],a
|
||||
ld [$ff00 + c],a
|
||||
ldh [c],a
|
||||
|
||||
ld a,[bc]
|
||||
ld a,[de]
|
||||
@@ -162,11 +164,17 @@ ENDM
|
||||
ld a,[$ABCD]
|
||||
ldh a,[$ff00+$DB]
|
||||
ld a,[$ff00+c]
|
||||
ld a,[$ff00 + c]
|
||||
ldh a,[c]
|
||||
|
||||
ld [hl+],a
|
||||
ld [hli],a
|
||||
ld [hl-],a
|
||||
ld [hld],a
|
||||
ld a,[hl+]
|
||||
ld a,[hli]
|
||||
ld a,[hl-]
|
||||
ld a,[hld]
|
||||
|
||||
; Jumps and Subroutines
|
||||
|
||||
|
||||
Reference in New Issue
Block a user