Skip to content

Commit 1a6aacc

Browse files
authored
Merge pull request #576 from boriel/bugfix/allow_brackets_for_16bit_regs
fix: allow ld [NNNN], reg16
2 parents 7d0429f + 4b8a4ce commit 1a6aacc

6 files changed

Lines changed: 21 additions & 8 deletions

File tree

src/parsetab/tabs.dbm.bak

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
'zxbpp', (0, 76970)
2-
'asmparse', (77312, 268394)
3-
'zxnext_asmparse', (346112, 298411)
4-
'zxbparser', (644608, 704752)
2+
'asmparse', (77312, 268610)
3+
'zxnext_asmparse', (346112, 298625)
4+
'zxbparser', (645120, 704752)

src/parsetab/tabs.dbm.dat

512 Bytes
Binary file not shown.

src/parsetab/tabs.dbm.dir

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
'zxbpp', (0, 76970)
2-
'asmparse', (77312, 268394)
3-
'zxnext_asmparse', (346112, 298411)
4-
'zxbparser', (644608, 704752)
2+
'asmparse', (77312, 268610)
3+
'zxnext_asmparse', (346112, 298625)
4+
'zxbparser', (645120, 704752)

src/zxbasm/asmparse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,8 @@ def p_LD_addr_reg(p): # Load address,reg
552552
| LD pexpr COMMA reg16
553553
| LD pexpr COMMA SP
554554
| LD mem_indir COMMA A
555-
| LD mem_indir reg16
556-
| LD mem_indir SP
555+
| LD mem_indir COMMA reg16
556+
| LD mem_indir COMMA SP
557557
"""
558558
p[0] = Asm(p.lineno(1), "LD (NN),%s" % p[4], p[2])
559559

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
ld (0x1234), hl
3+
ld [0x1234], hl
4+
5+
ld (0x1234), bc
6+
ld [0x1234], bc
7+
8+
ld [0x1234], de
9+
ld (0x1234), de
10+
11+
ld (0x1234), sp
12+
ld [0x1234], sp
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"4"4�C4�C4�S4�S4�s4�s4

0 commit comments

Comments
 (0)