[tmp]202609121939
This commit is contained in:
1 parent
208e37c394
commit
ed4ce6d3d4
6 files changed
+107
-41
No files matched your search
+1
-7
@@ -25,7 +25,6 @@ biz
|
||||
flb
|
||||
rnz
|
||||
|
||||
; sac=Ci: FLIP {A,B,buf}
|
||||
.tp %3
|
||||
biz
|
||||
.tp %1
|
||||
@@ -38,7 +37,6 @@ biz
|
||||
flb
|
||||
rnz
|
||||
|
||||
; sac=A: FLIP {Ci,S,buf}
|
||||
.tp %1
|
||||
biz
|
||||
.tp %3
|
||||
@@ -51,7 +49,6 @@ biz
|
||||
flb
|
||||
rnz
|
||||
|
||||
; sac=B: FLIP {A,Ci,Co,buf}
|
||||
.tp %2
|
||||
biz
|
||||
.tp %1
|
||||
@@ -66,7 +63,6 @@ biz
|
||||
flb
|
||||
rnz
|
||||
|
||||
; sac=S: SET1 {B,Co}
|
||||
.tp %4
|
||||
biz
|
||||
.tp %2
|
||||
@@ -77,7 +73,6 @@ biz
|
||||
flb
|
||||
rnz
|
||||
|
||||
; sac=buf: FLIP {A,B,Ci,S,Co}
|
||||
.tp %6
|
||||
biz
|
||||
.tp %1
|
||||
@@ -108,8 +103,7 @@ rnz
|
||||
%macro raw_add 6
|
||||
.anchor before_raw_add
|
||||
|
||||
.tp %6
|
||||
erase
|
||||
erase %6
|
||||
.tp %3
|
||||
bit_copy %6 %5
|
||||
.tp %6
|
||||
|
||||
+2
-4
@@ -54,11 +54,9 @@ rnz
|
||||
%macro bit_and 3
|
||||
.anchor before_and
|
||||
|
||||
.tp %1
|
||||
stp
|
||||
.tp %1 + 1
|
||||
.anchor bit_and_buf_1
|
||||
.tp %2
|
||||
stp
|
||||
.tp %2 + 1
|
||||
.anchor bit_and_buf_2
|
||||
|
||||
.tp %3
|
||||
|
||||
+87
-23
@@ -3,34 +3,98 @@
|
||||
|
||||
%include asm/lib.r8asm
|
||||
; Macro inc
|
||||
; %1: CellBit A
|
||||
; %2: CellBit B
|
||||
; %3: CellBit S
|
||||
; %4: CellBit Co
|
||||
; %5: CellBit tmp
|
||||
|
||||
%macro inc 0
|
||||
%macro bit_raw_inc 5
|
||||
|
||||
stp
|
||||
flb
|
||||
btp
|
||||
.anchor before_bit_raw_inc
|
||||
|
||||
.tp %2
|
||||
biz
|
||||
.tp %1
|
||||
flb
|
||||
.tp %4
|
||||
flb
|
||||
.tp %2
|
||||
flb
|
||||
rnz
|
||||
|
||||
.tp %1
|
||||
biz
|
||||
.tp %3
|
||||
set_1
|
||||
.tp %5
|
||||
set_1
|
||||
.tp %1
|
||||
flb
|
||||
rnz
|
||||
|
||||
.tp %4
|
||||
biz
|
||||
.tp %1
|
||||
set_1
|
||||
.tp %2
|
||||
set_1
|
||||
.tp %3
|
||||
set_1
|
||||
.tp %4
|
||||
flb
|
||||
rnz
|
||||
|
||||
.tp %5
|
||||
biz
|
||||
.tp %1
|
||||
flb
|
||||
.tp %3
|
||||
flb
|
||||
.tp %4
|
||||
flb
|
||||
.tp %5
|
||||
flb
|
||||
rnz
|
||||
|
||||
.tp before_bit_raw_inc
|
||||
|
||||
%endmacro
|
||||
|
||||
; Macro raw_inc
|
||||
; %1: Cell A
|
||||
; %2: Cell B
|
||||
; %3: Cell S
|
||||
; %4: Cell Co
|
||||
; %5: Cell tmp
|
||||
|
||||
%macro raw_inc 5
|
||||
.anchor before_raw_inc
|
||||
|
||||
.tp %5
|
||||
erase
|
||||
.tp %2
|
||||
bit_copy %5 %4
|
||||
.tp %5
|
||||
ror
|
||||
|
||||
%rep _CELL_SIZE
|
||||
|
||||
stp
|
||||
|
||||
|
||||
biz
|
||||
flb
|
||||
btp
|
||||
flb
|
||||
stp
|
||||
rol
|
||||
flb
|
||||
bit_raw_add %1 %2 %3 %4 %5
|
||||
.tp %5
|
||||
clb_bit_mov %3
|
||||
.tp %1
|
||||
ror
|
||||
.tp %2
|
||||
ror
|
||||
.tp %4
|
||||
ror
|
||||
rnz
|
||||
|
||||
|
||||
out
|
||||
ror
|
||||
btp
|
||||
out
|
||||
ror
|
||||
%endrep
|
||||
|
||||
.tp %3
|
||||
clb_bit_mov %5
|
||||
.tp %5
|
||||
rol
|
||||
clb_bit_mov %3
|
||||
|
||||
.tp before_raw_add
|
||||
%endmacro
|
||||
+5
-2
@@ -32,12 +32,15 @@ flb
|
||||
%endmacro
|
||||
|
||||
; Macro erase
|
||||
; %this: Cell operand
|
||||
%macro erase 0
|
||||
; %1: Cell operand
|
||||
%macro erase 1
|
||||
.anchor before_erase
|
||||
.tp %1
|
||||
%rep _CELL_SIZE
|
||||
set_0
|
||||
ror
|
||||
%endrep
|
||||
.tp before_erase
|
||||
%endmacro
|
||||
|
||||
; Macro rol
|
||||
|
||||
+2
-4
@@ -56,11 +56,9 @@ rnz
|
||||
%macro bit_or 3
|
||||
.anchor before_or
|
||||
|
||||
.tp %1
|
||||
stp
|
||||
.tp %1 + 1
|
||||
.anchor bit_or_buf_1
|
||||
.tp %2
|
||||
stp
|
||||
.tp %2 + 1
|
||||
.anchor bit_or_buf_2
|
||||
|
||||
.tp %3
|
||||
|
||||
+10
-1
@@ -1,4 +1,5 @@
|
||||
%include "asm/add.r8asm"
|
||||
%include "asm/and.r8asm"
|
||||
|
||||
.var A 0
|
||||
.var B 2
|
||||
@@ -7,7 +8,7 @@
|
||||
.var Co 8
|
||||
|
||||
.tp A
|
||||
.xor 127
|
||||
.xor 126
|
||||
.tp B
|
||||
.xor 11
|
||||
.tp Ci
|
||||
@@ -24,4 +25,12 @@ out
|
||||
.tp S
|
||||
out
|
||||
.tp Co
|
||||
out
|
||||
|
||||
and A B S
|
||||
.tp A
|
||||
out
|
||||
.tp B
|
||||
out
|
||||
.tp S
|
||||
out
|
||||
Reference in new issue
Block a user