Skip to content

Commit 7c93515

Browse files
ZERICO2005adriweb
authored andcommitted
added cycle counts to some i48 crt routines
1 parent dcf8980 commit 7c93515

File tree

14 files changed

+26
-0
lines changed

14 files changed

+26
-0
lines changed

src/crt/i48add.src

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
section .text
99
public __i48add
1010
__i48add:
11+
; CC: 11 bytes | 12F + 6R + 3W + 1
1112
add hl, bc
1213
ex de, hl
1314
push bc

src/crt/i48add_1.src

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
public __i48add_1
1111
__i48add_1:
12+
; CC: 8 bytes
13+
; HL != -1: 7F + 3R + 2
14+
; HL == -1: 9F + 3R + 2
1215
inc hl
1316
add hl, de
1417
or a, a

src/crt/i48and.src

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
section .text
99
public __i48and
1010
__i48and:
11+
; CC: 41 bytes | 42F + 22R + 17W + 1
1112
push af
1213

1314
; Deal with Upper Byte

src/crt/i48bswap.src

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
section .text
99
public __i48bswap
1010
__i48bswap:
11+
; CC: 14 bytes | 15F + 12R + 12W + 1
1112
; Line up the reversed data on the stack
1213
push hl
1314
ld h, e

src/crt/i48cmps.src

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
section .text
1313
public __i48cmps
1414
__i48cmps:
15+
; CC: 14 bytes | 15F + 9R + 6W + 1
1516
push hl
1617
push de
1718
or a, a

src/crt/i48cmpu.src

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
section .text
1313
public __i48cmpu
1414
__i48cmpu:
15+
; CC: 15 bytes
16+
; Minimum: 11F + 6R + 3W + 2
17+
; Maximum: 16F + 6R + 3W + 2
1518
push hl
1619
or a, a
1720
lea hl, iy

src/crt/i48cmpzero.src

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
section .text
99
public __i48cmpzero
1010
__i48cmpzero:
11+
; CC: 13 bytes
12+
; Minimum: 8F + 3R + 2
13+
; Maximum: 14F + 3R + 3
1114
; check msb's == 0
1215
ex de, hl
1316
add hl, de

src/crt/i48mulu.src

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
section .text
1313
public __i48mulu
1414
__i48mulu:
15+
; CC: 202*r(PC)+51*r(SPL)+35*w(SPL)+85
16+
; CC: 201 bytes | 202F + 51R + 35W + 85
1517
; backup af
1618
push af
1719
push ix

src/crt/i48neg.src

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
section .text
99
public __i48neg
1010
__i48neg:
11+
; CC: 17 bytes
12+
; HL != 0: 18F + 3R + 2
13+
; HL == 0: 16F + 3R + 2
1114
or a, a
1215
sbc hl, de ; hl = HL - DE
1316
ex de, hl ; hl = DE, de = HL - DE
@@ -27,6 +30,7 @@ __i48neg:
2730
; Used by i48divs and i48rems, uiy:ubc = -uiy:ubc
2831
public __uiyubcNeg
2932
__uiyubcNeg:
33+
; CC: 18 bytes | 19F + 12R + 9W + 1
3034
push hl
3135
or a, a
3236
sbc hl, hl

src/crt/i48not.src

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
section .text
99
public __i48not
1010
__i48not:
11+
; CC: 15 bytes | 16F + 3R + 1
1112
add hl, de ; hl = HL + DE
1213
ex de, hl ; hl = DE, de = HL + DE
1314
or a, a

0 commit comments

Comments
 (0)