File tree Expand file tree Collapse file tree
src/lib/arch/zxnext/runtime
tests/functional/arch/zxnext Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- ; Returns SGN (SIGN) for 32, 16 and 8 bits signed integers, Fixed and FLOAT
2-
3- push namespace core
4-
5- PROC
6- LOCAL __ENDSGN
7-
8- __SGNF:
9- or b
10- or c
11- or d
12- or e
13- ret z
14- ld a , e
15- jr __ENDSGN
16-
17- __SGNF16:
18- __SGNI32:
19- ld a , h
20- or l
21- or e
22- or d
23- ret z
24-
25- ld a , d
26- jr __ENDSGN
27-
28- __SGNI16:
29- ld a , h
30- or l
31- ret z
32- ld a , h
33-
34- __ENDSGN:
35- or a
36- ld a , 1
37- ret p
38- neg
39- ret
40-
41- ENDP
42-
43- pop namespace
44-
1+ ' ----------------------------------------------------------------
2+ ' This file is released under the MIT License
3+ '
4+ ' Copyleft (k) 2008
5+ ' by Jose Rodriguez - Rosa (a.k.a. Boriel) <https://www.boriel.com>
6+ ' ----------------------------------------------------------------
7+
8+ #include once [ arch:zx48k ] <sgn.asm>
Original file line number Diff line number Diff line change 1- #include once <sgn.asm>
1+ ' ----------------------------------------------------------------
2+ ' This file is released under the MIT License
3+ '
4+ ' Copyleft (k) 2008
5+ ' by Jose Rodriguez - Rosa (a.k.a. Boriel) <https://www.boriel.com>
6+ ' ----------------------------------------------------------------
27
8+ #include once [ arch:zx48k ] <sgnf.asm>
Original file line number Diff line number Diff line change 1- #include once <sgn.asm>
1+ ' ----------------------------------------------------------------
2+ ' This file is released under the MIT License
3+ '
4+ ' Copyleft (k) 2008
5+ ' by Jose Rodriguez - Rosa (a.k.a. Boriel) <https://www.boriel.com>
6+ ' ----------------------------------------------------------------
27
8+ #include once [ arch:zx48k ] <sgnf16.asm>
Original file line number Diff line number Diff line change 1- #include once <sgn.asm>
1+ ' ----------------------------------------------------------------
2+ ' This file is released under the MIT License
3+ '
4+ ' Copyleft (k) 2008
5+ ' by Jose Rodriguez - Rosa (a.k.a. Boriel) <https://www.boriel.com>
6+ ' ----------------------------------------------------------------
27
8+ #include once [ arch:zx48k ] <sgni16.asm>
Original file line number Diff line number Diff line change 1- #include once <sgn.asm>
1+ ' ----------------------------------------------------------------
2+ ' This file is released under the MIT License
3+ '
4+ ' Copyleft (k) 2008
5+ ' by Jose Rodriguez - Rosa (a.k.a. Boriel) <https://www.boriel.com>
6+ ' ----------------------------------------------------------------
27
8+ #include once [ arch:zx48k ] <sgni32.asm>
Original file line number Diff line number Diff line change 1- ; Returns SGN (SIGN) for 8 bits signed integer
2-
3- push namespace core
4-
5- __SGNI8:
6- or a
7- ret z
8- ld a , 1
9- ret p
10- neg
11- ret
12-
13- pop namespace
14-
1+ ' ----------------------------------------------------------------
2+ ' This file is released under the MIT License
3+ '
4+ ' Copyleft (k) 2008
5+ ' by Jose Rodriguez - Rosa (a.k.a. Boriel) <https://www.boriel.com>
6+ ' ----------------------------------------------------------------
7+
8+ #include once [ arch:zx48k ] <sgni8.asm>
Original file line number Diff line number Diff line change 1- ; Returns SGN (SIGN) for 16 bits unsigned integer
2-
3- push namespace core
4-
5- __SGNU16:
6- ld a , h
7- or l
8- ret z
9- ld a , 1
10- ret
11-
12- pop namespace
13-
1+ ' ----------------------------------------------------------------
2+ ' This file is released under the MIT License
3+ '
4+ ' Copyleft (k) 2008
5+ ' by Jose Rodriguez - Rosa (a.k.a. Boriel) <https://www.boriel.com>
6+ ' ----------------------------------------------------------------
7+
8+ #include once [ arch:zx48k ] <sgnu16.asm>
Original file line number Diff line number Diff line change 1- ; Returns SGN (SIGN) for 32 bits unsigned integer
2-
3- push namespace core
4-
5- __SGNU32:
6- ld a , h
7- or l
8- or d
9- or e
10- ret z
11-
12- ld a , 1
13- ret
14-
15- pop namespace
16-
1+ ' ----------------------------------------------------------------
2+ ' This file is released under the MIT License
3+ '
4+ ' Copyleft (k) 2008
5+ ' by Jose Rodriguez - Rosa (a.k.a. Boriel) <https://www.boriel.com>
6+ ' ----------------------------------------------------------------
7+
8+ #include once [ arch:zx48k ] <sgnu32.asm>
Original file line number Diff line number Diff line change 1- ; Returns SGN (SIGN) for 8 bits unsigned integera
2-
3- push namespace core
4-
5- __SGNU8:
6- or a
7- ret z
8- ld a , 1
9- ret
10-
11- pop namespace
12-
1+ ' ----------------------------------------------------------------
2+ ' This file is released under the MIT License
3+ '
4+ ' Copyleft (k) 2008
5+ ' by Jose Rodriguez - Rosa (a.k.a. Boriel) <https://www.boriel.com>
6+ ' ----------------------------------------------------------------
7+
8+ #include once [ arch:zx48k ] <sgnu8.asm>
Original file line number Diff line number Diff line change 3838 ret
3939 ;; --- end of user code ---
4040#line 1 "/zxbasic/src/lib/arch/zxnext/runtime/sgnf.asm"
41+ ' ----------------------------------------------------------------
42+ ' This file is released under the MIT License
43+ '
44+ ' Copyleft (k) 2008
45+ ' by Jose Rodriguez - Rosa (a.k.a. Boriel) <https://www.boriel.com>
46+ ' ----------------------------------------------------------------
47+ #line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sgnf.asm"
4148#line 1 "/zxbasic/src/lib/arch/zxnext/runtime/sgn.asm"
49+ ' ----------------------------------------------------------------
50+ ' This file is released under the MIT License
51+ '
52+ ' Copyleft (k) 2008
53+ ' by Jose Rodriguez - Rosa (a.k.a. Boriel) <https://www.boriel.com>
54+ ' ----------------------------------------------------------------
55+ #line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sgn.asm"
4256 ; Returns SGN (SIGN) for 32, 16 and 8 bits signed integers, Fixed and FLOAT
4357 push namespace core
4458 PROC
@@ -73,6 +87,8 @@ __ENDSGN:
7387 ret
7488 ENDP
7589 pop namespace
76- #line 2 "/zxbasic/src/lib/arch/zxnext/runtime/sgnf.asm"
90+ #line 9 "/zxbasic/src/lib/arch/zxnext/runtime/sgn.asm"
91+ #line 2 "/zxbasic/src/lib/arch/zx48k/runtime/sgnf.asm"
92+ #line 9 "/zxbasic/src/lib/arch/zxnext/runtime/sgnf.asm"
7793#line 18 "arch/zxnext/sgnf.bas"
7894 END
You can’t perform that action at this time.
0 commit comments