diff --git a/src/lib/arch/zxnext/runtime/bound.asm b/src/lib/arch/zxnext/runtime/bound.asm index 7eb344b7e..6cb71eafa 100644 --- a/src/lib/arch/zxnext/runtime/bound.asm +++ b/src/lib/arch/zxnext/runtime/bound.asm @@ -70,6 +70,10 @@ __CONT: ld h, (hl) ld l, a ; LD HL, (HL) => Origin of L/U Bound table + ; for LBound only, HL = 0x0000 (NULL) if the array is all 0-based + or h + ret z ; Should never happen for UBound + add hl, de ; hl += OFFSET __LBOUND._xxxx ld e, (hl) ; de = (hl) inc hl diff --git a/tests/functional/arch/zxnext/bound00.asm b/tests/functional/arch/zxnext/bound00.asm new file mode 100644 index 000000000..38076b560 --- /dev/null +++ b/tests/functional/arch/zxnext/bound00.asm @@ -0,0 +1,63 @@ + org 32768 +.core.__START_PROGRAM: + di + push iy + ld iy, 0x5C3A ; ZX Spectrum ROM variables address + ld hl, 0 + add hl, sp + ld (.core.__CALL_BACK__), hl + ei + jp .core.__MAIN_PROGRAM__ +.core.__CALL_BACK__: + DEFW 0 +.core.ZXBASIC_USER_DATA: + ; Defines USER DATA Length in bytes +.core.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_END - .core.ZXBASIC_USER_DATA + .core.__LABEL__.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_LEN + .core.__LABEL__.ZXBASIC_USER_DATA EQU .core.ZXBASIC_USER_DATA +_b: + DEFB 00, 00 +_c: + DEFB 00, 00 +_a: + DEFW .LABEL.__LABEL0 +_a.__DATA__.__PTR__: + DEFW _a.__DATA__ + DEFW 0 + DEFW 0 +_a.__DATA__: + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h +.LABEL.__LABEL0: + DEFW 0000h + DEFB 02h +.core.ZXBASIC_USER_DATA_END: +.core.__MAIN_PROGRAM__: + ld hl, 1 + ld (_b), hl + ld hl, 1 + ld (_c), hl + ld hl, 0 + ld b, h + ld c, l +.core.__END_PROGRAM: + di + ld hl, (.core.__CALL_BACK__) + ld sp, hl + pop iy + ei + ret + ;; --- end of user code --- + END diff --git a/tests/functional/arch/zxnext/bound00.bas b/tests/functional/arch/zxnext/bound00.bas new file mode 100644 index 000000000..1824d451a --- /dev/null +++ b/tests/functional/arch/zxnext/bound00.bas @@ -0,0 +1,5 @@ + +DIM a(2 TO 8) as integer + +LET b = Ubound(a) +LET c = Lbound(a) diff --git a/tests/functional/arch/zxnext/bound01.asm b/tests/functional/arch/zxnext/bound01.asm new file mode 100644 index 000000000..64c6ec4e7 --- /dev/null +++ b/tests/functional/arch/zxnext/bound01.asm @@ -0,0 +1,110 @@ + org 32768 +.core.__START_PROGRAM: + di + push iy + ld iy, 0x5C3A ; ZX Spectrum ROM variables address + ld hl, 0 + add hl, sp + ld (.core.__CALL_BACK__), hl + ei + jp .core.__MAIN_PROGRAM__ +.core.__CALL_BACK__: + DEFW 0 +.core.ZXBASIC_USER_DATA: + ; Defines USER DATA Length in bytes +.core.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_END - .core.ZXBASIC_USER_DATA + .core.__LABEL__.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_LEN + .core.__LABEL__.ZXBASIC_USER_DATA EQU .core.ZXBASIC_USER_DATA +_b: + DEFB 00, 00 +_c: + DEFB 00, 00 +_a: + DEFW .LABEL.__LABEL0 +_a.__DATA__.__PTR__: + DEFW _a.__DATA__ + DEFW 0 + DEFW 0 +_a.__DATA__: + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h +.LABEL.__LABEL0: + DEFW 0001h + DEFW 0004h + DEFB 02h +.core.ZXBASIC_USER_DATA_END: +.core.__MAIN_PROGRAM__: + ld hl, 8 + ld (_b), hl + ld hl, 2 + ld (_c), hl + ld hl, 6 + ld (_b), hl + ld hl, 3 + ld (_c), hl + ld hl, 0 + ld b, h + ld c, l +.core.__END_PROGRAM: + di + ld hl, (.core.__CALL_BACK__) + ld sp, hl + pop iy + ei + ret + ;; --- end of user code --- + END diff --git a/tests/functional/arch/zxnext/bound01.bas b/tests/functional/arch/zxnext/bound01.bas new file mode 100644 index 000000000..0ab3a3052 --- /dev/null +++ b/tests/functional/arch/zxnext/bound01.bas @@ -0,0 +1,7 @@ + +DIM a(2 TO 8, 3 TO 6) as integer + +LET b = Ubound(a, 1) +LET c = Lbound(a, 1) +LET b = Ubound(a, 2) +LET c = Lbound(a, 2) diff --git a/tests/functional/arch/zxnext/bound02.asm b/tests/functional/arch/zxnext/bound02.asm new file mode 100644 index 000000000..d20f4e2f1 --- /dev/null +++ b/tests/functional/arch/zxnext/bound02.asm @@ -0,0 +1,204 @@ + org 32768 +.core.__START_PROGRAM: + di + push iy + ld iy, 0x5C3A ; ZX Spectrum ROM variables address + ld hl, 0 + add hl, sp + ld (.core.__CALL_BACK__), hl + ei + jp .core.__MAIN_PROGRAM__ +.core.__CALL_BACK__: + DEFW 0 +.core.ZXBASIC_USER_DATA: + ; Defines USER DATA Length in bytes +.core.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_END - .core.ZXBASIC_USER_DATA + .core.__LABEL__.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_LEN + .core.__LABEL__.ZXBASIC_USER_DATA EQU .core.ZXBASIC_USER_DATA +_b: + DEFB 00 +_c: + DEFB 00, 00 +_a: + DEFW .LABEL.__LABEL0 +_a.__DATA__.__PTR__: + DEFW _a.__DATA__ + DEFW 0 + DEFW 0 +_a.__DATA__: + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h +.LABEL.__LABEL0: + DEFW 0001h + DEFW 0004h + DEFB 02h +.core.ZXBASIC_USER_DATA_END: +.core.__MAIN_PROGRAM__: + ld a, 1 + ld (_b), a + ld l, a + ld h, 0 + push hl + ld hl, _a + call .core.__LBOUND + ld (_c), hl + ld a, (_b) + inc a + ld l, a + ld h, 0 + push hl + ld hl, _a + call .core.__LBOUND + ld (_c), hl + ld a, (_b) + dec a + ld l, a + ld h, 0 + push hl + ld hl, _a + call .core.__LBOUND + ld (_c), hl + ld hl, 0 + ld b, h + ld c, l +.core.__END_PROGRAM: + di + ld hl, (.core.__CALL_BACK__) + ld sp, hl + pop iy + ei + ret + ;; --- end of user code --- +#line 1 "/zxbasic/src/lib/arch/zxnext/runtime/bound.asm" + ; --------------------------------------------------------- + ; Copyleft (k)2011 by Jose Rodriguez (a.k.a. Boriel) +; http://www.boriel.com + ; +; ZX BASIC Compiler http://www.zxbasic.net + ; This code is released under the BSD License + ; --------------------------------------------------------- + ; Implements both LBOUND(array, N) and UBOUND(array, N) function +; Parameters: + ; HL = PTR to array + ; [stack - 2] -> N (dimension) + push namespace core + PROC + LOCAL __BOUND + LOCAL __DIM_NOT_EXIST + LOCAL __CONT +__LBOUND: + ld a, 4 + jr __BOUND +__UBOUND: + ld a, 6 +__BOUND: + ex de, hl ; DE <-- Array ptr + pop hl ; HL <-- Ret address + ex (sp), hl ; CALLEE: HL <-- N, (SP) <-- Ret address + ex de, hl ; DE <-- N, HL <-- ARRAY_PTR + push hl + ld c, (hl) + inc hl + ld h, (hl) + ld l, c ; HL = start of dimension table (first position contains number of dimensions - 1) + ld c, (hl) + inc hl + ld b, (hl) + inc bc ; Number of total dimensions of the array + pop hl ; Recovers ARRAY PTR + ex af, af' ; Saves A for later + ld a, d + or e + jr nz, __CONT ; N = 0 => Return number of dimensions + ;; Return the number of dimensions of the array + ld h, b + ld l, c + ret +__CONT: + dec de + ex af, af' ; Recovers A (contains PTR offset) + ex de, hl ; HL = N (dimension asked) - 1, DE = Array PTR + or a + sbc hl, bc ; if no Carry => the user asked for a dimension that does not exist. Return 0 + jr nc, __DIM_NOT_EXIST + add hl, bc ; restores HL = (N - 1) + add hl, hl ; hl *= 2 + ex de, hl ; hl = ARRAY_PTR + 3, DE jsz = (N - 1) * 2 + ld b, 0 + ld c, a + add hl, bc ; HL = &BOUND_PTR + ld a, (hl) + inc hl + ld h, (hl) + ld l, a ; LD HL, (HL) => Origin of L/U Bound table + ; for LBound only, HL = 0x0000 (NULL) if the array is all 0-based + or h + ret z ; Should never happen for UBound + add hl, de ; hl += OFFSET __LBOUND._xxxx + ld e, (hl) ; de = (hl) + inc hl + ld d, (hl) + ex de, hl ; hl = de => returns result in HL + ret +__DIM_NOT_EXIST: + ; The dimension requested by the user does not exists. Return 0 + ld hl, 0 + ret + ENDP + pop namespace +#line 37 "arch/zxnext/bound02.bas" + END diff --git a/tests/functional/arch/zxnext/bound02.bas b/tests/functional/arch/zxnext/bound02.bas new file mode 100644 index 000000000..7a46f2a16 --- /dev/null +++ b/tests/functional/arch/zxnext/bound02.bas @@ -0,0 +1,7 @@ + +DIM a(2 TO 8, 3 TO 6) as integer + +LET b = 1 +LET c = Lbound(a, b) +LET c = Lbound(a, b + 1) +LET c = Lbound(a, b - 1) diff --git a/tests/functional/arch/zxnext/bound03.asm b/tests/functional/arch/zxnext/bound03.asm new file mode 100644 index 000000000..4a6e5ee69 --- /dev/null +++ b/tests/functional/arch/zxnext/bound03.asm @@ -0,0 +1,207 @@ + org 32768 +.core.__START_PROGRAM: + di + push iy + ld iy, 0x5C3A ; ZX Spectrum ROM variables address + ld hl, 0 + add hl, sp + ld (.core.__CALL_BACK__), hl + ei + jp .core.__MAIN_PROGRAM__ +.core.__CALL_BACK__: + DEFW 0 +.core.ZXBASIC_USER_DATA: + ; Defines USER DATA Length in bytes +.core.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_END - .core.ZXBASIC_USER_DATA + .core.__LABEL__.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_LEN + .core.__LABEL__.ZXBASIC_USER_DATA EQU .core.ZXBASIC_USER_DATA +_b: + DEFB 00 +_c: + DEFB 00, 00 +_a: + DEFW .LABEL.__LABEL0 +_a.__DATA__.__PTR__: + DEFW _a.__DATA__ + DEFW 0 + DEFW _a.__UBOUND__ +_a.__DATA__: + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h +.LABEL.__LABEL0: + DEFW 0001h + DEFW 0004h + DEFB 02h +_a.__UBOUND__: + DEFW 0008h + DEFW 0006h +.core.ZXBASIC_USER_DATA_END: +.core.__MAIN_PROGRAM__: + ld a, 1 + ld (_b), a + ld l, a + ld h, 0 + push hl + ld hl, _a + call .core.__UBOUND + ld (_c), hl + ld a, (_b) + inc a + ld l, a + ld h, 0 + push hl + ld hl, _a + call .core.__UBOUND + ld (_c), hl + ld a, (_b) + dec a + ld l, a + ld h, 0 + push hl + ld hl, _a + call .core.__UBOUND + ld (_c), hl + ld hl, 0 + ld b, h + ld c, l +.core.__END_PROGRAM: + di + ld hl, (.core.__CALL_BACK__) + ld sp, hl + pop iy + ei + ret + ;; --- end of user code --- +#line 1 "/zxbasic/src/lib/arch/zxnext/runtime/bound.asm" + ; --------------------------------------------------------- + ; Copyleft (k)2011 by Jose Rodriguez (a.k.a. Boriel) +; http://www.boriel.com + ; +; ZX BASIC Compiler http://www.zxbasic.net + ; This code is released under the BSD License + ; --------------------------------------------------------- + ; Implements both LBOUND(array, N) and UBOUND(array, N) function +; Parameters: + ; HL = PTR to array + ; [stack - 2] -> N (dimension) + push namespace core + PROC + LOCAL __BOUND + LOCAL __DIM_NOT_EXIST + LOCAL __CONT +__LBOUND: + ld a, 4 + jr __BOUND +__UBOUND: + ld a, 6 +__BOUND: + ex de, hl ; DE <-- Array ptr + pop hl ; HL <-- Ret address + ex (sp), hl ; CALLEE: HL <-- N, (SP) <-- Ret address + ex de, hl ; DE <-- N, HL <-- ARRAY_PTR + push hl + ld c, (hl) + inc hl + ld h, (hl) + ld l, c ; HL = start of dimension table (first position contains number of dimensions - 1) + ld c, (hl) + inc hl + ld b, (hl) + inc bc ; Number of total dimensions of the array + pop hl ; Recovers ARRAY PTR + ex af, af' ; Saves A for later + ld a, d + or e + jr nz, __CONT ; N = 0 => Return number of dimensions + ;; Return the number of dimensions of the array + ld h, b + ld l, c + ret +__CONT: + dec de + ex af, af' ; Recovers A (contains PTR offset) + ex de, hl ; HL = N (dimension asked) - 1, DE = Array PTR + or a + sbc hl, bc ; if no Carry => the user asked for a dimension that does not exist. Return 0 + jr nc, __DIM_NOT_EXIST + add hl, bc ; restores HL = (N - 1) + add hl, hl ; hl *= 2 + ex de, hl ; hl = ARRAY_PTR + 3, DE jsz = (N - 1) * 2 + ld b, 0 + ld c, a + add hl, bc ; HL = &BOUND_PTR + ld a, (hl) + inc hl + ld h, (hl) + ld l, a ; LD HL, (HL) => Origin of L/U Bound table + ; for LBound only, HL = 0x0000 (NULL) if the array is all 0-based + or h + ret z ; Should never happen for UBound + add hl, de ; hl += OFFSET __LBOUND._xxxx + ld e, (hl) ; de = (hl) + inc hl + ld d, (hl) + ex de, hl ; hl = de => returns result in HL + ret +__DIM_NOT_EXIST: + ; The dimension requested by the user does not exists. Return 0 + ld hl, 0 + ret + ENDP + pop namespace +#line 37 "arch/zxnext/bound03.bas" + END diff --git a/tests/functional/arch/zxnext/bound03.bas b/tests/functional/arch/zxnext/bound03.bas new file mode 100644 index 000000000..9ea251e2b --- /dev/null +++ b/tests/functional/arch/zxnext/bound03.bas @@ -0,0 +1,8 @@ + +DIM a(2 TO 8, 3 TO 6) as integer + +LET b = 1 + +LET c = Ubound(a, b) +LET c = Ubound(a, b + 1) +LET c = UBound(a, b-1) diff --git a/tests/functional/arch/zxnext/bound04.asm b/tests/functional/arch/zxnext/bound04.asm new file mode 100644 index 000000000..a66c84257 --- /dev/null +++ b/tests/functional/arch/zxnext/bound04.asm @@ -0,0 +1,90 @@ + org 32768 +.core.__START_PROGRAM: + di + push iy + ld iy, 0x5C3A ; ZX Spectrum ROM variables address + ld hl, 0 + add hl, sp + ld (.core.__CALL_BACK__), hl + ei + jp .core.__MAIN_PROGRAM__ +.core.__CALL_BACK__: + DEFW 0 +.core.ZXBASIC_USER_DATA: + ; Defines USER DATA Length in bytes +.core.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_END - .core.ZXBASIC_USER_DATA + .core.__LABEL__.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_LEN + .core.__LABEL__.ZXBASIC_USER_DATA EQU .core.ZXBASIC_USER_DATA +_c: + DEFB 00, 00 +_a: + DEFW .LABEL.__LABEL0 +_a.__DATA__.__PTR__: + DEFW _a.__DATA__ + DEFW 0 + DEFW 0 +_a.__DATA__: + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h +.LABEL.__LABEL0: + DEFW 0001h + DEFW 0007h + DEFB 01h +.core.ZXBASIC_USER_DATA_END: +.core.__MAIN_PROGRAM__: + ld hl, 2 + ld (_c), hl + ld hl, 2 + ld (_c), hl + ld hl, 0 + ld b, h + ld c, l +.core.__END_PROGRAM: + di + ld hl, (.core.__CALL_BACK__) + ld sp, hl + pop iy + ei + ret + ;; --- end of user code --- + END diff --git a/tests/functional/arch/zxnext/bound04.bas b/tests/functional/arch/zxnext/bound04.bas new file mode 100644 index 000000000..98626adcc --- /dev/null +++ b/tests/functional/arch/zxnext/bound04.bas @@ -0,0 +1,6 @@ +REM Constant dimensions test + +DIM a(5, 6) as Byte + +c = LBound(a, 0) +c = UBound(a, 0) diff --git a/tests/functional/arch/zxnext/ubound0.asm b/tests/functional/arch/zxnext/ubound0.asm new file mode 100644 index 000000000..65a2084e5 --- /dev/null +++ b/tests/functional/arch/zxnext/ubound0.asm @@ -0,0 +1,55 @@ + org 32768 +.core.__START_PROGRAM: + di + push iy + ld iy, 0x5C3A ; ZX Spectrum ROM variables address + ld hl, 0 + add hl, sp + ld (.core.__CALL_BACK__), hl + ei + jp .core.__MAIN_PROGRAM__ +.core.__CALL_BACK__: + DEFW 0 +.core.ZXBASIC_USER_DATA: + ; Defines USER DATA Length in bytes +.core.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_END - .core.ZXBASIC_USER_DATA + .core.__LABEL__.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_LEN + .core.__LABEL__.ZXBASIC_USER_DATA EQU .core.ZXBASIC_USER_DATA +_b: + DEFB 00, 00 +_a: + DEFW .LABEL.__LABEL0 +_a.__DATA__.__PTR__: + DEFW _a.__DATA__ + DEFW 0 + DEFW 0 +_a.__DATA__: + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h + DEFB 00h +.LABEL.__LABEL0: + DEFW 0001h + DEFW 0003h + DEFB 01h +.core.ZXBASIC_USER_DATA_END: +.core.__MAIN_PROGRAM__: + ld hl, 2 + ld (_b), hl + ld hl, 0 + ld b, h + ld c, l +.core.__END_PROGRAM: + di + ld hl, (.core.__CALL_BACK__) + ld sp, hl + pop iy + ei + ret + ;; --- end of user code --- + END diff --git a/tests/functional/arch/zxnext/ubound0.bas b/tests/functional/arch/zxnext/ubound0.bas new file mode 100644 index 000000000..b28466db3 --- /dev/null +++ b/tests/functional/arch/zxnext/ubound0.bas @@ -0,0 +1,4 @@ + +DIM a(3 TO 5, 7 TO 9) As UByte + +LET b = UBound(a)