Skip to content

Commit 4f362f4

Browse files
committed
Add tests
1 parent 4a82c62 commit 4f362f4

8 files changed

Lines changed: 202 additions & 0 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
org 32768
2+
.core.__START_PROGRAM:
3+
di
4+
push ix
5+
push iy
6+
exx
7+
push hl
8+
exx
9+
ld (.core.__CALL_BACK__), sp
10+
ei
11+
jp .core.__MAIN_PROGRAM__
12+
.core.__CALL_BACK__:
13+
DEFW 0
14+
.core.ZXBASIC_USER_DATA:
15+
; Defines USER DATA Length in bytes
16+
.core.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_END - .core.ZXBASIC_USER_DATA
17+
.core.__LABEL__.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_LEN
18+
.core.__LABEL__.ZXBASIC_USER_DATA EQU .core.ZXBASIC_USER_DATA
19+
_v1:
20+
DEFB 00h
21+
DEFB 80h
22+
DEFB 01h
23+
DEFB 00h
24+
_v2:
25+
DEFB 00, 00, 00, 00
26+
.core.ZXBASIC_USER_DATA_END:
27+
.core.__MAIN_PROGRAM__:
28+
ld hl, (_v1)
29+
ld de, (_v1 + 2)
30+
ex de, hl
31+
ld de, 0
32+
ld (_v2), hl
33+
ld (_v2 + 2), de
34+
ld hl, 0
35+
ld b, h
36+
ld c, l
37+
.core.__END_PROGRAM:
38+
di
39+
ld hl, (.core.__CALL_BACK__)
40+
ld sp, hl
41+
exx
42+
pop hl
43+
exx
44+
pop iy
45+
pop ix
46+
ei
47+
ret
48+
;; --- end of user code ---
49+
END
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
DIM v1 As Fixed = 1.5
2+
DIM v2 As Long
3+
4+
v2 = v1
5+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
org 32768
2+
.core.__START_PROGRAM:
3+
di
4+
push ix
5+
push iy
6+
exx
7+
push hl
8+
exx
9+
ld (.core.__CALL_BACK__), sp
10+
ei
11+
jp .core.__MAIN_PROGRAM__
12+
.core.__CALL_BACK__:
13+
DEFW 0
14+
.core.ZXBASIC_USER_DATA:
15+
; Defines USER DATA Length in bytes
16+
.core.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_END - .core.ZXBASIC_USER_DATA
17+
.core.__LABEL__.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_LEN
18+
.core.__LABEL__.ZXBASIC_USER_DATA EQU .core.ZXBASIC_USER_DATA
19+
_v1:
20+
DEFB 00h
21+
DEFB 80h
22+
DEFB 01h
23+
DEFB 00h
24+
_v2:
25+
DEFB 00, 00, 00, 00
26+
.core.ZXBASIC_USER_DATA_END:
27+
.core.__MAIN_PROGRAM__:
28+
ld hl, (_v1)
29+
ld de, (_v1 + 2)
30+
ex de, hl
31+
ld de, 0
32+
ld (_v2), hl
33+
ld (_v2 + 2), de
34+
ld hl, 0
35+
ld b, h
36+
ld c, l
37+
.core.__END_PROGRAM:
38+
di
39+
ld hl, (.core.__CALL_BACK__)
40+
ld sp, hl
41+
exx
42+
pop hl
43+
exx
44+
pop iy
45+
pop ix
46+
ei
47+
ret
48+
;; --- end of user code ---
49+
END
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
DIM v1 As Fixed = 1.5
2+
DIM v2 As ULong
3+
4+
v2 = v1
5+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
org 32768
2+
.core.__START_PROGRAM:
3+
di
4+
push iy
5+
ld iy, 0x5C3A ; ZX Spectrum ROM variables address
6+
ld (.core.__CALL_BACK__), sp
7+
ei
8+
jp .core.__MAIN_PROGRAM__
9+
.core.__CALL_BACK__:
10+
DEFW 0
11+
.core.ZXBASIC_USER_DATA:
12+
; Defines USER DATA Length in bytes
13+
.core.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_END - .core.ZXBASIC_USER_DATA
14+
.core.__LABEL__.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_LEN
15+
.core.__LABEL__.ZXBASIC_USER_DATA EQU .core.ZXBASIC_USER_DATA
16+
_v1:
17+
DEFB 00h
18+
DEFB 80h
19+
DEFB 01h
20+
DEFB 00h
21+
_v2:
22+
DEFB 00, 00, 00, 00
23+
.core.ZXBASIC_USER_DATA_END:
24+
.core.__MAIN_PROGRAM__:
25+
ld hl, (_v1)
26+
ld de, (_v1 + 2)
27+
ex de, hl
28+
ld de, 0
29+
ld (_v2), hl
30+
ld (_v2 + 2), de
31+
ld hl, 0
32+
ld b, h
33+
ld c, l
34+
.core.__END_PROGRAM:
35+
di
36+
ld hl, (.core.__CALL_BACK__)
37+
ld sp, hl
38+
pop iy
39+
ei
40+
ret
41+
;; --- end of user code ---
42+
END
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
DIM v1 As Fixed = 1.5
2+
DIM v2 As Long
3+
4+
v2 = v1
5+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
org 32768
2+
.core.__START_PROGRAM:
3+
di
4+
push iy
5+
ld iy, 0x5C3A ; ZX Spectrum ROM variables address
6+
ld (.core.__CALL_BACK__), sp
7+
ei
8+
jp .core.__MAIN_PROGRAM__
9+
.core.__CALL_BACK__:
10+
DEFW 0
11+
.core.ZXBASIC_USER_DATA:
12+
; Defines USER DATA Length in bytes
13+
.core.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_END - .core.ZXBASIC_USER_DATA
14+
.core.__LABEL__.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_LEN
15+
.core.__LABEL__.ZXBASIC_USER_DATA EQU .core.ZXBASIC_USER_DATA
16+
_v1:
17+
DEFB 00h
18+
DEFB 80h
19+
DEFB 01h
20+
DEFB 00h
21+
_v2:
22+
DEFB 00, 00, 00, 00
23+
.core.ZXBASIC_USER_DATA_END:
24+
.core.__MAIN_PROGRAM__:
25+
ld hl, (_v1)
26+
ld de, (_v1 + 2)
27+
ex de, hl
28+
ld de, 0
29+
ld (_v2), hl
30+
ld (_v2 + 2), de
31+
ld hl, 0
32+
ld b, h
33+
ld c, l
34+
.core.__END_PROGRAM:
35+
di
36+
ld hl, (.core.__CALL_BACK__)
37+
ld sp, hl
38+
pop iy
39+
ei
40+
ret
41+
;; --- end of user code ---
42+
END
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
DIM v1 As Fixed = 1.5
2+
DIM v2 As ULong
3+
4+
v2 = v1
5+

0 commit comments

Comments
 (0)