File tree Expand file tree Collapse file tree
tests/functional/arch/zx48k Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151 ld hl , (_a - 1 )
5252 call .core.__DIVU8_FAST
5353 ld (_b) , a
54+ ld hl , (_a - 1 )
55+ ld a , (_a)
56+ sub h
57+ sub 1
58+ sbc a , a
59+ neg
60+ push af
61+ ld hl , (_a - 1 )
62+ ld a , (_a)
63+ sub h
64+ sub 1
65+ sbc a , a
66+ neg
67+ ld h , a
68+ pop af
69+ call .core.__DIVU8_FAST
70+ ld (_b) , a
5471 ld hl , 0
5572 ld b , h
5673 ld c , l
6683 ei
6784 ret
6885 ;; --- end of user code ---
69- #line 1 "/zxbasic/src/arch/zx48k/library-asm /div8.asm"
86+ #line 1 "/zxbasic/src/lib/ arch/zx48k/runtime/arith /div8.asm"
7087 ; --------------------------------
7188 push namespace core
7289__DIVU8: ; 8 bit unsigned integer division
@@ -131,5 +148,5 @@ __MODI8_FAST: ; __FASTCALL__ entry
131148 ld a , l ; remainder
132149 ret ; a = Modulus
133150 pop namespace
134- #line 44 " divu8.bas"
151+ #line 61 "arch/zx48k/ divu8.bas"
135152 END
Original file line number Diff line number Diff line change @@ -11,3 +11,5 @@ b = 1 / a
1111b = 2 / a
1212b = 4 / a
1313b = a / a
14+ b = (a = a ) / (a = a )
15+
Original file line number Diff line number Diff line change 5252 ld a , (_a)
5353 call .core.__MUL8_FAST
5454 ld (_b) , a
55+ ld hl , (_a - 1 )
56+ ld a , (_a)
57+ sub h
58+ sub 1
59+ sbc a , a
60+ neg
61+ push af
62+ ld hl , (_a - 1 )
63+ ld a , (_a)
64+ sub h
65+ sub 1
66+ sbc a , a
67+ neg
68+ ld h , a
69+ pop af
70+ call .core.__MUL8_FAST
71+ ld (_b) , a
5572 ld hl , 0
5673 ld b , h
5774 ld c , l
6784 ei
6885 ret
6986 ;; --- end of user code ---
70- #line 1 "/zxbasic/src/arch/zx48k/library-asm /mul8.asm"
87+ #line 1 "/zxbasic/src/lib/ arch/zx48k/runtime/arith /mul8.asm"
7188 push namespace core
7289__MUL8: ; Performs 8bit x 8bit multiplication
7390 PROC
@@ -113,5 +130,5 @@ __MUL8B:
113130 ret ; result = HL
114131 ENDP
115132 pop namespace
116- #line 45 " mul8.bas"
133+ #line 62 "arch/zx48k/ mul8.bas"
117134 END
Original file line number Diff line number Diff line change @@ -12,3 +12,5 @@ b = 1 * a
1212b = 2 * a
1313b = 4 * a
1414b = a * a
15+ b = (a = a ) * (a = a )
16+
Original file line number Diff line number Diff line change 4040 ld hl , (_a - 1 )
4141 sub h
4242 ld (_b) , a
43+ ld hl , (_a - 1 )
44+ ld a , (_a)
45+ sub h
46+ sub 1
47+ sbc a , a
48+ neg
49+ push af
50+ ld hl , (_a - 1 )
51+ ld a , (_a)
52+ sub h
53+ sub 1
54+ sbc a , a
55+ neg
56+ ld h , a
57+ pop af
58+ sub h
59+ ld (_b) , a
4360 ld hl , 0
4461 ld b , h
4562 ld c , l
Original file line number Diff line number Diff line change @@ -8,3 +8,5 @@ b = a - 1
88b = 0 - a
99b = 1 - a
1010b = a - a
11+ b = (a = a ) - (a = a )
12+
You can’t perform that action at this time.
0 commit comments