Skip to content

Commit 0d0b8f9

Browse files
committed
Add test DIMCONST7
1 parent 787cef6 commit 0d0b8f9

2 files changed

Lines changed: 65 additions & 0 deletions

File tree

tests/functional/dimconst7.asm

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
org 32768
2+
__START_PROGRAM:
3+
di
4+
push ix
5+
push iy
6+
exx
7+
push hl
8+
exx
9+
ld hl, 0
10+
add hl, sp
11+
ld (__CALL_BACK__), hl
12+
ei
13+
ld hl, 0
14+
ld b, h
15+
ld c, l
16+
__END_PROGRAM:
17+
di
18+
ld hl, (__CALL_BACK__)
19+
ld sp, hl
20+
exx
21+
pop hl
22+
exx
23+
pop iy
24+
pop ix
25+
ei
26+
ret
27+
__CALL_BACK__:
28+
DEFW 0
29+
ZXBASIC_USER_DATA:
30+
_a:
31+
DEFW (_c.__DATA__ + 11)
32+
_c:
33+
DEFW __LABEL0
34+
_c.__DATA__.__PTR__:
35+
DEFW _c.__DATA__
36+
_c.__DATA__:
37+
DEFB 00h
38+
DEFB 00h
39+
DEFB 00h
40+
DEFB 00h
41+
DEFB 00h
42+
DEFB 00h
43+
DEFB 00h
44+
DEFB 00h
45+
DEFB 00h
46+
DEFB 00h
47+
DEFB 00h
48+
DEFB 00h
49+
DEFB 00h
50+
DEFB 00h
51+
DEFB 00h
52+
DEFB 00h
53+
__LABEL0:
54+
DEFW 0001h
55+
DEFW 0004h
56+
DEFB 01h
57+
; Defines DATA END --> HEAP size is 0
58+
ZXBASIC_USER_DATA_END EQU ZXBASIC_MEM_HEAP
59+
; Defines USER DATA Length in bytes
60+
ZXBASIC_USER_DATA_LEN EQU ZXBASIC_USER_DATA_END - ZXBASIC_USER_DATA
61+
END

tests/functional/dimconst7.bas

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
DIM c(3, 3) as UBYTE
3+
DIM a as Uinteger = @c(2, 3)
4+

0 commit comments

Comments
 (0)