File tree Expand file tree Collapse file tree 4 files changed +12
-14
lines changed Expand file tree Collapse file tree 4 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -10,23 +10,19 @@ __ineg := 000160h
10
10
else
11
11
12
12
__ineg:
13
- if 0
14
- push de
15
- end if
13
+ ; UHL = -UHL
14
+ ; CC: 10*r(PC)+3*r(SPL)+1
15
+ ; CC: 9 bytes | 10F + 3R + 1
16
16
add hl, de ; uhl=UHL+UDE
17
17
ex de, hl ; ude=UHL+UDE, uhl=UDE
18
18
or a, a
19
19
sbc hl, de ; uhl=UDE-(UHL+UDE)
20
20
; =UDE-UHL-UDE
21
21
; =-UHL
22
- if 0
23
- pop de
24
- else
25
22
ex de, hl ; ude=-UHL, uhl=UHL+UDE
26
23
add hl, de ; uhl=UHL+UDE+-UHL
27
24
; =UDE
28
25
ex de, hl ; ude=UDE, uhl=-UHL
29
- end if
30
26
ret
31
27
32
28
end if
Original file line number Diff line number Diff line change 3
3
section .text
4
4
public __ineg_fast
5
5
__ineg_fast:
6
+ ; UHL = -UHL
7
+ ; CC: 7*r(PC)+3*r(SPL)+1
8
+ ; CC: 6 bytes | 7F + 3R + 1
6
9
add hl, de ; uhl=UHL+UDE
7
10
ex de, hl ; ude=UHL+UDE, uhl=UDE
8
11
or a, a
Original file line number Diff line number Diff line change @@ -10,27 +10,23 @@ __inot := 000164h
10
10
else
11
11
12
12
__inot:
13
- if 0
14
- push de
15
- end if
13
+ ; UHL = ~UHL
14
+ ; CC: 11*r(PC)+3*r(SPL)+1
15
+ ; CC: 10 bytes | 11F + 3R + 1
16
16
add hl, de ; uhl=UHL+UDE
17
17
ex de, hl ; ude=UHL+UDE, uhl=UDE
18
18
scf
19
19
sbc hl, de ; uhl=UDE-(UHL+UDE)-1
20
20
; =UDE-UHL-UDE-1
21
21
; =-UHL-1
22
22
; =~UHL
23
- if 0
24
- pop de
25
- else
26
23
ex de, hl ; ude=~UHL, uhl=UHL+UDE
27
24
add hl, de ; uhl=UHL+UDE+~UHL
28
25
; =UHL+UDE+(-UHL-1)
29
26
; =UHL+UDE-UHL-1
30
27
; =UDE-1
31
28
inc hl ; uhl=UDE
32
29
ex de, hl ; ude=UDE, uhl=~UHL
33
- end if
34
30
ret
35
31
36
32
end if
Original file line number Diff line number Diff line change 3
3
section .text
4
4
public __inot_fast
5
5
__inot_fast:
6
+ ; UHL = ~UHL
7
+ ; CC: 7*r(PC)+3*r(SPL)+1
8
+ ; CC: 6 bytes | 7F + 3R + 1
6
9
add hl, de ; uhl=UHL+UDE
7
10
ex de, hl ; ude=UHL+UDE, uhl=UDE
8
11
scf
You can’t perform that action at this time.
0 commit comments