masterをマージ
authorj8takagi <j8takagi@nifty.com>
Fri, 12 Feb 2010 01:53:26 +0000 (10:53 +0900)
committerj8takagi <j8takagi@nifty.com>
Fri, 12 Feb 2010 01:53:26 +0000 (10:53 +0900)
衝突したas/casl2lib/mula.caslは削除

426 files changed:
as/CMD/adda0.casl [deleted file]
as/CMD/adda_overflow.casl [deleted file]
as/CMD/addl.casl [deleted file]
as/CMD/addl_overflow.casl [deleted file]
as/CMD/and0.casl [deleted file]
as/CMD/and1.casl [deleted file]
as/CMD/and2.casl [deleted file]
as/CMD/and3.casl [deleted file]
as/CMD/call0.casl [deleted file]
as/CMD/call2.casl [deleted file]
as/CMD/cpa1.casl [deleted file]
as/CMD/cpl1.casl [deleted file]
as/CMD/cpl2.casl [deleted file]
as/CMD/cpl3.casl [deleted file]
as/CMD/lad3.casl [deleted file]
as/CMD/lad4.casl [deleted file]
as/CMD/ld1.casl [deleted file]
as/CMD/ld2.casl [deleted file]
as/CMD/ld3.casl [deleted file]
as/CMD/ld4.casl [deleted file]
as/CMD/ld5.casl [deleted file]
as/CMD/ld_loop.casl [deleted file]
as/CMD/literal_spc.casl [deleted file]
as/CMD/out0.casl [deleted file]
as/CMD/out1.casl [deleted file]
as/CMD/pushpop.casl [deleted file]
as/CMD/sll2.casl [deleted file]
as/CMD/sll3.casl [deleted file]
as/CMD/xor0.casl [deleted file]
as/CMD/xor1.casl [deleted file]
as/CMD/xor3.casl [deleted file]
as/CMD/xor4.casl [deleted file]
as/FUNC/Makefile [deleted file]
as/FUNC/addl32.casl [deleted file]
as/FUNC/count1.casl [deleted file]
as/FUNC/diva1.casl [deleted file]
as/FUNC/inl.casl [deleted file]
as/FUNC/inl_call.casl [deleted file]
as/FUNC/minim.casl [deleted file]
as/FUNC/outa0.casl [deleted file]
as/FUNC/sum.casl [deleted file]
as/casl2lib/BUILD.mk [new file with mode: 0644]
as/casl2lib/Makefile [new file with mode: 0644]
as/casl2lib/abs.casl [moved from as/FUNC/abs.casl with 100% similarity]
as/casl2lib/addl32.casl [new file with mode: 0644]
as/casl2lib/diva.casl [new file with mode: 0644]
as/casl2lib/divl.casl [moved from as/FUNC/divl1.casl with 84% similarity]
as/casl2lib/inl.casl [new file with mode: 0644]
as/casl2lib/inl_src/Makefile [new file with mode: 0644]
as/casl2lib/inl_src/inl_main.casl [new file with mode: 0644]
as/casl2lib/minim.casl [new file with mode: 0644]
as/casl2lib/mula_src/Makefile [new file with mode: 0644]
as/casl2lib/mula_src/mula_main.casl [moved from as/FUNC/mula2.casl with 100% similarity]
as/casl2lib/mull.casl [moved from as/FUNC/mull1.casl with 100% similarity]
as/casl2lib/outa.casl [moved from as/FUNC/outa.casl with 85% similarity]
as/casl2lib/outa_src/Makefile [new file with mode: 0644]
as/casl2lib/outa_src/outa_main.casl [moved from as/FUNC/outa_main.casl with 100% similarity]
as/casl2lib/outb.casl [moved from as/FUNC/outb.casl with 85% similarity]
as/casl2lib/outb_src/Makefile [new file with mode: 0644]
as/casl2lib/outb_src/outb_main.casl [moved from as/FUNC/outb_main.casl with 100% similarity]
as/casl2lib/outd_q15.casl [moved from as/FUNC/outd_q15.casl with 100% similarity]
as/casl2lib/outl.casl [moved from as/FUNC/outl.casl with 84% similarity]
as/casl2lib/outl_src/Makefile [new file with mode: 0644]
as/casl2lib/outl_src/outl_main.casl [moved from as/FUNC/outl_main.casl with 100% similarity]
as/casl2lib/rev.casl [moved from as/FUNC/rev.casl with 68% similarity]
as/casl2lib_driver/abs.casl [moved from as/FUNC/abs_call.casl with 100% similarity]
as/casl2lib_driver/abs0.casl [moved from as/FUNC/abs_call1.casl with 100% similarity]
as/casl2lib_driver/addl32.casl [new file with mode: 0644]
as/casl2lib_driver/addl32_0.casl [new file with mode: 0644]
as/casl2lib_driver/divl.casl [moved from as/FUNC/divl_call.casl with 100% similarity]
as/casl2lib_driver/divl0.casl [moved from as/FUNC/divl_call0.casl with 100% similarity]
as/casl2lib_driver/divl1.casl [moved from as/FUNC/divl_call1.casl with 55% similarity]
as/casl2lib_driver/inl.casl [new file with mode: 0644]
as/casl2lib_driver/minim_call.casl [moved from as/FUNC/minim_call.casl with 100% similarity]
as/casl2lib_driver/mula_call.casl [moved from as/FUNC/mula_call.casl with 100% similarity]
as/casl2lib_driver/mula_call0.casl [moved from as/FUNC/mula_call0.casl with 100% similarity]
as/casl2lib_driver/mula_call1.casl [moved from as/FUNC/mula_call1.casl with 100% similarity]
as/casl2lib_driver/mula_call2.casl [moved from as/FUNC/mula_call2.casl with 100% similarity]
as/casl2lib_driver/mull_call.casl [moved from as/FUNC/mull_call.casl with 100% similarity]
as/casl2lib_driver/mull_call0.casl [moved from as/FUNC/mull_call0.casl with 100% similarity]
as/casl2lib_driver/mull_call1.casl [moved from as/FUNC/mull_call1.casl with 100% similarity]
as/casl2lib_driver/outa_call.casl [moved from as/FUNC/outa_call.casl with 100% similarity]
as/casl2lib_driver/outa_call1.casl [moved from as/FUNC/outa_call1.casl with 100% similarity]
as/casl2lib_driver/outa_call2.casl [moved from as/FUNC/outa_call2.casl with 100% similarity]
as/casl2lib_driver/outb_call.casl [moved from as/FUNC/outb_call.casl with 100% similarity]
as/casl2lib_driver/outd_q15_call.casl [moved from as/FUNC/outd_q15_call.casl with 100% similarity]
as/casl2lib_driver/outd_q15_call0.casl [moved from as/FUNC/outd_q15_call0.casl with 100% similarity]
as/casl2lib_driver/outl_call.casl [moved from as/FUNC/outl_call.casl with 100% similarity]
as/casl2lib_driver/outl_call0.casl [moved from as/FUNC/outl_call0.casl with 100% similarity]
as/casl2lib_driver/outl_call1.casl [moved from as/FUNC/outl_call1.casl with 100% similarity]
as/casl2lib_driver/outl_call2.casl [moved from as/FUNC/outl_call2.casl with 100% similarity]
as/casl2lib_driver/rev_call.casl [moved from as/FUNC/rev_call.casl with 100% similarity]
as/casl2lib_driver/sum_call.casl [moved from as/FUNC/sum_call.casl with 90% similarity]
as/cmd/ADDA/adda0.casl [moved from as/CMD/xor5.casl with 58% similarity]
as/cmd/ADDA/adda0_aov.casl [new file with mode: 0644]
as/cmd/ADDA/adda0_az.casl [new file with mode: 0644]
as/cmd/ADDA/adda0_lov.casl [new file with mode: 0644]
as/cmd/ADDA/adda0_ov.casl [new file with mode: 0644]
as/cmd/ADDA/adda0_s0.casl [new file with mode: 0644]
as/cmd/ADDA/adda0_s1.casl [new file with mode: 0644]
as/cmd/ADDA/adda0_z.casl [new file with mode: 0644]
as/cmd/ADDA/adda1.casl [new file with mode: 0644]
as/cmd/ADDA/adda2.casl [moved from as/CMD/adda1.casl with 90% similarity]
as/cmd/ADDL/addl0.casl [new file with mode: 0644]
as/cmd/ADDL/addl0_aov.casl [new file with mode: 0644]
as/cmd/ADDL/addl0_az.casl [new file with mode: 0644]
as/cmd/ADDL/addl0_lov.casl [new file with mode: 0644]
as/cmd/ADDL/addl0_ov.casl [new file with mode: 0644]
as/cmd/ADDL/addl0_s0.casl [new file with mode: 0644]
as/cmd/ADDL/addl0_s1.casl [new file with mode: 0644]
as/cmd/ADDL/addl0_z.casl [new file with mode: 0644]
as/cmd/ADDL/addl1.casl [new file with mode: 0644]
as/cmd/ADDL/addl2.casl [new file with mode: 0644]
as/cmd/AND/and0.casl [new file with mode: 0644]
as/cmd/AND/and0_s.casl [new file with mode: 0644]
as/cmd/AND/and0_z.casl [new file with mode: 0644]
as/cmd/AND/and1.casl [new file with mode: 0644]
as/cmd/AND/and2.casl [new file with mode: 0644]
as/cmd/CALL/call0.casl [moved from as/CMD/call1.casl with 51% similarity]
as/cmd/CALL/call1.casl [new file with mode: 0644]
as/cmd/CPA/cpa0.casl [new file with mode: 0644]
as/cmd/CPA/cpa0_ls.casl [new file with mode: 0644]
as/cmd/CPA/cpa0_s.casl [new file with mode: 0644]
as/cmd/CPA/cpa0_z.casl [new file with mode: 0644]
as/cmd/CPA/cpa1_s.casl [new file with mode: 0644]
as/cmd/CPA/cpa2_s.casl [new file with mode: 0644]
as/cmd/CPL/cpl0.casl [new file with mode: 0644]
as/cmd/CPL/cpl0_ls.casl [new file with mode: 0644]
as/cmd/CPL/cpl0_s.casl [new file with mode: 0644]
as/cmd/CPL/cpl0_z.casl [new file with mode: 0644]
as/cmd/CPL/cpl1_s.casl [new file with mode: 0644]
as/cmd/CPL/cpl2_s.casl [new file with mode: 0644]
as/cmd/DC/dc_c0.casl [new file with mode: 0644]
as/cmd/DC/dc_c1.casl [new file with mode: 0644]
as/cmd/DC/dc_i0.casl [new file with mode: 0644]
as/cmd/DC/dc_i1.casl [new file with mode: 0644]
as/cmd/DC/dc_i_of.casl [new file with mode: 0644]
as/cmd/DC/dc_overflow.casl [moved from as/CMD/dc_overflow.casl with 100% similarity]
as/cmd/DC/dc_spc.casl [moved from as/CMD/dc_spc.casl with 100% similarity]
as/cmd/DS/ds.casl [new file with mode: 0644]
as/cmd/DS/ds_0.casl [moved from as/CMD/ds_0.casl with 100% similarity]
as/cmd/IN/in.casl [new file with mode: 0644]
as/cmd/JMI/jmi_m.casl [new file with mode: 0644]
as/cmd/JMI/jmi_ov.casl [new file with mode: 0644]
as/cmd/JMI/jmi_p.casl [new file with mode: 0644]
as/cmd/JMI/jmi_z.casl [new file with mode: 0644]
as/cmd/JNZ/jnz_m.casl [new file with mode: 0644]
as/cmd/JNZ/jnz_ov.casl [new file with mode: 0644]
as/cmd/JNZ/jnz_p.casl [new file with mode: 0644]
as/cmd/JNZ/jnz_z.casl [new file with mode: 0644]
as/cmd/JOV/jov_m.casl [new file with mode: 0644]
as/cmd/JOV/jov_ov.casl [new file with mode: 0644]
as/cmd/JOV/jov_p.casl [new file with mode: 0644]
as/cmd/JOV/jov_z.casl [new file with mode: 0644]
as/cmd/JPL/jpl_m.casl [new file with mode: 0644]
as/cmd/JPL/jpl_ov.casl [new file with mode: 0644]
as/cmd/JPL/jpl_p.casl [new file with mode: 0644]
as/cmd/JPL/jpl_z.casl [new file with mode: 0644]
as/cmd/JUMP/jump_m.casl [new file with mode: 0644]
as/cmd/JUMP/jump_ov.casl [new file with mode: 0644]
as/cmd/JUMP/jump_p.casl [new file with mode: 0644]
as/cmd/JUMP/jump_z.casl [new file with mode: 0644]
as/cmd/JZE/jze_m.casl [new file with mode: 0644]
as/cmd/JZE/jze_ov.casl [new file with mode: 0644]
as/cmd/JZE/jze_p.casl [new file with mode: 0644]
as/cmd/JZE/jze_z.casl [new file with mode: 0644]
as/cmd/LAD/lad0.casl [moved from as/CMD/lad0.casl with 81% similarity]
as/cmd/LAD/lad1.casl [moved from as/CMD/lad1.casl with 56% similarity]
as/cmd/LAD/lad1_ov.casl [moved from as/CMD/lad2.casl with 100% similarity]
as/cmd/LAD/lad1_s.casl [new file with mode: 0644]
as/cmd/LD/ld0.casl [new file with mode: 0644]
as/cmd/LD/ld0_l.casl [new file with mode: 0644]
as/cmd/LD/ld1.casl [new file with mode: 0644]
as/cmd/LD/ld2.casl [new file with mode: 0644]
as/cmd/NOP/nop.casl [moved from as/CMD/nop.casl with 94% similarity]
as/cmd/OR/or0.casl [new file with mode: 0644]
as/cmd/OR/or0_s.casl [new file with mode: 0644]
as/cmd/OR/or0_z.casl [new file with mode: 0644]
as/cmd/OR/or1.casl [new file with mode: 0644]
as/cmd/OR/or2.casl [new file with mode: 0644]
as/cmd/OUT/out.casl [new file with mode: 0644]
as/cmd/POP/push_pop_0.casl [new file with mode: 0644]
as/cmd/POP/push_pop_1.casl [new file with mode: 0644]
as/cmd/PUSH/README [new file with mode: 0644]
as/cmd/RET/README [new file with mode: 0644]
as/cmd/RPOP/rpop.casl [new file with mode: 0644]
as/cmd/RPUSH/rpush.casl [new file with mode: 0644]
as/cmd/SLA/sla_1.casl [moved from as/CMD/ld0.casl with 62% similarity]
as/cmd/SLA/sla_o.casl [new file with mode: 0644]
as/cmd/SLA/sla_s.casl [new file with mode: 0644]
as/cmd/SLA/sla_so.casl [new file with mode: 0644]
as/cmd/SRA/sra2.casl [moved from as/CMD/sra2.casl with 100% similarity]
as/cmd/SRA/sra3.casl [moved from as/CMD/sra3.casl with 100% similarity]
as/cmd/SRA/sra4.casl [moved from as/CMD/sra4.casl with 100% similarity]
as/cmd/SRA/sra_1.casl [new file with mode: 0644]
as/cmd/SRA/sra_m.casl [moved from as/CMD/sla2.casl with 69% similarity]
as/cmd/SRA/sra_o.casl [new file with mode: 0644]
as/cmd/SRA/sra_ov.casl [new file with mode: 0644]
as/cmd/SRA/sra_s.casl [moved from as/CMD/sla3.casl with 70% similarity]
as/cmd/SRA/sra_so.casl [new file with mode: 0644]
as/cmd/ST/st0.casl [moved from as/CMD/st0.casl with 100% similarity]
as/cmd/ST/st1.casl [moved from as/CMD/st1.casl with 100% similarity]
as/cmd/SVC/svc2.casl [moved from as/CMD/svc2.casl with 100% similarity]
as/cmd/XOR/xor0.casl [new file with mode: 0644]
as/cmd/XOR/xor0_s.casl [new file with mode: 0644]
as/cmd/XOR/xor0_z.casl [new file with mode: 0644]
as/cmd/XOR/xor1.casl [new file with mode: 0644]
as/cmd/XOR/xor2.casl [new file with mode: 0644]
as/cmd/XOR/xor2_clear.casl [new file with mode: 0644]
as/cmd/literal_semi.casl [new file with mode: 0644]
as/cmd/literalstr.casl [moved from as/CMD/literalstr.casl with 79% similarity]
as/err/cmd_err0.casl [moved from as/ERR/cmd_err0.casl with 100% similarity]
as/err/cmd_err1.casl [moved from as/ERR/cmd_err1.casl with 100% similarity]
as/err/dc_c1_err.casl [new file with mode: 0644]
as/err/ds_err.casl [moved from as/ERR/ds_err.casl with 100% similarity]
as/err/labeldup_err.casl [moved from as/ERR/labeldup_err.casl with 100% similarity]
as/err/literalstr_err.casl [moved from as/ERR/literalstr_err.casl with 100% similarity]
as/err/opd_x_err.casl [new file with mode: 0644]
as/err/opdspc_err.casl [moved from as/ERR/opdspc_err.casl with 100% similarity]
as/err/quoteend_err.casl [moved from as/ERR/quoteend_err.casl with 100% similarity]
as/fe_tests/2008_04/Q09/token.casl [moved from as/FE_TESTS/2008_04/Q09/token.casl with 100% similarity]
as/fe_tests/2008_04/Q09/token_call.casl [moved from as/FE_TESTS/2008_04/Q09/token_call.casl with 100% similarity]
as/fe_tests/2008_10/Q09/ptn1.casl [moved from as/FE_TESTS/2008_10/Q09/ptn1.casl with 100% similarity]
as/fe_tests/2008_10/Q09/ptn1_call.casl [moved from as/FE_TESTS/2008_10/Q09/ptn1_call.casl with 100% similarity]
as/fe_tests/2008_10/Q09/ptn2.casl [moved from as/FE_TESTS/2008_10/Q09/ptn2.casl with 100% similarity]
as/fe_tests/2008_10/Q09/ptn2_call.casl [moved from as/FE_TESTS/2008_10/Q09/ptn2_call.casl with 100% similarity]
as/fe_tests/2008_10/Q09/ptn3.casl [moved from as/FE_TESTS/2008_10/Q09/ptn3.casl with 100% similarity]
as/fe_tests/2008_10/Q09/ptn3_call.casl [moved from as/FE_TESTS/2008_10/Q09/ptn3_call.casl with 100% similarity]
as/fe_tests/2008_10/Q09/ptn4.casl [moved from as/FE_TESTS/2008_10/Q09/ptn4.casl with 100% similarity]
as/fe_tests/2008_10/Q09/ptn4_call.casl [moved from as/FE_TESTS/2008_10/Q09/ptn4_call.casl with 100% similarity]
as/fe_tests/2008_10/Q13/summary.casl [moved from as/FE_TESTS/2008_10/Q13/summary.casl with 100% similarity]
as/fe_tests/2008_10/Q13/summary_call.casl [moved from as/FE_TESTS/2008_10/Q13/summary_call.casl with 100% similarity]
as/fe_tests/2009_04/Q12/muls.casl [moved from as/FE_TESTS/2009_04/Q12/muls.casl with 100% similarity]
as/fe_tests/2009_04/Q12/muls2.casl [moved from as/FE_TESTS/2009_04/Q12/muls2.casl with 100% similarity]
as/fe_tests/2009_04/Q12/muls2_call.casl [moved from as/FE_TESTS/2009_04/Q12/muls2_call.casl with 100% similarity]
as/fe_tests/2009_04/Q12/muls_call.casl [moved from as/FE_TESTS/2009_04/Q12/muls_call.casl with 100% similarity]
as/fe_tests/2009_10/Q12/outb.casl [moved from as/FE_TESTS/2009_10/Q12/outb.casl with 100% similarity]
as/fe_tests/2009_10/Q12/replace.casl [moved from as/FE_TESTS/2009_10/Q12/replace.casl with 100% similarity]
as/fe_tests/2009_10/Q12/replace_call.casl [moved from as/FE_TESTS/2009_10/Q12/replace_call.casl with 100% similarity]
as/hello.casl
as/macro/in/in.casl [new file with mode: 0644]
as/macro/in/intest0.casl [new file with mode: 0644]
as/macro/in/intest1.casl [new file with mode: 0644]
as/macro/in/str.txt [new file with mode: 0644]
as/macro/out/hello0.casl [new file with mode: 0644]
as/macro/out/hello1.casl [moved from as/CMD/svc2_out.casl with 71% similarity]
as/macro/out/out.casl [new file with mode: 0644]
as/misc/cnt60.casl [moved from as/FUNC/cnt60.casl with 100% similarity]
as/misc/count1.casl [new file with mode: 0644]
as/misc/count1_call.casl [moved from as/FUNC/count1_call.casl with 100% similarity]
as/misc/count1_call0.casl [moved from as/FUNC/count1_call0.casl with 100% similarity]
as/misc/divl0.casl [moved from as/FUNC/divl0.casl with 100% similarity]
as/misc/divl0_test/0.txt [moved from test/integration/casl2/divl0_call/0.txt with 100% similarity]
as/misc/divl0_test/1.txt [new file with mode: 0644]
as/misc/divl0_test/Makefile [moved from test/integration/casl2/divl0_call/Makefile with 100% similarity]
as/misc/divl0_test/report.txt [new file with mode: 0644]
as/misc/fib.casl [moved from as/FUNC/fib.casl with 100% similarity]
as/misc/fib_outl.casl [moved from as/FUNC/fib_outl.casl with 100% similarity]
as/misc/fib_outl/0.txt [moved from test/integration/casl2/fib_outl/0.txt with 51% similarity]
as/misc/fib_outl/Makefile [new file with mode: 0644]
as/misc/hanoi.casl [moved from as/FUNC/hanoi.casl with 100% similarity]
as/misc/in_out.casl [new file with mode: 0644]
as/misc/iotest.casl [moved from as/FUNC/iotest.casl with 50% similarity]
as/misc/mula0.casl [moved from as/FUNC/mula0.casl with 100% similarity]
as/misc/mula_timestab.casl [moved from as/FUNC/mula_timestab.casl with 100% similarity]
as/misc/mull0.casl [moved from as/FUNC/mull0.casl with 100% similarity]
as/misc/mull_timestab.casl [moved from as/FUNC/mull_timestab.casl with 100% similarity]
as/misc/sum.casl [new file with mode: 0644]
as/misc/sum_10.casl [moved from as/FUNC/sum_10.casl with 100% similarity]
as/misc/sum_10_2.casl [moved from as/FUNC/sum_10_2.casl with 100% similarity]
as/yakuwa/README.txt [moved from as/YAKUWA/README.txt with 100% similarity]
as/yakuwa/binout.casl [moved from as/YAKUWA/binout.casl with 100% similarity]
as/yakuwa/binout_test/0.txt [moved from test/integration/casl2/binout/0.txt with 100% similarity]
as/yakuwa/binout_test/1.txt [new file with mode: 0644]
as/yakuwa/binout_test/Makefile [moved from test/integration/casl2/binout/Makefile with 81% similarity]
as/yakuwa/binout_test/report.txt [new file with mode: 0644]
as/yakuwa/floatedit.casl [moved from as/YAKUWA/floatedit.casl with 100% similarity]
as/yakuwa/floatedit/0.txt [moved from test/integration/casl2/floatedit/0.txt with 100% similarity]
as/yakuwa/floatedit/1.txt [new file with mode: 0644]
as/yakuwa/floatedit/Makefile [moved from test/integration/casl2/floatedit/Makefile with 100% similarity]
as/yakuwa/floatedit/report.txt [new file with mode: 0644]
as/yakuwa/floatedit/teststr.txt [moved from test/integration/casl2/floatedit/teststr.txt with 100% similarity]
src/assemble.c
src/token.c
test/integration/casl2/abs_call/Makefile [deleted file]
test/integration/casl2/cmd_adda0/0.txt [moved from test/integration/casl2/adda0/0.txt with 100% similarity]
test/integration/casl2/cmd_adda0/Makefile [moved from test/integration/casl2/adda0/Makefile with 100% similarity]
test/integration/casl2/cmd_adda1/0.txt [moved from test/integration/casl2/adda1/0.txt with 100% similarity]
test/integration/casl2/cmd_adda1/Makefile [moved from test/integration/casl2/adda1/Makefile with 100% similarity]
test/integration/casl2/cmd_adda_overflow/0.txt [moved from test/integration/casl2/adda_overflow/0.txt with 100% similarity]
test/integration/casl2/cmd_adda_overflow/Makefile [moved from test/integration/casl2/adda_overflow/Makefile with 100% similarity]
test/integration/casl2/cmd_addl/0.txt [moved from test/integration/casl2/addl/0.txt with 100% similarity]
test/integration/casl2/cmd_addl/Makefile [moved from test/integration/casl2/addl/Makefile with 100% similarity]
test/integration/casl2/cmd_addl_overflow/0.txt [moved from test/integration/casl2/addl_overflow/0.txt with 100% similarity]
test/integration/casl2/cmd_addl_overflow/Makefile [moved from test/integration/casl2/addl_overflow/Makefile with 100% similarity]
test/integration/casl2/cmd_and0/0.txt [moved from test/integration/casl2/and0/0.txt with 100% similarity]
test/integration/casl2/cmd_and0/Makefile [moved from test/integration/casl2/and0/Makefile with 100% similarity]
test/integration/casl2/cmd_and1/0.txt [moved from test/integration/casl2/and1/0.txt with 100% similarity]
test/integration/casl2/cmd_and1/Makefile [moved from test/integration/casl2/and1/Makefile with 100% similarity]
test/integration/casl2/cmd_and2/0.txt [moved from test/integration/casl2/and2/0.txt with 100% similarity]
test/integration/casl2/cmd_and2/Makefile [moved from test/integration/casl2/and2/Makefile with 100% similarity]
test/integration/casl2/cmd_and3/0.txt [moved from test/integration/casl2/and3/0.txt with 100% similarity]
test/integration/casl2/cmd_and3/Makefile [moved from test/integration/casl2/and3/Makefile with 100% similarity]
test/integration/casl2/cmd_call0/0.txt [moved from test/integration/casl2/call0/0.txt with 100% similarity]
test/integration/casl2/cmd_call0/Makefile [moved from test/integration/casl2/call0/Makefile with 100% similarity]
test/integration/casl2/cmd_call1/0.txt [moved from test/integration/casl2/call1/0.txt with 100% similarity]
test/integration/casl2/cmd_call1/Makefile [moved from test/integration/casl2/call1/Makefile with 100% similarity]
test/integration/casl2/cmd_call2/0.txt [moved from test/integration/casl2/call2/0.txt with 100% similarity]
test/integration/casl2/cmd_call2/Makefile [moved from test/integration/casl2/call2/Makefile with 100% similarity]
test/integration/casl2/cmd_cpa1/0.txt [moved from test/integration/casl2/cpa1/0.txt with 100% similarity]
test/integration/casl2/cmd_cpa1/Makefile [moved from test/integration/casl2/cpa1/Makefile with 100% similarity]
test/integration/casl2/cmd_dc_overflow/0.txt [moved from test/integration/casl2/dc_overflow/0.txt with 100% similarity]
test/integration/casl2/cmd_dc_overflow/Makefile [moved from test/integration/casl2/dc_overflow/Makefile with 100% similarity]
test/integration/casl2/cmd_dc_spc/0.txt [moved from test/integration/casl2/dc_spc/0.txt with 100% similarity]
test/integration/casl2/cmd_dc_spc/Makefile [moved from test/integration/casl2/dc_spc/Makefile with 100% similarity]
test/integration/casl2/cmd_ds_0/0.txt [moved from test/integration/casl2/ds_0/0.txt with 100% similarity]
test/integration/casl2/cmd_ds_0/Makefile [moved from test/integration/casl2/ds_0/Makefile with 100% similarity]
test/integration/casl2/cmd_lad0/0.txt [moved from test/integration/casl2/lad0/0.txt with 100% similarity]
test/integration/casl2/cmd_lad0/Makefile [moved from test/integration/casl2/lad0/Makefile with 100% similarity]
test/integration/casl2/cmd_lad1/0.txt [moved from test/integration/casl2/lad1/0.txt with 100% similarity]
test/integration/casl2/cmd_lad1/Makefile [moved from test/integration/casl2/lad1/Makefile with 100% similarity]
test/integration/casl2/cmd_lad2/0.txt [moved from test/integration/casl2/lad2/0.txt with 100% similarity]
test/integration/casl2/cmd_lad2/Makefile [moved from test/integration/casl2/lad2/Makefile with 100% similarity]
test/integration/casl2/cmd_lad3/0.txt [moved from test/integration/casl2/lad3/0.txt with 100% similarity]
test/integration/casl2/cmd_lad3/Makefile [moved from test/integration/casl2/lad3/Makefile with 100% similarity]
test/integration/casl2/cmd_ld0/0.txt [moved from test/integration/casl2/ld0/0.txt with 100% similarity]
test/integration/casl2/cmd_ld0/Makefile [moved from test/integration/casl2/ld0/Makefile with 100% similarity]
test/integration/casl2/cmd_ld1/0.txt [moved from test/integration/casl2/ld1/0.txt with 100% similarity]
test/integration/casl2/cmd_ld1/Makefile [moved from test/integration/casl2/ld1/Makefile with 100% similarity]
test/integration/casl2/cmd_ld2/0.txt [moved from test/integration/casl2/ld2/0.txt with 100% similarity]
test/integration/casl2/cmd_ld2/Makefile [moved from test/integration/casl2/ld2/Makefile with 100% similarity]
test/integration/casl2/cmd_ld3/0.txt [moved from test/integration/casl2/ld3/0.txt with 100% similarity]
test/integration/casl2/cmd_ld3/Makefile [moved from test/integration/casl2/ld3/Makefile with 100% similarity]
test/integration/casl2/cmd_ld4/0.txt [moved from test/integration/casl2/ld4/0.txt with 100% similarity]
test/integration/casl2/cmd_ld4/Makefile [moved from test/integration/casl2/ld4/Makefile with 100% similarity]
test/integration/casl2/cmd_ld5/0.txt [moved from test/integration/casl2/ld5/0.txt with 100% similarity]
test/integration/casl2/cmd_ld5/Makefile [moved from test/integration/casl2/ld5/Makefile with 100% similarity]
test/integration/casl2/cmd_ld_loop/0.txt [moved from test/integration/casl2/ld_loop/0.txt with 100% similarity]
test/integration/casl2/cmd_ld_loop/Makefile [moved from test/integration/casl2/ld_loop/Makefile with 100% similarity]
test/integration/casl2/cmd_literal_spc/0.txt [moved from test/integration/casl2/literal_spc/0.txt with 100% similarity]
test/integration/casl2/cmd_literal_spc/Makefile [moved from test/integration/casl2/literal_spc/Makefile with 100% similarity]
test/integration/casl2/cmd_literalstr/0.txt [moved from test/integration/casl2/literalstr/0.txt with 100% similarity]
test/integration/casl2/cmd_literalstr/Makefile [moved from test/integration/casl2/literalstr/Makefile with 100% similarity]
test/integration/casl2/cmd_out0/0.txt [moved from test/integration/casl2/out0/0.txt with 100% similarity]
test/integration/casl2/cmd_out0/Makefile [moved from test/integration/casl2/out0/Makefile with 100% similarity]
test/integration/casl2/cmd_out1/0.txt [new file with mode: 0644]
test/integration/casl2/cmd_out1/Makefile [moved from test/integration/casl2/fib_outl/Makefile with 51% similarity]
test/integration/casl2/cmd_pushpop/0.txt [moved from test/integration/casl2/pushpop/0.txt with 100% similarity]
test/integration/casl2/cmd_pushpop/Makefile [moved from test/integration/casl2/pushpop/Makefile with 100% similarity]
test/integration/casl2/cmd_sla2/0.txt [moved from test/integration/casl2/sla2/0.txt with 100% similarity]
test/integration/casl2/cmd_sla2/Makefile [moved from test/integration/casl2/sla2/Makefile with 100% similarity]
test/integration/casl2/cmd_sra2/0.txt [moved from test/integration/casl2/sra2/0.txt with 100% similarity]
test/integration/casl2/cmd_sra2/Makefile [moved from test/integration/casl2/sra2/Makefile with 100% similarity]
test/integration/casl2/cmd_sra3/0.txt [moved from test/integration/casl2/sra3/0.txt with 100% similarity]
test/integration/casl2/cmd_sra3/Makefile [moved from test/integration/casl2/sra3/Makefile with 100% similarity]
test/integration/casl2/cmd_sra4/0.txt [moved from test/integration/casl2/sra4/0.txt with 100% similarity]
test/integration/casl2/cmd_sra4/Makefile [moved from test/integration/casl2/sra4/Makefile with 100% similarity]
test/integration/casl2/cmd_st0/0.txt [moved from test/integration/casl2/st0/0.txt with 100% similarity]
test/integration/casl2/cmd_st0/Makefile [moved from test/integration/casl2/st0/Makefile with 100% similarity]
test/integration/casl2/cmd_st1/0.txt [moved from test/integration/casl2/st1/0.txt with 100% similarity]
test/integration/casl2/cmd_st1/Makefile [moved from test/integration/casl2/st1/Makefile with 100% similarity]
test/integration/casl2/cmd_svc2/0.txt [moved from test/integration/casl2/svc2/0.txt with 100% similarity]
test/integration/casl2/cmd_svc2/Makefile [moved from test/integration/casl2/svc2/Makefile with 100% similarity]
test/integration/casl2/cmd_xor0/0.txt [moved from test/integration/casl2/xor0/0.txt with 100% similarity]
test/integration/casl2/cmd_xor0/Makefile [moved from test/integration/casl2/xor0/Makefile with 100% similarity]
test/integration/casl2/cmd_xor1/0.txt [moved from test/integration/casl2/xor1/0.txt with 100% similarity]
test/integration/casl2/cmd_xor1/Makefile [moved from test/integration/casl2/xor1/Makefile with 100% similarity]
test/integration/casl2/cmd_xor3/0.txt [moved from test/integration/casl2/xor3/0.txt with 100% similarity]
test/integration/casl2/cmd_xor3/Makefile [moved from test/integration/casl2/xor3/Makefile with 100% similarity]
test/integration/casl2/cmd_xor4/0.txt [moved from test/integration/casl2/xor4/0.txt with 100% similarity]
test/integration/casl2/cmd_xor4/Makefile [moved from test/integration/casl2/xor4/Makefile with 100% similarity]
test/integration/casl2/cmd_xor5/0.txt [moved from test/integration/casl2/xor5/0.txt with 100% similarity]
test/integration/casl2/cmd_xor5/Makefile [moved from test/integration/casl2/xor5/Makefile with 100% similarity]
test/integration/casl2/divl1_call/Makefile [deleted file]
test/integration/casl2/err_dserr/0.txt [new file with mode: 0644]
test/integration/casl2/err_dserr/Makefile [moved from test/integration/casl2/ds_err/Makefile with 59% similarity]
test/integration/casl2/hanoi/0.txt
test/integration/casl2/hanoi/Makefile
test/integration/casl2/hello/0.txt
test/integration/casl2/iotest/Makefile
test/integration/casl2/lib_abs/0.txt [moved from test/integration/casl2/abs_call/0.txt with 100% similarity]
test/integration/casl2/lib_abs/Makefile [new file with mode: 0644]
test/integration/casl2/lib_divl/0.txt [moved from test/integration/casl2/divl1_call/0.txt with 100% similarity]
test/integration/casl2/lib_divl/Makefile [new file with mode: 0644]
test/integration/casl2/lib_inl/0.txt [new file with mode: 0644]
test/integration/casl2/lib_inl/Makefile [new file with mode: 0644]
test/integration/casl2/lib_inl/teststr.txt [new file with mode: 0644]
test/integration/casl2/minim_call/Makefile
test/integration/casl2/misc_count1/0.txt [moved from test/integration/casl2/count_call/0.txt with 100% similarity]
test/integration/casl2/misc_count1/Makefile [moved from test/integration/casl2/count_call/Makefile with 100% similarity]
test/integration/casl2/misc_out_hello/0.txt [moved from test/integration/casl2/svc2_out/0.txt with 94% similarity]
test/integration/casl2/misc_out_hello/Makefile [moved from test/integration/casl2/out1/Makefile with 54% similarity]
test/integration/casl2/opt_h/0.txt [moved from test/integration/casl2/sum_10_h/0.txt with 100% similarity]
test/integration/casl2/opt_h/Makefile [moved from test/integration/casl2/sum_10_h/Makefile with 100% similarity]
test/integration/casl2/opt_opterr/0.txt [moved from test/integration/casl2/sum_10_opterr/0.txt with 100% similarity]
test/integration/casl2/opt_opterr/Makefile [moved from test/integration/casl2/sum_10_opterr/Makefile with 100% similarity]
test/integration/casl2/opt_s/0.txt [moved from test/integration/casl2/sum_10_s/0.txt with 100% similarity]
test/integration/casl2/opt_s/CMD.mk [moved from test/integration/casl2/sum_10_s/CMD.mk with 100% similarity]
test/integration/casl2/opt_s/Makefile [moved from test/integration/casl2/sum_10_s/Makefile with 100% similarity]
test/integration/casl2/opt_sL/0.txt [moved from test/integration/casl2/sum_10_sL/0.txt with 100% similarity]
test/integration/casl2/opt_sL/Makefile [moved from test/integration/casl2/sum_10_sL/Makefile with 100% similarity]
test/integration/casl2/opt_slA/0.txt [moved from test/integration/casl2/sum_10_slA/0.txt with 100% similarity]
test/integration/casl2/opt_slA/Makefile [moved from test/integration/casl2/sum_10_slA/Makefile with 100% similarity]
test/integration/casl2/opt_slaO/0.txt [moved from test/integration/casl2/sum_10_slaO/0.txt with 100% similarity]
test/integration/casl2/opt_slaO/Makefile [moved from test/integration/casl2/sum_10_slaO/Makefile with 100% similarity]
test/integration/casl2/opt_slaOn/0.txt [moved from test/integration/casl2/sum_10_slaOn/0.txt with 100% similarity]
test/integration/casl2/opt_slaOn/Makefile [moved from test/integration/casl2/sum_10_slaOn/Makefile with 100% similarity]
test/integration/casl2/opt_slaoT/0.txt [moved from test/integration/casl2/sum_10_slaoT/0.txt with 100% similarity]
test/integration/casl2/opt_slaoT/Makefile [moved from test/integration/casl2/sum_10_slaoT/Makefile with 100% similarity]
test/integration/casl2/opt_slaot/0.txt [moved from test/integration/casl2/sum_10_slaot/0.txt with 100% similarity]
test/integration/casl2/opt_slaot/Makefile [moved from test/integration/casl2/sum_10_slaot/Makefile with 100% similarity]
test/integration/casl2/opt_slaotd/0.txt [moved from test/integration/casl2/sum_10_slaotd/0.txt with 100% similarity]
test/integration/casl2/opt_slaotd/Makefile [moved from test/integration/casl2/sum_10_slaotd/Makefile with 100% similarity]
test/integration/casl2/out1/0.txt [deleted file]
test/integration/casl2/svc2_out/Makefile [deleted file]
test/integration/comet2/misc_out_hello1/0.txt [moved from test/integration/comet2/svc2_out/0.txt with 63% similarity]
test/integration/comet2/misc_out_hello1/Makefile [new file with mode: 0644]
test/integration/comet2/misc_out_hello1/a.o [new file with mode: 0644]
test/integration/comet2/mula1_call/0.txt [deleted file]
test/integration/comet2/mula1_call/Makefile [deleted file]
test/integration/comet2/mula1_call/a.o [deleted file]
test/integration/comet2/svc2_out/Makefile [deleted file]
test/integration/comet2/svc2_out/a.o
test/unit/TEST.mk
test/unit/print_cmdtype_code/print_cmdtype_code.c
test/unit/print_code_type/print_code_type.c

diff --git a/as/CMD/adda0.casl b/as/CMD/adda0.casl
deleted file mode 100644 (file)
index 8e068bc..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-MAIN    START
-BEGIN   LAD     GR1,3
-        ADDA    GR1,A
-        RET
-A       DC      1
-        END
diff --git a/as/CMD/adda_overflow.casl b/as/CMD/adda_overflow.casl
deleted file mode 100644 (file)
index 478cd3a..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-MAIN    START   BEGIN
-BEGIN   LAD     GR1,32766
-        ADDA    GR1,A
-        RET
-A       DC      29
-        END
diff --git a/as/CMD/addl.casl b/as/CMD/addl.casl
deleted file mode 100644 (file)
index d496648..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-MAIN    START   BEGIN
-BEGIN   LD  GR0,A
-        ADDL    GR0,B
-        ST  GR0,C
-        RET
-A   DC  32766
-B   DC  29
-C   DS  1
-        END
diff --git a/as/CMD/addl_overflow.casl b/as/CMD/addl_overflow.casl
deleted file mode 100644 (file)
index 5a6f7c9..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-MAIN   START   BEGIN
-BEGIN  LD      GR1,A
-       ADDL    GR1,B
-       ADDL    GR1,C
-    ADDL       GR1,D
-       RET
-A      DC      32765
-B      DC      4
-C      DC      32764
-D      DC      7
-       END
diff --git a/as/CMD/and0.casl b/as/CMD/and0.casl
deleted file mode 100644 (file)
index 99ca479..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-MAIN    START
-BEGIN   LAD     GR1,#8001
-        LAD     GR2,#3521
-        AND     GR1,GR2
-        RET
-        END
diff --git a/as/CMD/and1.casl b/as/CMD/and1.casl
deleted file mode 100644 (file)
index 99b3203..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-MAIN    START
-BEGIN   LAD     GR0,#3444
-        AND     GR0,A
-        RET
-A       DC      #00DD
-        END
diff --git a/as/CMD/and2.casl b/as/CMD/and2.casl
deleted file mode 100644 (file)
index 65b8b8a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-MAIN    START
-BEGIN   LAD     GR0,#3444
-        AND     GR0,=#00DD
-        RET
-        END
diff --git a/as/CMD/and3.casl b/as/CMD/and3.casl
deleted file mode 100644 (file)
index 2e6cf33..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-MAIN    START
-BEGIN   LAD     GR0,#0460
-        AND     GR0,=#00FF
-        RET
-        END
diff --git a/as/CMD/call0.casl b/as/CMD/call0.casl
deleted file mode 100644 (file)
index bcd9543..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-MAIN    START   BEGIN
-BEGIN   LD      GR1,A
-        CALL    COPY
-        ST      GR2,B
-        RET
-A       DC      29
-B       DS      1
-        END
-COPY    START
-        LD      GR2,GR1
-        RET
-        END
diff --git a/as/CMD/call2.casl b/as/CMD/call2.casl
deleted file mode 100644 (file)
index afa5fdd..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-MAIN    START   BEGIN
-BEGIN   LD      GR1,=29
-        CALL    INCR
-        ST      GR1,A
-        RET
-A       DS      1
-        END
-INCR    START
-        ADDA      GR1,=1
-        RET
-FIN     END
diff --git a/as/CMD/cpa1.casl b/as/CMD/cpa1.casl
deleted file mode 100644 (file)
index a5ca590..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-MAIN    START   BEGIN
-BEGIN   LAD     GR1,#5000
-        LAD     GR2,#F000
-        CPA     GR2,GR1
-        RET
-        END
diff --git a/as/CMD/cpl1.casl b/as/CMD/cpl1.casl
deleted file mode 100644 (file)
index 778ccb5..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-MAIN    START
-BEGIN   LAD     GR1,#5000
-        LAD     GR2,#F000
-        CPL     GR1,GR2
-        RET
-        END
diff --git a/as/CMD/cpl2.casl b/as/CMD/cpl2.casl
deleted file mode 100644 (file)
index 1eb8126..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-MAIN    START
-BEGIN   LAD     GR0,#3000
-        CPL     GR0,A
-        RET
-A       DC      #A000
-        END
diff --git a/as/CMD/cpl3.casl b/as/CMD/cpl3.casl
deleted file mode 100644 (file)
index 2bd37e0..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-MAIN    START
-BEGIN   LAD     GR1,#5000
-        ADDL    GR1,=#FFFF
-        LAD     GR2,#F000
-        CPL     GR1,GR2
-        RET
-        END
diff --git a/as/CMD/lad3.casl b/as/CMD/lad3.casl
deleted file mode 100644 (file)
index bd8d349..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-LAD1    START
-        LAD     GR1,-1
-        LAD     GR1,65535,GR1
-        RET
-        END
diff --git a/as/CMD/lad4.casl b/as/CMD/lad4.casl
deleted file mode 100644 (file)
index 1711f01..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-MAIN    START   BEGIN
-BEGIN   LD      GR7,A
-        LAD     GR7,1,GR7
-        RET
-A       DC      3
-        END
diff --git a/as/CMD/ld1.casl b/as/CMD/ld1.casl
deleted file mode 100644 (file)
index 56b035f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-MAIN    START
-        LD      GR0,A
-        RET
-A       DC      1,1,2,3,5,8
-        END
diff --git a/as/CMD/ld2.casl b/as/CMD/ld2.casl
deleted file mode 100644 (file)
index 5e3fc3a..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-; LDコマンド
-MAIN   START   BEGIN
-BEGIN  LAD     GR0,3
-    LD GR1,GR0
-       RET
-       END
diff --git a/as/CMD/ld3.casl b/as/CMD/ld3.casl
deleted file mode 100644 (file)
index 733c109..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-MAIN   START
-BEGIN  LD      GR1,I
-       RET
-I      DC      17
-       END
diff --git a/as/CMD/ld4.casl b/as/CMD/ld4.casl
deleted file mode 100644 (file)
index d6723d6..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-; LDコマンド
-MAIN   START   BEGIN
-BEGIN  LD      GR1,A
-        LD      GR2,B
-        ADDL    GR1,GR2
-        RET
-A      DC      32767
-B       DC      32675
-       END
diff --git a/as/CMD/ld5.casl b/as/CMD/ld5.casl
deleted file mode 100644 (file)
index 2b40d74..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-; LDコマンド
-MAIN    START   BEGIN
-BEGIN   LAD     GR2,1
-        LD      GR1,A,GR2
-        RET
-A       DC      1
-B       DC      2
-        END
diff --git a/as/CMD/ld_loop.casl b/as/CMD/ld_loop.casl
deleted file mode 100644 (file)
index 5e21750..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-;;; ループを使い、連続でGR1にデータを転送する
-MAIN    START
-        LAD     GR2,0
-MLOOP   CPA     GR2,LEN
-        JZE     MEND
-        LD      GR1,DATA,GR2
-        LAD     GR2,1,GR2
-        JUMP    MLOOP
-MEND    RET
-DATA    DC      #9600,#F000,#A400
-LEN     DC      3
-        END
diff --git a/as/CMD/literal_spc.casl b/as/CMD/literal_spc.casl
deleted file mode 100644 (file)
index 3c034d4..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-; リテラルに「=' '」を指定した場合のテスト
-MAIN    START
-        LD  GR1,=' '
-        ST  GR1,BUF      
-        OUT BUF,LEN
-        RET
-BUF            DS      1
-LEN            DC      1
-        END
diff --git a/as/CMD/out0.casl b/as/CMD/out0.casl
deleted file mode 100644 (file)
index 4f046e3..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-MAIN     START
-         OUT    BUF,LEN
-         RET
-BUF      DC     '0'
-LEN      DC     1
-         END
diff --git a/as/CMD/out1.casl b/as/CMD/out1.casl
deleted file mode 100644 (file)
index aedfb02..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-;;; OUTの使用例
-OTEST   START
-        OUT     IOBUF,IOLEN
-        RET
-IOBUF   DC      'aaaa',10,'b','c',10,'as','qwerty','111111'
-IOLEN   DC      24
-        END
diff --git a/as/CMD/pushpop.casl b/as/CMD/pushpop.casl
deleted file mode 100644 (file)
index f8c8d33..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-PUSHPOP START
-        LAD     GR1,1
-        LAD     GR2,2
-        PUSH    0,GR1
-        PUSH    0,GR2
-        LAD     GR1,0
-        LAD     GR2,0
-        POP     GR2
-        POP     GR1
-        RET
-        END
diff --git a/as/CMD/sll2.casl b/as/CMD/sll2.casl
deleted file mode 100644 (file)
index 86672cf..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-SLA2   START   BEGIN
-BEGIN  LD          GR1,X
-           SLL     GR1,2
-           RET
-X          DC      3
-           END
-        
\ No newline at end of file
diff --git a/as/CMD/sll3.casl b/as/CMD/sll3.casl
deleted file mode 100644 (file)
index e22bed0..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-SLA2   START   BEGIN
-BEGIN  LD          GR1,X
-           SLL     GR1,1
-           RET
-X          DC      #4000
-           END
-        
\ No newline at end of file
diff --git a/as/CMD/xor0.casl b/as/CMD/xor0.casl
deleted file mode 100644 (file)
index ced17dd..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-MAIN   START
-BEGIN  LD      GR1,A
-       LD      GR2,A
-       XOR     GR1,GR2
-    RET
-A      DC      #8001
-B      DC      #3521
-       END
diff --git a/as/CMD/xor1.casl b/as/CMD/xor1.casl
deleted file mode 100644 (file)
index a587fab..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-MAIN   START
-BEGIN  LAD     GR0,#3444
-       LD      GR1,A
-       XOR     GR0,A
-    RET
-A      DC      #00DD
-       END
diff --git a/as/CMD/xor3.casl b/as/CMD/xor3.casl
deleted file mode 100644 (file)
index 7b6e7cd..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-MAIN    START
-BEGIN   LAD     GR0,#3444
-        LD      GR1,A
-        XOR     GR0,A
-        RET
-A       DC      #00DD
-        END
diff --git a/as/CMD/xor4.casl b/as/CMD/xor4.casl
deleted file mode 100644 (file)
index 845043d..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-;;; XORで、GR1の内容をクリア
-MAIN    START
-BEGIN   XOR     GR2,GR2
-LOOP    CPA     GR2,LEN
-        JZE     FIN
-        LD      GR1,A,GR2
-        XOR     GR1,GR1
-        LAD     GR2,1,GR2
-        JUMP    LOOP
-FIN     RET
-A       DC      #8001,#8000,#FFFF,#51,#7FFF
-LEN     DC      5
-        END
diff --git a/as/FUNC/Makefile b/as/FUNC/Makefile
deleted file mode 100644 (file)
index fb93443..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-outl.casl: outl_main.casl divl1.casl rev.casl
-       cat $^ >$@
-outa.casl: outa_main.casl divl1.casl rev.casl abs.casl
-       cat $^ >$@
-outb.casl: outb_main.casl divl1.casl rev.casl
-       cat $^ >$@
diff --git a/as/FUNC/addl32.casl b/as/FUNC/addl32.casl
deleted file mode 100644 (file)
index 63a6bba..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-;;; 2つの32ビット数値を加算する
-;;; 32ビットの値は、連続する2語の領域に格納
-MAIN    START   BEGIN
-BEGIN   LAD     GR1,1           ; GR1にAの下位語を転送
-        LD      GR1,A,GR1       ; ↓
-        LAD     GR2,1           ; GR2にBの下位語を転送
-        LD      GR2,B,GR2       ; ↓
-        ADDL    GR1,GR2         ; GR1 <- GR1 + GR2
-        JOV     CARR            ; オーバーフロー時は、CARRにジャンプ
-        JUMP    STL
-CARR    LAD     GR2,1           ; Cの上位語に1を格納
-        ST      GR2,C           ; ↓
-STL     LAD     GR2,1           ; Cの下位語にGR1の内容を格納
-        ST      GR1,C,GR2       ; ↓
-        LD      GR1,A           ; GR1にAの上位語を転送
-        ADDL    GR1,B           ; GR1 <- GR1 + B
-        ADDL    GR1,C           ; GR1 <- GR1 + C
-        RET
-A       DC      0,65534
-B       DC      0,65535
-C       DS      2
-        END
diff --git a/as/FUNC/count1.casl b/as/FUNC/count1.casl
deleted file mode 100644 (file)
index 41f8d57..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-COUNT1 START
-;       入力    GR1:検索する語
-;       処理    GR1中の'1'のビットの個数を求める
-;       出力    GR0:GR1中の'1'のビットの個数
-       PUSH    0,GR1
-    PUSH       0,GR2
-    SUBA       GR2,GR2
-    AND                GR1,GR1
-    JZE        RETURN
-MORE LAD       GR2,1,GR2
-       LAD             GR0,-1,GR1
-    AND                GR1,GR0
-    JNZ                MORE
-RETURN LD      GR0,GR2
-       POP             GR2
-    POP                GR1
-    RET
-    END
diff --git a/as/FUNC/diva1.casl b/as/FUNC/diva1.casl
deleted file mode 100644 (file)
index 3d867f5..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-;;; -32767〜32767の範囲にある整数の割算(筆算方式)を行う
-;;; 入力 GR1:被除数 GR2:除数
-;;; 出力 GR0:商 GR3:剰余
-;;; GR2が0の場合は、GR0、GR3とも0になり、オーバーフロー
-DIVL    START
-        PUSH    0,GR1
-        PUSH    0,GR2
-        PUSH    0,GR4
-        AND     GR2,GR2         ; (GR2 = 0)の場合、DIVZEROへジャンプ
-        JZE     DIVZERO         ; ↓
-        ST      GR2,Y           ; YにGR2の初期値を保存
-        XOR     GR0,GR0         ; GR0の初期化
-        XOR     GR3,GR3         ; GR3の初期化
-        LAD     GR4,1           ; GR4の初期化。対象ビットを表す
-SL      CPL     GR2,GR1         ; ループ先頭。(GR2 > GR1)の場合、LOOPへループ脱出
-        JPL     LOOP            ; ↓
-        SLL     GR4,1           ; GR4を1回左シフト
-        ST      GR2,TMP         ; GR2の値をTMPに退避
-        SLL     GR2,1           ; GR2を1回左シフト
-        JOV     YOV             ; オーバーフローの場合は、YOVへジャンプ
-        JUMP    SL              ; ループ終端
-YOV     LD      GR2,TMP         ; GR2の値をTMPから復元
-        SRL     GR4,1           ; GR4を1回右シフト
-        JUMP    LPIN            ; LPINへジャンプ
-LOOP    SRL     GR4,1           ; ループ先頭。GR4を1回右シフト
-        JZE     SETMOD          ; (GR4 = 0)の場合、SETMODへループ脱出
-        SRL     GR2,1           ; GR2を1回右シフト
-        CPL     GR1,Y           ; (GR1 < Y)の場合、SETMODへループ脱出
-        JMI     SETMOD          ; ↓
-        CPL     GR1,GR2         ; (GR1 < GR2)の場合、ループ先頭へジャンプ
-        JMI     LOOP            ; ↓
-LPIN    SUBL    GR1,GR2         ; GR1 <- GR1 - GR2
-        ADDL    GR0,GR4         ; GR0 <- GR0 + GR4
-        JUMP    LOOP            ; ループ終端
-DIVZERO LAD     GR3,#8000       ; 強制的にオーバーフローを発生させ、GR3 <- 0
-        SLL     GR3,1           ; ↓
-        JUMP    FIN             ; FIN へジャンプ
-SETMOD  LD      GR3,GR1         ; GR3 <- GR1。剰余の設定
-FIN     POP     GR4
-        POP     GR2
-        POP     GR1
-        RET
-Y       DS      1
-TMP     DS      1
-        END
diff --git a/as/FUNC/inl.casl b/as/FUNC/inl.casl
deleted file mode 100644 (file)
index 8cb0a7a..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-;;; 入力された数値をGR0で返す
-INL     START
-        RPUSH
-        IN      IBUF,ILEN
-        LAD     GR1,0
-        LAD     GR2,10          ; 10進数の「10」
-        LAD     GR3,0           ; 値の一時格納
-        LAD     GR4,0           ; インデックス
-ISTOL   CPL     GR4,ILEN        ; ループ先頭。(GR4 = ILEN)の場合、ループ脱出
-        JZE     ICP             ; ↓
-        LD      GR1,IBUF,GR4
-        CPL     GR1,INCHR       ; (GR1 < (INCHR = '0'))の場合、IOVへジャンプ
-        JMI     IOV             ; ↓
-        CPL     GR1,='9'        ; (GR1 > '9')の場合、IOVへジャンプ
-        JPL     IOV             ; ↓
-        SUBL    GR1,INCHR
-        ST      GR4,NLEN
-        LD      GR4,ILEN
-        SUBA    GR4,NLEN
-MUL10   CPL     GR4,=1
-        JZE     ISNEXT
-        CALL    MULL
-        LD      GR1,GR0
-        LAD     GR4,-1,GR4
-        JUMP    MUL10
-ISNEXT  LD      GR4,NLEN
-        ADDL    GR3,GR1
-        LAD     GR4,1,GR4
-        JUMP    ISTOL           ; ループ終端
-IOV     LAD     GR0,1
-        ADDL    GR0,=#FFFF
-        JUMP    IFIN
-ICP     LD      GR0,GR3
-IFIN    RPOP
-        RET
-INCHR   DC      '0123456789'
-IBUF    DS      5
-ILEN    DS      1
-NLEN    DS      1
-        END
-;GR1の値とGR2の値の積をGR0に格納
-MULL    START
-        RPUSH
-        LAD     GR3,1           ; 対象ビット
-        LAD     GR0,0           ; 積
-MLOOP   CPL     GR3,GR2         ; ループ先頭。(GR2 = GR3)の場合、ループ脱出
-        JPL     MFIN            ; ↓
-        PUSH    0,GR3           ; GR2の、GR3が示したビットが0の場合、MNEXTへジャンプ
-        AND     GR3,GR2         ; ↓
-        POP     GR3             ; ↓
-        JZE     MNEXT           ; ↓
-        ADDL    GR0,GR1         ; GR0 <- GR0 + GR1
-        JOV     MFIN            ; オーバーフローした場合、ループ脱出
-MNEXT   SLL     GR3,1           ; GR3を1回左シフト
-        SLL     GR1,1           ; GR1を1回左シフト
-        JOV     MFIN            ; オーバーフローした場合、ループ脱出
-        JUMP    MLOOP           ; ループ終端
-MFIN    RPOP
-        RET
-        END
diff --git a/as/FUNC/inl_call.casl b/as/FUNC/inl_call.casl
deleted file mode 100644 (file)
index c2e3d05..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-;;; casl2 inl_call.casl outl.casl
-MAIN    START
-        CALL    INL
-        JOV     NAN
-        LD      GR1,GR0
-        CALL    OUTL
-        JUMP    FIN
-NAN     OUT     NANMSG,MLEN        
-FIN     RET
-NANMSG  DC      'Not A Number'
-MLEN    DC      12        
-        END
diff --git a/as/FUNC/minim.casl b/as/FUNC/minim.casl
deleted file mode 100644 (file)
index f1198da..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-;;; GR1のアドレスに格納されたGR2の個数の値の中で、最小値をGR0に格納する
-MINIM   START
-        LD      GR0,0,GR1
-        ST      GR0,MIN
-        LAD     GR3,0
-S1      CPA     GR3,GR2
-        JZE     LRET
-        LAD     GR1,1,GR1
-        LD      GR0,0,GR1
-        CPA     GR0,MIN
-        JPL     S2
-        JZE     S2
-        ST      GR0,MIN
-S2      LAD     GR3,1,GR3
-        JUMP    S1
-LRET    LD      GR0,MIN
-        RET
-MIN     DS      1
-        END
diff --git a/as/FUNC/outa0.casl b/as/FUNC/outa0.casl
deleted file mode 100644 (file)
index 1087f6c..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-;;; GR1に格納された値を、10進数の整数値(-32768〜32767)として表示
-OUTA    START
-        RPUSH
-        LAD     GR2,10          ; GR2に10進数の「10」を格納。
-        LAD     GR0,0           ; GR0 <- 0
-        LAD     GR4,0           ; 負数フラグ。GR1が負数の場合、GR4は1
-        ST      GR0,LEN         ; LENの初期化
-        AND     GR1,GR1         ; GR1をテスト
-        JZE     ZPRT            ; GR1が0の場合、ZPRTにジャンプ
-        JPL     STI             ; GR1が正数の場合、STIにジャンプ
-        LAD     GR4,1           ; GR1が負数の場合、GR4をオン
-        CALL    OABS            ;                  GR1を正数に変換
-STI     CPL     GR1,GR2         ; ループ先頭。(GR1 < GR2)の場合は、ループ脱出
-        JMI     STLST           ; ↓
-        CALL    ODIVL           ; GR1とGR2の、商をGR0、剰余をGR3に格納
-        LD      GR1,GR3         ; GR1にGR3をコピー
-        LD      GR1,NCHAR,GR1   ; GR1を文字に変換
-        CALL    STSTR           ; GR1をSTR領域に格納
-        LD      GR1,GR0         ; GR0をGR1にコピー
-        JUMP    STI             ; ループ終端
-STLST   LD      GR1,NCHAR,GR1   ; GR1を文字に変換
-        CALL    STSTR           ; GR1をSTR領域に格納
-        AND     GR4,GR4         ; 正数の場合
-        JZE     PRT             ; ↓
-        LD      GR1,='-'        ; 負数の場合、「-」をSTR領域に格納
-        CALL    STSTR           ; ↓
-        JUMP    PRT             ; PRTにジャンプ
-ZPRT    LD      GR1,NCHAR       ; 「0」をSTR領域に格納
-        CALL    STSTR           ; ↓
-PRT     LD      GR2,LEN         ; GR2にLENの値を格納
-        LAD     GR1,STR         ; GR1に文字列のアドレスを格納
-        CALL    REV             ; 文字列を逆順に並べ替え
-        OUT     STR,LEN         ; 文字列を出力
-        RPOP
-        RET
-STR     DS      17
-LEN     DS      1
-NCHAR   DC      '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-        END
-;; GR1をSTR領域に格納し、LENをインクリメント
-STSTR   START
-        PUSH    0,GR1
-        PUSH    0,GR2
-        LD      GR2,LEN         ; GR2にLENの値をロード
-        ST      GR1,STR,GR2     ; STR+GR2 <- GR1
-        LAD     GR2,1,GR2       ; GR2 <- GR2 + 1
-        ST      GR2,LEN         ; LENにGR2を格納
-        POP     GR2
-        POP     GR1
-        RET
-        END
-;;; GR1の値とGR2の値の、商をGR0、剰余をGR3に格納する
-;;; 0〜65535の範囲の数値を扱う
-ODIVL   START
-        PUSH    0,GR1
-        AND     GR2,GR2         ; (GR2 = 0)の場合、ODYZへジャンプ
-        JZE     ODYZ            ; ↓
-        LAD     GR0,0           ; GR0を初期化
-        LD      GR3,GR1         ; GR3 <- GR1
-ODLOOP  CPL     GR3,GR2         ; ループ先頭。(GR3 < GR2)の場合、終了
-        JMI     ODFIN           ; ↓
-        SUBL    GR3,GR2         ; GR3 <- GR3 - GR2
-        ADDL    GR0,ODONE       ; ↓
-        JUMP    ODLOOP          ; ループ終端
-ODYZ    LAD     GR3,#FFFF       ; 強制的にオーバーフローを発生させ、GR3 <- 0
-        ADDL    GR3,=1          ; ↓
-        JUMP    ODFIN           ; ODFINへジャンプ
-ODFIN   POP     GR1
-        RET
-ODONE   DC      1        
-        END
-;; アドレスがGR1、長さがGR2の文字列を逆順に並べ替える
-;; 例: 12345 -> 54321、54321- -> -12345
-REV     START
-        RPUSH
-        LAD     GR3,0           ; GR3の初期化
-RPU     CPL     GR3,GR2         ; ループ先頭。(GR3 = GR2)の場合、ループ脱出
-        JZE     RNEXT           ; ↓
-        LD      GR4,GR1         ; GR4にGR1の値をコピー
-        ADDL    GR4,GR3         ; GR4 <- GR4 + GR3
-        LD      GR5,0,GR4       ; GR5にアドレスGR4の値を格納
-        PUSH    0,GR5           ; GR5をプッシュ
-        LAD     GR3,1,GR3       ; GR3 <- GR3 + 1
-        JUMP    RPU             ; ループ終端
-RNEXT   LAD     GR3,0           ; GR3の初期化
-RPO     CPL     GR3,GR2         ; ループ先頭。(GR3 = GR2)の場合、ループ脱出
-        JZE     RFIN            ; ↓
-        POP     GR5             ; GR5にポップ
-        LD      GR4,GR1         ; GR4にGR1の値をコピー
-        ADDL    GR4,GR3         ; GR4 <- GR4 + GR3
-        ST      GR5,0,GR4       ; アドレスGR4にGR5の値を格納
-        LAD     GR3,1,GR3       ; GR3 <- GR3 + 1
-        JUMP    RPO             ; ループ終端
-RFIN    RPOP
-        RET
-        END
-;; GR1の値を絶対値に変換する。GR1にはマイナスの数値が格納されていると想定。
-;; 例: -10 -> 10, -20 -> 20
-OABS    START
-        XOR     GR1,=#FFFF      ; GR1の値を反転
-        LAD     GR1,1,GR1       ; GR1 <- GR1 + 1
-        RET
-        END
diff --git a/as/FUNC/sum.casl b/as/FUNC/sum.casl
deleted file mode 100644 (file)
index b9bfe11..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-;;; sum.casl
-;;; 入力 GR1: 1以上の正数
-;;; 出力 GR2: 1からGR1で指定された値までの正数をすべて加算した値。
-;;;           オーバーフローした場合は、#FFFF
-SUM     START
-        LAD     GR2,0
-        LAD     GR3,1
-LOOP    CPL     GR3,GR1
-        JPL     FIN
-        ADDL    GR2,GR3
-        JOV     OV
-        LAD     GR3,1,GR3
-        JUMP    LOOP
-OV      LAD     GR2,#FFFF
-FIN     RET
-        END
diff --git a/as/casl2lib/BUILD.mk b/as/casl2lib/BUILD.mk
new file mode 100644 (file)
index 0000000..392dc06
--- /dev/null
@@ -0,0 +1,6 @@
+.PHONY: clean
+
+$(TARGET): $(SRCFILE)
+       @cat $^ >$@
+clean:
+       @rm $(TARGET)
diff --git a/as/casl2lib/Makefile b/as/casl2lib/Makefile
new file mode 100644 (file)
index 0000000..74da775
--- /dev/null
@@ -0,0 +1,6 @@
+SRCDIR = `ls -d *src`
+.PHONY: all clean
+all:
+       @for target in $(SRCDIR); do $(MAKE) -C $$target; done
+clean:
+       @for target in $(SRCDIR); do $(MAKE) -C $$target clean; done
similarity index 100%
rename from as/FUNC/abs.casl
rename to as/casl2lib/abs.casl
diff --git a/as/casl2lib/addl32.casl b/as/casl2lib/addl32.casl
new file mode 100644 (file)
index 0000000..1282e78
--- /dev/null
@@ -0,0 +1,43 @@
+;;; 2つの32ビット数値を加算する
+;;; 32ビットの値は、連続する2語の領域に格納
+;;; 入力 GR1:数値1の先頭アドレス GR2:数値2の先頭アドレス
+;;; 出力 GR0:和の先頭アドレス
+ADDL32  START
+        RPUSH
+        ST      GR1,X           ; X <- GR1:数値1
+        ST      GR2,Y           ; Y <- GR2:数値2
+        LD      GR3,LEN         ; GR3:語を表すインデックス 初期化
+        XOR     GR4,GR4         ; GR4:キャリー値 初期化
+        LAD     GR3,-1,GR3      ; ↓
+LOOP    AND     GR3,GR3         ; ループ先頭。(GR3 = 0)の場合は、ループ脱出
+        JMI     FIN             ; ↓
+        LD      GR1,X           ; GR1 <- (X + GR3)の値
+        ADDL    GR1,GR3         ; ↓
+        LD      GR1,0,GR1       ; ↓
+        LD      GR2,Y           ; GR2 <- (Y + GR3)の値
+        ADDL    GR2,GR3         ; ↓
+        LD      GR2,0,GR2       ; ↓
+        ADDL    GR1,GR2         ; GR1 <- GR1 + GR2
+        JOV     CRRY            ; オーバーフロー時は、CRRYへジャンプ
+        ADDL    GR1,GR4         ; GR1 <- GR1 + GR4
+        JOV     CRRY            ; オーバーフロー時は、CRRYへジャンプ
+        ST      GR1,A,GR3       ; (A + GR3) <- GR1
+        LAD     GR3,-1,GR3      ; GR3 <- GR3 - 1
+        XOR     GR4,GR4         ; GR4 <- 0
+        JUMP    LOOP            ; ループ先頭へジャンプ
+CRRY    AND     GR3,GR3         ; 最上位の語でオーバーフローした場合、OVへジャンプ
+        JMI     OV              ; ↓
+        ST      GR1,A,GR3       ; (A + GR3) <- GR1
+        LAD     GR3,-1,GR3      ; GR3 <- GR3 - 1
+        LAD     GR4,1           ; GR4 <- 1
+        JUMP    LOOP            ; ループ終端
+OV      LAD     GR3,=#8000      ; 強制的にオーバーフロー発生
+        SLL     GR3,1           ; ↓
+FIN     LAD     GR0,A           ; GR0 <- A
+        RPOP
+        RET
+X       DS      1               ; 数値1のアドレス
+Y       DS      1               ; 数値2のアドレス
+A       DS      2               ; 和
+LEN     DC      2               ; 数値の語数
+        END
diff --git a/as/casl2lib/diva.casl b/as/casl2lib/diva.casl
new file mode 100644 (file)
index 0000000..eb87331
--- /dev/null
@@ -0,0 +1,7 @@
+;;; -32767〜32767の範囲にある整数の割算(筆算方式)を行う
+;;; 入力 GR1:被除数 GR2:除数
+;;; 出力 GR0:商 GR3:剰余
+;;; GR2が0の場合は、GR0、GR3とも0になり、オーバーフロー
+DIVL    START
+        RET
+        END
similarity index 84%
rename from as/FUNC/divl1.casl
rename to as/casl2lib/divl.casl
index 9fd2fab..3591366 100644 (file)
@@ -1,17 +1,19 @@
 ;;; 0〜65535の範囲にある正数の割算(筆算方式)を行う
 ;;; 入力 GR1:被除数 GR2:除数
 ;;; 出力 GR0:商 GR3:剰余
-;;; GR2が0の場合は、GR0、GR3とも0になり、オーバーフロー
+;;; (GR2 = 0)の場合、GR0 GR3とも0になり、オーバーフロー
 DIVL    START
         PUSH    0,GR1
         PUSH    0,GR2
         PUSH    0,GR4
+        XOR     GR0,GR0         ; GR0:商 初期化
+        XOR     GR3,GR3         ; GR3:剰余 初期化
         AND     GR2,GR2         ; (GR2 = 0)の場合、DIVZEROへジャンプ
         JZE     DIVZERO         ; ↓
+        AND     GR1,GR1         ; (GR1 = 0)の場合、FINへジャンプ
+        JZE     FIN             ; ↓
         ST      GR2,Y           ; YにGR2の初期値を保存
-        XOR     GR0,GR0         ; GR0の初期化
-        XOR     GR3,GR3         ; GR3の初期化
-        LAD     GR4,1           ; GR4の初期化。対象ビットを表す
+        LAD     GR4,1           ; GR4:対象ビットのインデックス 初期化
 SL      CPL     GR2,GR1         ; ループ先頭。(GR2 > GR1)の場合、LOOPへループ脱出
         JPL     LOOP            ; ↓
         SLL     GR4,1           ; GR4を1回左シフト
diff --git a/as/casl2lib/inl.casl b/as/casl2lib/inl.casl
new file mode 100644 (file)
index 0000000..0584e5f
--- /dev/null
@@ -0,0 +1,82 @@
+;;; 数値の入力を受け付ける
+;;; 入力 (SVC)
+;;; 出力 GR1: 入力された数値 GR0: 文字の長さ
+INL     START
+        PUSH    0,GR2
+        PUSH    0,GR3
+        PUSH    0,GR4
+        IN      IBUF,ILEN       ; 入力文字列を格納
+        LD      GR0,ILEN        ; ILEN = 0の場合、FINへジャンプ
+        JZE     FIN             ; ↓
+        XOR     GR1,GR1         ; GR1:各桁の数値 初期化
+        LAD     GR2,10          ; GR2:10進数の「10」 初期化
+        LAD     GR3,0           ; GR3:値の一時格納 初期化
+        LAD     GR4,0           ; GR4:インデックス 初期化
+STOL    CPL     GR4,ILEN        ; ループ先頭。(GR4 = ILEN)の場合、ループ脱出
+        JZE     CP              ; ↓
+        LD      GR1,IBUF,GR4    ; GR1に、入力文字列中の次の桁を格納
+        CPL     GR1,ZERO        ; (GR1 < '0')の場合、IOVへジャンプ
+        JMI     OV              ; ↓
+        CPL     GR1,NINE        ; (GR1 > '9')の場合、IOVへジャンプ
+        JPL     OV              ; ↓
+        SUBL    GR1,ZERO        ; GR1の文字を、対応する数値に変換
+        ST      GR4,NLEN        ; GR4 <- ILEN - NLEN - 1
+        LD      GR4,ILEN        ; ↓
+        SUBA    GR4,NLEN        ; ↓
+MUL10   CPA     GR4,=1          ; ループ先頭。GR1 <- 10 ** GR4
+        JZE     NEXT            ; (GR4 = 1)の場合、ループ脱出
+        JMI     NEXT            ; ↓
+        CALL    MULL            ; MULLを呼び出し、GR0 <- GR1 * GR2
+        LD      GR1,GR0         ; GR1 <- GR0
+        LAD     GR4,-1,GR4      ; GR4 <- GR4 -1
+        JUMP    MUL10           ; ループ終端
+NEXT    LD      GR4,NLEN        ; GR4 <- NLEN。復元
+        ADDL    GR3,GR1         ; GR3 <- GR3 + GR1
+        LAD     GR4,1,GR4       ; GR4 <- GR4 + 1
+        JUMP    STOL            ; ループ終端
+OV      LAD     GR0,#8000       ; GR0 <- 0。オーバーフローを強制的に発生させる
+        SLL     GR0,1           ; ↓
+        JUMP    FIN             ; FINへジャンプ
+CP      LD      GR1,GR3         ; GR0 <- GR3
+        LD      GR0,ILEN        ; GR0 <- ILEN
+FIN     POP     GR4
+        POP     GR3
+        POP     GR2
+        RET
+ZERO    DC      '0'
+NINE    DC      '9'
+IBUF    DS      5
+ILEN    DS      1
+NLEN    DS      1
+        END
+;;; 0〜65535の範囲にある正数のかけ算(筆算方式)を行う
+;;; 入力 GR1:被乗数 GR2:乗数
+;;; 出力 GR0:積
+;;; 積が65535より大きい場合は、GR0は積の下位16ビットになり、オーバーフロー
+MULL    START
+        PUSH    0,GR1
+        PUSH    0,GR3
+        XOR     GR0,GR0         ; 積
+        AND     GR1,GR1         ; (GR1 = 0)の場合、終了
+        JZE     FIN             ; ↓
+        AND     GR2,GR2         ; (GR2 = 0)の場合、終了
+        JZE     FIN             ; ↓
+        LAD     GR3,1           ; 対象ビット
+LOOP    PUSH    0,GR3           ; ループ先頭。GR2のビット中でGR3が示すビットが0の場合、NEXTへジャンプ
+        AND     GR3,GR2         ; ↓
+        POP     GR3             ; ↓
+        JZE     NEXT            ; ↓
+        ADDL    GR0,GR1         ; GR0 <- GR0 + GR1
+        JOV     FIN             ; GR0がオーバーフローした場合、ループ脱出
+NEXT    SLL     GR3,1           ; GR3を1回左シフト
+        AND     GR3,GR3         ; (GR3 = 0)の場合、ループ脱出
+        JZE     FIN             ; ↓
+        CPL     GR3,GR2         ; (GR3 > GR2)の場合、ループ脱出
+        JPL     FIN             ; ↓
+        SLL     GR1,1           ; GR1を1回左シフト
+        JOV     FIN             ; GR1がオーバーフローした場合、ループ脱出
+        JUMP    LOOP            ; ループ終端
+FIN     POP     GR3
+        POP     GR1
+        RET
+        END
diff --git a/as/casl2lib/inl_src/Makefile b/as/casl2lib/inl_src/Makefile
new file mode 100644 (file)
index 0000000..20a23ff
--- /dev/null
@@ -0,0 +1,3 @@
+TARGET = ../inl.casl
+SRCFILE = inl_main.casl ../mull.casl
+include ../BUILD.mk
diff --git a/as/casl2lib/inl_src/inl_main.casl b/as/casl2lib/inl_src/inl_main.casl
new file mode 100644 (file)
index 0000000..f40a303
--- /dev/null
@@ -0,0 +1,51 @@
+;;; 数値の入力を受け付ける
+;;; 入力 (SVC)
+;;; 出力 GR1: 入力された数値 GR0: 文字の長さ
+INL     START
+        PUSH    0,GR2
+        PUSH    0,GR3
+        PUSH    0,GR4
+        IN      IBUF,ILEN       ; 入力文字列を格納
+        LD      GR0,ILEN        ; ILEN = 0の場合、FINへジャンプ
+        JZE     FIN             ; ↓
+        XOR     GR1,GR1         ; GR1:各桁の数値 初期化
+        LAD     GR2,10          ; GR2:10進数の「10」 初期化
+        LAD     GR3,0           ; GR3:値の一時格納 初期化
+        LAD     GR4,0           ; GR4:インデックス 初期化
+STOL    CPL     GR4,ILEN        ; ループ先頭。(GR4 = ILEN)の場合、ループ脱出
+        JZE     CP              ; ↓
+        LD      GR1,IBUF,GR4    ; GR1に、入力文字列中の次の桁を格納
+        CPL     GR1,ZERO        ; (GR1 < '0')の場合、IOVへジャンプ
+        JMI     OV              ; ↓
+        CPL     GR1,NINE        ; (GR1 > '9')の場合、IOVへジャンプ
+        JPL     OV              ; ↓
+        SUBL    GR1,ZERO        ; GR1の文字を、対応する数値に変換
+        ST      GR4,NLEN        ; GR4 <- ILEN - NLEN - 1
+        LD      GR4,ILEN        ; ↓
+        SUBA    GR4,NLEN        ; ↓
+MUL10   CPA     GR4,=1          ; ループ先頭。GR1 <- 10 ** GR4
+        JZE     NEXT            ; (GR4 = 1)の場合、ループ脱出
+        JMI     NEXT            ; ↓
+        CALL    MULL            ; MULLを呼び出し、GR0 <- GR1 * GR2
+        LD      GR1,GR0         ; GR1 <- GR0
+        LAD     GR4,-1,GR4      ; GR4 <- GR4 -1
+        JUMP    MUL10           ; ループ終端
+NEXT    LD      GR4,NLEN        ; GR4 <- NLEN。復元
+        ADDL    GR3,GR1         ; GR3 <- GR3 + GR1
+        LAD     GR4,1,GR4       ; GR4 <- GR4 + 1
+        JUMP    STOL            ; ループ終端
+OV      LAD     GR0,#8000       ; GR0 <- 0。オーバーフローを強制的に発生させる
+        SLL     GR0,1           ; ↓
+        JUMP    FIN             ; FINへジャンプ
+CP      LD      GR1,GR3         ; GR0 <- GR3
+        LD      GR0,ILEN        ; GR0 <- ILEN
+FIN     POP     GR4
+        POP     GR3
+        POP     GR2
+        RET
+ZERO    DC      '0'
+NINE    DC      '9'
+IBUF    DS      5
+ILEN    DS      1
+NLEN    DS      1
+        END
diff --git a/as/casl2lib/minim.casl b/as/casl2lib/minim.casl
new file mode 100644 (file)
index 0000000..83d973f
--- /dev/null
@@ -0,0 +1,23 @@
+;;; 複数のWORD値の中から、最小値を返す
+;;; 入力: GR1: WORD値を格納したアドレス GR2: 値の個数
+;;; 出力: GR0: 最小値
+MINIM   START
+        RPUSH
+        LD      GR0,0,GR1       ; MIN <- GR1アドレスの値
+        ST      GR0,MIN         ; ↓
+        LAD     GR3,0           ; GR3:インデックス 初期化
+S1      CPA     GR3,GR2         ; ループ先頭。(GR2 = GR3)の場合、終了
+        JZE     RET             ; ↓
+        LAD     GR1,1,GR1       ; GR1 <- GR1 + 1
+        LD      GR0,0,GR1       ;
+        CPA     GR0,MIN         ;
+        JPL     S2              ;
+        JZE     S2              ;
+        ST      GR0,MIN         ;
+S2      LAD     GR3,1,GR3       ;
+        JUMP    S1              ;
+RET     LD      GR0,MIN         ;
+        RPOP
+        RET
+MIN     DS      1               ; 最小値を格納
+        END
diff --git a/as/casl2lib/mula_src/Makefile b/as/casl2lib/mula_src/Makefile
new file mode 100644 (file)
index 0000000..ab620ae
--- /dev/null
@@ -0,0 +1,3 @@
+TARGET = ../mula.casl
+SRCFILE = mula_main.casl ../mull.casl
+include ../BUILD.mk
similarity index 100%
rename from as/FUNC/mull1.casl
rename to as/casl2lib/mull.casl
similarity index 85%
rename from as/FUNC/outa.casl
rename to as/casl2lib/outa.casl
index f902b4f..3f7793d 100644 (file)
@@ -45,17 +45,19 @@ NCHAR   DC      '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 ;;; 0〜65535の範囲にある正数の割算(筆算方式)を行う
 ;;; 入力 GR1:被除数 GR2:除数
 ;;; 出力 GR0:商 GR3:剰余
-;;; GR2が0の場合は、GR0、GR3とも0になり、オーバーフロー
+;;; (GR2 = 0)の場合、GR0 GR3とも0になり、オーバーフロー
 DIVL    START
         PUSH    0,GR1
         PUSH    0,GR2
         PUSH    0,GR4
+        XOR     GR0,GR0         ; GR0:商 初期化
+        XOR     GR3,GR3         ; GR3:剰余 初期化
         AND     GR2,GR2         ; (GR2 = 0)の場合、DIVZEROへジャンプ
         JZE     DIVZERO         ; ↓
+        AND     GR1,GR1         ; (GR1 = 0)の場合、FINへジャンプ
+        JZE     FIN             ; ↓
         ST      GR2,Y           ; YにGR2の初期値を保存
-        LAD     GR0,0           ; GR0の初期化
-        LAD     GR3,0           ; GR3の初期化
-        LAD     GR4,1           ; GR4の初期化。対象ビットを表す
+        LAD     GR4,1           ; GR4:対象ビットのインデックス 初期化
 SL      CPL     GR2,GR1         ; ループ先頭。(GR2 > GR1)の場合、LOOPへループ脱出
         JPL     LOOP            ; ↓
         SLL     GR4,1           ; GR4を1回左シフト
@@ -79,7 +81,7 @@ LPIN    SUBL    GR1,GR2         ; GR1 <- GR1 - GR2
 DIVZERO LAD     GR3,#8000       ; 強制的にオーバーフローを発生させ、GR3 <- 0
         SLL     GR3,1           ; ↓
         JUMP    FIN             ; FIN へジャンプ
-SETMOD  LD      GR3,GR1
+SETMOD  LD      GR3,GR1         ; GR3 <- GR1。剰余の設定
 FIN     POP     GR4
         POP     GR2
         POP     GR1
@@ -87,16 +89,18 @@ FIN     POP     GR4
 Y       DS      1
 TMP     DS      1
         END
-;; アドレスがGR1、長さがGR2の文字列を逆順に並べ替える
-;; 例: 12345 -> 54321、54321- -> -12345
+;;; メモリー上にある指定されたアドレス、長さの文字列を逆順に並べ替える
+;;;     例: 12345 -> 54321、54321- -> -12345
+;;; 入力 GR1:文字列のアドレス GR2:文字列の長さ
+;;; 出力 (同上)
 REV     START
         RPUSH
         LAD     GR3,0           ; GR3の初期化
 PU      CPL     GR3,GR2         ; ループ先頭。(GR3 = GR2)の場合、ループ脱出
         JZE     NEXT            ; ↓
-        LD      GR4,GR1         ; GR4にGR1の値をコピー
+        LD      GR4,GR1         ; GR4 <- GR1
         ADDL    GR4,GR3         ; GR4 <- GR4 + GR3
-        LD      GR5,0,GR4       ; GR5にアドレスGR4の値を格納
+        LD      GR5,0,GR4       ; GR5 <- GR4アドレスの値
         PUSH    0,GR5           ; GR5をプッシュ
         LAD     GR3,1,GR3       ; GR3 <- GR3 + 1
         JUMP    PU              ; ループ終端
@@ -106,18 +110,9 @@ PO      CPL     GR3,GR2         ; ループ先頭。(GR3 = GR2)の場合、ル
         POP     GR5             ; GR5にポップ
         LD      GR4,GR1         ; GR4にGR1の値をコピー
         ADDL    GR4,GR3         ; GR4 <- GR4 + GR3
-        ST      GR5,0,GR4       ; アドレスGR4にGR5の値を格納
+        ST      GR5,0,GR4       ; GR4のアドレス <- GR5の値
         LAD     GR3,1,GR3       ; GR3 <- GR3 + 1
         JUMP    PO              ; ループ終端
 FIN     RPOP
         RET
         END
-;;; GR1を絶対値に変換する
-ABS     START
-        AND     GR1,GR1
-        JPL     FIN
-        JZE     FIN
-        XOR     GR1,=#FFFF
-        ADDA    GR1,=1
-FIN     RET
-        END
diff --git a/as/casl2lib/outa_src/Makefile b/as/casl2lib/outa_src/Makefile
new file mode 100644 (file)
index 0000000..259e059
--- /dev/null
@@ -0,0 +1,3 @@
+TARGET = ../outa.casl
+SRCFILE = outa_main.casl ../divl.casl ../rev.casl
+include ../BUILD.mk
similarity index 85%
rename from as/FUNC/outb.casl
rename to as/casl2lib/outb.casl
index 7d429e6..6b1d274 100644 (file)
@@ -43,17 +43,19 @@ DIG     DC      16
 ;;; 0〜65535の範囲にある正数の割算(筆算方式)を行う
 ;;; 入力 GR1:被除数 GR2:除数
 ;;; 出力 GR0:商 GR3:剰余
-;;; GR2が0の場合は、GR0、GR3とも0になり、オーバーフロー
+;;; (GR2 = 0)の場合、GR0 GR3とも0になり、オーバーフロー
 DIVL    START
         PUSH    0,GR1
         PUSH    0,GR2
         PUSH    0,GR4
+        XOR     GR0,GR0         ; GR0:商 初期化
+        XOR     GR3,GR3         ; GR3:剰余 初期化
         AND     GR2,GR2         ; (GR2 = 0)の場合、DIVZEROへジャンプ
         JZE     DIVZERO         ; ↓
+        AND     GR1,GR1         ; (GR1 = 0)の場合、FINへジャンプ
+        JZE     FIN             ; ↓
         ST      GR2,Y           ; YにGR2の初期値を保存
-        LAD     GR0,0           ; GR0の初期化
-        LAD     GR3,0           ; GR3の初期化
-        LAD     GR4,1           ; GR4の初期化。対象ビットを表す
+        LAD     GR4,1           ; GR4:対象ビットのインデックス 初期化
 SL      CPL     GR2,GR1         ; ループ先頭。(GR2 > GR1)の場合、LOOPへループ脱出
         JPL     LOOP            ; ↓
         SLL     GR4,1           ; GR4を1回左シフト
@@ -77,7 +79,7 @@ LPIN    SUBL    GR1,GR2         ; GR1 <- GR1 - GR2
 DIVZERO LAD     GR3,#8000       ; 強制的にオーバーフローを発生させ、GR3 <- 0
         SLL     GR3,1           ; ↓
         JUMP    FIN             ; FIN へジャンプ
-SETMOD  LD      GR3,GR1
+SETMOD  LD      GR3,GR1         ; GR3 <- GR1。剰余の設定
 FIN     POP     GR4
         POP     GR2
         POP     GR1
@@ -85,16 +87,18 @@ FIN     POP     GR4
 Y       DS      1
 TMP     DS      1
         END
-;; アドレスがGR1、長さがGR2の文字列を逆順に並べ替える
-;; 例: 12345 -> 54321、54321- -> -12345
+;;; メモリー上にある指定されたアドレス、長さの文字列を逆順に並べ替える
+;;;     例: 12345 -> 54321、54321- -> -12345
+;;; 入力 GR1:文字列のアドレス GR2:文字列の長さ
+;;; 出力 (同上)
 REV     START
         RPUSH
         LAD     GR3,0           ; GR3の初期化
 PU      CPL     GR3,GR2         ; ループ先頭。(GR3 = GR2)の場合、ループ脱出
         JZE     NEXT            ; ↓
-        LD      GR4,GR1         ; GR4にGR1の値をコピー
+        LD      GR4,GR1         ; GR4 <- GR1
         ADDL    GR4,GR3         ; GR4 <- GR4 + GR3
-        LD      GR5,0,GR4       ; GR5にアドレスGR4の値を格納
+        LD      GR5,0,GR4       ; GR5 <- GR4アドレスの値
         PUSH    0,GR5           ; GR5をプッシュ
         LAD     GR3,1,GR3       ; GR3 <- GR3 + 1
         JUMP    PU              ; ループ終端
@@ -104,7 +108,7 @@ PO      CPL     GR3,GR2         ; ループ先頭。(GR3 = GR2)の場合、ル
         POP     GR5             ; GR5にポップ
         LD      GR4,GR1         ; GR4にGR1の値をコピー
         ADDL    GR4,GR3         ; GR4 <- GR4 + GR3
-        ST      GR5,0,GR4       ; アドレスGR4にGR5の値を格納
+        ST      GR5,0,GR4       ; GR4のアドレス <- GR5の値
         LAD     GR3,1,GR3       ; GR3 <- GR3 + 1
         JUMP    PO              ; ループ終端
 FIN     RPOP
diff --git a/as/casl2lib/outb_src/Makefile b/as/casl2lib/outb_src/Makefile
new file mode 100644 (file)
index 0000000..4daa88c
--- /dev/null
@@ -0,0 +1,3 @@
+TARGET = ../outb.casl
+SRCFILE = outb_main.casl ../divl.casl ../rev.casl
+include ../BUILD.mk
similarity index 84%
rename from as/FUNC/outl.casl
rename to as/casl2lib/outl.casl
index ea419c0..a7a6d15 100644 (file)
@@ -36,17 +36,19 @@ NCHAR   DC      '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 ;;; 0〜65535の範囲にある正数の割算(筆算方式)を行う
 ;;; 入力 GR1:被除数 GR2:除数
 ;;; 出力 GR0:商 GR3:剰余
-;;; GR2が0の場合は、GR0、GR3とも0になり、オーバーフロー
+;;; (GR2 = 0)の場合、GR0 GR3とも0になり、オーバーフロー
 DIVL    START
         PUSH    0,GR1
         PUSH    0,GR2
         PUSH    0,GR4
+        XOR     GR0,GR0         ; GR0:商 初期化
+        XOR     GR3,GR3         ; GR3:剰余 初期化
         AND     GR2,GR2         ; (GR2 = 0)の場合、DIVZEROへジャンプ
         JZE     DIVZERO         ; ↓
+        AND     GR1,GR1         ; (GR1 = 0)の場合、FINへジャンプ
+        JZE     FIN             ; ↓
         ST      GR2,Y           ; YにGR2の初期値を保存
-        LAD     GR0,0           ; GR0の初期化
-        LAD     GR3,0           ; GR3の初期化
-        LAD     GR4,1           ; GR4の初期化。対象ビットを表す
+        LAD     GR4,1           ; GR4:対象ビットのインデックス 初期化
 SL      CPL     GR2,GR1         ; ループ先頭。(GR2 > GR1)の場合、LOOPへループ脱出
         JPL     LOOP            ; ↓
         SLL     GR4,1           ; GR4を1回左シフト
@@ -70,7 +72,7 @@ LPIN    SUBL    GR1,GR2         ; GR1 <- GR1 - GR2
 DIVZERO LAD     GR3,#8000       ; 強制的にオーバーフローを発生させ、GR3 <- 0
         SLL     GR3,1           ; ↓
         JUMP    FIN             ; FIN へジャンプ
-SETMOD  LD      GR3,GR1
+SETMOD  LD      GR3,GR1         ; GR3 <- GR1。剰余の設定
 FIN     POP     GR4
         POP     GR2
         POP     GR1
@@ -78,16 +80,18 @@ FIN     POP     GR4
 Y       DS      1
 TMP     DS      1
         END
-;; アドレスがGR1、長さがGR2の文字列を逆順に並べ替える
-;; 例: 12345 -> 54321、54321- -> -12345
+;;; メモリー上にある指定されたアドレス、長さの文字列を逆順に並べ替える
+;;;     例: 12345 -> 54321、54321- -> -12345
+;;; 入力 GR1:文字列のアドレス GR2:文字列の長さ
+;;; 出力 (同上)
 REV     START
         RPUSH
         LAD     GR3,0           ; GR3の初期化
 PU      CPL     GR3,GR2         ; ループ先頭。(GR3 = GR2)の場合、ループ脱出
         JZE     NEXT            ; ↓
-        LD      GR4,GR1         ; GR4にGR1の値をコピー
+        LD      GR4,GR1         ; GR4 <- GR1
         ADDL    GR4,GR3         ; GR4 <- GR4 + GR3
-        LD      GR5,0,GR4       ; GR5にアドレスGR4の値を格納
+        LD      GR5,0,GR4       ; GR5 <- GR4アドレスの値
         PUSH    0,GR5           ; GR5をプッシュ
         LAD     GR3,1,GR3       ; GR3 <- GR3 + 1
         JUMP    PU              ; ループ終端
@@ -97,7 +101,7 @@ PO      CPL     GR3,GR2         ; ループ先頭。(GR3 = GR2)の場合、ル
         POP     GR5             ; GR5にポップ
         LD      GR4,GR1         ; GR4にGR1の値をコピー
         ADDL    GR4,GR3         ; GR4 <- GR4 + GR3
-        ST      GR5,0,GR4       ; アドレスGR4にGR5の値を格納
+        ST      GR5,0,GR4       ; GR4のアドレス <- GR5の値
         LAD     GR3,1,GR3       ; GR3 <- GR3 + 1
         JUMP    PO              ; ループ終端
 FIN     RPOP
diff --git a/as/casl2lib/outl_src/Makefile b/as/casl2lib/outl_src/Makefile
new file mode 100644 (file)
index 0000000..2c75dcb
--- /dev/null
@@ -0,0 +1,3 @@
+TARGET = ../outl.casl
+SRCFILE = outl_main.casl ../divl.casl ../rev.casl
+include ../BUILD.mk
similarity index 68%
rename from as/FUNC/rev.casl
rename to as/casl2lib/rev.casl
index 8674381..397c5c4 100644 (file)
@@ -1,13 +1,15 @@
-;; アドレスがGR1、長さがGR2の文字列を逆順に並べ替える
-;; 例: 12345 -> 54321、54321- -> -12345
+;;; メモリー上にある指定されたアドレス、長さの文字列を逆順に並べ替える
+;;;     例: 12345 -> 54321、54321- -> -12345
+;;; 入力 GR1:文字列のアドレス GR2:文字列の長さ
+;;; 出力 (同上)
 REV     START
         RPUSH
         LAD     GR3,0           ; GR3の初期化
 PU      CPL     GR3,GR2         ; ループ先頭。(GR3 = GR2)の場合、ループ脱出
         JZE     NEXT            ; ↓
-        LD      GR4,GR1         ; GR4にGR1の値をコピー
+        LD      GR4,GR1         ; GR4 <- GR1
         ADDL    GR4,GR3         ; GR4 <- GR4 + GR3
-        LD      GR5,0,GR4       ; GR5にアドレスGR4の値を格納
+        LD      GR5,0,GR4       ; GR5 <- GR4アドレスの値
         PUSH    0,GR5           ; GR5をプッシュ
         LAD     GR3,1,GR3       ; GR3 <- GR3 + 1
         JUMP    PU              ; ループ終端
@@ -17,7 +19,7 @@ PO      CPL     GR3,GR2         ; ループ先頭。(GR3 = GR2)の場合、ル
         POP     GR5             ; GR5にポップ
         LD      GR4,GR1         ; GR4にGR1の値をコピー
         ADDL    GR4,GR3         ; GR4 <- GR4 + GR3
-        ST      GR5,0,GR4       ; アドレスGR4にGR5の値を格納
+        ST      GR5,0,GR4       ; GR4のアドレス <- GR5の値
         LAD     GR3,1,GR3       ; GR3 <- GR3 + 1
         JUMP    PO              ; ループ終端
 FIN     RPOP
diff --git a/as/casl2lib_driver/addl32.casl b/as/casl2lib_driver/addl32.casl
new file mode 100644 (file)
index 0000000..6072b8b
--- /dev/null
@@ -0,0 +1,13 @@
+MAIN    START
+        LAD     GR1,A
+        LAD     GR2,B
+        CALL    ADDL32
+        LD      GR2,GR0
+        LD      GR1,1,GR2
+        CALL    OUTL
+        LD      GR1,0,GR2
+        CALL    OUTL
+        RET
+A       DC      6,10
+B       DC      2,65530
+        END
diff --git a/as/casl2lib_driver/addl32_0.casl b/as/casl2lib_driver/addl32_0.casl
new file mode 100644 (file)
index 0000000..bb8fa0a
--- /dev/null
@@ -0,0 +1,9 @@
+MAIN    START
+        LAD     GR1,A
+        LAD     GR2,B
+        CALL    ADDL32
+        LD      GR2,GR0
+        RET
+A       DC      6,10
+B       DC      2,65530
+        END
similarity index 55%
rename from as/FUNC/divl_call1.casl
rename to as/casl2lib_driver/divl1.casl
index 5b22066..bd84ab3 100644 (file)
@@ -1,7 +1,12 @@
-;;; casl2 div0_call0.casl div0.casl outl.casl
+;;; casl2 divl1.casl ../casl2lib/outl.casl
 MAIN    START
 BEGIN   LD      GR1,X
+        CALL    OUTL
         LD      GR2,Y
+        PUSH    0,GR1
+        LD      GR1,GR2
+        CALL    OUTL
+        POP     GR1
         CALL    DIVL
         LD      GR1,GR0
         CALL    OUTL
@@ -9,5 +14,5 @@ BEGIN   LD      GR1,X
         CALL    OUTL
         RET
 X       DC      123
-Y       DC      10       
+Y       DC      10
         END
diff --git a/as/casl2lib_driver/inl.casl b/as/casl2lib_driver/inl.casl
new file mode 100644 (file)
index 0000000..b24c688
--- /dev/null
@@ -0,0 +1,14 @@
+;;; casl2 inl.casl ../casl2lib/inl.casl ../casl2lib/outl.caslg
+MAIN    START
+LOOP    CALL    INL             ; GR1に数値、GR0に文字列の長さ
+        JOV     NAN
+        AND     GR0,GR0
+        JZE     FIN
+        CALL    OUTL
+        JUMP    LOOP
+NAN     OUT     NANMSG,MLEN
+        JUMP    LOOP
+FIN     RET
+NANMSG  DC      'Not A Number'
+MLEN    DC      12
+        END
similarity index 90%
rename from as/FUNC/sum_call.casl
rename to as/casl2lib_driver/sum_call.casl
index a983623..eea0111 100644 (file)
@@ -3,7 +3,7 @@
 MAIN    START
         LAD     GR1,361
         CALL    SUM
-        LD      GR1,GR2
+        LD      GR1,GR0
         CALL    OUTL
 MFIN    RET
         END
similarity index 58%
rename from as/CMD/xor5.casl
rename to as/cmd/ADDA/adda0.casl
index 0d5e346..7c951b1 100644 (file)
@@ -1,7 +1,8 @@
+;;; ADDA r,adr
 MAIN    START
 BEGIN   LD      GR1,A
-        XOR     GR1,B
+        ADDA    GR1,B
         RET
 A       DC      3
-B       DC      #FFFF
+B       DC      1
         END
diff --git a/as/cmd/ADDA/adda0_aov.casl b/as/cmd/ADDA/adda0_aov.casl
new file mode 100644 (file)
index 0000000..f3144f5
--- /dev/null
@@ -0,0 +1,8 @@
+;;; ADDA r,adr 正数でオーバーフロー
+MAIN    START
+        LD      GR1,A
+        ADDA    GR1,B
+        RET
+A       DC      #7FFE           ; 32766
+B       DC      #000A           ; 10
+        END
diff --git a/as/cmd/ADDA/adda0_az.casl b/as/cmd/ADDA/adda0_az.casl
new file mode 100644 (file)
index 0000000..99e533b
--- /dev/null
@@ -0,0 +1,8 @@
+;;; ADDA r,adr 演算結果が零
+MAIN    START
+        LD      GR1,A
+        ADDA    GR1,B
+        RET
+A       DC      #FFF6           ; -10
+B       DC      10
+        END
diff --git a/as/cmd/ADDA/adda0_lov.casl b/as/cmd/ADDA/adda0_lov.casl
new file mode 100644 (file)
index 0000000..c1f5d74
--- /dev/null
@@ -0,0 +1,8 @@
+;;; ADDA r,adr ADDLではオーバーフロー
+MAIN    START
+        LD      GR1,A
+        ADDA    GR1,B
+        RET
+A       DC      #FFFE           ; -2
+B       DC      #000F           ; 15
+        END
diff --git a/as/cmd/ADDA/adda0_ov.casl b/as/cmd/ADDA/adda0_ov.casl
new file mode 100644 (file)
index 0000000..b5ae906
--- /dev/null
@@ -0,0 +1,8 @@
+;;; ADDA r,adr オーバーフロー
+MAIN    START
+        LD      GR1,A
+        ADDA    GR1,B
+        RET
+A       DC      #8002           ; -32766
+B       DC      #8001           ; -32767
+        END
diff --git a/as/cmd/ADDA/adda0_s0.casl b/as/cmd/ADDA/adda0_s0.casl
new file mode 100644 (file)
index 0000000..36d9bb1
--- /dev/null
@@ -0,0 +1,8 @@
+;;; ADDA r,adr 演算結果が負数(r > adr)
+MAIN    START
+        LD      GR1,A
+        ADDA    GR1,B
+        RET
+A       DC      #000A           ; 10
+B       DC      #FFEC           ; -20
+        END
diff --git a/as/cmd/ADDA/adda0_s1.casl b/as/cmd/ADDA/adda0_s1.casl
new file mode 100644 (file)
index 0000000..52003a3
--- /dev/null
@@ -0,0 +1,8 @@
+;;; ADDA r,adr 演算結果が負数(r < adr)
+MAIN    START
+        LD      GR1,A
+        ADDA    GR1,B
+        RET
+A       DC      #FFEC           ; -20
+B       DC      #000A           ; 10
+        END
diff --git a/as/cmd/ADDA/adda0_z.casl b/as/cmd/ADDA/adda0_z.casl
new file mode 100644 (file)
index 0000000..4397331
--- /dev/null
@@ -0,0 +1,8 @@
+;;; ADDA r,adr 演算結果が零
+MAIN    START
+        LD      GR1,A
+        ADDA    GR1,B
+        RET
+A       DC      0
+B       DC      0
+        END
diff --git a/as/cmd/ADDA/adda1.casl b/as/cmd/ADDA/adda1.casl
new file mode 100644 (file)
index 0000000..023afe6
--- /dev/null
@@ -0,0 +1,9 @@
+;;; ADDA r,adr,x
+MAIN    START
+BEGIN   LD      GR1,A
+        LAD     GR2,1
+        ADDA    GR1,A,GR2
+        RET
+A       DC      3
+        DC      1
+        END
similarity index 90%
rename from as/CMD/adda1.casl
rename to as/cmd/ADDA/adda2.casl
index 6c69581..eee6ad5 100644 (file)
@@ -1,3 +1,4 @@
+;;; ADDA r1,r2
 MAIN    START
 BEGIN   LD      GR1,A
         LD      GR2,B
diff --git a/as/cmd/ADDL/addl0.casl b/as/cmd/ADDL/addl0.casl
new file mode 100644 (file)
index 0000000..f295896
--- /dev/null
@@ -0,0 +1,8 @@
+;;; ADDL r,adr
+MAIN    START
+BEGIN   LD      GR1,A
+        ADDL    GR1,B
+        RET
+A       DC      3
+B       DC      1
+        END
diff --git a/as/cmd/ADDL/addl0_aov.casl b/as/cmd/ADDL/addl0_aov.casl
new file mode 100644 (file)
index 0000000..51d2bd7
--- /dev/null
@@ -0,0 +1,8 @@
+;;; ADDL r,adr ADDAでは正数でオーバーフロー
+MAIN    START
+        LD      GR1,A
+        ADDL    GR1,B
+        RET
+A       DC      #7FFE           ; 32766
+B       DC      #000A           ; 10
+        END
diff --git a/as/cmd/ADDL/addl0_az.casl b/as/cmd/ADDL/addl0_az.casl
new file mode 100644 (file)
index 0000000..aeff1ed
--- /dev/null
@@ -0,0 +1,8 @@
+;;; ADDL r,adr ADDAでは演算結果が零
+MAIN    START
+        LD      GR1,A
+        ADDL    GR1,B
+        RET
+A       DC      #FFF6           ; -10
+B       DC      10
+        END
diff --git a/as/cmd/ADDL/addl0_lov.casl b/as/cmd/ADDL/addl0_lov.casl
new file mode 100644 (file)
index 0000000..e59d44e
--- /dev/null
@@ -0,0 +1,8 @@
+;;; ADDL r,adr ADDLではオーバーフロー
+MAIN    START
+        LD      GR1,A
+        ADDL    GR1,B
+        RET
+A       DC      #FFFE           ; -2
+B       DC      #000F           ; 15
+        END
diff --git a/as/cmd/ADDL/addl0_ov.casl b/as/cmd/ADDL/addl0_ov.casl
new file mode 100644 (file)
index 0000000..1c01d61
--- /dev/null
@@ -0,0 +1,8 @@
+;;; ADDL r,adr オーバーフロー
+MAIN    START
+        LD      GR1,A
+        ADDL    GR1,B
+        RET
+A       DC      #8002           ; 32770
+B       DC      #8001           ; 32769
+        END
diff --git a/as/cmd/ADDL/addl0_s0.casl b/as/cmd/ADDL/addl0_s0.casl
new file mode 100644 (file)
index 0000000..ccf1932
--- /dev/null
@@ -0,0 +1,8 @@
+;;; ADDL r,adr 演算結果が負数(r > adr)
+MAIN    START
+        LD      GR1,A
+        ADDL    GR1,B
+        RET
+A       DC      #000A           ; 10
+B       DC      #FFEC           ; -20
+        END
diff --git a/as/cmd/ADDL/addl0_s1.casl b/as/cmd/ADDL/addl0_s1.casl
new file mode 100644 (file)
index 0000000..0bc77d4
--- /dev/null
@@ -0,0 +1,8 @@
+;;; ADDL r,adr 演算結果が負数(r < adr)
+MAIN    START
+        LD      GR1,A
+        ADDL    GR1,B
+        RET
+A       DC      #FFEC           ; -20
+B       DC      #000A           ; 10
+        END
diff --git a/as/cmd/ADDL/addl0_z.casl b/as/cmd/ADDL/addl0_z.casl
new file mode 100644 (file)
index 0000000..429b776
--- /dev/null
@@ -0,0 +1,8 @@
+;;; ADDL r,adr 演算結果が零
+MAIN    START
+        LD      GR1,A
+        ADDL    GR1,B
+        RET
+A       DC      0
+B       DC      0
+        END
diff --git a/as/cmd/ADDL/addl1.casl b/as/cmd/ADDL/addl1.casl
new file mode 100644 (file)
index 0000000..4ffc8e7
--- /dev/null
@@ -0,0 +1,9 @@
+;;; ADDL r,adr,x
+MAIN    START
+BEGIN   LD      GR1,A
+        LAD     GR2,1
+        ADDL    GR1,A,GR2
+        RET
+A       DC      3
+        DC      1
+        END
diff --git a/as/cmd/ADDL/addl2.casl b/as/cmd/ADDL/addl2.casl
new file mode 100644 (file)
index 0000000..159afa9
--- /dev/null
@@ -0,0 +1,9 @@
+;;; ADDL r1,r2
+MAIN    START
+BEGIN   LD      GR1,A
+        LD      GR2,B
+        ADDL    GR1,GR2
+        RET
+A       DC      3
+B       DC      1
+        END
diff --git a/as/cmd/AND/and0.casl b/as/cmd/AND/and0.casl
new file mode 100644 (file)
index 0000000..b389e00
--- /dev/null
@@ -0,0 +1,8 @@
+;;; AND r,adr
+MAIN    START
+        LD      GR1,A
+        AND     GR1,B
+        RET
+A       DC      #3000
+B       DC      #4FFF
+        END
diff --git a/as/cmd/AND/and0_s.casl b/as/cmd/AND/and0_s.casl
new file mode 100644 (file)
index 0000000..b8aee82
--- /dev/null
@@ -0,0 +1,8 @@
+;;; AND r,adr 演算結果の符号が負
+MAIN    START
+        LD      GR1,A
+        AND     GR1,B
+        RET
+A       DC      #8000
+B       DC      #FFFF
+        END
diff --git a/as/cmd/AND/and0_z.casl b/as/cmd/AND/and0_z.casl
new file mode 100644 (file)
index 0000000..a33e69b
--- /dev/null
@@ -0,0 +1,8 @@
+;;; AND r,adr 演算結果が零
+MAIN    START
+        LD      GR1,A
+        AND     GR1,B
+        RET
+A       DC      #0001
+B       DC      #FFFE
+        END
diff --git a/as/cmd/AND/and1.casl b/as/cmd/AND/and1.casl
new file mode 100644 (file)
index 0000000..abec8ed
--- /dev/null
@@ -0,0 +1,8 @@
+;;; AND r,adr
+MAIN    START
+        LD      GR1,A
+        AND     GR1,1,A
+        RET
+A       DC      #3000
+        DC      #4FFF
+        END
diff --git a/as/cmd/AND/and2.casl b/as/cmd/AND/and2.casl
new file mode 100644 (file)
index 0000000..91ea8cf
--- /dev/null
@@ -0,0 +1,9 @@
+;;; AND r1,r2
+MAIN    START
+        LD      GR1,A
+        LD      GR2,B
+        AND     GR1,GR2
+        RET
+A       DC      #3000
+B       DC      #4FFF
+        END
similarity index 51%
rename from as/CMD/call1.casl
rename to as/cmd/CALL/call0.casl
index f0282ca..ec37f34 100644 (file)
@@ -1,9 +1,8 @@
-MAIN    START   BEGIN
-BEGIN   LD      GR1,=29
+;;; CALL ほかのプログラムの入口名を指定
+        MAIN    START
+        LAD     GR1,29
         CALL    COPY
-        ST      GR2,B
         RET
-B       DS      1
         END
 COPY    START
         LD      GR2,GR1
diff --git a/as/cmd/CALL/call1.casl b/as/cmd/CALL/call1.casl
new file mode 100644 (file)
index 0000000..70f8ae0
--- /dev/null
@@ -0,0 +1,8 @@
+;;; CALL 同じプログラムの中にあるラベルを指定
+MAIN    START   BEGIN
+BEGIN   LAD     GR1,29
+        CALL    COPY
+        RET
+COPY    LD      GR2,GR1
+        RET
+        END
diff --git a/as/cmd/CPA/cpa0.casl b/as/cmd/CPA/cpa0.casl
new file mode 100644 (file)
index 0000000..c3d0a00
--- /dev/null
@@ -0,0 +1,8 @@
+;;; CPA r,adr
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        CPA     GR1,B
+        RET
+A       DC      #5000
+B       DC      #3000
+        END
diff --git a/as/cmd/CPA/cpa0_ls.casl b/as/cmd/CPA/cpa0_ls.casl
new file mode 100644 (file)
index 0000000..d75db3a
--- /dev/null
@@ -0,0 +1,8 @@
+;;; CPA r,adr
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        CPA     GR1,B
+        RET
+A       DC      #5000
+B       DC      #8000
+        END
diff --git a/as/cmd/CPA/cpa0_s.casl b/as/cmd/CPA/cpa0_s.casl
new file mode 100644 (file)
index 0000000..8464ff0
--- /dev/null
@@ -0,0 +1,8 @@
+;;; CPA r,adr SF:1
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        CPA     GR1,B
+        RET
+A       DC      #5000
+B       DC      #7000
+        END
diff --git a/as/cmd/CPA/cpa0_z.casl b/as/cmd/CPA/cpa0_z.casl
new file mode 100644 (file)
index 0000000..020e207
--- /dev/null
@@ -0,0 +1,8 @@
+;;; CPA r,adr ZF:0
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        CPA     GR1,B
+        RET
+A       DC      #5000
+B       DC      #5000
+        END
diff --git a/as/cmd/CPA/cpa1_s.casl b/as/cmd/CPA/cpa1_s.casl
new file mode 100644 (file)
index 0000000..46842b4
--- /dev/null
@@ -0,0 +1,9 @@
+;;; CPA r,adr,x SF:1
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        LAD     GR2,1
+        CPA     GR1,A,GR2
+        RET
+A       DC      #5000
+        DC      #7000
+        END
diff --git a/as/cmd/CPA/cpa2_s.casl b/as/cmd/CPA/cpa2_s.casl
new file mode 100644 (file)
index 0000000..e19efb6
--- /dev/null
@@ -0,0 +1,9 @@
+;;; CPA r1,r2 SF:1
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        LD      GR2,B
+        CPA     GR1,GR2
+        RET
+A       DC      #5000
+B       DC      #7000
+        END
diff --git a/as/cmd/CPL/cpl0.casl b/as/cmd/CPL/cpl0.casl
new file mode 100644 (file)
index 0000000..4f3b5f3
--- /dev/null
@@ -0,0 +1,8 @@
+;;; CPL r,adr
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        CPL     GR1,B
+        RET
+A       DC      #5000
+B       DC      #3000
+        END
diff --git a/as/cmd/CPL/cpl0_ls.casl b/as/cmd/CPL/cpl0_ls.casl
new file mode 100644 (file)
index 0000000..26a102d
--- /dev/null
@@ -0,0 +1,8 @@
+;;; CPL r,adr
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        CPL     GR1,B
+        RET
+A       DC      #5000
+B       DC      #8000
+        END
diff --git a/as/cmd/CPL/cpl0_s.casl b/as/cmd/CPL/cpl0_s.casl
new file mode 100644 (file)
index 0000000..e7027c9
--- /dev/null
@@ -0,0 +1,8 @@
+;;; CPL r,adr SF:1
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        CPL     GR1,B
+        RET
+A       DC      #5000
+B       DC      #7000
+        END
diff --git a/as/cmd/CPL/cpl0_z.casl b/as/cmd/CPL/cpl0_z.casl
new file mode 100644 (file)
index 0000000..3986279
--- /dev/null
@@ -0,0 +1,8 @@
+;;; CPL r,adr ZF:0
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        CPL     GR1,B
+        RET
+A       DC      #5000
+B       DC      #5000
+        END
diff --git a/as/cmd/CPL/cpl1_s.casl b/as/cmd/CPL/cpl1_s.casl
new file mode 100644 (file)
index 0000000..614245b
--- /dev/null
@@ -0,0 +1,9 @@
+;;; CPL r,adr,x SF:1
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        LAD     GR2,1
+        CPL     GR1,A,GR2
+        RET
+A       DC      #5000
+        DC      #7000
+        END
diff --git a/as/cmd/CPL/cpl2_s.casl b/as/cmd/CPL/cpl2_s.casl
new file mode 100644 (file)
index 0000000..e4ce432
--- /dev/null
@@ -0,0 +1,9 @@
+;;; CPL r1,r2 SF:1
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        LD      GR2,B
+        CPL     GR1,GR2
+        RET
+A       DC      #5000
+B       DC      #7000
+        END
diff --git a/as/cmd/DC/dc_c0.casl b/as/cmd/DC/dc_c0.casl
new file mode 100644 (file)
index 0000000..6d6287e
--- /dev/null
@@ -0,0 +1,98 @@
+;; DC 文字定数
+MAIN    START
+        RET
+        DC      ' '
+        DC      '!'
+        DC      '"'
+        DC      '#'
+        DC      '$'
+        DC      '%'
+        DC      '&'
+        DC      ''''
+        DC      '('
+        DC      ')'
+        DC      '*'
+        DC      '+'
+        DC      ','
+        DC      '-'
+        DC      '.'
+        DC      '/'
+        DC      '0'
+        DC      '1'
+        DC      '2'
+        DC      '3'
+        DC      '4'
+        DC      '5'
+        DC      '6'
+        DC      '7'
+        DC      '8'
+        DC      '9'
+        DC      ':'
+        DC      ';'
+        DC      '<'
+        DC      '='
+        DC      '>'
+        DC      '?'
+        DC      '@'
+        DC      'A'
+        DC      'B'
+        DC      'C'
+        DC      'D'
+        DC      'E'
+        DC      'F'
+        DC      'G'
+        DC      'H'
+        DC      'I'
+        DC      'J'
+        DC      'K'
+        DC      'L'
+        DC      'M'
+        DC      'N'
+        DC      'O'
+        DC      'P'
+        DC      'Q'
+        DC      'R'
+        DC      'S'
+        DC      'T'
+        DC      'U'
+        DC      'V'
+        DC      'W'
+        DC      'X'
+        DC      'Y'
+        DC      'Z'
+        DC      '['
+        DC      '\'
+        DC      ']'
+        DC      '^'
+        DC      '_'
+        DC      'a'
+        DC      'b'
+        DC      'c'
+        DC      'd'
+        DC      'e'
+        DC      'f'
+        DC      'g'
+        DC      'h'
+        DC      'i'
+        DC      'j'
+        DC      'k'
+        DC      'l'
+        DC      'm'
+        DC      'n'
+        DC      'o'
+        DC      'p'
+        DC      'q'
+        DC      'r'
+        DC      's'
+        DC      't'
+        DC      'u'
+        DC      'v'
+        DC      'w'
+        DC      'x'
+        DC      'y'
+        DC      'z'
+        DC      '{'
+        DC      '|'
+        DC      '}'
+        DC      '~'
+    END
diff --git a/as/cmd/DC/dc_c1.casl b/as/cmd/DC/dc_c1.casl
new file mode 100644 (file)
index 0000000..7dae71c
--- /dev/null
@@ -0,0 +1,7 @@
+;; DC 文字定数
+MAIN    START
+        RET
+        DC      ' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFG'
+        DC      'GHIJKLMNOPQRSTUVWXYZ[\]^_abcdefghijklmno'
+        DC      'pqrstuvwxyz{|}~'
+        END
diff --git a/as/cmd/DC/dc_i0.casl b/as/cmd/DC/dc_i0.casl
new file mode 100644 (file)
index 0000000..cf8f20c
--- /dev/null
@@ -0,0 +1,27 @@
+;; DC 10進定数/16進定数
+MAIN    START
+        RET
+        DC      0
+        DC      1
+        DC      10
+        DC      32767
+        DC      32768
+        DC      65535
+        DC      65536
+        DC      65537
+        DC      -1
+        DC      -10
+        DC      -32767
+        DC      -32768
+        DC      -32769
+        DC      #0
+        DC      #1
+        DC      #01
+        DC      #001
+        DC      #0001
+        DC      #10
+        DC      #11
+        DC      #F
+        DC      #000F
+        DC      #FFFF
+        END
diff --git a/as/cmd/DC/dc_i1.casl b/as/cmd/DC/dc_i1.casl
new file mode 100644 (file)
index 0000000..c9352bd
--- /dev/null
@@ -0,0 +1,5 @@
+;; DC 10進定数/16進定数
+MAIN    START
+        RET
+        DC      1,10,32767,32768,65535,65536,65537,-1,-10,-32767,-32768,-32769,#0,#1,#01,#001,#0001,#10,#11,#F,#000F,#FFFF
+        END
diff --git a/as/cmd/DC/dc_i_of.casl b/as/cmd/DC/dc_i_of.casl
new file mode 100644 (file)
index 0000000..0b36f5a
--- /dev/null
@@ -0,0 +1,14 @@
+;; DC -32768〜32768の範囲にない10進数値
+MAIN    START
+        RET
+        DC      32767
+        DC      32768
+        DC      65535
+        DC      65536
+        DC      131073          ; 65536 * 2 + 1
+        DC      -32768
+        DC      -32769
+        DC      -65535
+        DC      -65536
+        DC      -131073         ; -65536 * 2 - 1
+        END
similarity index 100%
rename from as/CMD/dc_spc.casl
rename to as/cmd/DC/dc_spc.casl
diff --git a/as/cmd/DS/ds.casl b/as/cmd/DS/ds.casl
new file mode 100644 (file)
index 0000000..39ea1e9
--- /dev/null
@@ -0,0 +1,14 @@
+;;; DS
+MAIN    START
+        LAD     GR1,A
+        LAD     GR1,B
+        LAD     GR1,C
+        LAD     GR1,D
+        LAD     GR1,E
+        RET
+A       DS      1
+B       DS      2
+C       DS      4
+D       DS      0
+E       DC      #FFFF
+        END
similarity index 100%
rename from as/CMD/ds_0.casl
rename to as/cmd/DS/ds_0.casl
diff --git a/as/cmd/IN/in.casl b/as/cmd/IN/in.casl
new file mode 100644 (file)
index 0000000..248762f
--- /dev/null
@@ -0,0 +1,7 @@
+;;; IN IBUF,ILEN
+MAIN    START
+LOOP    IN      IBUF,ILEN
+FIN     RET
+IBUF    DS      20
+ILEN    DS      1
+        END
diff --git a/as/cmd/JMI/jmi_m.casl b/as/cmd/JMI/jmi_m.casl
new file mode 100644 (file)
index 0000000..0dc7216
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JMI OSZ:010
+MAIN    START
+        LD      GR1,A
+        AND     GR1,GR1
+        JMI     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      -1
+        END
diff --git a/as/cmd/JMI/jmi_ov.casl b/as/cmd/JMI/jmi_ov.casl
new file mode 100644 (file)
index 0000000..4541927
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JMI OSZ:001
+MAIN    START
+        LD      GR1,A
+        SRL     GR1,1
+        JMI     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      #0003
+        END
diff --git a/as/cmd/JMI/jmi_p.casl b/as/cmd/JMI/jmi_p.casl
new file mode 100644 (file)
index 0000000..ecf7fef
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JMI OSZ:000
+MAIN    START
+        LD      GR1,A
+        AND     GR1,GR1
+        JMI     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      1
+        END
diff --git a/as/cmd/JMI/jmi_z.casl b/as/cmd/JMI/jmi_z.casl
new file mode 100644 (file)
index 0000000..5f98af9
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JMI OSZ:001
+MAIN    START
+        LD      GR1,A
+        AND     GR1,GR1
+        JMI     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      0
+        END
diff --git a/as/cmd/JNZ/jnz_m.casl b/as/cmd/JNZ/jnz_m.casl
new file mode 100644 (file)
index 0000000..e88d234
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JNZ OSZ:010
+MAIN    START
+        LD      GR1,A
+        AND     GR1,GR1
+        JNZ     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      -1
+        END
diff --git a/as/cmd/JNZ/jnz_ov.casl b/as/cmd/JNZ/jnz_ov.casl
new file mode 100644 (file)
index 0000000..559fb3f
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JNZ OSZ:001
+MAIN    START
+        LD      GR1,A
+        SRL     GR1,1
+        JNZ     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      #0003
+        END
diff --git a/as/cmd/JNZ/jnz_p.casl b/as/cmd/JNZ/jnz_p.casl
new file mode 100644 (file)
index 0000000..7a03678
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JNZ OSZ:000
+MAIN    START
+        LD      GR1,A
+        AND     GR1,GR1
+        JNZ     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      1
+        END
diff --git a/as/cmd/JNZ/jnz_z.casl b/as/cmd/JNZ/jnz_z.casl
new file mode 100644 (file)
index 0000000..89bd1a3
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JNZ OSZ:001
+MAIN    START
+        LD      GR1,A
+        AND     GR1,GR1
+        JNZ     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      0
+        END
diff --git a/as/cmd/JOV/jov_m.casl b/as/cmd/JOV/jov_m.casl
new file mode 100644 (file)
index 0000000..14a39ab
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JOV OSZ:010
+MAIN    START
+        LD      GR1,A
+        AND     GR1,GR1
+        JOV     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      -1
+        END
diff --git a/as/cmd/JOV/jov_ov.casl b/as/cmd/JOV/jov_ov.casl
new file mode 100644 (file)
index 0000000..b477f09
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JOV OSZ:001
+MAIN    START
+        LD      GR1,A
+        SRL     GR1,1
+        JOV     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      #0003
+        END
diff --git a/as/cmd/JOV/jov_p.casl b/as/cmd/JOV/jov_p.casl
new file mode 100644 (file)
index 0000000..7401ccf
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JOV OSZ:000
+MAIN    START
+        LD      GR1,A
+        AND     GR1,GR1
+        JOV     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      1
+        END
diff --git a/as/cmd/JOV/jov_z.casl b/as/cmd/JOV/jov_z.casl
new file mode 100644 (file)
index 0000000..fb72464
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JOV OSZ:001
+MAIN    START
+        LD      GR1,A
+        AND     GR1,GR1
+        JOV     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      0
+        END
diff --git a/as/cmd/JPL/jpl_m.casl b/as/cmd/JPL/jpl_m.casl
new file mode 100644 (file)
index 0000000..9e0c157
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JPL OSZ:010
+MAIN    START
+        LD      GR1,A
+        AND     GR1,GR1
+        JPL     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      -1
+        END
diff --git a/as/cmd/JPL/jpl_ov.casl b/as/cmd/JPL/jpl_ov.casl
new file mode 100644 (file)
index 0000000..58729f6
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JPL OSZ:001
+MAIN    START
+        LD      GR1,A
+        SRL     GR1,1
+        JPL     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      #0003
+        END
diff --git a/as/cmd/JPL/jpl_p.casl b/as/cmd/JPL/jpl_p.casl
new file mode 100644 (file)
index 0000000..09c8964
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JPL OSZ:000
+MAIN    START
+        LD      GR1,A
+        AND     GR1,GR1
+        JPL     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      1
+        END
diff --git a/as/cmd/JPL/jpl_z.casl b/as/cmd/JPL/jpl_z.casl
new file mode 100644 (file)
index 0000000..5717e2a
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JPL OSZ:001
+MAIN    START
+        LD      GR1,A
+        AND     GR1,GR1
+        JPL     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      0
+        END
diff --git a/as/cmd/JUMP/jump_m.casl b/as/cmd/JUMP/jump_m.casl
new file mode 100644 (file)
index 0000000..e80f243
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JUMP OSZ:010
+MAIN    START
+        LD      GR1,A
+        AND     GR1,GR1
+        JUMP    TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      -1
+        END
diff --git a/as/cmd/JUMP/jump_ov.casl b/as/cmd/JUMP/jump_ov.casl
new file mode 100644 (file)
index 0000000..7a2ae38
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JUMP OSZ:001
+MAIN    START
+        LD      GR1,A
+        SRL     GR1,1
+        JUMP    TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      #0003
+        END
diff --git a/as/cmd/JUMP/jump_p.casl b/as/cmd/JUMP/jump_p.casl
new file mode 100644 (file)
index 0000000..7d4be42
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JUMP OSZ:000
+MAIN    START
+        LD      GR1,A
+        AND     GR1,GR1
+        JUMP    TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      1
+        END
diff --git a/as/cmd/JUMP/jump_z.casl b/as/cmd/JUMP/jump_z.casl
new file mode 100644 (file)
index 0000000..39e43c9
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JUMP OSZ:001
+MAIN    START
+        LD      GR1,A
+        AND     GR1,GR1
+        JUMP    TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      0
+        END
diff --git a/as/cmd/JZE/jze_m.casl b/as/cmd/JZE/jze_m.casl
new file mode 100644 (file)
index 0000000..904ff9e
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JZE OSZ:010
+MAIN    START
+        LD      GR1,A
+        AND     GR1,GR1
+        JZE     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      -1
+        END
diff --git a/as/cmd/JZE/jze_ov.casl b/as/cmd/JZE/jze_ov.casl
new file mode 100644 (file)
index 0000000..38ab4ae
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JZE OSZ:001
+MAIN    START
+        LD      GR1,A
+        SRL     GR1,1
+        JZE     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      #0003
+        END
diff --git a/as/cmd/JZE/jze_p.casl b/as/cmd/JZE/jze_p.casl
new file mode 100644 (file)
index 0000000..20f208b
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JZE OSZ:000
+MAIN    START
+        LD      GR1,A
+        AND     GR1,GR1
+        JZE     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      1
+        END
diff --git a/as/cmd/JZE/jze_z.casl b/as/cmd/JZE/jze_z.casl
new file mode 100644 (file)
index 0000000..73ee48d
--- /dev/null
@@ -0,0 +1,11 @@
+;;; JZE OSZ:001
+MAIN    START
+        LD      GR1,A
+        AND     GR1,GR1
+        JZE     TO
+        LAD     GR1,0
+        JUMP    FIN
+TO      LAD     GR1,#FFFF
+FIN     RET
+A       DC      0
+        END
similarity index 81%
rename from as/CMD/lad0.casl
rename to as/cmd/LAD/lad0.casl
index 875e53d..3171666 100644 (file)
@@ -1,3 +1,4 @@
+;;; LAD r,adr
 LAD     START
         LAD     GR1,5
         RET
similarity index 56%
rename from as/CMD/lad1.casl
rename to as/cmd/LAD/lad1.casl
index 3700cbc..ff3e22d 100644 (file)
@@ -1,5 +1,6 @@
-MAIN    START   BEGIN
-BEGIN   LD      GR1,A
+;;; LAD r,adr,x
+MAIN    START
+        LD      GR1,A
         LAD     GR1,1,GR1
         RET
 A       DC      3
similarity index 100%
rename from as/CMD/lad2.casl
rename to as/cmd/LAD/lad1_ov.casl
diff --git a/as/cmd/LAD/lad1_s.casl b/as/cmd/LAD/lad1_s.casl
new file mode 100644 (file)
index 0000000..3c63c8d
--- /dev/null
@@ -0,0 +1,7 @@
+;;; LAD r,adr,x
+MAIN    START
+        LD      GR1,A
+        LAD     GR1,-1,GR1
+        RET
+A       DC      3
+        END
diff --git a/as/cmd/LD/ld0.casl b/as/cmd/LD/ld0.casl
new file mode 100644 (file)
index 0000000..d0e02a6
--- /dev/null
@@ -0,0 +1,9 @@
+MAIN    START
+        LD      GR0,A
+        LD      GR0,B
+        LD      GR0,C
+        RET
+A       DC      7
+B       DC      -7
+C       DC      0
+        END
diff --git a/as/cmd/LD/ld0_l.casl b/as/cmd/LD/ld0_l.casl
new file mode 100644 (file)
index 0000000..b23b09e
--- /dev/null
@@ -0,0 +1,97 @@
+;;; LD  r,adr
+MAIN    START
+        LD      GR1,='"'
+        LD      GR1,='#'
+        LD      GR1,='$'
+        LD      GR1,='%'
+        LD      GR1,='&'
+        LD      GR1,=''''
+        LD      GR1,='('
+        LD      GR1,=')'
+        LD      GR1,='*'
+        LD      GR1,='+'
+        LD      GR1,=','
+        LD      GR1,='-'
+        LD      GR1,='.'
+        LD      GR1,='/'
+        LD      GR1,='0'
+        LD      GR1,='1'
+        LD      GR1,='2'
+        LD      GR1,='3'
+        LD      GR1,='4'
+        LD      GR1,='5'
+        LD      GR1,='6'
+        LD      GR1,='7'
+        LD      GR1,='8'
+        LD      GR1,='9'
+        LD      GR1,=':'
+        LD      GR1,=';'
+        LD      GR1,='<'
+        LD      GR1,='='
+        LD      GR1,='>'
+        LD      GR1,='?'
+        LD      GR1,='@'
+        LD      GR1,='A'
+        LD      GR1,='B'
+        LD      GR1,='C'
+        LD      GR1,='D'
+        LD      GR1,='E'
+        LD      GR1,='F'
+        LD      GR1,='G'
+        LD      GR1,='H'
+        LD      GR1,='I'
+        LD      GR1,='J'
+        LD      GR1,='K'
+        LD      GR1,='L'
+        LD      GR1,='M'
+        LD      GR1,='N'
+        LD      GR1,='O'
+        LD      GR1,='P'
+        LD      GR1,='Q'
+        LD      GR1,='R'
+        LD      GR1,='S'
+        LD      GR1,='T'
+        LD      GR1,='U'
+        LD      GR1,='V'
+        LD      GR1,='W'
+        LD      GR1,='X'
+        LD      GR1,='Y'
+        LD      GR1,='Z'
+        LD      GR1,='['
+        LD      GR1,='\'
+        LD      GR1,=']'
+        LD      GR1,='^'
+        LD      GR1,='_'
+        LD      GR1,='`'
+        LD      GR1,='a'
+        LD      GR1,='b'
+        LD      GR1,='c'
+        LD      GR1,='d'
+        LD      GR1,='e'
+        LD      GR1,='f'
+        LD      GR1,='g'
+        LD      GR1,='h'
+        LD      GR1,='i'
+        LD      GR1,='j'
+        LD      GR1,='k'
+        LD      GR1,='l'
+        LD      GR1,='m'
+        LD      GR1,='n'
+        LD      GR1,='o'
+        LD      GR1,='p'
+        LD      GR1,='q'
+        LD      GR1,='r'
+        LD      GR1,='s'
+        LD      GR1,='t'
+        LD      GR1,='u'
+        LD      GR1,='v'
+        LD      GR1,='w'
+        LD      GR1,='x'
+        LD      GR1,='y'
+        LD      GR1,='z'
+        LD      GR1,='{'
+        LD      GR1,='|'
+        LD      GR1,='}'
+        LD      GR1,='~'
+        RET
+        END
diff --git a/as/cmd/LD/ld1.casl b/as/cmd/LD/ld1.casl
new file mode 100644 (file)
index 0000000..37c03ef
--- /dev/null
@@ -0,0 +1,39 @@
+MAIN    START
+        LAD     GR1,#FFFF
+        LD      GR2,GR1
+        LD      GR3,GR1
+        LD      GR4,GR1
+        LD      GR5,GR1
+        LD      GR6,GR1
+        LD      GR7,GR1
+        LD      GR0,GR1
+        LD      GR1,GR1
+        LAD     GR2,#FFFE
+        LD      GR2,GR2
+        LD      GR3,GR2
+        LD      GR4,GR2
+        LD      GR5,GR2
+        LD      GR6,GR2
+        LD      GR7,GR2
+        LD      GR0,GR2
+        LD      GR1,GR2
+        LAD     GR3,#FFFE
+        LD      GR3,GR3
+        LD      GR4,GR3
+        LD      GR5,GR3
+        LD      GR6,GR3
+        LD      GR7,GR3
+        LD      GR0,GR3
+        LD      GR1,GR3
+        LD      GR2,GR3
+        LAD     GR0,1
+        LD      GR1,GR0
+        LD      GR2,GR0
+        LD      GR3,GR0
+        LD      GR4,GR0
+        LD      GR5,GR0
+        LD      GR6,GR0
+        LD      GR7,GR0
+        LD      GR0,GR0
+        RET
+        END
diff --git a/as/cmd/LD/ld2.casl b/as/cmd/LD/ld2.casl
new file mode 100644 (file)
index 0000000..21d6790
--- /dev/null
@@ -0,0 +1,13 @@
+MAIN    START
+        LAD     GR1,A
+        LD      GR0,0,GR1
+        LD      GR2,2,GR1
+        LD      GR3,3,GR1
+        LD      GR4,4,GR1
+        LD      GR5,5,GR1
+        LD      GR6,6,GR1
+        LD      GR7,7,GR1
+        LD      GR1,1,GR1
+        RET
+A       DC      2,3,5,7,11,13,17,19
+        END
similarity index 94%
rename from as/CMD/nop.casl
rename to as/cmd/NOP/nop.casl
index 362bc6c..6facee4 100644 (file)
@@ -1,3 +1,4 @@
+;;; NOP
 MAIN    START
         NOP
         NOP
@@ -10,4 +11,3 @@ MAIN    START
         NOP
         RET
         END
-        
\ No newline at end of file
diff --git a/as/cmd/OR/or0.casl b/as/cmd/OR/or0.casl
new file mode 100644 (file)
index 0000000..d23f8c2
--- /dev/null
@@ -0,0 +1,8 @@
+;;; OR r,adr
+MAIN    START
+        LD      GR1,A
+        OR      GR1,B
+        RET
+A       DC      #3000
+B       DC      #4FFF
+        END
diff --git a/as/cmd/OR/or0_s.casl b/as/cmd/OR/or0_s.casl
new file mode 100644 (file)
index 0000000..7c29667
--- /dev/null
@@ -0,0 +1,8 @@
+;;; OR r,adr 演算結果の符号が負
+MAIN    START
+        LD      GR1,A
+        OR      GR1,B
+        RET
+A       DC      #8000
+B       DC      #FFFF
+        END
diff --git a/as/cmd/OR/or0_z.casl b/as/cmd/OR/or0_z.casl
new file mode 100644 (file)
index 0000000..d4843e8
--- /dev/null
@@ -0,0 +1,8 @@
+;;; OR r,adr 演算結果が零
+MAIN    START
+        LD      GR1,A
+        OR      GR1,B
+        RET
+A       DC      #0001
+B       DC      #FFFE
+        END
diff --git a/as/cmd/OR/or1.casl b/as/cmd/OR/or1.casl
new file mode 100644 (file)
index 0000000..1067c46
--- /dev/null
@@ -0,0 +1,8 @@
+;;; OR r,adr
+MAIN    START
+        LD      GR1,A
+        OR      GR1,1,A
+        RET
+A       DC      #3000
+        DC      #4FFF
+        END
diff --git a/as/cmd/OR/or2.casl b/as/cmd/OR/or2.casl
new file mode 100644 (file)
index 0000000..63be2ca
--- /dev/null
@@ -0,0 +1,9 @@
+;;; OR r1,r2
+MAIN    START
+        LD      GR1,A
+        LD      GR2,B
+        OR      GR1,GR2
+        RET
+A       DC      #3000
+B       DC      #4FFF
+        END
diff --git a/as/cmd/OUT/out.casl b/as/cmd/OUT/out.casl
new file mode 100644 (file)
index 0000000..2a491fe
--- /dev/null
@@ -0,0 +1,16 @@
+;;; OUT buf.len
+MAIN    START
+        OUT     BUF1,L1
+        OUT     BUF2,L2
+        OUT     BUF3,L3
+        OUT     BUF4,L4
+        RET
+BUF1    DC      '0',9,'1',10            ; TAB、改行
+L1      DC      4
+BUF2    DC      ' !"#$%&''()*+,-./0123456789:;<=>?'
+L2      DC      32
+BUF3    DC      '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_'
+L3      DC      32
+BUF4    DC      '`abcdefghijklmnopqrstuvwxyz{|}~'
+L4      DC      31
+        END
diff --git a/as/cmd/POP/push_pop_0.casl b/as/cmd/POP/push_pop_0.casl
new file mode 100644 (file)
index 0000000..cdf1a64
--- /dev/null
@@ -0,0 +1,27 @@
+;;; PUSH / POP 値の復元
+MAIN    START
+        LD      GR1,A
+        LD      GR1,0,GR7
+        LD      GR2,1,GR7
+        LD      GR3,2,GR7
+        LD      GR4,3,GR7
+        LD      GR5,4,GR7
+        LD      GR6,5,GR7
+        LD      GR7,6,GR7
+        PUSH    0,GR1
+        PUSH    0,GR2
+        PUSH    0,GR3
+        PUSH    0,GR4
+        PUSH    0,GR5
+        PUSH    0,GR6
+        PUSH    0,GR7
+        POP     GR7
+        POP     GR6
+        POP     GR5
+        POP     GR4
+        POP     GR3
+        POP     GR2
+        POP     GR1
+        RET
+A       DC      1,2,3,4,5,6,7
+        END
diff --git a/as/cmd/POP/push_pop_1.casl b/as/cmd/POP/push_pop_1.casl
new file mode 100644 (file)
index 0000000..08f4c43
--- /dev/null
@@ -0,0 +1,27 @@
+;;; PUSH / POP 値の交換
+MAIN    START
+        LD      GR1,A
+        LD      GR1,0,GR7
+        LD      GR2,1,GR7
+        LD      GR3,2,GR7
+        LD      GR4,3,GR7
+        LD      GR5,4,GR7
+        LD      GR6,5,GR7
+        LD      GR7,6,GR7
+        PUSH    0,GR1
+        PUSH    0,GR2
+        PUSH    0,GR3
+        PUSH    0,GR4
+        PUSH    0,GR5
+        PUSH    0,GR6
+        PUSH    0,GR7
+        POP     GR1
+        POP     GR2
+        POP     GR3
+        POP     GR4
+        POP     GR5
+        POP     GR6
+        POP     GR7
+        RET
+A       DC      1,2,3,4,5,6,7
+        END
diff --git a/as/cmd/PUSH/README b/as/cmd/PUSH/README
new file mode 100644 (file)
index 0000000..f6733a3
--- /dev/null
@@ -0,0 +1 @@
+see POP
diff --git a/as/cmd/RET/README b/as/cmd/RET/README
new file mode 100644 (file)
index 0000000..aa33c9c
--- /dev/null
@@ -0,0 +1 @@
+see CALL
diff --git a/as/cmd/RPOP/rpop.casl b/as/cmd/RPOP/rpop.casl
new file mode 100644 (file)
index 0000000..c6c31bd
--- /dev/null
@@ -0,0 +1,21 @@
+;;; RPOP 値の復元
+MAIN    START
+        LD      GR1,A
+        LD      GR1,0,GR7
+        LD      GR2,1,GR7
+        LD      GR3,2,GR7
+        LD      GR4,3,GR7
+        LD      GR5,4,GR7
+        LD      GR6,5,GR7
+        LD      GR7,6,GR7
+        PUSH    0,GR1
+        PUSH    0,GR2
+        PUSH    0,GR3
+        PUSH    0,GR4
+        PUSH    0,GR5
+        PUSH    0,GR6
+        PUSH    0,GR7
+        RPOP
+        RET
+A       DC      1,2,3,4,5,6,7
+        END
diff --git a/as/cmd/RPUSH/rpush.casl b/as/cmd/RPUSH/rpush.casl
new file mode 100644 (file)
index 0000000..3a86ea2
--- /dev/null
@@ -0,0 +1,21 @@
+;;; PUSH / POP 値の復元
+MAIN    START
+        LD      GR1,A
+        LD      GR1,0,GR7
+        LD      GR2,1,GR7
+        LD      GR3,2,GR7
+        LD      GR4,3,GR7
+        LD      GR5,4,GR7
+        LD      GR6,5,GR7
+        LD      GR7,6,GR7
+        RPUSH
+        POP     GR7
+        POP     GR6
+        POP     GR5
+        POP     GR4
+        POP     GR3
+        POP     GR2
+        POP     GR1
+        RET
+A       DC      1,2,3,4,5,6,7
+        END
similarity index 62%
rename from as/CMD/ld0.casl
rename to as/cmd/SLA/sla_1.casl
index dd84f32..33441b7 100644 (file)
@@ -1,5 +1,6 @@
+;;; SLA r,adr
 MAIN    START
         LAD     GR1,3
-        LD      GR0,GR1
+        SLA     GR1,2
         RET
         END
diff --git a/as/cmd/SLA/sla_o.casl b/as/cmd/SLA/sla_o.casl
new file mode 100644 (file)
index 0000000..3c8f1c0
--- /dev/null
@@ -0,0 +1,6 @@
+;;; SLA r,adr 正数のオーバーフロー
+MAIN    START
+        LAD     GR1,#4000
+        SLA     GR1,1
+        RET
+        END
diff --git a/as/cmd/SLA/sla_s.casl b/as/cmd/SLA/sla_s.casl
new file mode 100644 (file)
index 0000000..5013b78
--- /dev/null
@@ -0,0 +1,6 @@
+;;; SLA r,adr 負数
+SLA2    START   BEGIN
+BEGIN   LAD     GR1,#8001
+        SLA     GR1,7
+        RET
+        END
diff --git a/as/cmd/SLA/sla_so.casl b/as/cmd/SLA/sla_so.casl
new file mode 100644 (file)
index 0000000..e36ea7b
--- /dev/null
@@ -0,0 +1,6 @@
+;;; SLA r,adr 負数のオーバーフロー
+MAIN    START
+        LAD     GR1,#C000
+        SLA     GR1,1
+        RET
+        END
similarity index 100%
rename from as/CMD/sra2.casl
rename to as/cmd/SRA/sra2.casl
similarity index 100%
rename from as/CMD/sra3.casl
rename to as/cmd/SRA/sra3.casl
similarity index 100%
rename from as/CMD/sra4.casl
rename to as/cmd/SRA/sra4.casl
diff --git a/as/cmd/SRA/sra_1.casl b/as/cmd/SRA/sra_1.casl
new file mode 100644 (file)
index 0000000..ce1fee4
--- /dev/null
@@ -0,0 +1,6 @@
+;;; SRA r,adr
+MAIN    START
+        LAD     GR1,12
+        SRA     GR1,2
+        RET
+        END
similarity index 69%
rename from as/CMD/sla2.casl
rename to as/cmd/SRA/sra_m.casl
index 31a3d1d..1a5e0c3 100644 (file)
@@ -1,6 +1,5 @@
 SLA2    START   BEGIN
-BEGIN   LAD     GR1,3
+BEGIN   LAD     GR1,#FFFD
         SLA     GR1,2
         RET
         END
-        
\ No newline at end of file
diff --git a/as/cmd/SRA/sra_o.casl b/as/cmd/SRA/sra_o.casl
new file mode 100644 (file)
index 0000000..ab7aac9
--- /dev/null
@@ -0,0 +1,5 @@
+MAIN    START
+        LAD     GR1,#4000
+        SLA     GR1,1
+        RET
+        END
diff --git a/as/cmd/SRA/sra_ov.casl b/as/cmd/SRA/sra_ov.casl
new file mode 100644 (file)
index 0000000..d5aee00
--- /dev/null
@@ -0,0 +1,5 @@
+MAIN    START
+        LAD     GR1,#C000
+        SLA     GR1,1
+        RET
+        END
similarity index 70%
rename from as/CMD/sla3.casl
rename to as/cmd/SRA/sra_s.casl
index 4108f1e..440cacc 100644 (file)
@@ -1,6 +1,5 @@
-SLA3    START   BEGIN
+SLA2    START   BEGIN
 BEGIN   LAD     GR1,#8000
         SLA     GR1,1
         RET
         END
-        
\ No newline at end of file
diff --git a/as/cmd/SRA/sra_so.casl b/as/cmd/SRA/sra_so.casl
new file mode 100644 (file)
index 0000000..d5aee00
--- /dev/null
@@ -0,0 +1,5 @@
+MAIN    START
+        LAD     GR1,#C000
+        SLA     GR1,1
+        RET
+        END
similarity index 100%
rename from as/CMD/st0.casl
rename to as/cmd/ST/st0.casl
similarity index 100%
rename from as/CMD/st1.casl
rename to as/cmd/ST/st1.casl
similarity index 100%
rename from as/CMD/svc2.casl
rename to as/cmd/SVC/svc2.casl
diff --git a/as/cmd/XOR/xor0.casl b/as/cmd/XOR/xor0.casl
new file mode 100644 (file)
index 0000000..1896735
--- /dev/null
@@ -0,0 +1,8 @@
+;;; XOR r,adr
+MAIN    START
+        LD      GR1,A
+        XOR     GR1,B
+        RET
+A       DC      #3000
+B       DC      #4FFF
+        END
diff --git a/as/cmd/XOR/xor0_s.casl b/as/cmd/XOR/xor0_s.casl
new file mode 100644 (file)
index 0000000..31ccb2a
--- /dev/null
@@ -0,0 +1,8 @@
+;;; XOR r,adr 演算結果の符号が負
+MAIN    START
+        LD      GR1,A
+        XOR     GR1,B
+        RET
+A       DC      #8000
+B       DC      #FFFF
+        END
diff --git a/as/cmd/XOR/xor0_z.casl b/as/cmd/XOR/xor0_z.casl
new file mode 100644 (file)
index 0000000..5a747bd
--- /dev/null
@@ -0,0 +1,8 @@
+;;; XOR r,adr 演算結果が零
+MAIN    START
+        LD      GR1,A
+        XOR     GR1,B
+        RET
+A       DC      #0001
+B       DC      #FFFE
+        END
diff --git a/as/cmd/XOR/xor1.casl b/as/cmd/XOR/xor1.casl
new file mode 100644 (file)
index 0000000..dc52edd
--- /dev/null
@@ -0,0 +1,8 @@
+;;; XOR r,adr
+MAIN    START
+        LD      GR1,A
+        XOR     GR1,1,A
+        RET
+A       DC      #3000
+        DC      #4FFF
+        END
diff --git a/as/cmd/XOR/xor2.casl b/as/cmd/XOR/xor2.casl
new file mode 100644 (file)
index 0000000..fc95b85
--- /dev/null
@@ -0,0 +1,9 @@
+;;; XOR r1,r2
+MAIN    START
+        LD      GR1,A
+        LD      GR2,B
+        XOR     GR1,GR2
+        RET
+A       DC      #3000
+B       DC      #4FFF
+        END
diff --git a/as/cmd/XOR/xor2_clear.casl b/as/cmd/XOR/xor2_clear.casl
new file mode 100644 (file)
index 0000000..ff454dd
--- /dev/null
@@ -0,0 +1,7 @@
+;;; XOR r,r rの内容をクリア
+MAIN    START
+BEGIN   LD      GR1,A
+        XOR     GR1,GR1
+        RET
+A       DC      3
+        END
diff --git a/as/cmd/literal_semi.casl b/as/cmd/literal_semi.casl
new file mode 100644 (file)
index 0000000..a3cc7ea
--- /dev/null
@@ -0,0 +1,4 @@
+MAIN    START
+        LAD     GR1,=';'        ; 「;」の処理が正常にできるか
+FIN     RET
+        END
similarity index 79%
rename from as/CMD/literalstr.casl
rename to as/cmd/literalstr.casl
index 0fa3fd4..7a352de 100644 (file)
@@ -2,12 +2,12 @@ MAIN    START
         LAD     GR1,='a'
         LAD     GR2,10
 LOOP    CPA     GR2,=0
-        JZE     LEND
-        JMI     LEND
+        JZE     FIN
+        JMI     FIN
         LD      GR3,0,GR1
         ADDA    GR1,=1
         SUBA    GR2,=1
         JUMP    LOOP
-LEND    RET
+FIN     RET
 LEN     DC      5
         END
similarity index 100%
rename from as/ERR/cmd_err0.casl
rename to as/err/cmd_err0.casl
similarity index 100%
rename from as/ERR/cmd_err1.casl
rename to as/err/cmd_err1.casl
diff --git a/as/err/dc_c1_err.casl b/as/err/dc_c1_err.casl
new file mode 100644 (file)
index 0000000..dd05608
--- /dev/null
@@ -0,0 +1,7 @@
+;; DC 文字定数
+MAIN    START
+        RET
+        DC      ' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFG'
+        DC      'GHIJKLMNOPQRSTUVWXYZ[\]^_abcdefghijklmnop'
+        DC      'pqrstuvwxyz{|}~'
+        END
similarity index 100%
rename from as/ERR/ds_err.casl
rename to as/err/ds_err.casl
diff --git a/as/err/opd_x_err.casl b/as/err/opd_x_err.casl
new file mode 100644 (file)
index 0000000..ee98241
--- /dev/null
@@ -0,0 +1,9 @@
+;;; ADDA r,adr,x 演算結果が負数(r < adr)
+MAIN    START
+        LD      GR1,A
+        LAD     GR2,1
+        ADDA    GR1,A,1
+        RET
+A       DC      -10
+        DC      20
+        END
index 191f75a..e02055c 100644 (file)
@@ -1,6 +1,6 @@
-MAIN     START
-         OUT    BUF,LEN
-         RET
-BUF      DC     'Hello, World!'
-LEN      DC     13
-         END
+MAIN    START
+        OUT     OBUF,LEN
+        RET
+OBUF    DC      'Hello, World!'
+LEN     DC      13
+        END
diff --git a/as/macro/in/in.casl b/as/macro/in/in.casl
new file mode 100644 (file)
index 0000000..de3509d
--- /dev/null
@@ -0,0 +1,8 @@
+;;; CASL IIマクロ命令「IN IBUF LEN」で生成される命令群
+        PUSH    0,GR1
+        PUSH    0,GR2
+        LAD     GR1,IBUF
+        LAD     GR2,LEN
+        SVC     1
+        POP     GR2
+        POP     GR1
diff --git a/as/macro/in/intest0.casl b/as/macro/in/intest0.casl
new file mode 100644 (file)
index 0000000..43a89e0
--- /dev/null
@@ -0,0 +1,7 @@
+MAIN    START
+        IN      IBUF,LEN
+        OUT     IBUF,LEN
+        RET
+IBUF    DS      100
+LEN     DC      1
+        END
diff --git a/as/macro/in/intest1.casl b/as/macro/in/intest1.casl
new file mode 100644 (file)
index 0000000..2877bc8
--- /dev/null
@@ -0,0 +1,14 @@
+MAIN    START
+        PUSH    0,GR1
+        PUSH    0,GR2
+        LAD     GR1,IBUF
+        LAD     GR2,LEN
+        SVC     1
+        POP     GR2
+        POP     GR1
+        IN      IBUF,LEN
+        OUT     IBUF,LEN
+        RET
+IBUF    DS      100
+LEN     DC      1
+        END
diff --git a/as/macro/in/str.txt b/as/macro/in/str.txt
new file mode 100644 (file)
index 0000000..6097ccb
--- /dev/null
@@ -0,0 +1 @@
+1234567890abcdefghijkLMNOPQRST
diff --git a/as/macro/out/hello0.casl b/as/macro/out/hello0.casl
new file mode 100644 (file)
index 0000000..e02055c
--- /dev/null
@@ -0,0 +1,6 @@
+MAIN    START
+        OUT     OBUF,LEN
+        RET
+OBUF    DC      'Hello, World!'
+LEN     DC      13
+        END
similarity index 71%
rename from as/CMD/svc2_out.casl
rename to as/macro/out/hello1.casl
index aff4b29..a697251 100644 (file)
@@ -1,5 +1,4 @@
-;;; 「OUT」と同等のプログラム
-OTEST   START
+MAIN    START
         PUSH    0,GR1
         PUSH    0,GR2
         LAD     GR1,OBUF
@@ -11,6 +10,6 @@ OTEST   START
         POP     GR2
         POP     GR1
         RET
-OBUF    DC      'abcd'
-LEN     DC      4
+OBUF    DC      'Hello, World!'
+LEN     DC      13
         END
diff --git a/as/macro/out/out.casl b/as/macro/out/out.casl
new file mode 100644 (file)
index 0000000..6bdf9cd
--- /dev/null
@@ -0,0 +1,11 @@
+;;; CASL IIマクロ命令「OUT OBUF LEN」で生成される命令群
+        PUSH    0,GR1
+        PUSH    0,GR2
+        LAD     GR1,OBUF
+        LAD     GR2,LEN
+        SVC     2
+        LAD     GR1,=#A
+        LAD     GR2,=1
+        SVC     2
+        POP     GR2
+        POP     GR1
similarity index 100%
rename from as/FUNC/cnt60.casl
rename to as/misc/cnt60.casl
diff --git a/as/misc/count1.casl b/as/misc/count1.casl
new file mode 100644 (file)
index 0000000..52e6b03
--- /dev/null
@@ -0,0 +1,19 @@
+;;; 「アセンブラ言語の使用」に掲載されているサンプル
+COUNT1  START
+;       入力    GR1:検索する語
+;       処理    GR1中の'1'のビットの個数を求める
+;       出力    GR0:GR1中の'1'のビットの個数
+        PUSH    0,GR1           ;
+        PUSH    0,GR2           ;
+        SUBA    GR2,GR2         ; Count = 0
+        AND     GR1,GR1         ; 全部のビットが'0'?
+        JZE     RETURN          ; 全部のビットが'0'なら終了
+MORE    LAD     GR2,1,GR2       ; Count = Count + 1
+        LAD     GR0,-1,GR1      ; 最下位の'1'のビット1個を
+        AND     GR1,GR0         ;  '0'に変える
+        JNZ     MORE            ; '1'のビットが残っていれば繰返し
+RETURN  LD      GR0,GR2         ; GR0 = Count
+        POP     GR2             ;
+        POP     GR1             ;
+        RET                     ; 呼び出しプログラムへ戻る
+        END                     ;
similarity index 100%
rename from as/FUNC/divl0.casl
rename to as/misc/divl0.casl
diff --git a/as/misc/divl0_test/1.txt b/as/misc/divl0_test/1.txt
new file mode 100644 (file)
index 0000000..ed9b1d4
--- /dev/null
@@ -0,0 +1,5556 @@
+../../../../casl2 ../../../../as/FUNC/divl_call.casl ../../../../as/FUNC/divl0.casl ../../../../as/FUNC/outl_main.casl ../../../../as/FUNC/rev.casl
+--------------------
+100
+0
+Error: div by 0
+--------------------
+100
+1
+100
+0
+--------------------
+100
+2
+50
+0
+--------------------
+100
+3
+33
+1
+--------------------
+100
+4
+25
+0
+--------------------
+100
+5
+20
+0
+--------------------
+100
+6
+16
+4
+--------------------
+100
+7
+14
+2
+--------------------
+100
+8
+12
+4
+--------------------
+100
+9
+11
+1
+--------------------
+100
+10
+10
+0
+--------------------
+--------------------
+99
+0
+Error: div by 0
+--------------------
+99
+1
+99
+0
+--------------------
+99
+2
+49
+1
+--------------------
+99
+3
+33
+0
+--------------------
+99
+4
+24
+3
+--------------------
+99
+5
+19
+4
+--------------------
+99
+6
+16
+3
+--------------------
+99
+7
+14
+1
+--------------------
+99
+8
+12
+3
+--------------------
+99
+9
+11
+0
+--------------------
+99
+10
+9
+9
+--------------------
+--------------------
+98
+0
+Error: div by 0
+--------------------
+98
+1
+98
+0
+--------------------
+98
+2
+49
+0
+--------------------
+98
+3
+32
+2
+--------------------
+98
+4
+24
+2
+--------------------
+98
+5
+19
+3
+--------------------
+98
+6
+16
+2
+--------------------
+98
+7
+14
+0
+--------------------
+98
+8
+12
+2
+--------------------
+98
+9
+10
+8
+--------------------
+98
+10
+9
+8
+--------------------
+--------------------
+97
+0
+Error: div by 0
+--------------------
+97
+1
+97
+0
+--------------------
+97
+2
+48
+1
+--------------------
+97
+3
+32
+1
+--------------------
+97
+4
+24
+1
+--------------------
+97
+5
+19
+2
+--------------------
+97
+6
+16
+1
+--------------------
+97
+7
+13
+6
+--------------------
+97
+8
+12
+1
+--------------------
+97
+9
+10
+7
+--------------------
+97
+10
+9
+7
+--------------------
+--------------------
+96
+0
+Error: div by 0
+--------------------
+96
+1
+96
+0
+--------------------
+96
+2
+48
+0
+--------------------
+96
+3
+32
+0
+--------------------
+96
+4
+24
+0
+--------------------
+96
+5
+19
+1
+--------------------
+96
+6
+16
+0
+--------------------
+96
+7
+13
+5
+--------------------
+96
+8
+12
+0
+--------------------
+96
+9
+10
+6
+--------------------
+96
+10
+9
+6
+--------------------
+--------------------
+95
+0
+Error: div by 0
+--------------------
+95
+1
+95
+0
+--------------------
+95
+2
+47
+1
+--------------------
+95
+3
+31
+2
+--------------------
+95
+4
+23
+3
+--------------------
+95
+5
+19
+0
+--------------------
+95
+6
+15
+5
+--------------------
+95
+7
+13
+4
+--------------------
+95
+8
+11
+7
+--------------------
+95
+9
+10
+5
+--------------------
+95
+10
+9
+5
+--------------------
+--------------------
+94
+0
+Error: div by 0
+--------------------
+94
+1
+94
+0
+--------------------
+94
+2
+47
+0
+--------------------
+94
+3
+31
+1
+--------------------
+94
+4
+23
+2
+--------------------
+94
+5
+18
+4
+--------------------
+94
+6
+15
+4
+--------------------
+94
+7
+13
+3
+--------------------
+94
+8
+11
+6
+--------------------
+94
+9
+10
+4
+--------------------
+94
+10
+9
+4
+--------------------
+--------------------
+93
+0
+Error: div by 0
+--------------------
+93
+1
+93
+0
+--------------------
+93
+2
+46
+1
+--------------------
+93
+3
+31
+0
+--------------------
+93
+4
+23
+1
+--------------------
+93
+5
+18
+3
+--------------------
+93
+6
+15
+3
+--------------------
+93
+7
+13
+2
+--------------------
+93
+8
+11
+5
+--------------------
+93
+9
+10
+3
+--------------------
+93
+10
+9
+3
+--------------------
+--------------------
+92
+0
+Error: div by 0
+--------------------
+92
+1
+92
+0
+--------------------
+92
+2
+46
+0
+--------------------
+92
+3
+30
+2
+--------------------
+92
+4
+23
+0
+--------------------
+92
+5
+18
+2
+--------------------
+92
+6
+15
+2
+--------------------
+92
+7
+13
+1
+--------------------
+92
+8
+11
+4
+--------------------
+92
+9
+10
+2
+--------------------
+92
+10
+9
+2
+--------------------
+--------------------
+91
+0
+Error: div by 0
+--------------------
+91
+1
+91
+0
+--------------------
+91
+2
+45
+1
+--------------------
+91
+3
+30
+1
+--------------------
+91
+4
+22
+3
+--------------------
+91
+5
+18
+1
+--------------------
+91
+6
+15
+1
+--------------------
+91
+7
+13
+0
+--------------------
+91
+8
+11
+3
+--------------------
+91
+9
+10
+1
+--------------------
+91
+10
+9
+1
+--------------------
+--------------------
+90
+0
+Error: div by 0
+--------------------
+90
+1
+90
+0
+--------------------
+90
+2
+45
+0
+--------------------
+90
+3
+30
+0
+--------------------
+90
+4
+22
+2
+--------------------
+90
+5
+18
+0
+--------------------
+90
+6
+15
+0
+--------------------
+90
+7
+12
+6
+--------------------
+90
+8
+11
+2
+--------------------
+90
+9
+10
+0
+--------------------
+90
+10
+9
+0
+--------------------
+--------------------
+89
+0
+Error: div by 0
+--------------------
+89
+1
+89
+0
+--------------------
+89
+2
+44
+1
+--------------------
+89
+3
+29
+2
+--------------------
+89
+4
+22
+1
+--------------------
+89
+5
+17
+4
+--------------------
+89
+6
+14
+5
+--------------------
+89
+7
+12
+5
+--------------------
+89
+8
+11
+1
+--------------------
+89
+9
+9
+8
+--------------------
+89
+10
+8
+9
+--------------------
+--------------------
+88
+0
+Error: div by 0
+--------------------
+88
+1
+88
+0
+--------------------
+88
+2
+44
+0
+--------------------
+88
+3
+29
+1
+--------------------
+88
+4
+22
+0
+--------------------
+88
+5
+17
+3
+--------------------
+88
+6
+14
+4
+--------------------
+88
+7
+12
+4
+--------------------
+88
+8
+11
+0
+--------------------
+88
+9
+9
+7
+--------------------
+88
+10
+8
+8
+--------------------
+--------------------
+87
+0
+Error: div by 0
+--------------------
+87
+1
+87
+0
+--------------------
+87
+2
+43
+1
+--------------------
+87
+3
+29
+0
+--------------------
+87
+4
+21
+3
+--------------------
+87
+5
+17
+2
+--------------------
+87
+6
+14
+3
+--------------------
+87
+7
+12
+3
+--------------------
+87
+8
+10
+7
+--------------------
+87
+9
+9
+6
+--------------------
+87
+10
+8
+7
+--------------------
+--------------------
+86
+0
+Error: div by 0
+--------------------
+86
+1
+86
+0
+--------------------
+86
+2
+43
+0
+--------------------
+86
+3
+28
+2
+--------------------
+86
+4
+21
+2
+--------------------
+86
+5
+17
+1
+--------------------
+86
+6
+14
+2
+--------------------
+86
+7
+12
+2
+--------------------
+86
+8
+10
+6
+--------------------
+86
+9
+9
+5
+--------------------
+86
+10
+8
+6
+--------------------
+--------------------
+85
+0
+Error: div by 0
+--------------------
+85
+1
+85
+0
+--------------------
+85
+2
+42
+1
+--------------------
+85
+3
+28
+1
+--------------------
+85
+4
+21
+1
+--------------------
+85
+5
+17
+0
+--------------------
+85
+6
+14
+1
+--------------------
+85
+7
+12
+1
+--------------------
+85
+8
+10
+5
+--------------------
+85
+9
+9
+4
+--------------------
+85
+10
+8
+5
+--------------------
+--------------------
+84
+0
+Error: div by 0
+--------------------
+84
+1
+84
+0
+--------------------
+84
+2
+42
+0
+--------------------
+84
+3
+28
+0
+--------------------
+84
+4
+21
+0
+--------------------
+84
+5
+16
+4
+--------------------
+84
+6
+14
+0
+--------------------
+84
+7
+12
+0
+--------------------
+84
+8
+10
+4
+--------------------
+84
+9
+9
+3
+--------------------
+84
+10
+8
+4
+--------------------
+--------------------
+83
+0
+Error: div by 0
+--------------------
+83
+1
+83
+0
+--------------------
+83
+2
+41
+1
+--------------------
+83
+3
+27
+2
+--------------------
+83
+4
+20
+3
+--------------------
+83
+5
+16
+3
+--------------------
+83
+6
+13
+5
+--------------------
+83
+7
+11
+6
+--------------------
+83
+8
+10
+3
+--------------------
+83
+9
+9
+2
+--------------------
+83
+10
+8
+3
+--------------------
+--------------------
+82
+0
+Error: div by 0
+--------------------
+82
+1
+82
+0
+--------------------
+82
+2
+41
+0
+--------------------
+82
+3
+27
+1
+--------------------
+82
+4
+20
+2
+--------------------
+82
+5
+16
+2
+--------------------
+82
+6
+13
+4
+--------------------
+82
+7
+11
+5
+--------------------
+82
+8
+10
+2
+--------------------
+82
+9
+9
+1
+--------------------
+82
+10
+8
+2
+--------------------
+--------------------
+81
+0
+Error: div by 0
+--------------------
+81
+1
+81
+0
+--------------------
+81
+2
+40
+1
+--------------------
+81
+3
+27
+0
+--------------------
+81
+4
+20
+1
+-------