We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 670c12a commit 7a6d5a8Copy full SHA for 7a6d5a8
src/lib/arch/zx48k/stdlib/hmirror.bas
@@ -0,0 +1,22 @@
1
+#pragma once
2
+
3
+Function fastcall hMirror(number as uByte) as uByte
4
+ Asm
5
+ ;17 bytes and 66 clock cycles
6
+ ld b,a ;b=ABCDEFGH
7
+ rrca ;a=HABCDEFG
8
+ rrca ;a=GHABCDEF
9
+ xor b
10
+ and %10101010
11
+ xor b ;a=GBADCFEH
12
+ ld b,a ;b=GBADCFEH
13
+ rrca ;a=HGBADCFE
14
+ rrca ;a=EHGBADCF
15
+ rrca ;a=FEHGBADC
16
+ rrca ;a=CFEHGBAD
17
18
+ and %01100110
19
+ xor b ;a=GFEDCBAH
20
+ rrca ;a=HGFEDCBA
21
+ End Asm
22
+End Function
src/lib/arch/zxnext/stdlib/hmirror.bas
@@ -0,0 +1,6 @@
+#define hMirror(x) \
+ Asm \
+ mirror a \
0 commit comments