diff --git a/src/crt/i48shrs_1.src b/src/crt/i48shrs_1.src new file mode 100644 index 000000000..a1825becd --- /dev/null +++ b/src/crt/i48shrs_1.src @@ -0,0 +1,24 @@ + .assume adl=1 + + .section .text + .global __i48shrs_1 + .type __i48shrs_1, @function + +__i48shrs_1: + push hl + scf + sbc hl, hl + add hl, sp + push de + sra (hl) + pop de + inc hl + inc hl + inc hl + rr d + rr e + rr (hl) + pop hl + rr h + rr l + ret diff --git a/src/crt/i48shru_1.src b/src/crt/i48shru_1.src new file mode 100644 index 000000000..6159a9848 --- /dev/null +++ b/src/crt/i48shru_1.src @@ -0,0 +1,24 @@ + .assume adl=1 + + .section .text + .global __i48shru_1 + .type __i48shru_1, @function + +__i48shru_1: + push hl + scf + sbc hl, hl + add hl, sp + push de + srl (hl) + pop de + inc hl + inc hl + inc hl + rr d + rr e + rr (hl) + pop hl + rr h + rr l + ret diff --git a/src/crt/ishrs_1_fast.src b/src/crt/ishrs_1.src similarity index 57% rename from src/crt/ishrs_1_fast.src rename to src/crt/ishrs_1.src index 17970e4da..d1464ba72 100644 --- a/src/crt/ishrs_1_fast.src +++ b/src/crt/ishrs_1.src @@ -1,10 +1,10 @@ .assume adl=1 .section .text - .global __ishrs_1_fast - .type __ishrs_1_fast, @function + .global __ishrs_1 + .type __ishrs_1, @function -__ishrs_1_fast: +__ishrs_1: push hl ld hl, 2 add hl, sp diff --git a/src/crt/ishru_1_fast.src b/src/crt/ishru_1.src similarity index 57% rename from src/crt/ishru_1_fast.src rename to src/crt/ishru_1.src index 765437bc1..a88c783d5 100644 --- a/src/crt/ishru_1_fast.src +++ b/src/crt/ishru_1.src @@ -1,10 +1,10 @@ .assume adl=1 .section .text - .global __ishru_1_fast - .type __ishru_1_fast, @function + .global __ishru_1 + .type __ishru_1, @function -__ishru_1_fast: +__ishru_1: push hl ld hl, 2 add hl, sp diff --git a/src/crt/llshl_1_fast.src b/src/crt/llshl_1.src similarity index 56% rename from src/crt/llshl_1_fast.src rename to src/crt/llshl_1.src index 830b4f510..dfb491ca7 100644 --- a/src/crt/llshl_1_fast.src +++ b/src/crt/llshl_1.src @@ -1,10 +1,10 @@ .assume adl=1 .section .text - .global __llshl_1_fast - .type __llshl_1_fast, @function + .global __llshl_1 + .type __llshl_1, @function -__llshl_1_fast: +__llshl_1: add hl, hl ex de, hl adc hl, hl diff --git a/src/crt/llshrs_1_fast.src b/src/crt/llshrs_1.src similarity index 65% rename from src/crt/llshrs_1_fast.src rename to src/crt/llshrs_1.src index 68d26bbe8..0e6e2d786 100644 --- a/src/crt/llshrs_1_fast.src +++ b/src/crt/llshrs_1.src @@ -1,14 +1,15 @@ .assume adl=1 .section .text - .global __llshrs_1_fast - .type __llshrs_1_fast, @function + .global __llshrs_1 + .type __llshrs_1, @function -__llshrs_1_fast: +__llshrs_1: push hl - push de - ld hl, 2 + scf + sbc hl, hl add hl, sp + push de sra b rr c rr (hl) diff --git a/src/crt/llshru_1_fast.src b/src/crt/llshru_1.src similarity index 65% rename from src/crt/llshru_1_fast.src rename to src/crt/llshru_1.src index 1a6f83873..487c9362d 100644 --- a/src/crt/llshru_1_fast.src +++ b/src/crt/llshru_1.src @@ -1,14 +1,15 @@ .assume adl=1 .section .text - .global __llshru_1_fast - .type __llshru_1_fast, @function + .global __llshru_1 + .type __llshru_1, @function -__llshru_1_fast: +__llshru_1: push hl - push de - ld hl, 2 + scf + sbc hl, hl add hl, sp + push de srl b rr c rr (hl) diff --git a/src/crt/lshrs_1_fast.src b/src/crt/lshrs_1.src similarity index 58% rename from src/crt/lshrs_1_fast.src rename to src/crt/lshrs_1.src index 11c4f8fdf..cc47736ef 100644 --- a/src/crt/lshrs_1_fast.src +++ b/src/crt/lshrs_1.src @@ -1,10 +1,10 @@ .assume adl=1 .section .text - .global __lshru_1_fast - .type __lshru_1_fast, @function + .global __lshrs_1 + .type __lshrs_1, @function -__lshru_1_fast: +__lshrs_1: push hl ld hl, 2 add hl, sp diff --git a/src/crt/lshru_1_fast.src b/src/crt/lshru_1.src similarity index 58% rename from src/crt/lshru_1_fast.src rename to src/crt/lshru_1.src index 59215d650..8aa1bb3ae 100644 --- a/src/crt/lshru_1_fast.src +++ b/src/crt/lshru_1.src @@ -1,10 +1,10 @@ .assume adl=1 .section .text - .global __lshru_1_fast - .type __lshru_1_fast, @function + .global __lshru_1 + .type __lshru_1, @function -__lshru_1_fast: +__lshru_1: push hl ld hl, 2 add hl, sp