Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/crt/i48shrs_1.src
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
.type __i48shrs_1, @function

__i48shrs_1:
; Input:
; - UDE:UHL
; Output:
; - UDE:UHL >>= 1 (signed)
; - Carry = shifted-out bit
; Cost: 24 bytes | 25F + 11R + 8W + 3
push hl
scf
sbc hl, hl
Expand Down
6 changes: 6 additions & 0 deletions src/crt/i48shru_1.src
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
.type __i48shru_1, @function

__i48shru_1:
; Input:
; - UDE:UHL
; Output:
; - UDE:UHL >>= 1 (unsigned)
; - Carry = shifted-out bit
; Cost: 24 bytes | 25F + 11R + 8W + 3
push hl
scf
sbc hl, hl
Expand Down
6 changes: 6 additions & 0 deletions src/crt/ishrs_1.src
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
.type __ishrs_1, @function

__ishrs_1:
; Input:
; - UHL
; Output:
; - UHL >>= 1 (signed)
; - Carry = shifted-out bit
; Cost: 14 bytes | 15F + 7R + 4W + 2
push hl
ld hl, 2
add hl, sp
Expand Down
6 changes: 6 additions & 0 deletions src/crt/ishru_1.src
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
.type __ishru_1, @function

__ishru_1:
; Input:
; - UHL
; Output:
; - UHL >>= 1 (unsigned)
; - Carry = shifted-out bit
; Cost: 14 bytes | 15F + 7R + 4W + 2
push hl
ld hl, 2
add hl, sp
Expand Down
6 changes: 6 additions & 0 deletions src/crt/llshl_1.src
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
.type __llshl_1, @function

__llshl_1:
; Input:
; - BC:UDE:UHL
; Output:
; - BC:UDE:UHL <<= 1
; - Carry = shifted-out bit
; Cost: 10 bytes | 11F + 3R + 1
add hl, hl
ex de, hl
adc hl, hl
Expand Down
6 changes: 6 additions & 0 deletions src/crt/llshrs_1.src
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
.type __llshrs_1, @function

__llshrs_1:
; Input:
; - BC:UDE:UHL
; Output:
; - BC:UDE:UHL >>= 1 (signed)
; - Carry = shifted-out bit
; Cost: 28 bytes | 29F + 11R + 8W + 3
push hl
scf
sbc hl, hl
Expand Down
6 changes: 6 additions & 0 deletions src/crt/llshru_1.src
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
.type __llshru_1, @function

__llshru_1:
; Input:
; - BC:UDE:UHL
; Output:
; - BC:UDE:UHL >>= 1 (unsigned)
; - Carry = shifted-out bit
; Cost: 28 bytes | 29F + 11R + 8W + 3
push hl
scf
sbc hl, hl
Expand Down
6 changes: 6 additions & 0 deletions src/crt/lshrs_1.src
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
.type __lshrs_1, @function

__lshrs_1:
; Input:
; - E:UHL
; Output:
; - E:UHL >>= 1 (signed)
; - Carry = shifted-out bit
; Cost: 16 bytes | 17F + 7R + 4W + 2
push hl
ld hl, 2
add hl, sp
Expand Down
6 changes: 6 additions & 0 deletions src/crt/lshru_1.src
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
.type __lshru_1, @function

__lshru_1:
; Input:
; - E:UHL
; Output:
; - E:UHL >>= 1 (unsigned)
; - Carry = shifted-out bit
; Cost: 16 bytes | 17F + 7R + 4W + 2
push hl
ld hl, 2
add hl, sp
Expand Down
Loading