Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Merged in bugfix/array_letsubstr (pull request boriel-basic#216)
Browse files Browse the repository at this point in the history
bugfix: Fix LET ARR$ substr asignation

Approved-by: Jose Rodriguez <boriel@gmail.com>
  • Loading branch information
boriel committed Sep 28, 2019
2 parents a314ac8 + 5880c35 commit 90aa502
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion arch/zx48k/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def visit_LETARRAYSUBSTR(self, node):
else:
offset = node_.offset
if scope == SCOPE.global_:
self.ic_load(gl.PTR_TYPE, entry.t, '%s + %i' % (entry.mangled, offset))
self.ic_load(gl.PTR_TYPE, entry.t, '%s.__DATA__ + %i' % (entry.mangled, offset))
elif scope == SCOPE.parameter:
self.ic_pload(gl.PTR_TYPE, node_.t, entry.offset - offset)
elif scope == SCOPE.local:
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/let_array_substr10.asm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ __START_PROGRAM:
push hl
ld hl, 3
push hl
ld hl, (_a + 8)
ld hl, (_a.__DATA__ + 8)
call __LETSUBSTR
ld hl, 0
ld b, h
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/let_array_substr11.asm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ __START_PROGRAM:
push hl
ld hl, 65534
push hl
ld hl, (_a + 6)
ld hl, (_a.__DATA__ + 6)
call __LETSUBSTR
ld hl, 0
ld b, h
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/let_array_substr12.asm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ __START_PROGRAM:
push hl
ld hl, 5
push hl
ld hl, (_a + 6)
ld hl, (_a.__DATA__ + 6)
call __LETSUBSTR
ld hl, 0
ld b, h
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/let_array_substr13.asm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ __START_PROGRAM:
push hl
ld hl, 5
push hl
ld hl, (_a + 6)
ld hl, (_a.__DATA__ + 6)
call __LETSUBSTR
ld hl, 0
ld b, h
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/let_array_substr2.asm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ __START_PROGRAM:
push hl
ld hl, 5
push hl
ld hl, (_a + 6)
ld hl, (_a.__DATA__ + 6)
call __LETSUBSTR
ld hl, 0
ld b, h
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/let_array_substr3.asm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ __START_PROGRAM:
push hl
ld hl, 5
push hl
ld hl, (_a + 6)
ld hl, (_a.__DATA__ + 6)
call __LETSUBSTR
ld hl, 0
ld b, h
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/let_array_substr7.asm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ __START_PROGRAM:
push hl
ld hl, 1
push hl
ld hl, (_a + 6)
ld hl, (_a.__DATA__ + 6)
call __LETSUBSTR
ld hl, 0
ld b, h
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/let_array_substr9.asm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ __START_PROGRAM:
push hl
ld hl, 65534
push hl
ld hl, (_a + 6)
ld hl, (_a.__DATA__ + 6)
call __LETSUBSTR
ld hl, 0
ld b, h
Expand Down

0 comments on commit 90aa502

Please sign in to comment.