File tree Expand file tree Collapse file tree 16 files changed +372
-8
lines changed
tests/functional/arch/zx48k Expand file tree Collapse file tree 16 files changed +372
-8
lines changed Original file line number Diff line number Diff line change 1+ declare sub test2
2+
13sub test1 ()
24 DIM dummy as Uinteger = @test2
35end sub
Original file line number Diff line number Diff line change 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+ .core.ZXBASIC_USER_DATA_END:
20+ .core.__MAIN_PROGRAM__:
21+ ld hl , 0
22+ ld b , h
23+ ld c , l
24+ .core.__END_PROGRAM:
25+ di
26+ ld hl , (.core.__CALL_BACK__)
27+ ld sp , hl
28+ exx
29+ pop hl
30+ exx
31+ pop iy
32+ pop ix
33+ ei
34+ ret
35+ _test1:
36+ push ix
37+ ld ix , 0
38+ add ix , sp
39+ ld hl , 0
40+ push hl
41+ ld hl , _test2
42+ ld (ix - 2 ) , l
43+ ld (ix - 1 ) , h
44+ _test1__leave:
45+ ld sp , ix
46+ pop ix
47+ ret
48+ _test2:
49+ push ix
50+ ld ix , 0
51+ add ix , sp
52+ _test2__leave:
53+ ld sp , ix
54+ pop ix
55+ ret
56+ ;; --- end of user code ---
57+ END
Original file line number Diff line number Diff line change 1+ sub test1 ()
2+ DIM dummy as Uinteger = @test2
3+ end sub
4+
5+ sub test2
6+ end sub
Original file line number Diff line number Diff line change 1+ Map:
12
23Function q
34 DIM q as Uinteger = @Map
45End Function
5-
6- Map:
Original file line number Diff line number Diff line change 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+ _Map:
20+ DEFB 00
21+ .core.ZXBASIC_USER_DATA_END:
22+ .core.__MAIN_PROGRAM__:
23+ ld a , 2
24+ ld (_Map) , a
25+ ld hl , 0
26+ ld b , h
27+ ld c , l
28+ .core.__END_PROGRAM:
29+ di
30+ ld hl , (.core.__CALL_BACK__)
31+ ld sp , hl
32+ exx
33+ pop hl
34+ exx
35+ pop iy
36+ pop ix
37+ ei
38+ ret
39+ _q:
40+ push ix
41+ ld ix , 0
42+ add ix , sp
43+ ld hl , 0
44+ push hl
45+ push ix
46+ pop hl
47+ ld bc , - 2
48+ add hl , bc
49+ ex de , hl
50+ ld hl , .LABEL.__LABEL0
51+ ld bc , 2
52+ ldir
53+ ld a , 1
54+ ld (_Map) , a
55+ _q__leave:
56+ ld sp , ix
57+ pop ix
58+ ret
59+ ;; --- end of user code ---
60+ .LABEL.__LABEL0:
61+ DEFW _Map
62+ END
Original file line number Diff line number Diff line change 1+ Map = 2
2+
13Function q
24 DIM q as Uinteger = @Map
35 Map = 1
46End Function
5-
6- Map = 2
Original file line number Diff line number Diff line change 1+ Let Map = 1
2+
13Function q
24 DIM q as Uinteger = @Map
35End Function
4-
5- Let Map = 1
Original file line number Diff line number Diff line change 1+ Dim Map = 1
2+
13Function q
24 DIM q as Uinteger = @Map
35End Function
4-
5- Dim Map = 1
Original file line number Diff line number Diff line change 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+ .core.ZXBASIC_USER_DATA_END:
20+ .core.__MAIN_PROGRAM__:
21+ .LABEL._Map:
22+ ld hl , 0
23+ ld b , h
24+ ld c , l
25+ .core.__END_PROGRAM:
26+ di
27+ ld hl , (.core.__CALL_BACK__)
28+ ld sp , hl
29+ exx
30+ pop hl
31+ exx
32+ pop iy
33+ pop ix
34+ ei
35+ ret
36+ _q:
37+ push ix
38+ ld ix , 0
39+ add ix , sp
40+ ld hl , 0
41+ push hl
42+ ld hl , .LABEL._Map
43+ ld (ix - 2 ) , l
44+ ld (ix - 1 ) , h
45+ _q__leave:
46+ ld sp , ix
47+ pop ix
48+ ret
49+ ;; --- end of user code ---
50+ END
Original file line number Diff line number Diff line change 1+
2+ Function q
3+ DIM q as Uinteger = @Map
4+ End Function
5+
6+ Map:
You can’t perform that action at this time.
0 commit comments