From: j8takagi Date: Fri, 12 Feb 2010 02:09:14 +0000 (+0900) Subject: シフト演算に関するCASLコードを追加 X-Git-Tag: v0.1~47^2~3 X-Git-Url: https://j8takagi.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2b4a9880e544d2fcb54f5a6dda673f67767d93d;p=YACASL2.git シフト演算に関するCASLコードを追加 --- diff --git a/as/cmd/SLA/sla_1.casl b/as/cmd/SLA/sla.casl similarity index 76% rename from as/cmd/SLA/sla_1.casl rename to as/cmd/SLA/sla.casl index 33441b7..6f04c86 100644 --- a/as/cmd/SLA/sla_1.casl +++ b/as/cmd/SLA/sla.casl @@ -1,6 +1,6 @@ ;;; SLA r,adr MAIN START LAD GR1,3 - SLA GR1,2 + SLA GR1,13 RET END diff --git a/as/cmd/SLA/sla_o.casl b/as/cmd/SLA/sla_o.casl index 3c8f1c0..36ff19e 100644 --- a/as/cmd/SLA/sla_o.casl +++ b/as/cmd/SLA/sla_o.casl @@ -1,6 +1,6 @@ -;;; SLA r,adr 正数のオーバーフロー +;;; SLA r,adr オーバーフロー MAIN START - LAD GR1,#4000 - SLA GR1,1 + LAD GR1,3 + SLA GR1,14 RET END diff --git a/as/cmd/SLA/sla_so.casl b/as/cmd/SLA/sla_os.casl similarity index 62% rename from as/cmd/SLA/sla_so.casl rename to as/cmd/SLA/sla_os.casl index e36ea7b..afd008a 100644 --- a/as/cmd/SLA/sla_so.casl +++ b/as/cmd/SLA/sla_os.casl @@ -1,6 +1,6 @@ ;;; SLA r,adr 負数のオーバーフロー MAIN START - LAD GR1,#C000 - SLA GR1,1 + LAD GR1,#8003 + SLA GR1,14 RET END diff --git a/as/cmd/SLA/sla_oz.casl b/as/cmd/SLA/sla_oz.casl new file mode 100644 index 0000000..c832f72 --- /dev/null +++ b/as/cmd/SLA/sla_oz.casl @@ -0,0 +1,6 @@ +;;; SLA r,adr オーバーフローし、結果は零 +MAIN START + LAD GR1,3 + SLA GR1,15 + RET + END diff --git a/as/cmd/SLA/sla_s.casl b/as/cmd/SLA/sla_s.casl index 5013b78..2366bf0 100644 --- a/as/cmd/SLA/sla_s.casl +++ b/as/cmd/SLA/sla_s.casl @@ -1,6 +1,6 @@ ;;; SLA r,adr 負数 SLA2 START BEGIN -BEGIN LAD GR1,#8001 - SLA GR1,7 +BEGIN LAD GR1,#8003 + SLA GR1,13 RET END diff --git a/as/cmd/SLA/sla_z.casl b/as/cmd/SLA/sla_z.casl new file mode 100644 index 0000000..71b5692 --- /dev/null +++ b/as/cmd/SLA/sla_z.casl @@ -0,0 +1,6 @@ +;;; SLA r,adr 結果は零 +MAIN START + LAD GR1,2 + SLA GR1,15 + RET + END diff --git a/as/cmd/SLL/sll.casl b/as/cmd/SLL/sll.casl new file mode 100644 index 0000000..24e1df8 --- /dev/null +++ b/as/cmd/SLL/sll.casl @@ -0,0 +1,6 @@ +;;; SLL r,adr +MAIN START + LAD GR1,3 + SLL GR1,13 + RET + END diff --git a/as/cmd/SLL/sll_o.casl b/as/cmd/SLL/sll_o.casl new file mode 100644 index 0000000..95600ae --- /dev/null +++ b/as/cmd/SLL/sll_o.casl @@ -0,0 +1,6 @@ +;;; SLL r,adr 正数のオーバーフロー +MAIN START + LAD GR1,2 + SLL GR1,15 + RET + END diff --git a/as/cmd/SLL/sll_os.casl b/as/cmd/SLL/sll_os.casl new file mode 100644 index 0000000..9e7015e --- /dev/null +++ b/as/cmd/SLL/sll_os.casl @@ -0,0 +1,6 @@ +;;; SLL r,adr 符号フラグオンで、オーバーフロー +MAIN START + LAD GR1,3 + SLL GR1,15 + RET + END diff --git a/as/cmd/SLL/sll_oz.casl b/as/cmd/SLL/sll_oz.casl new file mode 100644 index 0000000..db7bd15 --- /dev/null +++ b/as/cmd/SLL/sll_oz.casl @@ -0,0 +1,6 @@ +;;; SLL r,adr オーバーフローし、結果は零 +MAIN START + LAD GR1,3 + SLL GR1,16 + RET + END diff --git a/as/cmd/SLL/sll_s.casl b/as/cmd/SLL/sll_s.casl new file mode 100644 index 0000000..bb881d7 --- /dev/null +++ b/as/cmd/SLL/sll_s.casl @@ -0,0 +1,6 @@ +;;; SLL r,adr 負数 +SLL2 START BEGIN +BEGIN LAD GR1,3 + SLL GR1,14 + RET + END diff --git a/as/cmd/SLL/sll_z.casl b/as/cmd/SLL/sll_z.casl new file mode 100644 index 0000000..7d4ec58 --- /dev/null +++ b/as/cmd/SLL/sll_z.casl @@ -0,0 +1,6 @@ +;;; SLL r,adr 結果は零 +MAIN START + LAD GR1,2 + SLL GR1,17 + RET + END diff --git a/as/cmd/SRA/sra_1.casl b/as/cmd/SRA/sra.casl similarity index 51% rename from as/cmd/SRA/sra_1.casl rename to as/cmd/SRA/sra.casl index ce1fee4..1354c87 100644 --- a/as/cmd/SRA/sra_1.casl +++ b/as/cmd/SRA/sra.casl @@ -1,6 +1,6 @@ ;;; SRA r,adr MAIN START - LAD GR1,12 - SRA GR1,2 + LAD GR1,#6000 + SRA GR1,13 RET END diff --git a/as/cmd/SRA/sra2.casl b/as/cmd/SRA/sra2.casl deleted file mode 100644 index a455538..0000000 --- a/as/cmd/SRA/sra2.casl +++ /dev/null @@ -1,5 +0,0 @@ -SRA2 START BEGIN -BEGIN LAD GR4,124 - SRA GR4,2 - RET - END diff --git a/as/cmd/SRA/sra3.casl b/as/cmd/SRA/sra3.casl deleted file mode 100644 index b056150..0000000 --- a/as/cmd/SRA/sra3.casl +++ /dev/null @@ -1,6 +0,0 @@ -SLA2 START BEGIN -BEGIN LD GR0,X - SRA GR0,2 - RET -X DC #7A31 - END diff --git a/as/cmd/SRA/sra4.casl b/as/cmd/SRA/sra4.casl deleted file mode 100644 index e4e8f99..0000000 --- a/as/cmd/SRA/sra4.casl +++ /dev/null @@ -1,8 +0,0 @@ -SRA4 START BEGIN -BEGIN LD GR0,X - LD GR1,Y - SRA GR0,1,GR1 - RET -X DC #A238 -Y DC 2 - END diff --git a/as/cmd/SRA/sra_m.casl b/as/cmd/SRA/sra_m.casl deleted file mode 100644 index 1a5e0c3..0000000 --- a/as/cmd/SRA/sra_m.casl +++ /dev/null @@ -1,5 +0,0 @@ -SLA2 START BEGIN -BEGIN LAD GR1,#FFFD - SLA GR1,2 - RET - END diff --git a/as/cmd/SRA/sra_o.casl b/as/cmd/SRA/sra_o.casl index ab7aac9..a8703eb 100644 --- a/as/cmd/SRA/sra_o.casl +++ b/as/cmd/SRA/sra_o.casl @@ -1,5 +1,6 @@ +;;; SRA r,adr 正数のオーバーフロー MAIN START - LAD GR1,#4000 - SLA GR1,1 + LAD GR1,#6000 + SRA GR1,14 RET END diff --git a/as/cmd/SRA/sra_os.casl b/as/cmd/SRA/sra_os.casl new file mode 100644 index 0000000..e7a6efa --- /dev/null +++ b/as/cmd/SRA/sra_os.casl @@ -0,0 +1,6 @@ +;;; SRA r,adr 負数のオーバーフロー +MAIN START + LAD GR1,#A000 + SRA GR1,14 + RET + END diff --git a/as/cmd/SRA/sra_oz.casl b/as/cmd/SRA/sra_oz.casl new file mode 100644 index 0000000..e6d568f --- /dev/null +++ b/as/cmd/SRA/sra_oz.casl @@ -0,0 +1,6 @@ +;;; SRA r,adr オーバーフローし、結果は零 +MAIN START + LAD GR1,#6000 + SRA GR1,15 + RET + END diff --git a/as/cmd/SRA/sra_s.casl b/as/cmd/SRA/sra_s.casl index 440cacc..cf5e692 100644 --- a/as/cmd/SRA/sra_s.casl +++ b/as/cmd/SRA/sra_s.casl @@ -1,5 +1,6 @@ -SLA2 START BEGIN -BEGIN LAD GR1,#8000 - SLA GR1,1 +;;; SRA r,adr 負数 +SRA2 START BEGIN +BEGIN LAD GR1,#A000 + SRA GR1,13 RET END diff --git a/as/cmd/SRA/sra_z.casl b/as/cmd/SRA/sra_z.casl new file mode 100644 index 0000000..1ae3e2a --- /dev/null +++ b/as/cmd/SRA/sra_z.casl @@ -0,0 +1,6 @@ +;;; SRA r,adr 結果は零 +MAIN START + LAD GR1,#2000 + SRA GR1,15 + RET + END diff --git a/as/cmd/SRA/sra_so.casl b/as/cmd/SRL/srl.casl similarity index 63% rename from as/cmd/SRA/sra_so.casl rename to as/cmd/SRL/srl.casl index d5aee00..5170cf0 100644 --- a/as/cmd/SRA/sra_so.casl +++ b/as/cmd/SRL/srl.casl @@ -1,5 +1,6 @@ +;;; SRL r,adr MAIN START LAD GR1,#C000 - SLA GR1,1 + SRL GR1,14 RET END diff --git a/as/cmd/SRL/srl_o.casl b/as/cmd/SRL/srl_o.casl new file mode 100644 index 0000000..ab23fea --- /dev/null +++ b/as/cmd/SRL/srl_o.casl @@ -0,0 +1,6 @@ +;;; SRL r,adr オーバーフロー +MAIN START + LAD GR1,#C000 + SRL GR1,15 + RET + END diff --git a/as/cmd/SRL/srl_oz.casl b/as/cmd/SRL/srl_oz.casl new file mode 100644 index 0000000..0e4f53f --- /dev/null +++ b/as/cmd/SRL/srl_oz.casl @@ -0,0 +1,6 @@ +;;; SRL r,adr オーバーフローし、結果は零 +MAIN START + LAD GR1,#C000 + SRL GR1,16 + RET + END diff --git a/as/cmd/SRL/srl_s.casl b/as/cmd/SRL/srl_s.casl new file mode 100644 index 0000000..94917f4 --- /dev/null +++ b/as/cmd/SRL/srl_s.casl @@ -0,0 +1,6 @@ +;;; SRL r,adr 負数 +SRL2 START BEGIN +BEGIN LAD GR1,#C000 + SRL GR1,0 + RET + END diff --git a/as/cmd/SRA/sra_ov.casl b/as/cmd/SRL/srl_z.casl similarity index 56% rename from as/cmd/SRA/sra_ov.casl rename to as/cmd/SRL/srl_z.casl index d5aee00..db11fb3 100644 --- a/as/cmd/SRA/sra_ov.casl +++ b/as/cmd/SRL/srl_z.casl @@ -1,5 +1,6 @@ +;;; SRL r,adr 結果は零 MAIN START LAD GR1,#C000 - SLA GR1,1 + SRL GR1,17 RET END