アセンブラファイルとテストの整理
authorj8takagi <j8takagi@nifty.com>
Thu, 21 Jan 2010 13:37:55 +0000 (22:37 +0900)
committerj8takagi <j8takagi@nifty.com>
Thu, 21 Jan 2010 13:37:55 +0000 (22:37 +0900)
739 files changed:
.gitignore
Makefile
as/CMD/adda0.casl [new file with mode: 0644]
as/CMD/adda1.casl [new file with mode: 0644]
as/CMD/adda_overflow.casl [new file with mode: 0644]
as/CMD/addl.casl [moved from as/addl.casl with 100% similarity]
as/CMD/addl_overflow.casl [moved from as/addl_overflow.casl with 100% similarity]
as/CMD/and0.casl [new file with mode: 0644]
as/CMD/and1.casl [new file with mode: 0644]
as/CMD/and2.casl [new file with mode: 0644]
as/CMD/and3.casl [new file with mode: 0644]
as/CMD/call0.casl [new file with mode: 0644]
as/CMD/call1.casl [new file with mode: 0644]
as/CMD/call2.casl [new file with mode: 0644]
as/CMD/cpa1.casl [new file with mode: 0644]
as/CMD/cpl1.casl [new file with mode: 0644]
as/CMD/cpl2.casl [new file with mode: 0644]
as/CMD/cpl3.casl [new file with mode: 0644]
as/CMD/dc_overflow.casl [new file with mode: 0644]
as/CMD/dc_spc.casl [new file with mode: 0644]
as/CMD/ds_0.casl [new file with mode: 0644]
as/CMD/lad0.casl [new file with mode: 0644]
as/CMD/lad1.casl [new file with mode: 0644]
as/CMD/lad2.casl [new file with mode: 0644]
as/CMD/lad3.casl [new file with mode: 0644]
as/CMD/lad4.casl [new file with mode: 0644]
as/CMD/ld0.casl [new file with mode: 0644]
as/CMD/ld1.casl [new file with mode: 0644]
as/CMD/ld2.casl [moved from as/ld2.casl with 100% similarity]
as/CMD/ld3.casl [moved from as/ld3.casl with 100% similarity]
as/CMD/ld4.casl [new file with mode: 0644]
as/CMD/ld5.casl [new file with mode: 0644]
as/CMD/ld_loop.casl [new file with mode: 0644]
as/CMD/literal_spc.casl [moved from as/literal_spc.casl with 100% similarity]
as/CMD/literalstr.casl [moved from as/literalstr.casl with 100% similarity]
as/CMD/nop.casl [new file with mode: 0644]
as/CMD/out0.casl [new file with mode: 0644]
as/CMD/out1.casl [new file with mode: 0644]
as/CMD/pushpop.casl [new file with mode: 0644]
as/CMD/sla2.casl [new file with mode: 0644]
as/CMD/sla3.casl [new file with mode: 0644]
as/CMD/sll2.casl [new file with mode: 0644]
as/CMD/sll3.casl [new file with mode: 0644]
as/CMD/sra2.casl [new file with mode: 0644]
as/CMD/sra3.casl [moved from as/sra3.casl with 100% similarity]
as/CMD/sra4.casl [moved from as/sra4.casl with 100% similarity]
as/CMD/st0.casl [new file with mode: 0644]
as/CMD/st1.casl [new file with mode: 0644]
as/CMD/svc2.casl [new file with mode: 0644]
as/CMD/svc2_out.casl [new file with mode: 0644]
as/CMD/xor0.casl [moved from as/xor0.casl with 100% similarity]
as/CMD/xor1.casl [moved from as/xor1.casl with 100% similarity]
as/CMD/xor3.casl [new file with mode: 0644]
as/CMD/xor4.casl [new file with mode: 0644]
as/CMD/xor5.casl [new file with mode: 0644]
as/ERR/cmd_err0.casl [new file with mode: 0644]
as/ERR/cmd_err1.casl [new file with mode: 0644]
as/ERR/ds_err.casl [new file with mode: 0644]
as/ERR/labeldup_err.casl [new file with mode: 0644]
as/ERR/opdspc_err.casl [new file with mode: 0644]
as/FE_TESTS/2008_04/Q09/token.casl [new file with mode: 0644]
as/FE_TESTS/2008_04/Q09/token_call.casl [new file with mode: 0644]
as/FE_TESTS/2008_10/Q09/ptn1.casl [new file with mode: 0644]
as/FE_TESTS/2008_10/Q09/ptn1_call.casl [moved from as/ptn1_call.casl with 64% similarity]
as/FE_TESTS/2008_10/Q09/ptn2.casl [moved from as/ptn2.casl with 54% similarity]
as/FE_TESTS/2008_10/Q09/ptn2_call.casl [moved from as/ptn2_call.casl with 64% similarity]
as/FE_TESTS/2008_10/Q09/ptn3.casl [new file with mode: 0644]
as/FE_TESTS/2008_10/Q09/ptn3_call.casl [moved from as/ptn3_call.casl with 64% similarity]
as/FE_TESTS/2008_10/Q09/ptn4.casl [moved from as/ptn4.casl with 69% similarity]
as/FE_TESTS/2008_10/Q09/ptn4_call.casl [moved from as/ptn4_call.casl with 69% similarity]
as/FE_TESTS/2008_10/Q13/summary.casl [moved from as/summary.casl with 92% similarity]
as/FE_TESTS/2008_10/Q13/summary_call.casl [moved from as/summary_call2.casl with 100% similarity]
as/FE_TESTS/2009_04/Q12/muls.casl [new file with mode: 0644]
as/FE_TESTS/2009_04/Q12/muls2.casl [moved from as/muls2.casl with 94% similarity]
as/FE_TESTS/2009_04/Q12/muls2_call.casl [new file with mode: 0644]
as/FE_TESTS/2009_04/Q12/muls_call.casl [new file with mode: 0644]
as/FE_TESTS/2009_10/Q12/outb.casl [new file with mode: 0644]
as/FE_TESTS/2009_10/Q12/replace.casl [new file with mode: 0644]
as/FE_TESTS/2009_10/Q12/replace_call.casl [new file with mode: 0644]
as/FUNC/abs.casl [new file with mode: 0644]
as/FUNC/abs_call.casl [new file with mode: 0644]
as/FUNC/cnt60.casl [new file with mode: 0644]
as/FUNC/count1.casl [moved from as/count.casl with 100% similarity]
as/FUNC/count1_call.casl [new file with mode: 0644]
as/FUNC/count1_call0.casl [new file with mode: 0644]
as/FUNC/divl0.casl [new file with mode: 0644]
as/FUNC/divl1.casl [new file with mode: 0644]
as/FUNC/divl_call.casl [new file with mode: 0644]
as/FUNC/divl_call0.casl [new file with mode: 0644]
as/FUNC/divl_call1.casl [new file with mode: 0644]
as/FUNC/fib.casl [new file with mode: 0644]
as/FUNC/fib_outl.casl [new file with mode: 0644]
as/FUNC/hanoi.casl [moved from as/hanoi.casl with 100% similarity]
as/FUNC/inl.casl [new file with mode: 0644]
as/FUNC/inl_call.casl [new file with mode: 0644]
as/FUNC/iotest.casl [new file with mode: 0644]
as/FUNC/minim.casl [new file with mode: 0644]
as/FUNC/minim_call.casl [new file with mode: 0644]
as/FUNC/mula0.casl [new file with mode: 0644]
as/FUNC/mula1.casl [new file with mode: 0644]
as/FUNC/mula_call.casl [new file with mode: 0644]
as/FUNC/mula_call0.casl [new file with mode: 0644]
as/FUNC/mula_call1.casl [new file with mode: 0644]
as/FUNC/mula_call2.casl [new file with mode: 0644]
as/FUNC/mula_timestab.casl [new file with mode: 0644]
as/FUNC/mull0.casl [new file with mode: 0644]
as/FUNC/mull1.casl [new file with mode: 0644]
as/FUNC/mull_call.casl [new file with mode: 0644]
as/FUNC/mull_call0.casl [new file with mode: 0644]
as/FUNC/mull_call1.casl [new file with mode: 0644]
as/FUNC/mull_timestab.casl [new file with mode: 0644]
as/FUNC/outa.casl [new file with mode: 0644]
as/FUNC/outa0.casl [new file with mode: 0644]
as/FUNC/outa_call.casl [new file with mode: 0644]
as/FUNC/outa_call1.casl [new file with mode: 0644]
as/FUNC/outa_call2.casl [new file with mode: 0644]
as/FUNC/outb.casl [new file with mode: 0644]
as/FUNC/outb_call.casl [new file with mode: 0644]
as/FUNC/outd_q15.casl [new file with mode: 0644]
as/FUNC/outd_q15_call.casl [new file with mode: 0644]
as/FUNC/outd_q15_call0.casl [new file with mode: 0644]
as/FUNC/outl.casl [new file with mode: 0644]
as/FUNC/outl_call.casl [new file with mode: 0644]
as/FUNC/outl_call0.casl [new file with mode: 0644]
as/FUNC/outl_call1.casl [new file with mode: 0644]
as/FUNC/outl_call2.casl [new file with mode: 0644]
as/FUNC/rev.casl [new file with mode: 0644]
as/FUNC/rev_call.casl [new file with mode: 0644]
as/FUNC/sum.casl [new file with mode: 0644]
as/FUNC/sum_call.casl [new file with mode: 0644]
as/YAKUWA/README.txt [new file with mode: 0644]
as/YAKUWA/binout.casl [new file with mode: 0644]
as/YAKUWA/floatedit.casl [moved from as/floatedit.casl with 100% similarity]
as/add.casl [deleted file]
as/add1.casl [deleted file]
as/add2.casl [deleted file]
as/add_err.casl [deleted file]
as/add_labelerr.casl [deleted file]
as/add_loop.casl [deleted file]
as/add_opdspc_err.casl [deleted file]
as/add_p.casl [deleted file]
as/adda_overflow.casl [deleted file]
as/binout.casl [deleted file]
as/count_call.casl [deleted file]
as/count_call1.casl [deleted file]
as/count_call2.casl [deleted file]
as/cpa1.casl [deleted file]
as/dc_overflow.casl [deleted file]
as/dc_spc.casl [deleted file]
as/div.casl [deleted file]
as/div10.casl [deleted file]
as/div10_test.casl [deleted file]
as/div2.casl [deleted file]
as/div3.casl [deleted file]
as/div_call.casl [deleted file]
as/div_sub.casl [deleted file]
as/ds.casl [deleted file]
as/ds_err.casl [deleted file]
as/iotest.casl [deleted file]
as/itoa.casl [deleted file]
as/itoa0.casl [deleted file]
as/itoa1.casl [deleted file]
as/itoa2.casl [deleted file]
as/lad.casl [deleted file]
as/ladtest.casl [deleted file]
as/ld.casl [deleted file]
as/ld4.casl [deleted file]
as/ld_data.casl [deleted file]
as/ld_zero.casl [deleted file]
as/min_main.casl [deleted file]
as/min_main2.casl [deleted file]
as/min_sub.casl [deleted file]
as/min_sub2.casl [deleted file]
as/minus.casl [deleted file]
as/minus2.casl [deleted file]
as/mul.casl [deleted file]
as/muls.casl [deleted file]
as/muls_out.casl [deleted file]
as/muls_p.casl [deleted file]
as/multi.casl [deleted file]
as/multi2.casl [deleted file]
as/multi2_test.casl [deleted file]
as/multi_call.casl [deleted file]
as/multi_call0.casl [deleted file]
as/multi_sub.casl [deleted file]
as/not.casl [deleted file]
as/outi.casl [deleted file]
as/outi0.casl [deleted file]
as/outi2.casl [deleted file]
as/outi2_call.casl [deleted file]
as/outi_call.casl [deleted file]
as/outtest.casl [deleted file]
as/outtest1.casl [deleted file]
as/outtest2.casl [deleted file]
as/outtest_err.casl [deleted file]
as/ptn1.casl [deleted file]
as/ptn3.casl [deleted file]
as/pushpop.casl [deleted file]
as/revtest.casl [deleted file]
as/sla2.casl [deleted file]
as/sra2.casl [deleted file]
as/suba_p.casl [deleted file]
as/suba_p2.casl [deleted file]
as/summary_call.casl [deleted file]
as/summary_lderr.casl [deleted file]
as/svctest.casl [deleted file]
as/xor.casl [deleted file]
as/zero1.casl [deleted file]
src/dumpword.c [new file with mode: 0644]
test/Makefile.PARENT.mk [new file with mode: 0644]
test/TEST.mk [new file with mode: 0644]
test/astest/List.mk [deleted file]
test/astest/Makefile [deleted file]
test/astest/Test.mk [deleted file]
test/astest/add/Makefile [deleted file]
test/astest/add_err/0.txt [deleted file]
test/astest/add_err/Makefile [deleted file]
test/astest/add_labelerr/0.txt [deleted file]
test/astest/add_labelerr/Makefile [deleted file]
test/astest/add_opdspc_err/0.txt [deleted file]
test/astest/add_opdspc_err/Makefile [deleted file]
test/astest/add_p/0.txt [deleted file]
test/astest/add_p/Makefile [deleted file]
test/astest/adda_overflow/0.txt [deleted file]
test/astest/adda_overflow/Makefile [deleted file]
test/astest/addl/0.txt [deleted file]
test/astest/addl/Makefile [deleted file]
test/astest/addl_overflow/0.txt [deleted file]
test/astest/addl_overflow/Makefile [deleted file]
test/astest/binout/0.txt [deleted file]
test/astest/binout/Makefile [deleted file]
test/astest/call/0.txt [deleted file]
test/astest/call/Makefile [deleted file]
test/astest/count/0.txt [deleted file]
test/astest/count/Makefile [deleted file]
test/astest/count_call/0.txt [deleted file]
test/astest/count_call/Makefile [deleted file]
test/astest/count_call1/0.txt [deleted file]
test/astest/count_call1/Makefile [deleted file]
test/astest/count_call2/0.txt [deleted file]
test/astest/count_call2/Makefile [deleted file]
test/astest/dc_overflow/0.txt [deleted file]
test/astest/dc_overflow/Makefile [deleted file]
test/astest/dc_spc/0.txt [deleted file]
test/astest/dc_spc/Makefile [deleted file]
test/astest/div/0.txt [deleted file]
test/astest/div/Makefile [deleted file]
test/astest/div10_test/0.txt [deleted file]
test/astest/div10_test/Makefile [deleted file]
test/astest/div2/0.txt [deleted file]
test/astest/div2/Makefile [deleted file]
test/astest/ds/0.txt [deleted file]
test/astest/ds/Makefile [deleted file]
test/astest/ds_err/0.txt [deleted file]
test/astest/ds_err/Makefile [deleted file]
test/astest/floatedit/0.txt [deleted file]
test/astest/floatedit/Makefile [deleted file]
test/astest/hanoi/0.txt [deleted file]
test/astest/hanoi/Makefile [deleted file]
test/astest/hello/0.txt [deleted file]
test/astest/hello/Makefile [deleted file]
test/astest/iotest/Makefile [deleted file]
test/astest/lad/0.txt [deleted file]
test/astest/lad/Makefile [deleted file]
test/astest/ladtest/0.txt [deleted file]
test/astest/ladtest/Makefile [deleted file]
test/astest/ld/Makefile [deleted file]
test/astest/literal_spc/0.txt [deleted file]
test/astest/literal_spc/Makefile [deleted file]
test/astest/literalstr/0.txt [deleted file]
test/astest/literalstr/Makefile [deleted file]
test/astest/muls/0.txt [deleted file]
test/astest/muls/Makefile [deleted file]
test/astest/muls_p/0.txt [deleted file]
test/astest/muls_p/Makefile [deleted file]
test/astest/multi/0.txt [deleted file]
test/astest/multi/Makefile [deleted file]
test/astest/multi_p/0.txt [deleted file]
test/astest/multi_p/Makefile [deleted file]
test/astest/outi/0.txt [deleted file]
test/astest/outi/Makefile [deleted file]
test/astest/outtest/0.txt [deleted file]
test/astest/outtest/Makefile [deleted file]
test/astest/outtest1/0.txt [deleted file]
test/astest/outtest1/Makefile [deleted file]
test/astest/outtest2/0.txt [deleted file]
test/astest/outtest2/Makefile [deleted file]
test/astest/outtest_err/0.txt [deleted file]
test/astest/outtest_err/Makefile [deleted file]
test/astest/ptn1/0.txt [deleted file]
test/astest/ptn1/Makefile [deleted file]
test/astest/ptn2/0.txt [deleted file]
test/astest/ptn2/Makefile [deleted file]
test/astest/ptn3/0.txt [deleted file]
test/astest/ptn3/Makefile [deleted file]
test/astest/ptn4/0.txt [deleted file]
test/astest/ptn4/Makefile [deleted file]
test/astest/pushpop/0.txt [deleted file]
test/astest/pushpop/Makefile [deleted file]
test/astest/sla2/Makefile [deleted file]
test/astest/sra2/Makefile [deleted file]
test/astest/summary/0.txt [deleted file]
test/astest/summary/Makefile [deleted file]
test/astest/summary_lderr/0.txt [deleted file]
test/astest/summary_lderr/Makefile [deleted file]
test/integration/CASL2/CMD.mk [new file with mode: 0644]
test/integration/CASL2/Makefile [new file with mode: 0644]
test/integration/CASL2/TEST.log [new file with mode: 0644]
test/integration/CASL2/TEST.mk [new file with mode: 0644]
test/integration/CASL2/abs_call/0.txt [new file with mode: 0644]
test/integration/CASL2/abs_call/Makefile [new file with mode: 0644]
test/integration/CASL2/adda0/0.txt [new file with mode: 0644]
test/integration/CASL2/adda0/Makefile [new file with mode: 0644]
test/integration/CASL2/adda1/0.txt [new file with mode: 0644]
test/integration/CASL2/adda1/Makefile [new file with mode: 0644]
test/integration/CASL2/adda_overflow/0.txt [new file with mode: 0644]
test/integration/CASL2/adda_overflow/Makefile [new file with mode: 0644]
test/integration/CASL2/addl/0.txt [new file with mode: 0644]
test/integration/CASL2/addl/Makefile [new file with mode: 0644]
test/integration/CASL2/addl_overflow/0.txt [new file with mode: 0644]
test/integration/CASL2/addl_overflow/Makefile [new file with mode: 0644]
test/integration/CASL2/and0/0.txt [new file with mode: 0644]
test/integration/CASL2/and0/Makefile [new file with mode: 0644]
test/integration/CASL2/and1/0.txt [new file with mode: 0644]
test/integration/CASL2/and1/Makefile [new file with mode: 0644]
test/integration/CASL2/and2/0.txt [new file with mode: 0644]
test/integration/CASL2/and2/Makefile [new file with mode: 0644]
test/integration/CASL2/and3/0.txt [new file with mode: 0644]
test/integration/CASL2/and3/Makefile [new file with mode: 0644]
test/integration/CASL2/binout/0.txt [new file with mode: 0644]
test/integration/CASL2/binout/Makefile [new file with mode: 0644]
test/integration/CASL2/call0/0.txt [new file with mode: 0644]
test/integration/CASL2/call0/Makefile [new file with mode: 0644]
test/integration/CASL2/call1/0.txt [new file with mode: 0644]
test/integration/CASL2/call1/Makefile [new file with mode: 0644]
test/integration/CASL2/call2/0.txt [new file with mode: 0644]
test/integration/CASL2/call2/Makefile [new file with mode: 0644]
test/integration/CASL2/cmd_err0/0.txt [new file with mode: 0644]
test/integration/CASL2/cmd_err0/Makefile [new file with mode: 0644]
test/integration/CASL2/cmd_err0/err.txt [new file with mode: 0644]
test/integration/CASL2/cmd_err1/0.txt [new file with mode: 0644]
test/integration/CASL2/cmd_err1/Makefile [new file with mode: 0644]
test/integration/CASL2/cmd_err1/err.txt [new file with mode: 0644]
test/integration/CASL2/count_call/0.txt [new file with mode: 0644]
test/integration/CASL2/count_call/Makefile [new file with mode: 0644]
test/integration/CASL2/cpa1/0.txt [new file with mode: 0644]
test/integration/CASL2/cpa1/Makefile [new file with mode: 0644]
test/integration/CASL2/dc_overflow/0.txt [new file with mode: 0644]
test/integration/CASL2/dc_overflow/Makefile [new file with mode: 0644]
test/integration/CASL2/dc_spc/0.txt [new file with mode: 0644]
test/integration/CASL2/dc_spc/Makefile [new file with mode: 0644]
test/integration/CASL2/divl0_call/0.txt [new file with mode: 0644]
test/integration/CASL2/divl0_call/Makefile [new file with mode: 0644]
test/integration/CASL2/divl1_call/0.txt [new file with mode: 0644]
test/integration/CASL2/divl1_call/Makefile [new file with mode: 0644]
test/integration/CASL2/ds_0/0.txt [new file with mode: 0644]
test/integration/CASL2/ds_0/Makefile [new file with mode: 0644]
test/integration/CASL2/ds_err/0.txt [new file with mode: 0644]
test/integration/CASL2/ds_err/Makefile [new file with mode: 0644]
test/integration/CASL2/ds_err/err.txt [new file with mode: 0644]
test/integration/CASL2/fib_outl/0.txt [new file with mode: 0644]
test/integration/CASL2/fib_outl/Makefile [new file with mode: 0644]
test/integration/CASL2/floatedit/0.txt [new file with mode: 0644]
test/integration/CASL2/floatedit/Makefile [new file with mode: 0644]
test/integration/CASL2/floatedit/teststr.txt [moved from test/astest/floatedit/teststr.txt with 100% similarity]
test/integration/CASL2/hanoi/0.txt [new file with mode: 0644]
test/integration/CASL2/hanoi/Makefile [new file with mode: 0644]
test/integration/CASL2/hello/0.txt [new file with mode: 0644]
test/integration/CASL2/hello/Makefile [new file with mode: 0644]
test/integration/CASL2/iotest/0.txt [moved from test/astest/iotest/0.txt with 56% similarity]
test/integration/CASL2/iotest/Makefile [new file with mode: 0644]
test/integration/CASL2/iotest/teststr.txt [moved from test/astest/iotest/teststr.txt with 100% similarity]
test/integration/CASL2/labeldup_err/0.txt [new file with mode: 0644]
test/integration/CASL2/labeldup_err/Makefile [new file with mode: 0644]
test/integration/CASL2/labeldup_err/err.txt [new file with mode: 0644]
test/integration/CASL2/lad0/0.txt [new file with mode: 0644]
test/integration/CASL2/lad0/Makefile [new file with mode: 0644]
test/integration/CASL2/lad1/0.txt [moved from test/astest/add/0.txt with 91% similarity]
test/integration/CASL2/lad1/Makefile [new file with mode: 0644]
test/integration/CASL2/lad2/0.txt [moved from test/astest/ld/0.txt with 90% similarity]
test/integration/CASL2/lad2/Makefile [new file with mode: 0644]
test/integration/CASL2/lad3/0.txt [new file with mode: 0644]
test/integration/CASL2/lad3/Makefile [new file with mode: 0644]
test/integration/CASL2/ld0/0.txt [new file with mode: 0644]
test/integration/CASL2/ld0/Makefile [new file with mode: 0644]
test/integration/CASL2/ld1/0.txt [new file with mode: 0644]
test/integration/CASL2/ld1/Makefile [new file with mode: 0644]
test/integration/CASL2/ld2/0.txt [new file with mode: 0644]
test/integration/CASL2/ld2/Makefile [new file with mode: 0644]
test/integration/CASL2/ld3/0.txt [new file with mode: 0644]
test/integration/CASL2/ld3/Makefile [new file with mode: 0644]
test/integration/CASL2/ld4/0.txt [new file with mode: 0644]
test/integration/CASL2/ld4/Makefile [new file with mode: 0644]
test/integration/CASL2/ld5/0.txt [moved from test/astest/add/0.o.txt with 79% similarity]
test/integration/CASL2/ld5/Makefile [new file with mode: 0644]
test/integration/CASL2/ld_loop/0.txt [new file with mode: 0644]
test/integration/CASL2/ld_loop/Makefile [new file with mode: 0644]
test/integration/CASL2/literal_spc/0.txt [new file with mode: 0644]
test/integration/CASL2/literal_spc/Makefile [new file with mode: 0644]
test/integration/CASL2/literalstr/0.txt [new file with mode: 0644]
test/integration/CASL2/literalstr/Makefile [new file with mode: 0644]
test/integration/CASL2/minim_call/0.txt [new file with mode: 0644]
test/integration/CASL2/minim_call/Makefile [new file with mode: 0644]
test/integration/CASL2/mula0_call/0.txt [new file with mode: 0644]
test/integration/CASL2/mula0_call/Makefile [new file with mode: 0644]
test/integration/CASL2/mula1_call/0.txt [new file with mode: 0644]
test/integration/CASL2/mula1_call/Makefile [new file with mode: 0644]
test/integration/CASL2/mull0_call/0.txt [new file with mode: 0644]
test/integration/CASL2/mull0_call/Makefile [new file with mode: 0644]
test/integration/CASL2/mull1_call/0.txt [new file with mode: 0644]
test/integration/CASL2/mull1_call/Makefile [new file with mode: 0644]
test/integration/CASL2/opdspc_err/0.txt [new file with mode: 0644]
test/integration/CASL2/opdspc_err/Makefile [new file with mode: 0644]
test/integration/CASL2/opdspc_err/err.txt [new file with mode: 0644]
test/integration/CASL2/out0/0.txt [new file with mode: 0644]
test/integration/CASL2/out0/Makefile [new file with mode: 0644]
test/integration/CASL2/out1/0.txt [new file with mode: 0644]
test/integration/CASL2/out1/Makefile [new file with mode: 0644]
test/integration/CASL2/outa_call/0.txt [new file with mode: 0644]
test/integration/CASL2/outa_call/Makefile [new file with mode: 0644]
test/integration/CASL2/outb_call/0.txt [new file with mode: 0644]
test/integration/CASL2/outb_call/Makefile [new file with mode: 0644]
test/integration/CASL2/outd_q15_call/0.txt [new file with mode: 0644]
test/integration/CASL2/outd_q15_call/Makefile [new file with mode: 0644]
test/integration/CASL2/outl_call/0.txt [new file with mode: 0644]
test/integration/CASL2/outl_call/Makefile [new file with mode: 0644]
test/integration/CASL2/ptn1/0.txt [new file with mode: 0644]
test/integration/CASL2/ptn1/Makefile [new file with mode: 0644]
test/integration/CASL2/ptn2/0.txt [new file with mode: 0644]
test/integration/CASL2/ptn2/Makefile [new file with mode: 0644]
test/integration/CASL2/ptn3/0.txt [new file with mode: 0644]
test/integration/CASL2/ptn3/Makefile [new file with mode: 0644]
test/integration/CASL2/ptn4/0.txt [new file with mode: 0644]
test/integration/CASL2/ptn4/Makefile [new file with mode: 0644]
test/integration/CASL2/pushpop/0.txt [new file with mode: 0644]
test/integration/CASL2/pushpop/Makefile [new file with mode: 0644]
test/integration/CASL2/rev_call/0.txt [new file with mode: 0644]
test/integration/CASL2/rev_call/Makefile [new file with mode: 0644]
test/integration/CASL2/sla2/0.txt [new file with mode: 0644]
test/integration/CASL2/sla2/Makefile [new file with mode: 0644]
test/integration/CASL2/sra2/0.txt [new file with mode: 0644]
test/integration/CASL2/sra2/Makefile [new file with mode: 0644]
test/integration/CASL2/sra3/0.txt [new file with mode: 0644]
test/integration/CASL2/sra3/Makefile [new file with mode: 0644]
test/integration/CASL2/sra4/0.txt [new file with mode: 0644]
test/integration/CASL2/sra4/Makefile [new file with mode: 0644]
test/integration/CASL2/st0/0.txt [new file with mode: 0644]
test/integration/CASL2/st0/Makefile [new file with mode: 0644]
test/integration/CASL2/st1/0.txt [new file with mode: 0644]
test/integration/CASL2/st1/Makefile [new file with mode: 0644]
test/integration/CASL2/sum_call/0.txt [new file with mode: 0644]
test/integration/CASL2/sum_call/Makefile [new file with mode: 0644]
test/integration/CASL2/summary/0.txt [new file with mode: 0644]
test/integration/CASL2/summary/Makefile [new file with mode: 0644]
test/integration/CASL2/svc2/0.txt [new file with mode: 0644]
test/integration/CASL2/svc2/Makefile [new file with mode: 0644]
test/integration/CASL2/svc2_out/0.txt [new file with mode: 0644]
test/integration/CASL2/svc2_out/Makefile [new file with mode: 0644]
test/integration/CASL2/xor0/0.txt [new file with mode: 0644]
test/integration/CASL2/xor0/Makefile [new file with mode: 0644]
test/integration/CASL2/xor1/0.txt [moved from test/astest/sla2/0.txt with 90% similarity]
test/integration/CASL2/xor1/Makefile [new file with mode: 0644]
test/integration/CASL2/xor3/0.txt [moved from test/astest/sra2/0.txt with 89% similarity]
test/integration/CASL2/xor3/Makefile [new file with mode: 0644]
test/integration/CASL2/xor4/0.txt [new file with mode: 0644]
test/integration/CASL2/xor4/Makefile [new file with mode: 0644]
test/integration/CASL2/xor5/0.txt [new file with mode: 0644]
test/integration/CASL2/xor5/Makefile [new file with mode: 0644]
test/integration/COMET2/CMD.mk [new file with mode: 0644]
test/integration/COMET2/Makefile [new file with mode: 0644]
test/integration/COMET2/TEST.log [new file with mode: 0644]
test/integration/COMET2/TEST.mk [new file with mode: 0644]
test/integration/COMET2/abs_call/0.txt [new file with mode: 0644]
test/integration/COMET2/abs_call/Makefile [new file with mode: 0644]
test/integration/COMET2/abs_call/abs_call.o [new file with mode: 0644]
test/integration/COMET2/adda0/0.txt [new file with mode: 0644]
test/integration/COMET2/adda0/Makefile [new file with mode: 0644]
test/integration/COMET2/adda0/adda0.o [new file with mode: 0644]
test/integration/COMET2/adda1/0.txt [new file with mode: 0644]
test/integration/COMET2/adda1/Makefile [new file with mode: 0644]
test/integration/COMET2/adda1/adda1.o [new file with mode: 0644]
test/integration/COMET2/adda_overflow/0.txt [new file with mode: 0644]
test/integration/COMET2/adda_overflow/Makefile [new file with mode: 0644]
test/integration/COMET2/adda_overflow/adda_overflow.o [new file with mode: 0644]
test/integration/COMET2/addl/0.txt [new file with mode: 0644]
test/integration/COMET2/addl/Makefile [new file with mode: 0644]
test/integration/COMET2/addl/addl.o [new file with mode: 0644]
test/integration/COMET2/addl_overflow/0.txt [new file with mode: 0644]
test/integration/COMET2/addl_overflow/Makefile [new file with mode: 0644]
test/integration/COMET2/addl_overflow/addl_overflow.o [new file with mode: 0644]
test/integration/COMET2/and0/0.txt [new file with mode: 0644]
test/integration/COMET2/and0/Makefile [new file with mode: 0644]
test/integration/COMET2/and0/and0.o [new file with mode: 0644]
test/integration/COMET2/and1/0.txt [new file with mode: 0644]
test/integration/COMET2/and1/Makefile [new file with mode: 0644]
test/integration/COMET2/and1/and1.o [new file with mode: 0644]
test/integration/COMET2/and2/0.txt [new file with mode: 0644]
test/integration/COMET2/and2/Makefile [new file with mode: 0644]
test/integration/COMET2/and2/and2.o [new file with mode: 0644]
test/integration/COMET2/and3/0.txt [new file with mode: 0644]
test/integration/COMET2/and3/Makefile [new file with mode: 0644]
test/integration/COMET2/and3/and3.o [new file with mode: 0644]
test/integration/COMET2/binout/0.txt [new file with mode: 0644]
test/integration/COMET2/binout/Makefile [new file with mode: 0644]
test/integration/COMET2/binout/binout.o [new file with mode: 0644]
test/integration/COMET2/call0/0.txt [new file with mode: 0644]
test/integration/COMET2/call0/Makefile [new file with mode: 0644]
test/integration/COMET2/call0/call0.o [new file with mode: 0644]
test/integration/COMET2/call1/0.txt [new file with mode: 0644]
test/integration/COMET2/call1/Makefile [new file with mode: 0644]
test/integration/COMET2/call1/call1.o [new file with mode: 0644]
test/integration/COMET2/call2/0.txt [new file with mode: 0644]
test/integration/COMET2/call2/Makefile [new file with mode: 0644]
test/integration/COMET2/call2/call2.o [new file with mode: 0644]
test/integration/COMET2/count_call/0.txt [new file with mode: 0644]
test/integration/COMET2/count_call/Makefile [new file with mode: 0644]
test/integration/COMET2/count_call/count_call.o [new file with mode: 0644]
test/integration/COMET2/cpa1/0.txt [new file with mode: 0644]
test/integration/COMET2/cpa1/Makefile [new file with mode: 0644]
test/integration/COMET2/cpa1/cpa1.o [new file with mode: 0644]
test/integration/COMET2/dc_overflow/0.txt [new file with mode: 0644]
test/integration/COMET2/dc_overflow/Makefile [new file with mode: 0644]
test/integration/COMET2/dc_overflow/dc_overflow.o [new file with mode: 0644]
test/integration/COMET2/dc_spc/0.txt [new file with mode: 0644]
test/integration/COMET2/dc_spc/Makefile [new file with mode: 0644]
test/integration/COMET2/dc_spc/dc_spc.o [new file with mode: 0644]
test/integration/COMET2/divl0_call/0.txt [new file with mode: 0644]
test/integration/COMET2/divl0_call/Makefile [new file with mode: 0644]
test/integration/COMET2/divl0_call/divl0_call.o [new file with mode: 0644]
test/integration/COMET2/divl1_call/0.txt [new file with mode: 0644]
test/integration/COMET2/divl1_call/Makefile [new file with mode: 0644]
test/integration/COMET2/divl1_call/divl1_call.o [new file with mode: 0644]
test/integration/COMET2/ds_0/0.txt [new file with mode: 0644]
test/integration/COMET2/ds_0/Makefile [new file with mode: 0644]
test/integration/COMET2/ds_0/ds_0.o [new file with mode: 0644]
test/integration/COMET2/fib_outl/0.txt [new file with mode: 0644]
test/integration/COMET2/fib_outl/Makefile [new file with mode: 0644]
test/integration/COMET2/fib_outl/fib_outl.o [new file with mode: 0644]
test/integration/COMET2/floatedit/0.txt [new file with mode: 0644]
test/integration/COMET2/floatedit/Makefile [new file with mode: 0644]
test/integration/COMET2/floatedit/floatedit.o [new file with mode: 0644]
test/integration/COMET2/floatedit/teststr.txt [new file with mode: 0644]
test/integration/COMET2/hanoi/0.txt [new file with mode: 0644]
test/integration/COMET2/hanoi/Makefile [new file with mode: 0644]
test/integration/COMET2/hanoi/hanoi.o [new file with mode: 0644]
test/integration/COMET2/hello/0.txt [new file with mode: 0644]
test/integration/COMET2/hello/Makefile [new file with mode: 0644]
test/integration/COMET2/hello/hello.o [new file with mode: 0644]
test/integration/COMET2/iotest/0.txt [new file with mode: 0644]
test/integration/COMET2/iotest/Makefile [new file with mode: 0644]
test/integration/COMET2/iotest/iotest.o [new file with mode: 0644]
test/integration/COMET2/iotest/teststr.txt [new file with mode: 0644]
test/integration/COMET2/lad0/0.txt [new file with mode: 0644]
test/integration/COMET2/lad0/Makefile [new file with mode: 0644]
test/integration/COMET2/lad0/lad0.o [new file with mode: 0644]
test/integration/COMET2/lad1/0.txt [new file with mode: 0644]
test/integration/COMET2/lad1/Makefile [new file with mode: 0644]
test/integration/COMET2/lad1/lad1.o [new file with mode: 0644]
test/integration/COMET2/lad2/0.txt [new file with mode: 0644]
test/integration/COMET2/lad2/Makefile [new file with mode: 0644]
test/integration/COMET2/lad2/lad2.o [new file with mode: 0644]
test/integration/COMET2/lad3/0.txt [new file with mode: 0644]
test/integration/COMET2/lad3/Makefile [new file with mode: 0644]
test/integration/COMET2/lad3/lad3.o [new file with mode: 0644]
test/integration/COMET2/ld0/0.txt [new file with mode: 0644]
test/integration/COMET2/ld0/Makefile [new file with mode: 0644]
test/integration/COMET2/ld0/ld0.o [new file with mode: 0644]
test/integration/COMET2/ld1/0.txt [new file with mode: 0644]
test/integration/COMET2/ld1/Makefile [new file with mode: 0644]
test/integration/COMET2/ld1/ld1.o [new file with mode: 0644]
test/integration/COMET2/ld2/0.txt [new file with mode: 0644]
test/integration/COMET2/ld2/Makefile [new file with mode: 0644]
test/integration/COMET2/ld2/ld2.o [new file with mode: 0644]
test/integration/COMET2/ld3/0.txt [new file with mode: 0644]
test/integration/COMET2/ld3/Makefile [new file with mode: 0644]
test/integration/COMET2/ld3/ld3.o [new file with mode: 0644]
test/integration/COMET2/ld4/0.txt [new file with mode: 0644]
test/integration/COMET2/ld4/Makefile [new file with mode: 0644]
test/integration/COMET2/ld4/ld4.o [new file with mode: 0644]
test/integration/COMET2/ld5/0.txt [new file with mode: 0644]
test/integration/COMET2/ld5/Makefile [new file with mode: 0644]
test/integration/COMET2/ld5/ld5.o [new file with mode: 0644]
test/integration/COMET2/ld_loop/0.txt [new file with mode: 0644]
test/integration/COMET2/ld_loop/Makefile [new file with mode: 0644]
test/integration/COMET2/ld_loop/ld_loop.o [new file with mode: 0644]
test/integration/COMET2/literal_spc/0.txt [new file with mode: 0644]
test/integration/COMET2/literal_spc/Makefile [new file with mode: 0644]
test/integration/COMET2/literal_spc/literal_spc.o [new file with mode: 0644]
test/integration/COMET2/literalstr/0.txt [new file with mode: 0644]
test/integration/COMET2/literalstr/Makefile [new file with mode: 0644]
test/integration/COMET2/literalstr/literalstr.o [new file with mode: 0644]
test/integration/COMET2/minim_call/0.txt [new file with mode: 0644]
test/integration/COMET2/minim_call/Makefile [new file with mode: 0644]
test/integration/COMET2/minim_call/minim_call.o [new file with mode: 0644]
test/integration/COMET2/mula0_call/0.txt [new file with mode: 0644]
test/integration/COMET2/mula0_call/Makefile [new file with mode: 0644]
test/integration/COMET2/mula0_call/mula0_call.o [new file with mode: 0644]
test/integration/COMET2/mula1_call/0.txt [new file with mode: 0644]
test/integration/COMET2/mula1_call/Makefile [new file with mode: 0644]
test/integration/COMET2/mula1_call/mula1_call.o [new file with mode: 0644]
test/integration/COMET2/mull0_call/0.txt [new file with mode: 0644]
test/integration/COMET2/mull0_call/Makefile [new file with mode: 0644]
test/integration/COMET2/mull0_call/mull0_call.o [new file with mode: 0644]
test/integration/COMET2/mull1_call/0.txt [new file with mode: 0644]
test/integration/COMET2/mull1_call/Makefile [new file with mode: 0644]
test/integration/COMET2/mull1_call/mull1_call.o [new file with mode: 0644]
test/integration/COMET2/out0/0.txt [new file with mode: 0644]
test/integration/COMET2/out0/Makefile [new file with mode: 0644]
test/integration/COMET2/out0/out0.o [new file with mode: 0644]
test/integration/COMET2/out1/0.txt [new file with mode: 0644]
test/integration/COMET2/out1/Makefile [new file with mode: 0644]
test/integration/COMET2/out1/out1.o [new file with mode: 0644]
test/integration/COMET2/outa_call/0.txt [new file with mode: 0644]
test/integration/COMET2/outa_call/Makefile [new file with mode: 0644]
test/integration/COMET2/outa_call/outa_call.o [new file with mode: 0644]
test/integration/COMET2/outb_call/0.txt [new file with mode: 0644]
test/integration/COMET2/outb_call/Makefile [new file with mode: 0644]
test/integration/COMET2/outb_call/outb_call.o [new file with mode: 0644]
test/integration/COMET2/outd_q15_call/0.txt [new file with mode: 0644]
test/integration/COMET2/outd_q15_call/Makefile [new file with mode: 0644]
test/integration/COMET2/outd_q15_call/outd_q15_call.o [new file with mode: 0644]
test/integration/COMET2/outl_call/0.txt [new file with mode: 0644]
test/integration/COMET2/outl_call/Makefile [new file with mode: 0644]
test/integration/COMET2/outl_call/outl_call.o [new file with mode: 0644]
test/integration/COMET2/ptn1/0.txt [new file with mode: 0644]
test/integration/COMET2/ptn1/Makefile [new file with mode: 0644]
test/integration/COMET2/ptn1/ptn1.o [new file with mode: 0644]
test/integration/COMET2/ptn2/0.txt [new file with mode: 0644]
test/integration/COMET2/ptn2/Makefile [new file with mode: 0644]
test/integration/COMET2/ptn2/ptn2.o [new file with mode: 0644]
test/integration/COMET2/ptn3/0.txt [new file with mode: 0644]
test/integration/COMET2/ptn3/Makefile [new file with mode: 0644]
test/integration/COMET2/ptn3/ptn3.o [new file with mode: 0644]
test/integration/COMET2/ptn4/0.txt [new file with mode: 0644]
test/integration/COMET2/ptn4/Makefile [new file with mode: 0644]
test/integration/COMET2/ptn4/ptn4.o [new file with mode: 0644]
test/integration/COMET2/pushpop/0.txt [new file with mode: 0644]
test/integration/COMET2/pushpop/Makefile [new file with mode: 0644]
test/integration/COMET2/pushpop/pushpop.o [new file with mode: 0644]
test/integration/COMET2/rev_call/0.txt [new file with mode: 0644]
test/integration/COMET2/rev_call/Makefile [new file with mode: 0644]
test/integration/COMET2/rev_call/rev_call.o [new file with mode: 0644]
test/integration/COMET2/sla2/0.txt [new file with mode: 0644]
test/integration/COMET2/sla2/Makefile [new file with mode: 0644]
test/integration/COMET2/sla2/sla2.o [new file with mode: 0644]
test/integration/COMET2/sra2/0.txt [new file with mode: 0644]
test/integration/COMET2/sra2/Makefile [new file with mode: 0644]
test/integration/COMET2/sra2/sra2.o [new file with mode: 0644]
test/integration/COMET2/sra3/0.txt [new file with mode: 0644]
test/integration/COMET2/sra3/Makefile [new file with mode: 0644]
test/integration/COMET2/sra3/sra3.o [new file with mode: 0644]
test/integration/COMET2/sra4/0.txt [new file with mode: 0644]
test/integration/COMET2/sra4/Makefile [new file with mode: 0644]
test/integration/COMET2/sra4/sra4.o [new file with mode: 0644]
test/integration/COMET2/st0/0.txt [new file with mode: 0644]
test/integration/COMET2/st0/Makefile [new file with mode: 0644]
test/integration/COMET2/st0/st0.o [new file with mode: 0644]
test/integration/COMET2/st1/0.txt [new file with mode: 0644]
test/integration/COMET2/st1/Makefile [new file with mode: 0644]
test/integration/COMET2/st1/st1.o [new file with mode: 0644]
test/integration/COMET2/sum_call/0.txt [new file with mode: 0644]
test/integration/COMET2/sum_call/Makefile [new file with mode: 0644]
test/integration/COMET2/sum_call/sum_call.o [new file with mode: 0644]
test/integration/COMET2/summary/0.txt [new file with mode: 0644]
test/integration/COMET2/summary/Makefile [new file with mode: 0644]
test/integration/COMET2/summary/summary.o [new file with mode: 0644]
test/integration/COMET2/svc2/0.txt [new file with mode: 0644]
test/integration/COMET2/svc2/Makefile [new file with mode: 0644]
test/integration/COMET2/svc2/svc2.o [new file with mode: 0644]
test/integration/COMET2/svc2_out/0.txt [new file with mode: 0644]
test/integration/COMET2/svc2_out/Makefile [new file with mode: 0644]
test/integration/COMET2/svc2_out/svc2_out.o [new file with mode: 0644]
test/integration/COMET2/xor0/0.txt [new file with mode: 0644]
test/integration/COMET2/xor0/Makefile [new file with mode: 0644]
test/integration/COMET2/xor0/xor0.o [new file with mode: 0644]
test/integration/COMET2/xor1/0.txt [new file with mode: 0644]
test/integration/COMET2/xor1/Makefile [new file with mode: 0644]
test/integration/COMET2/xor1/xor1.o [new file with mode: 0644]
test/integration/COMET2/xor3/0.txt [new file with mode: 0644]
test/integration/COMET2/xor3/Makefile [new file with mode: 0644]
test/integration/COMET2/xor3/xor3.o [new file with mode: 0644]
test/integration/COMET2/xor4/0.txt [new file with mode: 0644]
test/integration/COMET2/xor4/Makefile [new file with mode: 0644]
test/integration/COMET2/xor4/xor4.o [new file with mode: 0644]
test/integration/COMET2/xor5/0.txt [new file with mode: 0644]
test/integration/COMET2/xor5/Makefile [new file with mode: 0644]
test/integration/COMET2/xor5/xor5.o [new file with mode: 0644]
test/integration/DUMPWORD/CMD.mk [new file with mode: 0644]
test/integration/DUMPWORD/HEX.txt [new file with mode: 0644]
test/integration/DUMPWORD/Makefile [new file with mode: 0644]
test/integration/DUMPWORD/TEST.log [new file with mode: 0644]
test/integration/DUMPWORD/TEST.mk [new file with mode: 0644]
test/integration/DUMPWORD/a/0.txt [new file with mode: 0644]
test/integration/DUMPWORD/a/Makefile [new file with mode: 0644]
test/integration/DUMPWORD/a/err.txt [new file with mode: 0644]
test/integration/DUMPWORD/a/test.sh [new file with mode: 0644]
test/integration/DUMPWORD/l/0.txt [new file with mode: 0644]
test/integration/DUMPWORD/l/Makefile [new file with mode: 0644]
test/integration/DUMPWORD/l/err.txt [new file with mode: 0644]
test/integration/DUMPWORD/l/test.sh [new file with mode: 0644]
test/integration/DUMPWORD/noopt/0.txt [new file with mode: 0644]
test/integration/DUMPWORD/noopt/Makefile [new file with mode: 0644]
test/integration/DUMPWORD/noopt/err.txt [new file with mode: 0644]
test/integration/DUMPWORD/noopt/test.sh [new file with mode: 0644]
test/integration/Makefile [new file with mode: 0644]
test/unit/List.mk [moved from test/utest/List.mk with 100% similarity]
test/unit/Makefile [moved from test/utest/Makefile with 100% similarity]
test/unit/Template.c [moved from test/utest/Template.c with 100% similarity]
test/unit/Test.mk [moved from test/utest/Test.mk with 100% similarity]
test/unit/cerrtest/0.txt [moved from test/utest/cerrtest/0.txt with 100% similarity]
test/unit/cerrtest/Makefile [moved from test/utest/cerrtest/Makefile with 100% similarity]
test/unit/cerrtest/cerrtest.c [moved from test/utest/cerrtest/cerrtest.c with 100% similarity]
test/unit/getcmdcode/0.txt [moved from test/utest/getcmdcode/0.txt with 100% similarity]
test/unit/getcmdcode/Makefile [moved from test/utest/getcmdcode/Makefile with 100% similarity]
test/unit/getcmdcode/getcmdcode.c [moved from test/utest/getcmdcode/getcmdcode.c with 100% similarity]
test/unit/getcmdtype/0.txt [moved from test/utest/getcmdtype/0.txt with 100% similarity]
test/unit/getcmdtype/Makefile [moved from test/utest/getcmdtype/Makefile with 100% similarity]
test/unit/getcmdtype/getcmdtype.c [moved from test/utest/getcmdtype/getcmdtype.c with 100% similarity]
test/unit/getgr/0.txt [moved from test/utest/getgr/0.txt with 100% similarity]
test/unit/getgr/Makefile [moved from test/utest/getgr/Makefile with 100% similarity]
test/unit/getgr/getgr.c [moved from test/utest/getgr/getgr.c with 100% similarity]
test/unit/gethex/0.txt [moved from test/utest/gethex/0.txt with 100% similarity]
test/unit/gethex/Makefile [moved from test/utest/gethex/Makefile with 100% similarity]
test/unit/gethex/gethex.c [moved from test/utest/gethex/gethex.c with 100% similarity]
test/unit/getint/0.txt [moved from test/utest/getint/0.txt with 100% similarity]
test/unit/getint/Makefile [moved from test/utest/getint/Makefile with 100% similarity]
test/unit/getint/getint.c [moved from test/utest/getint/getint.c with 100% similarity]
test/unit/linetok/0.txt [moved from test/utest/linetok/0.txt with 100% similarity]
test/unit/linetok/Makefile [moved from test/utest/linetok/Makefile with 100% similarity]
test/unit/linetok/linetok.c [moved from test/utest/linetok/linetok.c with 100% similarity]
test/unit/opdtok/0.txt [moved from test/utest/opdtok/0.txt with 100% similarity]
test/unit/opdtok/Makefile [moved from test/utest/opdtok/Makefile with 100% similarity]
test/unit/opdtok/opdtok.c [moved from test/utest/opdtok/opdtok.c with 100% similarity]
test/unit/print_cmdtype_code/0.txt [moved from test/utest/print_cmdtype_code/0.txt with 100% similarity]
test/unit/print_cmdtype_code/Makefile [moved from test/utest/print_cmdtype_code/Makefile with 100% similarity]
test/unit/print_cmdtype_code/print_cmdtype_code.c [moved from test/utest/print_cmdtype_code/print_cmdtype_code.c with 100% similarity]
test/unit/print_code_type/0.txt [moved from test/utest/print_code_type/0.txt with 100% similarity]
test/unit/print_code_type/Makefile [moved from test/utest/print_code_type/Makefile with 100% similarity]
test/unit/print_code_type/print_code_type.c [moved from test/utest/print_code_type/print_code_type.c with 100% similarity]

index 8048d7c..4ffad4b 100644 (file)
@@ -1,8 +1,10 @@
-*.o
+src/*.o
 1.txt
 report.txt
 diff.txt
 casl2
 comet2
+dumpword
 test.log
 *~
+TAGS
index 06cf19d..2797559 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,20 @@
-INSTALLDIR = /usr/local/bin
+prefix = $(HOME)
 .PHPNY: all clean check install uninstall
 all:
-       make -C src ../casl2 ../comet2
+       make -C src
 check:
-       make -C test/astest
+       make -C test/integration
 clean:
        make -C src clean
-       make -C test/astest clean
-       make -C test/utest clean
-install: casl2 comet2
-       @if test -d $(INSTALLDIR); then \
-       install -s ./casl2 $(INSTALLDIR)/casl2; \
-       install -s ./comet2 $(INSTALLDIR)/comet2; \
+       make -C test/integration clean
+       make -C test/unit clean
+install: all
+       @if test -d $(prefix); then \
+       install -s ./casl2 $(prefix)/casl2; \
+       install -s ./comet2 $(prefix)/comet2; \
+       install -s ./dumpword $(prefix)/dumpword; \
      fi
 uninstall:
-       @if test -d $(INSTALLDIR); then \
-       rm -f $(INSTALLDIR)/casl2 $(INSTALLDIR)/comet2; \
+       @if test -d $(prefix); then \
+       rm -f $(prefix)/casl2 $(prefix)/comet2 $(prefix)/dumpword; \
      fi
diff --git a/as/CMD/adda0.casl b/as/CMD/adda0.casl
new file mode 100644 (file)
index 0000000..8e068bc
--- /dev/null
@@ -0,0 +1,6 @@
+MAIN    START
+BEGIN   LAD     GR1,3
+        ADDA    GR1,A
+        RET
+A       DC      1
+        END
diff --git a/as/CMD/adda1.casl b/as/CMD/adda1.casl
new file mode 100644 (file)
index 0000000..6c69581
--- /dev/null
@@ -0,0 +1,8 @@
+MAIN    START
+BEGIN   LD      GR1,A
+        LD      GR2,B
+        ADDA    GR1,GR2
+        RET
+A       DC      3
+B       DC      1
+        END
diff --git a/as/CMD/adda_overflow.casl b/as/CMD/adda_overflow.casl
new file mode 100644 (file)
index 0000000..478cd3a
--- /dev/null
@@ -0,0 +1,6 @@
+MAIN    START   BEGIN
+BEGIN   LAD     GR1,32766
+        ADDA    GR1,A
+        RET
+A       DC      29
+        END
similarity index 100%
rename from as/addl.casl
rename to as/CMD/addl.casl
diff --git a/as/CMD/and0.casl b/as/CMD/and0.casl
new file mode 100644 (file)
index 0000000..99ca479
--- /dev/null
@@ -0,0 +1,6 @@
+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
new file mode 100644 (file)
index 0000000..99b3203
--- /dev/null
@@ -0,0 +1,6 @@
+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
new file mode 100644 (file)
index 0000000..65b8b8a
--- /dev/null
@@ -0,0 +1,5 @@
+MAIN    START
+BEGIN   LAD     GR0,#3444
+        AND     GR0,=#00DD
+        RET
+        END
diff --git a/as/CMD/and3.casl b/as/CMD/and3.casl
new file mode 100644 (file)
index 0000000..2e6cf33
--- /dev/null
@@ -0,0 +1,5 @@
+MAIN    START
+BEGIN   LAD     GR0,#0460
+        AND     GR0,=#00FF
+        RET
+        END
diff --git a/as/CMD/call0.casl b/as/CMD/call0.casl
new file mode 100644 (file)
index 0000000..bcd9543
--- /dev/null
@@ -0,0 +1,12 @@
+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/call1.casl b/as/CMD/call1.casl
new file mode 100644 (file)
index 0000000..f0282ca
--- /dev/null
@@ -0,0 +1,11 @@
+MAIN    START   BEGIN
+BEGIN   LD      GR1,=29
+        CALL    COPY
+        ST      GR2,B
+        RET
+B       DS      1
+        END
+COPY    START
+        LD      GR2,GR1
+        RET
+        END
diff --git a/as/CMD/call2.casl b/as/CMD/call2.casl
new file mode 100644 (file)
index 0000000..afa5fdd
--- /dev/null
@@ -0,0 +1,11 @@
+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
new file mode 100644 (file)
index 0000000..a5ca590
--- /dev/null
@@ -0,0 +1,6 @@
+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
new file mode 100644 (file)
index 0000000..778ccb5
--- /dev/null
@@ -0,0 +1,6 @@
+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
new file mode 100644 (file)
index 0000000..1eb8126
--- /dev/null
@@ -0,0 +1,6 @@
+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
new file mode 100644 (file)
index 0000000..2bd37e0
--- /dev/null
@@ -0,0 +1,7 @@
+MAIN    START
+BEGIN   LAD     GR1,#5000
+        ADDL    GR1,=#FFFF
+        LAD     GR2,#F000
+        CPL     GR1,GR2
+        RET
+        END
diff --git a/as/CMD/dc_overflow.casl b/as/CMD/dc_overflow.casl
new file mode 100644 (file)
index 0000000..d3da7aa
--- /dev/null
@@ -0,0 +1,10 @@
+;; DC命令で、-32768〜32768の範囲にない10進数値を指定
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        ADDL    GR1,B
+        ST      GR0,C
+        RET
+A       DC      32779
+B       DC      32778
+C       DS      1
+        END
diff --git a/as/CMD/dc_spc.casl b/as/CMD/dc_spc.casl
new file mode 100644 (file)
index 0000000..1d68a32
--- /dev/null
@@ -0,0 +1,7 @@
+;;; DC命令で空白を指定
+MAIN    START
+        OUT     BUF,LEN
+        RET
+BUF     DC      ' '
+LEN     DC      1
+        END
diff --git a/as/CMD/ds_0.casl b/as/CMD/ds_0.casl
new file mode 100644 (file)
index 0000000..9e161f1
--- /dev/null
@@ -0,0 +1,8 @@
+;; 「DS 0」を指定したプログラム例
+MAIN    START
+        LD      GR1,A
+        LD      GR2,B
+        RET
+A       DS      0
+B       DC      15
+        END
diff --git a/as/CMD/lad0.casl b/as/CMD/lad0.casl
new file mode 100644 (file)
index 0000000..875e53d
--- /dev/null
@@ -0,0 +1,4 @@
+LAD     START
+        LAD     GR1,5
+        RET
+        END
diff --git a/as/CMD/lad1.casl b/as/CMD/lad1.casl
new file mode 100644 (file)
index 0000000..3700cbc
--- /dev/null
@@ -0,0 +1,6 @@
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        LAD     GR1,1,GR1
+        RET
+A       DC      3
+        END
diff --git a/as/CMD/lad2.casl b/as/CMD/lad2.casl
new file mode 100644 (file)
index 0000000..5d75b42
--- /dev/null
@@ -0,0 +1,5 @@
+LAD1    START
+        LAD     GR1,10
+        LAD     GR1,65534,GR1
+        RET
+        END
diff --git a/as/CMD/lad3.casl b/as/CMD/lad3.casl
new file mode 100644 (file)
index 0000000..bd8d349
--- /dev/null
@@ -0,0 +1,5 @@
+LAD1    START
+        LAD     GR1,-1
+        LAD     GR1,65535,GR1
+        RET
+        END
diff --git a/as/CMD/lad4.casl b/as/CMD/lad4.casl
new file mode 100644 (file)
index 0000000..1711f01
--- /dev/null
@@ -0,0 +1,6 @@
+MAIN    START   BEGIN
+BEGIN   LD      GR7,A
+        LAD     GR7,1,GR7
+        RET
+A       DC      3
+        END
diff --git a/as/CMD/ld0.casl b/as/CMD/ld0.casl
new file mode 100644 (file)
index 0000000..dd84f32
--- /dev/null
@@ -0,0 +1,5 @@
+MAIN    START
+        LAD     GR1,3
+        LD      GR0,GR1
+        RET
+        END
diff --git a/as/CMD/ld1.casl b/as/CMD/ld1.casl
new file mode 100644 (file)
index 0000000..56b035f
--- /dev/null
@@ -0,0 +1,5 @@
+MAIN    START
+        LD      GR0,A
+        RET
+A       DC      1,1,2,3,5,8
+        END
similarity index 100%
rename from as/ld2.casl
rename to as/CMD/ld2.casl
similarity index 100%
rename from as/ld3.casl
rename to as/CMD/ld3.casl
diff --git a/as/CMD/ld4.casl b/as/CMD/ld4.casl
new file mode 100644 (file)
index 0000000..d6723d6
--- /dev/null
@@ -0,0 +1,9 @@
+; 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
new file mode 100644 (file)
index 0000000..2b40d74
--- /dev/null
@@ -0,0 +1,8 @@
+; 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
new file mode 100644 (file)
index 0000000..5e21750
--- /dev/null
@@ -0,0 +1,12 @@
+;;; ループを使い、連続で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
similarity index 100%
rename from as/literal_spc.casl
rename to as/CMD/literal_spc.casl
similarity index 100%
rename from as/literalstr.casl
rename to as/CMD/literalstr.casl
diff --git a/as/CMD/nop.casl b/as/CMD/nop.casl
new file mode 100644 (file)
index 0000000..362bc6c
--- /dev/null
@@ -0,0 +1,13 @@
+MAIN    START
+        NOP
+        NOP
+        NOP
+        NOP
+        NOP
+        NOP
+        NOP
+        NOP
+        NOP
+        RET
+        END
+        
\ No newline at end of file
diff --git a/as/CMD/out0.casl b/as/CMD/out0.casl
new file mode 100644 (file)
index 0000000..4f046e3
--- /dev/null
@@ -0,0 +1,6 @@
+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
new file mode 100644 (file)
index 0000000..aedfb02
--- /dev/null
@@ -0,0 +1,7 @@
+;;; 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
new file mode 100644 (file)
index 0000000..f8c8d33
--- /dev/null
@@ -0,0 +1,11 @@
+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/sla2.casl b/as/CMD/sla2.casl
new file mode 100644 (file)
index 0000000..31a3d1d
--- /dev/null
@@ -0,0 +1,6 @@
+SLA2    START   BEGIN
+BEGIN   LAD     GR1,3
+        SLA     GR1,2
+        RET
+        END
+        
\ No newline at end of file
diff --git a/as/CMD/sla3.casl b/as/CMD/sla3.casl
new file mode 100644 (file)
index 0000000..4108f1e
--- /dev/null
@@ -0,0 +1,6 @@
+SLA3    START   BEGIN
+BEGIN   LAD     GR1,#8000
+        SLA     GR1,1
+        RET
+        END
+        
\ No newline at end of file
diff --git a/as/CMD/sll2.casl b/as/CMD/sll2.casl
new file mode 100644 (file)
index 0000000..86672cf
--- /dev/null
@@ -0,0 +1,7 @@
+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
new file mode 100644 (file)
index 0000000..e22bed0
--- /dev/null
@@ -0,0 +1,7 @@
+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/sra2.casl b/as/CMD/sra2.casl
new file mode 100644 (file)
index 0000000..a455538
--- /dev/null
@@ -0,0 +1,5 @@
+SRA2    START   BEGIN
+BEGIN   LAD     GR4,124
+        SRA     GR4,2
+        RET
+        END
similarity index 100%
rename from as/sra3.casl
rename to as/CMD/sra3.casl
similarity index 100%
rename from as/sra4.casl
rename to as/CMD/sra4.casl
diff --git a/as/CMD/st0.casl b/as/CMD/st0.casl
new file mode 100644 (file)
index 0000000..3ed3127
--- /dev/null
@@ -0,0 +1,6 @@
+MAIN    START
+        LAD     GR0,286
+        ST      GR0,A
+        RET
+A       DS      1
+        END
diff --git a/as/CMD/st1.casl b/as/CMD/st1.casl
new file mode 100644 (file)
index 0000000..2803c76
--- /dev/null
@@ -0,0 +1,7 @@
+MAIN    START
+        LAD     GR0,286
+        LAD     GR1,3
+        ST      GR0,A,GR1
+        RET
+A       DS      4
+        END
diff --git a/as/CMD/svc2.casl b/as/CMD/svc2.casl
new file mode 100644 (file)
index 0000000..f5542fd
--- /dev/null
@@ -0,0 +1,12 @@
+;;; 「SVC 2」で数値を表示
+;;; casl2 svctest.casl div10.casl
+MAIN    START
+BEGIN   LAD     GR1,D
+        LAD     GR2,A
+        SVC     2
+        LAD     GR1,=#A
+        SVC     2
+        RET
+D       DC      '0'
+A       DS      1
+        END
diff --git a/as/CMD/svc2_out.casl b/as/CMD/svc2_out.casl
new file mode 100644 (file)
index 0000000..5902866
--- /dev/null
@@ -0,0 +1,16 @@
+;;; 「OUT」と同等のプログラム
+OTEST   START
+        PUSH    0,GR1
+        PUSH    0,GR2
+        LAD     GR1,OBUF
+        LD      GR2,LEN
+        SVC     2
+        LAD     GR1,=#A
+        LAD     GR2,1
+        SVC     2
+        POP     GR2
+        POP     GR1
+        RET
+OBUF    DC      'abcd'
+LEN     DC      4
+        END
similarity index 100%
rename from as/xor0.casl
rename to as/CMD/xor0.casl
similarity index 100%
rename from as/xor1.casl
rename to as/CMD/xor1.casl
diff --git a/as/CMD/xor3.casl b/as/CMD/xor3.casl
new file mode 100644 (file)
index 0000000..7b6e7cd
--- /dev/null
@@ -0,0 +1,7 @@
+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
new file mode 100644 (file)
index 0000000..845043d
--- /dev/null
@@ -0,0 +1,13 @@
+;;; 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/CMD/xor5.casl b/as/CMD/xor5.casl
new file mode 100644 (file)
index 0000000..0d5e346
--- /dev/null
@@ -0,0 +1,7 @@
+MAIN    START
+BEGIN   LD      GR1,A
+        XOR     GR1,B
+        RET
+A       DC      3
+B       DC      #FFFF
+        END
diff --git a/as/ERR/cmd_err0.casl b/as/ERR/cmd_err0.casl
new file mode 100644 (file)
index 0000000..82efe3e
--- /dev/null
@@ -0,0 +1,6 @@
+MAIN    START   BEGIN
+BEGIN   LAD     GR1,3
+        LAD     GR2,2
+        LEA     GR1,GR2
+        RET
+        END
diff --git a/as/ERR/cmd_err1.casl b/as/ERR/cmd_err1.casl
new file mode 100644 (file)
index 0000000..c90bc38
--- /dev/null
@@ -0,0 +1,5 @@
+MAIN    START   BEGIN
+BEGIN   LEA     GR1,A
+        RET
+A       DC      3
+        END
diff --git a/as/ERR/ds_err.casl b/as/ERR/ds_err.casl
new file mode 100644 (file)
index 0000000..666484d
--- /dev/null
@@ -0,0 +1,6 @@
+MAIN    START
+        LAD     GR0,=10
+        ST      GR0,A
+A       DS
+        RET
+        END
diff --git a/as/ERR/labeldup_err.casl b/as/ERR/labeldup_err.casl
new file mode 100644 (file)
index 0000000..f40fc98
--- /dev/null
@@ -0,0 +1,7 @@
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        ADDA    GR1,B
+        RET
+A       DC      3
+A       DC      1
+        END
diff --git a/as/ERR/opdspc_err.casl b/as/ERR/opdspc_err.casl
new file mode 100644 (file)
index 0000000..f5ab5bf
--- /dev/null
@@ -0,0 +1,7 @@
+MAIN    START   BEGIN
+BEGIN   LD      GR1, A
+        ADDA    GR1,B
+        RET
+A       DC      3
+B       DC      1
+        END
diff --git a/as/FE_TESTS/2008_04/Q09/token.casl b/as/FE_TESTS/2008_04/Q09/token.casl
new file mode 100644 (file)
index 0000000..de57bca
--- /dev/null
@@ -0,0 +1,42 @@
+TOKEN   START
+        RPUSH
+        LD      GR3,=-1        ; 単語の処理中を示すフラグの初期化
+                               ;  0: 数字だけの単語を処理中である。
+                               ;  1: 英字を含む単語を処理中である。
+                               ; -1: 単語の処理中ではない。
+        LAD     GR1,-1,GR1
+LP      LAD     GR1,1,GR1
+        LD      GR4,0,GR1      ; 1文字を取り出す。
+        CPL     GR4,='.'       ; 終了判定
+        JZE     FIN 
+        CPL     GR4,=' '
+        JNZ     ALNUM
+        CALL    SETTKN
+        JUMP    LP
+ALNUM   LD      GR3,GR3        ; 単語の処理中?
+        JPL     LP             ;   英字を含む単語を処理中ならLPヘ
+        JZE     ACHK           ;   数字だけの単語を処理中ならACHKヘ
+        LD      GR3,=0
+        LD      GR6,GR1        ; 単語の先頭アドレスを退避
+ACHK    CPL     GR4,='A'       ; 検査対象文字は数字?
+        JMI     LP             ;   数字の場合,次の文字の取出しヘ
+        LD      GR3,=1         ;   英字の場合
+        JUMP    LP
+;
+FIN     CALL    SETTKN
+        LD      GR5,=-1
+        ST      GR5,0,GR2      ; 終了マークを格納
+        RPOP
+        RET
+;
+SETTKN  LD      GR3,GR3        ; 単語の処理中?
+        JMI     FIN2           ;   処理中でなければ何もしない。
+        ST      GR6,0,GR2      ; 単語の先頭アドレスを管理テーブルに格納
+        LD      GR5,GR1
+        SUBL    GR5,GR6        ; 単語の長さを計算
+        ST      GR5,1,GR2      ; 単語の長さを格納
+        ST      GR3,2,GR2      ; 単語の属性を格納
+        LD      GR3,=-1        ; 単語の処理中状態を解除
+        LAD     GR2,3,GR2 
+FIN2    RET
+        END
diff --git a/as/FE_TESTS/2008_04/Q09/token_call.casl b/as/FE_TESTS/2008_04/Q09/token_call.casl
new file mode 100644 (file)
index 0000000..bd42226
--- /dev/null
@@ -0,0 +1,9 @@
+MAIN    START
+        LAD     GR1,STR
+        LAD     GR2,TBL
+        CALL    TOKEN
+        RET
+        DS      93
+STR     DC      '  THIS 1234  AN9999.'
+TBL     DS      100        
+        END
diff --git a/as/FE_TESTS/2008_10/Q09/ptn1.casl b/as/FE_TESTS/2008_10/Q09/ptn1.casl
new file mode 100644 (file)
index 0000000..cbf57c3
--- /dev/null
@@ -0,0 +1,12 @@
+;;; 平成20年 秋期 基本情報技術者 午後 問09
+;;; 最上位ビットから与えられたビット番号までのビットを1、それ以外を0に設定
+PTN1    START
+        PUSH    0,GR1
+        LAD     GR2,15
+        SUBL    GR2,GR1
+        LD      GR1,GR2
+        LD      GR2,=#8000
+        SRA     GR2,0,GR1
+        POP     GR1
+        RET
+        END
similarity index 64%
rename from as/ptn1_call.casl
rename to as/FE_TESTS/2008_10/Q09/ptn1_call.casl
index c0f838d..a033f58 100644 (file)
@@ -1,5 +1,7 @@
 MAIN    START
         LAD     GR1,5
         CALL    PTN1
+        LD      GR1,GR2
+        CALL    OUTB
         RET
         END
similarity index 54%
rename from as/ptn2.casl
rename to as/FE_TESTS/2008_10/Q09/ptn2.casl
index 4714518..b142e62 100644 (file)
@@ -1,3 +1,5 @@
+;;; 平成20年 秋期 基本情報技術者 午後 問09
+;;; 最上位ビットから与えられたビット番号までのビットを0、それ以外を1に設定
 PTN2    START
         PUSH    0,GR1
         LAD     GR2,16
similarity index 64%
rename from as/ptn2_call.casl
rename to as/FE_TESTS/2008_10/Q09/ptn2_call.casl
index 703261a..62507ee 100644 (file)
@@ -1,5 +1,7 @@
 MAIN    START
         LAD     GR1,5
         CALL    PTN2
+        LD      GR1,GR2
+        CALL    OUTB
         RET
         END
diff --git a/as/FE_TESTS/2008_10/Q09/ptn3.casl b/as/FE_TESTS/2008_10/Q09/ptn3.casl
new file mode 100644 (file)
index 0000000..c1a69f9
--- /dev/null
@@ -0,0 +1,7 @@
+;;; 平成20年 秋期 基本情報技術者 午後 問09
+;;; 与えられたビット番号のビットを1,それ以外を0に設定
+PTN3   START
+       LD      GR2,=#0001
+       SLL     GR2,0,GR1
+       RET
+       END
similarity index 64%
rename from as/ptn3_call.casl
rename to as/FE_TESTS/2008_10/Q09/ptn3_call.casl
index 3c3e7ec..6f2047e 100644 (file)
@@ -1,5 +1,7 @@
 MAIN    START
         LAD     GR1,5
         CALL    PTN3
+        LD      GR1,GR2
+        CALL    OUTB
         RET
         END
similarity index 69%
rename from as/ptn4.casl
rename to as/FE_TESTS/2008_10/Q09/ptn4.casl
index 5fbac0f..4c24fd8 100644 (file)
@@ -1,3 +1,5 @@
+;;; 平成20年 秋期 基本情報技術者 午後 問09
+;;; 与えられたビット番号B1からB2(15>B1≧B2>0)までのビットを0、それ以外を1に設定
 PTN4    START
         ST      GR1,WRK
         LD      GR1,GR2
similarity index 69%
rename from as/ptn4_call.casl
rename to as/FE_TESTS/2008_10/Q09/ptn4_call.casl
index 24d0fa5..7a2aef5 100644 (file)
@@ -2,5 +2,7 @@ MAIN    START
         LAD     GR1,10
         LAD     GR2,5
         CALL    PTN4
+        LD      GR1,GR2
+        CALL    OUTB
         RET
         END
similarity index 92%
rename from as/summary.casl
rename to as/FE_TESTS/2008_10/Q13/summary.casl
index 4d52851..1b7dda3 100644 (file)
@@ -1,3 +1,5 @@
+;;; 平成20年 秋期 基本情報技術者 午後 問13
+;;; アンケートに対するn人分の回答を集計し、集計結果をグラフで出力する副プログラム
 SUMMARY START
         RPUSH
 ; カウンタ領域と出力バッファを初期化
diff --git a/as/FE_TESTS/2009_04/Q12/muls.casl b/as/FE_TESTS/2009_04/Q12/muls.casl
new file mode 100644 (file)
index 0000000..21b70f3
--- /dev/null
@@ -0,0 +1,27 @@
+;平成21年 春期 基本情報技術者 午後 問12
+MULS    START                ; 32ビット×16ビット→32ビット
+        RPUSH
+        LAD     GR6,0        ; 積 上位語の初期化
+        LAD     GR7,0        ; 積 下位語の初期化
+        LD      GR4,0,GR1    ; 被乗数 上位語の取出し
+        LD      GR5,1,GR1    ; 被乗数 下位語の取出し
+LP      SRL     GR2,1        ; 乗数を1ビット右にシフト
+        JOV     ADD32
+        JZE     FIN
+        JUMP    NEXT         ; 加算処理をスキップ
+ADD32   ADDL    GR6,GR4      ; 32ビット+32ビット→32ビット
+        ADDL    GR7,GR5
+        JOV     ADJ1
+        JUMP    NEXT 
+ADJ1    ADDL    GR6,=1       ; けた上げ処理
+NEXT    SLL     GR4,1        ; 被乗数(32ビット)を1ビット左にシフト
+        SLL     GR5,1
+        JOV     ADJ2
+        JUMP    LP
+ADJ2    OR      GR4,=1
+        JUMP    LP
+FIN     ST      GR6,0,GR3    ; 乗算結果の格納
+        ST      GR7,1,GR3
+        RPOP
+        RET
+        END
similarity index 94%
rename from as/muls2.casl
rename to as/FE_TESTS/2009_04/Q12/muls2.casl
index ec7b57b..b4143cf 100644 (file)
@@ -1,14 +1,4 @@
 ;平成21年 春期 基本情報技術者 午後 問12-2
-MAIN   START
-       LAD     GR1,X
-       LAD     GR2,Y
-    LAD GR3,A
-    CALL MUL
-       RET
-X      DC      2,3
-Y      DC      4,5
-A   DS  2
-       END
 MUL     START              ; 32ビット×32ビット→32ビット
         RPUSH
         PUSH  0,GR3
diff --git a/as/FE_TESTS/2009_04/Q12/muls2_call.casl b/as/FE_TESTS/2009_04/Q12/muls2_call.casl
new file mode 100644 (file)
index 0000000..6f57d71
--- /dev/null
@@ -0,0 +1,10 @@
+MAIN    START
+        LAD     GR1,X
+        LAD     GR2,Y
+        LAD     GR3,A
+        CALL    MUL
+        RET
+X       DC      2,3
+Y       DC      4,5
+A       DS      2
+        END
diff --git a/as/FE_TESTS/2009_04/Q12/muls_call.casl b/as/FE_TESTS/2009_04/Q12/muls_call.casl
new file mode 100644 (file)
index 0000000..2c6601b
--- /dev/null
@@ -0,0 +1,10 @@
+MAIN    START
+        LAD     GR1,X
+        LD      GR2,Y
+        LAD     GR3,A
+        CALL    MULS
+        RET
+X       DC      10,30
+Y       DC      4
+A       DS      2
+        END
diff --git a/as/FE_TESTS/2009_10/Q12/outb.casl b/as/FE_TESTS/2009_10/Q12/outb.casl
new file mode 100644 (file)
index 0000000..9e1d70a
--- /dev/null
@@ -0,0 +1,108 @@
+;;; GR1に格納された値を、2進数値として表示
+OUTL    START
+        RPUSH
+        LAD     GR2,2           ; GR2に2進数の「2」を格納。
+        LAD     GR0,0           ; GR0 <- 0
+        ST      GR0,LEN         ; LENの初期化
+        AND     GR1,GR1         ; GR1をテスト
+        JZE     ZINS            ; GR1が0の場合、ZINSにジャンプ
+STI     CPL     GR1,GR2         ; ループ先頭。(GR1 < GR2)の場合は、ループ脱出
+        JMI     STLST           ; ↓
+        CALL    ODIVL           ; GR1とGR2の、商をGR0、剰余をGR1に格納
+        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領域に格納
+        JUMP    EMB             ; EMBにジャンプ
+ZINS    LD      GR1,NCHAR       ; 「0」をSTR領域に格納
+        CALL    STSTR           ; ↓
+EMB     LD      GR1,NCHAR       ; GR0 <- '0'
+EMLOOP  LD      GR2,LEN         ; GR2 <- LEN
+        CPA     GR2,DIG         ; ループ先頭。(GR2 = DIG)の場合は、ループ脱出
+        JZE     PRT             ; ↓
+        CALL    STSTR           ; GR1をSTR領域に格納
+        JUMP    EMLOOP          ; ループ終端
+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'
+DIG     DC      16        
+        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、剰余をGR1に格納する
+;;; 0〜65535の範囲の数値を扱う
+ODIVL   START
+        PUSH    0,GR2
+        PUSH    0,GR3
+        LAD     GR0,0           ; GR0の初期化。商
+        ST      GR2,ODY         ; DYにGR2の初期値を保存
+        LAD     GR3,1           ; GR3の初期化。対象ビットを表す
+ODSL    CPL     GR2,GR1         ; ループ先頭。(GR3 > GR1)の場合、DLOOPへループ脱出
+        JPL     ODLOOP          ; ↓
+        SLL     GR3,1           ; GR3を1回左シフト
+        SLL     GR2,1           ; GR2を1回左シフト
+        JOV     ODYOV           ; オーバーフローの場合は、ODYOVにジャンプ
+        JUMP    ODSL            ; ループ終端
+ODYOV   SRL     GR2,1           ; GR2を1回右シフト
+        LAD     GR2,#8000,GR2   ; GR2 <- GR2 + #8000
+        SRL     GR3,1           ; GR3を1回右シフト
+        JUMP    ODLPIN          ; ODLPINへジャンプ
+ODLOOP  SRL     GR3,1           ; ループ先頭。GR3を1回右シフト
+        JZE     ODFIN           ; (GR3= 0)の場合、ループ脱出
+        SRL     GR2,1           ; GR2を1回右シフト
+        CPL     GR1,ODY         ; (GR1 < ODY)の場合、ループ脱出
+        JMI     ODFIN           ; ↓
+        CPL     GR1,GR2         ; (GR1 < GR2)の場合、ループ先頭へジャンプ
+        JMI     ODLOOP          ; ↓
+ODLPIN  SUBL    GR1,GR2         ; GR1 <- GR1 - GR2
+        ADDL    GR0,GR3         ; GR0 <- GR0 + GR3
+        JUMP    ODLOOP          ; ループ終端
+ODFIN   POP     GR3
+        POP     GR2
+        RET
+ODY     DS      1
+ODMB    DC      #8000        
+        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
diff --git a/as/FE_TESTS/2009_10/Q12/replace.casl b/as/FE_TESTS/2009_10/Q12/replace.casl
new file mode 100644 (file)
index 0000000..6416213
--- /dev/null
@@ -0,0 +1,30 @@
+REPLACE START 
+        RPUSH 
+        LD      GR4,GR2    ; GR4 ← p
+        SRL     GR4,4      ; GR4 ← p/16 
+        ADDA    GR1,GR4    ; GR1 を置換え対象語(第i語)に位置付ける。
+        AND     GR2,=#000F 
+        LD      GR4,=16 
+        SUBA    GR4,GR2 
+        LD      GR5,GR0
+        LD      GR6,=#8000
+        SUBA    GR3,=1
+        SRA     GR6,0,GR3
+        LD      GR7,GR6
+        SRL     GR0,0,GR2
+        SRL     GR6,0,GR2
+        SLL     GR5,0,GR4
+        SLL     GR7,0,GR4
+        LD      GR2,0,GR1
+        XOR     GR6,GR2    ; 第i語のうち
+        AND     GR2,GR6    ; ビット列Bを入れる部分を0にする。
+        OR      GR2,GR0 
+        ST      GR2,0,GR1 
+        LD      GR2,1,GR1 
+        XOR     GR7,GR2    ; 第(i+1)語のうち
+        AND     GR2,GR7    ; ビット列Bを入れる部分を0にする。
+        OR      GR2,GR5
+        ST      GR2,1,GR1
+        RPOP
+        RET 
+        END 
diff --git a/as/FE_TESTS/2009_10/Q12/replace_call.casl b/as/FE_TESTS/2009_10/Q12/replace_call.casl
new file mode 100644 (file)
index 0000000..854e5f2
--- /dev/null
@@ -0,0 +1,21 @@
+MAIN    START
+        LAD     GR1,A
+        LD      GR0,B
+        LD      GR2,P
+        LD      GR3,Q
+        CALL    REPLACE
+        LAD     GR1,A
+        LAD     GR2,0
+LOOP    CPA     GR2,CNT
+        JZE     FIN
+        LD      GR1,A,GR2
+        CALL    OUTL
+        LAD     GR2,1,GR2
+        JUMP    LOOP
+FIN     RET
+A       DC      #FFFF,#FFFF,#FFFF,#FFFF,#FFFF,#FFFF
+CNT     DC      6        
+B       DC      #B1D0
+P       DC      55
+Q       DC      12
+        END
diff --git a/as/FUNC/abs.casl b/as/FUNC/abs.casl
new file mode 100644 (file)
index 0000000..8a25f8b
--- /dev/null
@@ -0,0 +1,9 @@
+;;; GR1を絶対値に変換する
+ABS     START
+        AND     GR1,GR1
+        JPL     ABSFIN
+        JZE     ABSFIN
+        XOR     GR1,=#FFFF
+        LAD     GR1,1,GR1
+ABSFIN  RET
+        END
diff --git a/as/FUNC/abs_call.casl b/as/FUNC/abs_call.casl
new file mode 100644 (file)
index 0000000..4a73221
--- /dev/null
@@ -0,0 +1,15 @@
+;;; ABSを呼び出す
+;;; casl2 abs_call.casl abs.casl outa.casl
+MAIN    START
+        LAD     GR2,0
+MLOOP   CPA     GR2,MLEN
+        JZE     MFIN
+        LD      GR1,MVAL,GR2
+        CALL    ABS
+        CALL    OUTA
+        LAD     GR2,1,GR2
+        JUMP    MLOOP
+MFIN    RET
+MVAL    DC      12,-12,1,-1,32767,-32767,0,-32768
+MLEN    DC      8
+        END
diff --git a/as/FUNC/cnt60.casl b/as/FUNC/cnt60.casl
new file mode 100644 (file)
index 0000000..0cca4bf
--- /dev/null
@@ -0,0 +1,10 @@
+MAIN    START
+        LAD     GR1,0
+LOOP    CPA     GR1,CNT
+        JZE     FIN
+        LAD     GR1,1,GR1
+        NOP
+        JUMP    LOOP
+FIN     RET
+CNT     DC      60
+        END
similarity index 100%
rename from as/count.casl
rename to as/FUNC/count1.casl
diff --git a/as/FUNC/count1_call.casl b/as/FUNC/count1_call.casl
new file mode 100644 (file)
index 0000000..b9cd347
--- /dev/null
@@ -0,0 +1,15 @@
+;; count1.casl(「アセンブラ言語の仕様」プログラム例)を呼び出し、出力結果を表示
+;; 使い方: casl2 count1_call.casl count1.casl outa.casl
+MAIN    START
+        LAD     GR2,0
+LOOP    CPA     GR2,MAX         ; ループ開始。GR2がMAXの値になったらループ脱出
+        JZE     FIN             ; ↓
+        LD      GR1,GR2         ; GR1にVALの値をロード
+        CALL    COUNT1          ; COUNT1を呼び出す。出力はGR0に格納
+        LD      GR1,GR0         ; GR1にGR0の値をコピー
+        CALL    OUTA            ; OUTAを呼び出す
+        LAD     GR2,1,GR2       ; GR2 <= GR2 + 1
+        JUMP    LOOP            ; ループ終端
+FIN     RET
+MAX     DC      256
+        END
diff --git a/as/FUNC/count1_call0.casl b/as/FUNC/count1_call0.casl
new file mode 100644 (file)
index 0000000..72a955b
--- /dev/null
@@ -0,0 +1,7 @@
+;; count1.casl(「アセンブラ言語の仕様」プログラム例)を呼び出す
+;; 使い方: casl2 count1_call0.casl count1.casl
+MAIN    START
+        LAD     GR1,#7FFFk
+        CALL    COUNT1
+FIN     RET
+        END
diff --git a/as/FUNC/divl0.casl b/as/FUNC/divl0.casl
new file mode 100644 (file)
index 0000000..c827b9d
--- /dev/null
@@ -0,0 +1,20 @@
+;;; GR1の値とGR2の値の、商をGR0、剰余をGR3に格納する
+;;; 0〜65535の範囲の数値を扱う
+DIVL    START
+        PUSH    0,GR1
+        AND     GR2,GR2         ; (GR2 = 0)の場合、DYZへジャンプ
+        JZE     DYZ             ; ↓
+        LAD     GR0,0           ; GR0を初期化
+        LD      GR3,GR1         ; GR3 <- GR1
+DLOOP   CPL     GR3,GR2         ; ループ先頭。(GR3 < GR2)の場合、終了
+        JMI     DFIN            ; ↓
+        SUBL    GR3,GR2         ; GR3 <- GR3 - GR2
+        ADDL    GR0,DONE        ; ↓
+        JUMP    DLOOP           ; ループ終端
+DYZ     LAD     GR3,#FFFF       ; 強制的にオーバーフローを発生させ、GR3 <- 0
+        ADDL    GR3,=1          ; ↓
+        JUMP    DFIN            ; DFINへジャンプ
+DFIN    POP     GR1
+        RET
+DONE    DC      1        
+        END
diff --git a/as/FUNC/divl1.casl b/as/FUNC/divl1.casl
new file mode 100644 (file)
index 0000000..1d86890
--- /dev/null
@@ -0,0 +1,42 @@
+;;; GR1の値とGR2の値の、商をGR0、剰余をGR3に格納する
+;;; 0〜65535の範囲の数値を扱う
+DIVL    START
+        PUSH    0,GR1
+        PUSH    0,GR2
+        PUSH    0,GR4
+        AND     GR2,GR2         ; (GR2 = 0)の場合、DFZへジャンプ
+        JZE     DYZ             ; ↓
+        ST      GR2,DY          ; DYにGR2の初期値を保存
+        LAD     GR0,0           ; GR0の初期化
+        LAD     GR3,0           ; GR3の初期化
+        LAD     GR4,1           ; GR4の初期化。対象ビットを表す
+DSL     CPL     GR2,GR1         ; ループ先頭。(GR2 > GR1)の場合、DLOOPへループ脱出
+        JPL     DLOOP           ; ↓
+        SLL     GR4,1           ; GR4を1回左シフト
+        SLL     GR2,1           ; GR2を1回左シフト
+        JOV     DYOV            ; オーバーフローの場合は、DYOVにジャンプ
+        JUMP    DSL             ; ループ終端
+DYOV    SRL     GR2,1
+        LAD     GR2,#8000,GR2
+        SRL     GR4,1
+        JUMP    DLPIN
+DLOOP   SRL     GR4,1           ; ループ先頭。GR4を1回右シフト
+        JZE     DCP             ; (GR4 = 0)の場合、ループ脱出
+        SRL     GR2,1           ; GR2を1回右シフト
+        CPL     GR1,DY          ; (GR1 < DY)の場合、ループ脱出
+        JMI     DCP             ; ↓
+        CPL     GR1,GR2         ; (GR1 < GR2)の場合、ループ先頭へジャンプ
+        JMI     DLOOP           ; ↓
+DLPIN   SUBL    GR1,GR2         ; GR1 <- GR1 - GR2
+        ADDL    GR0,GR4         ; GR0 <- GR0 + GR4
+        JUMP    DLOOP           ; ループ終端
+DYZ     LAD     GR3,#FFFF       ; 強制的にオーバーフローを発生させ、GR3 <- 0
+        ADDL    GR3,=1          ; ↓
+        JUMP    DFIN            ; DFINへジャンプ
+DCP     LD      GR3,GR1
+DFIN    POP    GR4
+        POP     GR2
+        POP     GR1
+        RET
+DY      DS      1        
+        END
diff --git a/as/FUNC/divl_call.casl b/as/FUNC/divl_call.casl
new file mode 100644 (file)
index 0000000..bceca27
--- /dev/null
@@ -0,0 +1,38 @@
+MAIN    START
+        LD      GR1,XMAX
+LOOPX   CPA     GR1,XMIN
+        JMI     FIN
+        OUT     SEP,SLEN        
+        LD      GR2,YMIN
+LOOPY   CPL     GR2,YMAX
+        JPL     XNEXT
+        CALL    OUTL
+        PUSH    0,GR1
+        LD      GR1,GR2
+        CALL    OUTL
+        POP     GR1
+        CALL    DIVL
+        JOV     WOV
+        PUSH    0,GR1
+        LD      GR1,GR0
+        CALL    OUTL
+        LD      GR1,GR3
+        CALL    OUTL
+        POP     GR1
+YNEXT   OUT     SEP,SLEN        
+        LAD     GR2,1,GR2
+        JUMP    LOOPY
+WOV     OUT     Y0MSG,YLEN
+        JUMP    YNEXT
+XNEXT   LAD     GR1,-1,GR1
+        JUMP    LOOPX
+FIN     RET
+XMAX    DC      100
+XMIN    DC      0      
+YMAX    DC      10
+YMIN    DC      0
+SEP     DC      '--------------------'
+SLEN    DC      20
+Y0MSG   DC      'Error: div by 0'
+YLEN    DC      15        
+        END
diff --git a/as/FUNC/divl_call0.casl b/as/FUNC/divl_call0.casl
new file mode 100644 (file)
index 0000000..cbdb169
--- /dev/null
@@ -0,0 +1,7 @@
+;;; casl2 div0_call0.casl div0.casl outl.casl
+MAIN    START
+BEGIN   LAD     GR1,101
+        LAD     GR2,10
+        CALL    DIVL
+        RET
+        END
diff --git a/as/FUNC/divl_call1.casl b/as/FUNC/divl_call1.casl
new file mode 100644 (file)
index 0000000..5b22066
--- /dev/null
@@ -0,0 +1,13 @@
+;;; casl2 div0_call0.casl div0.casl outl.casl
+MAIN    START
+BEGIN   LD      GR1,X
+        LD      GR2,Y
+        CALL    DIVL
+        LD      GR1,GR0
+        CALL    OUTL
+        LD      GR1,GR3
+        CALL    OUTL
+        RET
+X       DC      123
+Y       DC      10       
+        END
diff --git a/as/FUNC/fib.casl b/as/FUNC/fib.casl
new file mode 100644 (file)
index 0000000..77b3965
--- /dev/null
@@ -0,0 +1,20 @@
+MAIN    START
+        LAD     GR1,0
+        LAD     GR2,0           ; インデックス
+BEGIN   CPA     GR2,CNT
+        JZE     FIN
+        LAD     GR3,SEQ,GR2
+        AND     GR2,GR2
+        CPA     GR2,=1
+        JPL     SUMP2
+        LD      GR1,GR2
+        JUMP    STSEQ
+SUMP2   LD      GR1,-2,GR3
+        ADDA    GR1,-1,GR3
+STSEQ   ST      GR1,0,GR3
+        LAD     GR2,1,GR2
+        JUMP    BEGIN
+FIN     RET
+CNT     DC      10
+SEQ     DS      10
+        END
diff --git a/as/FUNC/fib_outl.casl b/as/FUNC/fib_outl.casl
new file mode 100644 (file)
index 0000000..f97220f
--- /dev/null
@@ -0,0 +1,18 @@
+;;; 0〜65535の範囲で、フィボナッチ数列を表示する
+MAIN    START
+        LAD     GR1,0           ; GR1は、第n項
+        LAD     GR2,0           ; GR2は、インデックス
+BEGIN   CPL     GR2,=1          ; GR2が1以下の場合、SUMP2へジャンプ
+        JPL     SUMP2           ; ↓
+        LD      GR1,GR2         ; GR1にGR2をロード
+        JUMP    FOUT            ; FOUTへジャンプ
+SUMP2   LD      GR1,GR3         ; GR1にGR3をロード
+        ADDL    GR1,GR4         ; GR1 <- GR1 + GR4
+        JOV     FIN             ; オーバーフローした場合は終了
+FOUT    CALL    OUTL            ; GR1の数値を表示
+        LD      GR4,GR3         ; GR4にGR3をロード
+        LD      GR3,GR1         ; GR3にGR1をロード
+        LAD     GR2,1,GR2       ; GR2 <- GR2 + 1
+        JUMP    BEGIN
+FIN     RET
+        END
similarity index 100%
rename from as/hanoi.casl
rename to as/FUNC/hanoi.casl
diff --git a/as/FUNC/inl.casl b/as/FUNC/inl.casl
new file mode 100644 (file)
index 0000000..09c505a
--- /dev/null
@@ -0,0 +1,60 @@
+;;; 入力された数値を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
new file mode 100644 (file)
index 0000000..c2e3d05
--- /dev/null
@@ -0,0 +1,12 @@
+;;; 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/iotest.casl b/as/FUNC/iotest.casl
new file mode 100644 (file)
index 0000000..af25ff3
--- /dev/null
@@ -0,0 +1,20 @@
+IOTEST  START
+           OUT     OBUF1,OLEN1
+LOOP    IN      IOBUF,IOLEN
+           LD      GR1,IOLEN
+        JZE        RETURN
+           OUT     OBUF2,OLEN2
+           OUT     IOBUF,IOLEN
+           OUT     OBUF3,OLEN3
+           JUMP    LOOP
+RETURN RET
+; Memory
+OBUF1   DC      'LET''S START. TYPE IN'
+OLEN1   DC      20
+OBUF2   DC      'YOU TYPED'
+OLEN2   DC      9
+OBUF3   DC      'WHAT''S NEXT?'
+OLEN3   DC      12
+IOBUF   DS      64
+IOLEN   DS      1   
+           END
diff --git a/as/FUNC/minim.casl b/as/FUNC/minim.casl
new file mode 100644 (file)
index 0000000..f1198da
--- /dev/null
@@ -0,0 +1,19 @@
+;;; 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/minim_call.casl b/as/FUNC/minim_call.casl
new file mode 100644 (file)
index 0000000..71d6d47
--- /dev/null
@@ -0,0 +1,11 @@
+;;; casl2 minim_call.casl minim.casl outa.casl
+MAIN    START
+        LAD     GR1,DATA
+        LD      GR2,CNT
+        CALL    MINIM
+        LD      GR1,GR0
+        CALL    OUTA
+        RET
+DATA    DC      23,78,2,45,67,-39,86
+CNT     DC      7
+        END
diff --git a/as/FUNC/mula0.casl b/as/FUNC/mula0.casl
new file mode 100644 (file)
index 0000000..e21184c
--- /dev/null
@@ -0,0 +1,53 @@
+;GR1の値とGR2の値の積をGR0に格納
+MULA    START
+        RPUSH
+        LAD     GR3,0           ; インデックス
+        LAD     GR4,0           ; マイナスフラグ
+CHK1    CALL    CHKVAL          ; (GR1 < 0)の場合は正負を反転させ、GR0 <- 1
+        JOV     MFIN
+        LD      GR4,GR0         ; マイナスフラグをオン
+CHK2    PUSH    0,GR1           ; GR1を退避
+        LD      GR1,GR2         ; GR2をGR1へロード
+        CALL    CHKVAL          ; (GR1 < 0)の場合は正負を反転させ、GR0 <- 1
+        JOV     C2OV
+        LD      GR2,GR1         ; GR1をGR2へロード
+        XOR     GR4,GR0         ; マイナスフラグを反転
+        POP     GR1             ; GR1を復元
+        LAD     GR0,0           ; 積
+        JUMP    MLOOP
+C2OV    POP     GR1             ; 
+        JUMP    MFIN
+MLOOP   CPA     GR2,GR3         ; ループ先頭。(GR2 = GR3)の場合、ループ脱出
+        JZE     MMIN            ; ↓
+        ADDA    GR0,GR1         ; GR0 <- GR0 + GR1
+        JOV     MFIN            ; オーバーフローした場合、ループ脱出
+        LAD     GR3,1,GR3       ; GR3 <- GR3 + 1
+        JUMP    MLOOP           ; ループ終端
+MMIN    AND     GR4,GR4         ; マイナスフラグがオフの場合、MFINへジャンプ
+        JZE     MFIN            ; ↓
+        PUSH    0,GR1           ; GR1を退避
+        LD      GR1,GR0         ; GR1にGR0をロード
+        CALL    MABS            ; GR1を絶対値に変換
+        JOV     MMF             ; オーバーフロー(GR1 = -32768)の場合、MMFへジャンプ
+        LD      GR0,GR1         ; GR0にGR1をロード
+MMF     POP     GR1             ; GR1を復元
+MFIN    RPOP
+        RET
+        END
+;;; GR1が0未満の場合は、絶対値に変換し、GR0に1を設定
+CHKVAL  START
+        LAD     GR0,0
+        AND     GR1,GR1         ; (GR1 >= 0)の場合は、CFINへジャンプ
+        JPL     CFIN            ; ↓
+        JZE     CFIN            ; ↓
+        LAD     GR0,1           ; GR0に1をロード
+        CALL    MABS            ; GR1を絶対値に変換
+CFIN    RET
+        END
+;;; GR1の値の正負を反転させる。
+;;; 例: -10 -> 10、10 -> -10
+MABS    START
+        XOR     GR1,=#FFFF      ; GR1のビット値を反転
+        ADDA    GR1,=1          ; GR1 <- GR1 + 1
+        RET
+        END
diff --git a/as/FUNC/mula1.casl b/as/FUNC/mula1.casl
new file mode 100644 (file)
index 0000000..75ab187
--- /dev/null
@@ -0,0 +1,60 @@
+;GR1の値とGR2の値の積をGR0に格納
+MULA    START
+        RPUSH
+        XOR     GR0,GR0         ; 積
+        LAD     GR3,1           ; 対象ビット
+        XOR     GR4,GR4         ; マイナスフラグ
+CHK1    CALL    CHKVAL          ; (GR1 < 0)の場合は正負を反転させ、GR0 <- 1
+        JOV     MFIN
+        LD      GR4,GR0         ; マイナスフラグをオン
+CHK2    PUSH    0,GR1           ; GR1を退避
+        LD      GR1,GR2         ; GR2をGR1へロード
+        CALL    CHKVAL          ; (GR1 < 0)の場合は正負を反転させ、GR0 <- 1
+        JOV     C2OV
+        LD      GR2,GR1         ; GR1をGR2へロード
+        XOR     GR4,GR0         ; マイナスフラグを反転
+C2FIN   POP     GR1             ; GR1を復元
+        XOR     GR0,GR0         ; GR0を初期化
+        JUMP    MLOOP           ; MLOOPへジャンプ
+C2OV    POP     GR1             ; GR1を復元
+        JUMP    MFIN            ; MFINへジャンプ
+MLOOP   PUSH    0,GR3           ; ループ先頭。GR2の、GR3が示したビットが0の場合、MNEXTへジャンプ
+        AND     GR3,GR2         ; ↓
+        POP     GR3             ; ↓
+        JZE     MNEXT           ; ↓
+        ADDA    GR0,GR1         ; GR0 <- GR0 + GR1
+        JOV     MFIN            ; オーバーフローした場合、ループ脱出
+MNEXT   SLA     GR3,1           ; GR3を1回左シフト
+        AND     GR3,GR3         ; (GR3 = 0)の場合、ループ脱出
+        JZE     MMIN            ; ↓
+        CPL     GR3,GR2         ; (GR3 > GR2)の場合、ループ脱出
+        JPL     MMIN            ; ↓
+        SLA     GR1,1           ; GR1を1回左シフト
+        JOV     MFIN            ; オーバーフローした場合、ループ脱出
+        JUMP    MLOOP           ; ループ終端
+MMIN    AND     GR4,GR4         ; マイナスフラグがオフの場合、MFINへジャンプ
+        JZE     MFIN            ; ↓
+        LD      GR1,GR0         ; GR1にGR0をロード
+        CALL    MABS            ; GR1の正負を反転
+        JOV     MFIN            ; オーバーフロー(GR1 = -32768)の場合、MFINへジャンプ
+        LD      GR0,GR1         ; GR0にGR1をロード
+MFIN    RPOP
+        RET
+        END
+;;; GR1が0未満の場合は、絶対値に変換し、GR0に1を設定
+CHKVAL  START
+        LAD     GR0,0
+        AND     GR1,GR1         ; (GR1 >= 0)の場合は、CFINへジャンプ
+        JPL     CFIN            ; ↓
+        JZE     CFIN            ; ↓
+        LAD     GR0,1           ; GR0に1をロード
+        CALL    MABS            ; GR1を絶対値に変換
+CFIN    RET
+        END
+;;; GR1の値の正負を反転させる。
+;;; 例: -10 -> 10、10 -> -10
+MABS    START
+        XOR     GR1,=#FFFF       ; GR1のビット値を反転
+        ADDA    GR1,=1           ; GR1 <- GR1 + 1
+        RET
+        END
diff --git a/as/FUNC/mula_call.casl b/as/FUNC/mula_call.casl
new file mode 100644 (file)
index 0000000..eeaf6d0
--- /dev/null
@@ -0,0 +1,38 @@
+MAIN    START
+        LAD     GR3,0           ; Xのインデックス
+LOOPX   CPA     GR3,XCNT
+        JZE     FIN
+        LD      GR1,X,GR3
+        LAD     GR4,0           ; Yのインデックス
+LOOPY   CPA     GR4,YCNT
+        JZE     XNEXT
+        LD      GR2,Y,GR4
+        OUT     SEP,SLEN
+        CALL    OUTA
+        PUSH    0,GR1
+        LD      GR1,GR2
+        CALL    OUTA
+        POP     GR1
+        CALL    MULA
+        JOV     WOV
+        PUSH    0,GR1
+        LD      GR1,GR0
+        CALL    OUTA
+        POP     GR1
+YNEXT   OUT     SEP,SLEN        
+        LAD     GR4,1,GR4
+        JUMP    LOOPY
+WOV     OUT     YOMSG,YLEN
+        JUMP    YNEXT
+XNEXT   LAD     GR3,1,GR3
+        JUMP    LOOPX
+FIN     RET
+X       DC      0,1,2,127,128,151,217,255,256,257,32767,-32768,-32767,-257,-256,-255,-217,-151,-128,-127,-2,-1
+Y       DC      0,1,2,127,128,151,217,255,256,257,32767,-32768,-32767,-257,-256,-255,-217,-151,-128,-127,-2,-1
+XCNT    DC      22
+YCNT    DC      22
+SEP     DC      '--------------------'
+SLEN    DC      20
+YOMSG   DC      'Warning: overflow'
+YLEN    DC      17
+        END
diff --git a/as/FUNC/mula_call0.casl b/as/FUNC/mula_call0.casl
new file mode 100644 (file)
index 0000000..477e1a2
--- /dev/null
@@ -0,0 +1,7 @@
+;;; casl2 mula_call0.casl mula.casl outa.casl
+MAIN    START
+        LAD     GR1,20000
+        LAD     GR2,2
+        CALL    MULA
+        RET
+        END
diff --git a/as/FUNC/mula_call1.casl b/as/FUNC/mula_call1.casl
new file mode 100644 (file)
index 0000000..e8eaa61
--- /dev/null
@@ -0,0 +1,14 @@
+;;; casl2 mula_call0.casl mula.casl outa.casl
+MAIN    START
+        LAD     GR1,151
+        LAD     GR2,255
+        CALL    MULA
+        JOV     WAN
+        LD      GR1,GR0
+        CALL    OUTA
+        JUMP    FIN
+WAN     OUT     MSG,MLEN        
+FIN     RET
+MSG     DC      'OF'
+MLEN    DC      2
+        END
diff --git a/as/FUNC/mula_call2.casl b/as/FUNC/mula_call2.casl
new file mode 100644 (file)
index 0000000..356b59f
--- /dev/null
@@ -0,0 +1,9 @@
+;;; casl2 mula_call0.casl mula.casl outa.casl
+MAIN    START
+        LAD     GR1,0
+        LAD     GR2,32767
+LOOP    CALL    MULA
+        LD      GR1,GR0
+        CALL    OUTA
+FIN     RET
+        END
diff --git a/as/FUNC/mula_timestab.casl b/as/FUNC/mula_timestab.casl
new file mode 100644 (file)
index 0000000..016cf1a
--- /dev/null
@@ -0,0 +1,33 @@
+MAIN    START
+        LAD     GR1,0
+        SUBA    GR1,XMAX
+LOOPX   CPA     GR1,XMAX
+        JPL     FIN
+        OUT     SEP,SLEN
+        CALL    OUTA
+        OUT     SEP,SLEN
+        LAD     GR2,0
+        SUBA    GR2,YMAX
+LOOPY   CPA     GR2,YMAX
+        JPL     XNEXT
+        CALL    MULA
+        JOV     WOV
+        PUSH    0,GR1
+        LD      GR1,GR0
+        CALL    OUTA
+        POP     GR1
+YNEXT   OUT     SEP,SLEN        
+        LAD     GR2,1,GR2
+        JUMP    LOOPY
+WOV     OUT     YOMSG,YLEN
+        JUMP    YNEXT
+XNEXT   LAD     GR1,1,GR1
+        JUMP    LOOPX
+FIN     RET
+XMAX    DC      9
+YMAX    DC      9
+SEP     DC      '--------------------'
+SLEN    DC      20
+YOMSG   DC      'Warning: overflow'
+YLEN    DC      17        
+        END
diff --git a/as/FUNC/mull0.casl b/as/FUNC/mull0.casl
new file mode 100644 (file)
index 0000000..20168d6
--- /dev/null
@@ -0,0 +1,14 @@
+;GR1の値とGR2の値の積をGR0に格納
+MULL    START
+        RPUSH
+        LAD     GR3,0           ; インデックス
+        LAD     GR0,0           ; 積
+MLOOP   CPA     GR2,GR3         ; ループ先頭。(GR2 = GR3)の場合、ループ脱出
+        JZE     MFIN            ; ↓
+        ADDL    GR0,GR1         ; GR0 <- GR0 + GR1
+        JOV     MFIN            ; オーバーフローした場合、ループ脱出
+        LAD     GR3,1,GR3       ; GR3 <- GR3 + 1
+        JUMP    MLOOP           ; ループ終端
+MFIN    RPOP
+        RET
+        END
diff --git a/as/FUNC/mull1.casl b/as/FUNC/mull1.casl
new file mode 100644 (file)
index 0000000..916f386
--- /dev/null
@@ -0,0 +1,22 @@
+;GR1の値とGR2の値の積をGR0に格納
+MULL    START
+        RPUSH
+        XOR     GR0,GR0         ; 積
+        LAD     GR3,1           ; 対象ビット
+MLOOP   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回左シフト
+        AND     GR3,GR3         ; (GR3 = 0)の場合、ループ脱出
+        JZE     MFIN            ; ↓
+        CPL     GR3,GR2         ; (GR3 > GR2)の場合、ループ脱出
+        JPL     MFIN            ; ↓
+        SLL     GR1,1           ; GR1を1回左シフト
+        JOV     MFIN            ; オーバーフローした場合、ループ脱出
+        JUMP    MLOOP           ; ループ終端
+MFIN    RPOP
+        RET
+        END
diff --git a/as/FUNC/mull_call.casl b/as/FUNC/mull_call.casl
new file mode 100644 (file)
index 0000000..5b03a07
--- /dev/null
@@ -0,0 +1,38 @@
+MAIN    START
+        LAD     GR3,0           ; Xのインデックス
+LOOPX   CPA     GR3,XCNT        ; (GR3 = XCNT)の場合、ループ脱出
+        JZE     FIN             ; ↓
+        LD      GR1,X,GR3       ; GR1に、(X+GR3)番地の値を転送
+        LAD     GR4,0           ; Yのインデックス
+LOOPY   CPA     GR4,YCNT        ; (GR4 = YCNT)の場合、ループ脱出
+        JZE     XNEXT           ; ↓
+        LD      GR2,Y,GR4       ; GR2に、(X+GR4)番地の値を転送
+        OUT     SEP,SLEN        ; 区切り線を出力
+        CALL    OUTL            ; GR1の数値を出力
+        PUSH    0,GR1           ; GR2の数値を出力
+        LD      GR1,GR2         ; ↓
+        CALL    OUTL            ; ↓
+        POP     GR1             ; ↓
+        CALL    MULL            ; GR0 <- GR1 * GR2
+        JOV     WOV             ; オーバーフローの場合は、WOVへジャンプ
+        PUSH    0,GR1           ; GR0の数値を出力 
+        LD      GR1,GR0         ; ↓
+        CALL    OUTL            ; ↓
+        POP     GR1             ; ↓
+YNEXT   OUT     SEP,SLEN        ; 区切り線を出力
+        LAD     GR4,1,GR4       ; GR4 <- GR4 + 1
+        JUMP    LOOPY           ; LOOPYへジャンプ
+WOV     OUT     YOMSG,YLEN      ; オーバーフローした場合のメッセージを表示
+        JUMP    YNEXT           ; YNEXTへジャンプ
+XNEXT   LAD     GR3,1,GR3       ; GR3 <- GR3 + 1
+        JUMP    LOOPX           ; LOOPXへジャンプ
+FIN     RET
+X       DC      0,1,2,127,128,255,256,257,32767,#8000,#FFFF
+Y       DC      0,1,2,127,128,255,256,257,32767,#8000,#FFFF
+XCNT    DC      11
+YCNT    DC      11
+SEP     DC      '--------------------'
+SLEN    DC      20
+YOMSG   DC      'Warning: overflow'
+YLEN    DC      17
+        END
diff --git a/as/FUNC/mull_call0.casl b/as/FUNC/mull_call0.casl
new file mode 100644 (file)
index 0000000..06adfc3
--- /dev/null
@@ -0,0 +1,7 @@
+;;; casl2 mula_call0.casl mula.casl outa.casl
+MAIN    START
+        LAD     GR1,20000
+        LAD     GR2,2
+        CALL    MULL
+        RET
+        END
diff --git a/as/FUNC/mull_call1.casl b/as/FUNC/mull_call1.casl
new file mode 100644 (file)
index 0000000..a238beb
--- /dev/null
@@ -0,0 +1,14 @@
+;;; casl2 mull_call0.casl mull.casl outl.casl
+MAIN    START
+        LAD     GR1,1
+        LAD     GR2,#8000
+        CALL    MULL
+        JOV     WAN
+        LD      GR1,GR0
+        CALL    OUTL
+        JUMP    FIN
+WAN     OUT     MSG,MLEN        
+FIN     RET
+MSG     DC      'OF'
+MLEN    DC      2
+        END
diff --git a/as/FUNC/mull_timestab.casl b/as/FUNC/mull_timestab.casl
new file mode 100644 (file)
index 0000000..6ca1348
--- /dev/null
@@ -0,0 +1,27 @@
+MAIN    START
+        LD      GR1,XMIN
+LOOPX   CPL     GR1,XMAX
+        JPL     FIN
+        OUT     SEP,SLEN
+        CALL    OUTL
+        OUT     SEP,SLEN        
+        LD      GR2,YMIN
+LOOPY   CPL     GR2,YMAX
+        JPL     XNEXT
+        CALL    MULL
+        PUSH    0,GR1
+        LD      GR1,GR0
+        CALL    OUTL
+        POP     GR1
+        LAD     GR2,1,GR2
+        JUMP    LOOPY
+XNEXT   LAD     GR1,1,GR1
+        JUMP    LOOPX
+FIN     RET
+XMIN    DC      0        
+XMAX    DC      19
+YMIN    DC      0        
+YMAX    DC      19
+SEP     DC      '--------------------'
+SLEN    DC      20
+        END
diff --git a/as/FUNC/outa.casl b/as/FUNC/outa.casl
new file mode 100644 (file)
index 0000000..ad3ff53
--- /dev/null
@@ -0,0 +1,122 @@
+;;; 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
+        PUSH    0,GR2
+        PUSH    0,GR4
+        AND     GR2,GR2         ; GR2が0の場合、ODFINへジャンプ
+        JZE     ODFIN           ; ↓
+        ST      GR2,ODY         ; ODYにGR2の初期値を保存
+        LAD     GR0,0           ; GR0の初期化
+        LAD     GR3,0           ; GR3の初期化
+        LAD     GR4,1           ; GR4の初期化。対象ビットを表す
+ODSL    CPL     GR2,GR1         ; ループ先頭。(GR2 > GR1)の場合、ODLOOPへループ脱出
+        JPL     ODLOOP          ; ↓
+        SLL     GR4,1           ; GR4を1回左シフト
+        SLL     GR2,1           ; GR2を1回左シフト
+        JOV     ODYOV           ; オーバーフローの場合は、ODYOVにジャンプ
+        JUMP    ODSL            ; ループ終端
+ODYOV   SRL     GR2,1
+        LAD     GR2,#8000,GR2
+        SRL     GR4,1
+        JUMP    ODLPIN
+ODLOOP  SRL     GR4,1           ; ループ先頭。GR4を1回右シフト
+        JZE     ODFIN           ; (GR4 = 0)の場合、ループ脱出
+        SRL     GR2,1           ; GR2を1回右シフト
+        CPL     GR1,ODY         ; (GR1 < ODY)の場合、ループ脱出
+        JMI     ODFIN           ; ↓
+        CPL     GR1,GR2         ; (GR1 < GR2)の場合、ループ先頭へジャンプ
+        JMI     ODLOOP          ; ↓
+ODLPIN  SUBL    GR1,GR2         ; GR1 <- GR1 - GR2
+        ADDL    GR0,GR4         ; GR0 <- GR0 + GR4
+        JUMP    ODLOOP          ; ループ終端
+ODFIN   LD      GR3,GR1
+        POP    GR4
+        POP     GR2
+        POP     GR1
+        RET
+ODY     DS      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/outa0.casl b/as/FUNC/outa0.casl
new file mode 100644 (file)
index 0000000..1087f6c
--- /dev/null
@@ -0,0 +1,103 @@
+;;; 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/outa_call.casl b/as/FUNC/outa_call.casl
new file mode 100644 (file)
index 0000000..8b7c205
--- /dev/null
@@ -0,0 +1,23 @@
+;; casl2 outi_call.casl outi.casl
+MAIN    START
+        LAD     GR1,VAL
+        LAD     GR2,0
+LOOP    CPA     GR2,CNT
+        JZE     FIN
+        LD      GR1,VAL,GR2
+        CALL    OUTA
+        LAD     GR2,1,GR2
+        JUMP    LOOP
+FIN     RET
+        END
+VAL     DC      0
+        DC      #0001,#0002,#0004,#0008
+        DC      #0010,#0020,#0040,#0080
+        DC      #0100,#0200,#0400,#0800
+        DC      #1000,#2000,#4000,#7FFF
+        DC      #8000
+        DC      #8001,#C000,#E000,#F000
+        DC      #F800,#FC00,#FE00,#FF00
+        DC      #FF80,#FFC0,#FFE0,#FFF0
+        DC      #FFF8,#FFFC,#FFFE,#FFFF
+CNT     DC      34
diff --git a/as/FUNC/outa_call1.casl b/as/FUNC/outa_call1.casl
new file mode 100644 (file)
index 0000000..335a4c5
--- /dev/null
@@ -0,0 +1,6 @@
+; casl2 outa_call.casl outa.casl
+MAIN    START
+        LAD     GR1,170
+        CALL    OUTA
+        RET
+        END
diff --git a/as/FUNC/outa_call2.casl b/as/FUNC/outa_call2.casl
new file mode 100644 (file)
index 0000000..f142a9a
--- /dev/null
@@ -0,0 +1,6 @@
+; casl2 outl_call2.casl outa.casl
+MAIN    START
+        LAD     GR1,#FFFF
+        CALL    OUTA
+        RET
+        END
diff --git a/as/FUNC/outb.casl b/as/FUNC/outb.casl
new file mode 100644 (file)
index 0000000..7d52dad
--- /dev/null
@@ -0,0 +1,108 @@
+;;; GR1に格納された値を、2進数値として表示
+OUTB    START
+        RPUSH
+        LAD     GR2,2           ; GR2に2進数の「2」を格納。
+        LAD     GR0,0           ; GR0 <- 0
+        ST      GR0,LEN         ; LENの初期化
+        AND     GR1,GR1         ; GR1をテスト
+        JZE     ZINS            ; GR1が0の場合、ZINSにジャンプ
+STI     CPL     GR1,GR2         ; ループ先頭。(GR1 < GR2)の場合は、ループ脱出
+        JMI     STLST           ; ↓
+        CALL    ODIVL           ; GR1とGR2の、商をGR0、剰余をGR1に格納
+        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領域に格納
+        JUMP    EMB             ; EMBにジャンプ
+ZINS    LD      GR1,NCHAR       ; 「0」をSTR領域に格納
+        CALL    STSTR           ; ↓
+EMB     LD      GR1,NCHAR       ; GR0 <- '0'
+EMLOOP  LD      GR2,LEN         ; GR2 <- LEN
+        CPA     GR2,DIG         ; ループ先頭。(GR2 = DIG)の場合は、ループ脱出
+        JZE     PRT             ; ↓
+        CALL    STSTR           ; GR1をSTR領域に格納
+        JUMP    EMLOOP          ; ループ終端
+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'
+DIG     DC      16        
+        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、剰余をGR1に格納する
+;;; 0〜65535の範囲の数値を扱う
+ODIVL   START
+        PUSH    0,GR2
+        PUSH    0,GR3
+        LAD     GR0,0           ; GR0の初期化。商
+        ST      GR2,ODY         ; DYにGR2の初期値を保存
+        LAD     GR3,1           ; GR3の初期化。対象ビットを表す
+ODSL    CPL     GR2,GR1         ; ループ先頭。(GR3 > GR1)の場合、DLOOPへループ脱出
+        JPL     ODLOOP          ; ↓
+        SLL     GR3,1           ; GR3を1回左シフト
+        SLL     GR2,1           ; GR2を1回左シフト
+        JOV     ODYOV           ; オーバーフローの場合は、ODYOVにジャンプ
+        JUMP    ODSL            ; ループ終端
+ODYOV   SRL     GR2,1           ; GR2を1回右シフト
+        LAD     GR2,#8000,GR2   ; GR2 <- GR2 + #8000
+        SRL     GR3,1           ; GR3を1回右シフト
+        JUMP    ODLPIN          ; ODLPINへジャンプ
+ODLOOP  SRL     GR3,1           ; ループ先頭。GR3を1回右シフト
+        JZE     ODFIN           ; (GR3= 0)の場合、ループ脱出
+        SRL     GR2,1           ; GR2を1回右シフト
+        CPL     GR1,ODY         ; (GR1 < ODY)の場合、ループ脱出
+        JMI     ODFIN           ; ↓
+        CPL     GR1,GR2         ; (GR1 < GR2)の場合、ループ先頭へジャンプ
+        JMI     ODLOOP          ; ↓
+ODLPIN  SUBL    GR1,GR2         ; GR1 <- GR1 - GR2
+        ADDL    GR0,GR3         ; GR0 <- GR0 + GR3
+        JUMP    ODLOOP          ; ループ終端
+ODFIN   POP     GR3
+        POP     GR2
+        RET
+ODY     DS      1
+ODMB    DC      #8000        
+        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
diff --git a/as/FUNC/outb_call.casl b/as/FUNC/outb_call.casl
new file mode 100644 (file)
index 0000000..657b17f
--- /dev/null
@@ -0,0 +1,22 @@
+;;; casl2 outb_call.casl outb.casl
+MAIN    START
+        LAD     GR2,0
+LOOP    LD      GR1,VAL,GR2
+        CALL    OUTB
+        LAD     GR2,1,GR2
+        CPA     GR2,CNT
+        JZE     FIN
+        JUMP    LOOP
+FIN     RET
+        END
+VAL     DC      0
+        DC      #0001,#0002,#0004,#0008
+        DC      #0010,#0020,#0040,#0080
+        DC      #0100,#0200,#0400,#0800
+        DC      #1000,#2000,#4000,#7FFF
+        DC      #8000
+        DC      #8001,#C000,#E000,#F000
+        DC      #F800,#FC00,#FE00,#FF00
+        DC      #FF80,#FFC0,#FFE0,#FFF0
+        DC      #FFF8,#FFFC,#FFFE,#FFFF
+CNT     DC      34
diff --git a/as/FUNC/outd_q15.casl b/as/FUNC/outd_q15.casl
new file mode 100644 (file)
index 0000000..58a9951
--- /dev/null
@@ -0,0 +1,83 @@
+;; GR1に格納された値を、10進数の小数値として表示
+OUTD    START
+        RPUSH
+        LAD     GR2,10          ; GR2に10進数の「10」を格納
+        LAD     GR0,0           ; 負数フラグ。GR1が負数の場合、GR0は1
+        ST      GR0,LEN         ; LENを初期化
+        AND     GR1,GR1         ; GR1が0の場合
+        JZE     ZPRT            ; ↓
+        JPL     STDN            ; GR1が正数の場合、STDNにジャンプ
+        PUSH    0,GR1
+        LD      GR1,='-'        ; GR1が負数の場合、「-」をSTR領域に格納
+        CALL    STSTR           ; ↓
+        POP     GR1
+        CPA     GR1,=#8000      ; GR1が#8000より大きい場合
+        JPL     MDN             ; ↓
+        LD      GR1,='1'        ; GR1が#8000の場合、-1を出力
+        CALL    STSTR           ; ↓
+        JUMP    PRT             ; ↓
+MDN     CALL    ABS             ; GR1を正数に変換
+STDN    PUSH    0,GR1           ; GR1を退避
+        LD      GR1,='0'        ; 「0」をSTR領域に格納
+        CALL    STSTR           ; ↓
+        LD      GR1,='.'        ; 「.」をSTR領域に格納
+        CALL    STSTR           ; ↓
+        POP     GR1             ; GR1を復元
+;; GR1の内容を小数値と見なし、10進数文字に変換してSTRに格納
+TODIG   AND     GR1,GR1         ; GR4が0の場合は、ループを脱出
+        JZE     PRT             ; ↓
+        CALL    MUL             ; GR1とGR2の、積をGR1、オーバーフロー値をGR3に格納
+        PUSH    0,GR1           ; G1を退避
+        LD      GR1,GR3         ; GR3をGR1にコピー
+        ADDA    GR1,='0'        ; GR1を文字に変換
+        CALL    STSTR           ; GR1をSTR領域に格納
+        POP     GR1             ; GR1を復元
+        JUMP    TODIG           ; ループ
+ZPRT    LD      GR1,='0'        ; 「0」をSTR領域に格納
+        CALL    STSTR           ; ↓
+PRT     LAD     GR1,STR         ; ↓
+        OUT     STR,LEN         ; ↓
+        RPOP
+        RET
+STR     DS      20
+LEN     DS      1
+        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の値を10倍にし、GR3にオーバーフロー値を格納
+MUL    START
+        PUSH    0,GR5
+        PUSH    0,GR6
+        LAD     GR3,0           ; GR3は、オーバーフロー値を格納
+        LAD     GR5,1           ; GR5は、インデックス
+        LD      GR6,GR1         ; GR6は、GR4の元の値を保持
+MLOOP   CPA     GR5,=10         ; GR5が10になったらループ脱出
+        JZE     MFIN            ; ↓
+        ADDA    GR1,GR6         ; GR4 <- GR4 + GR6
+        LAD     GR5,1,GR5       ; GR5 <- GR5 + 1
+        JOV     MADD            ; オーバーフローした場合、MADDへジャンプ
+        JUMP    MLOOP           ; ループ
+MADD    LAD     GR3,1,GR3       ; GR3 <- GR3 + 1
+        AND     GR1,=#7FFF      ; GR4の最上位ビットをクリア
+        JUMP    MLOOP           ; ループ
+MFIN    POP     GR6
+        POP     GR5
+        RET
+        END
+;; GR1の値を絶対値に変換する。GR1には0未満の数値が格納されていると想定。
+;; 例: -10 => 10, -20 => 20
+ABS     START
+        XOR     GR1,=#FFFF      ; GR1の値を反転
+        LAD     GR1,1,GR1       ; GR1 <- GR1 + 1
+        RET
+        END
diff --git a/as/FUNC/outd_q15_call.casl b/as/FUNC/outd_q15_call.casl
new file mode 100644 (file)
index 0000000..fc2ef1a
--- /dev/null
@@ -0,0 +1,21 @@
+;; outd_q15.caslを呼び出し、33個の数値を表示する
+MAIN    START
+        LAD     GR2,0
+LOOP    LD      GR1,VAL,GR2
+        CALL    OUTD
+        LAD     GR2,1,GR2
+        CPA     GR2,CNT
+        JZE     FIN
+        JUMP    LOOP
+FIN     RET
+VAL     DC      #7FFF,#4000,#2000,#1000
+        DC      #0800,#0400,#0200,#0100
+        DC      #0080,#0040,#0020,#0010
+        DC      #0008,#0004,#0002,#0001
+        DC      #8000
+        DC      #8001,#C000,#E000,#F000
+        DC      #F800,#FC00,#FE00,#FF00
+        DC      #FF80,#FFC0,#FFE0,#FFF0
+        DC      #FFF8,#FFFC,#FFFE,#FFFF
+CNT     DC      33
+        END
diff --git a/as/FUNC/outd_q15_call0.casl b/as/FUNC/outd_q15_call0.casl
new file mode 100644 (file)
index 0000000..d097d5b
--- /dev/null
@@ -0,0 +1,6 @@
+; need outd_q16.casl
+MAIN    START
+        LAD     GR1,#7777
+        CALL    OUTD
+        RET
+        END
diff --git a/as/FUNC/outl.casl b/as/FUNC/outl.casl
new file mode 100644 (file)
index 0000000..47e31b4
--- /dev/null
@@ -0,0 +1,107 @@
+;;; GR1に格納された値を、10進数の整数値(0〜65535)として表示
+OUTL    START
+        RPUSH
+        LAD     GR2,10          ; GR2に10進数の「10」を格納。
+        LAD     GR0,0           ; GR0 <- 0
+        ST      GR0,LEN         ; LENの初期化
+        AND     GR1,GR1         ; GR1をテスト
+        JZE     ZPRT            ; GR1が0の場合、ZPRTにジャンプ
+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領域に格納
+        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
+        PUSH    0,GR2
+        PUSH    0,GR4
+        AND     GR2,GR2         ; GR2が0の場合、ODFINへジャンプ
+        JZE     ODFIN           ; ↓
+        ST      GR2,ODY         ; ODYにGR2の初期値を保存
+        LAD     GR0,0           ; GR0の初期化
+        LAD     GR3,0           ; GR3の初期化
+        LAD     GR4,1           ; GR4の初期化。対象ビットを表す
+ODSL    CPL     GR2,GR1         ; ループ先頭。(GR2 > GR1)の場合、ODLOOPへループ脱出
+        JPL     ODLOOP          ; ↓
+        SLL     GR4,1           ; GR4を1回左シフト
+        SLL     GR2,1           ; GR2を1回左シフト
+        JOV     ODYOV           ; オーバーフローの場合は、ODYOVにジャンプ
+        JUMP    ODSL            ; ループ終端
+ODYOV   SRL     GR2,1
+        LAD     GR2,#8000,GR2
+        SRL     GR4,1
+        JUMP    ODLPIN
+ODLOOP  SRL     GR4,1           ; ループ先頭。GR4を1回右シフト
+        JZE     ODFIN           ; (GR4 = 0)の場合、ループ脱出
+        SRL     GR2,1           ; GR2を1回右シフト
+        CPL     GR1,ODY         ; (GR1 < ODY)の場合、ループ脱出
+        JMI     ODFIN           ; ↓
+        CPL     GR1,GR2         ; (GR1 < GR2)の場合、ループ先頭へジャンプ
+        JMI     ODLOOP          ; ↓
+ODLPIN  SUBL    GR1,GR2         ; GR1 <- GR1 - GR2
+        ADDL    GR0,GR4         ; GR0 <- GR0 + GR4
+        JUMP    ODLOOP          ; ループ終端
+ODFIN   LD      GR3,GR1
+        POP    GR4
+        POP     GR2
+        POP     GR1
+        RET
+ODY     DS      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
diff --git a/as/FUNC/outl_call.casl b/as/FUNC/outl_call.casl
new file mode 100644 (file)
index 0000000..729cd7e
--- /dev/null
@@ -0,0 +1,22 @@
+;;; casl2 outl_call.casl outl.casl
+MAIN    START
+        LAD     GR2,0
+LOOP    LD      GR1,VAL,GR2
+        CALL    OUTL
+        LAD     GR2,1,GR2
+        CPA     GR2,CNT
+        JZE     FIN
+        JUMP    LOOP
+FIN     RET
+        END
+VAL     DC      0
+        DC      #0001,#0002,#0004,#0008
+        DC      #0010,#0020,#0040,#0080
+        DC      #0100,#0200,#0400,#0800
+        DC      #1000,#2000,#4000,#7FFF
+        DC      #8000
+        DC      #8001,#C000,#E000,#F000
+        DC      #F800,#FC00,#FE00,#FF00
+        DC      #FF80,#FFC0,#FFE0,#FFF0
+        DC      #FFF8,#FFFC,#FFFE,#FFFF
+CNT     DC      34
diff --git a/as/FUNC/outl_call0.casl b/as/FUNC/outl_call0.casl
new file mode 100644 (file)
index 0000000..528569f
--- /dev/null
@@ -0,0 +1,6 @@
+; casl2 outl_call0.casl outl.casl
+MAIN    START
+        LAD     GR1,1
+        CALL    OUTL
+        RET
+        END
diff --git a/as/FUNC/outl_call1.casl b/as/FUNC/outl_call1.casl
new file mode 100644 (file)
index 0000000..9e06f9c
--- /dev/null
@@ -0,0 +1,6 @@
+; casl2 outl_call0.casl outl.casl
+MAIN    START
+        LAD     GR1,100
+        CALL    OUTL
+        RET
+        END
diff --git a/as/FUNC/outl_call2.casl b/as/FUNC/outl_call2.casl
new file mode 100644 (file)
index 0000000..d3a4280
--- /dev/null
@@ -0,0 +1,6 @@
+; casl2 outl_call2.casl outl.casl
+MAIN    START
+        LAD     GR1,#FFFF
+        CALL    OUTL
+        RET
+        END
diff --git a/as/FUNC/rev.casl b/as/FUNC/rev.casl
new file mode 100644 (file)
index 0000000..09d81d1
--- /dev/null
@@ -0,0 +1,25 @@
+;; アドレスが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
diff --git a/as/FUNC/rev_call.casl b/as/FUNC/rev_call.casl
new file mode 100644 (file)
index 0000000..58252c2
--- /dev/null
@@ -0,0 +1,10 @@
+MAIN    START
+        OUT     STR,LEN
+        LAD     GR1,STR
+        LD      GR2,LEN
+        CALL    REV
+        OUT     STR,LEN
+        RET
+STR     DC      '12345'
+LEN     DC      5
+        END
diff --git a/as/FUNC/sum.casl b/as/FUNC/sum.casl
new file mode 100644 (file)
index 0000000..85592c3
--- /dev/null
@@ -0,0 +1,14 @@
+;;; sum.casl
+;;; 1からGR1で指定された値までの正数をすべて加算する
+SUM     START
+        LAD     GR2,0
+        LAD     GR3,1
+SLOOP   CPL     GR3,GR1
+        JPL     SFIN
+        ADDL    GR2,GR3
+        JOV     SERR
+        LAD     GR3,1,GR3
+        JUMP    SLOOP
+SERR    LAD     GR2,#FFFF
+SFIN    RET
+        END
diff --git a/as/FUNC/sum_call.casl b/as/FUNC/sum_call.casl
new file mode 100644 (file)
index 0000000..a983623
--- /dev/null
@@ -0,0 +1,9 @@
+;;; sum.caslを呼び出し、1から361までの数値の合計を求める
+;;; casl2 sum_call.casl sum.call outl.casl
+MAIN    START
+        LAD     GR1,361
+        CALL    SUM
+        LD      GR1,GR2
+        CALL    OUTL
+MFIN    RET
+        END
diff --git a/as/YAKUWA/README.txt b/as/YAKUWA/README.txt
new file mode 100644 (file)
index 0000000..aa9ebc7
--- /dev/null
@@ -0,0 +1,4 @@
+『らくらく突破 CASL2―基本情報技術者試験 (情報処理技術者試験) 』
+(技術評論社)掲載のプログラム
+
+http://www.amazon.co.jp/dp/4774116068/
diff --git a/as/YAKUWA/binout.casl b/as/YAKUWA/binout.casl
new file mode 100644 (file)
index 0000000..1d920aa
--- /dev/null
@@ -0,0 +1,55 @@
+;;; BINOUT: 主プログラムから渡された1語の内容を、
+;;;         ゼロ抑制を行った2進表記で出力する
+;;;     八鍬幸信『基本情報処理試験 らくらく突破 CASL II』172ページ
+;;; BINOUTを呼び出す
+MAIN    START
+        LAD     GR2,0
+MLOOP   CPA     GR2,MLEN
+        JZE     MFIN
+        LD      GR1,MWORD,GR2
+        CALL    BINOUT
+        LAD     GR2,1,GR2
+        JUMP    MLOOP
+MFIN    RET
+MWORD   DC      #0000,#0001,#09CD,#8001
+MLEN    DC      4        
+        END
+;;; BINOUT
+BINOUT  START
+        PUSH    0,GR1           ; レジスタの退避
+        PUSH    0,GR2           ; ↓
+        PUSH    0,GR3           ; ↓
+        PUSH    0,GR4           ; ↓
+        LAD     GR2,0           ; 出力ポインタの初期化
+        LAD     GR3,15          ; カウンタの初期化
+        LD      GR4,GR1         ; 全ビット = 0?
+        JZE     OUT1
+LOOP1   JMI     ONE             ; 先行するビット処理
+        LAD     GR3,-1,GR3      ; ↓
+        SLL     GR1,1           ; ↓
+        JUMP    LOOP1
+LOOP2   JMI     ONE             ; 符号ビットの判定
+ZERO    LAD     GR0,48          ; '0'→GR0
+        JUMP    STORE
+ONE     LAD     GR0,49          ; '1'→GR1
+STORE   ST      GR0,OBUF,GR2
+        LAD     GR2,1,GR2
+        LAD     GR3,-1,GR3
+        CPA     GR3,NZERO
+        JMI     OUT2            ; 全ビット終了?
+        SLL     GR1,1
+        JUMP    LOOP2
+OUT1    LAD     GR0,48
+        ST      GR0,OBUF,GR2
+        LAD     GR2,1,GR2
+OUT2    ST      GR2,OLNG
+        OUT     OBUF,OLNG
+        POP     GR4             ; レジスタの復元
+        POP     GR3             ; ↓
+        POP     GR2             ; ↓
+        POP     GR1             ; ↓
+        RET
+OBUF    DS      16
+OLNG    DS      1
+NZERO   DC      0
+        END
similarity index 100%
rename from as/floatedit.casl
rename to as/YAKUWA/floatedit.casl
diff --git a/as/add.casl b/as/add.casl
deleted file mode 100644 (file)
index 2b769a4..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-MAIN   START
-BEGIN  LD      GR1,A
-       ADDA    GR1,B
-    RET
-A      DC      3
-B      DC      1
-       END
diff --git a/as/add1.casl b/as/add1.casl
deleted file mode 100644 (file)
index 7d470aa..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-MAIN   START   BEGIN
-BEGIN  RPUSH
-       LD      GR1,A
-       ADDA    GR1,B
-    ST GR1,C
-    RPOP
-    RET
-A      DC      3
-B      DC      1
-C      DS      1
-       END
diff --git a/as/add2.casl b/as/add2.casl
deleted file mode 100644 (file)
index fac7ac2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-MAIN   START
-BEGIN  LD      GR0,A
-       LD      GR1,B
-       ADDA    GR0,GR1
-    ST GR1,C
-    RET
-A      DC      3
-B      DC      1
-C      DS      1
-       END
diff --git a/as/add_err.casl b/as/add_err.casl
deleted file mode 100644 (file)
index 14b2ee5..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-MAIN   START   BEGIN
-BEGIN  LD      GR1,A
-       ADEA    GR1,B
-    ST GR1, C
-    RET
-A      DC      3
-B      DC      1
-C      DS      1
-       END
diff --git a/as/add_labelerr.casl b/as/add_labelerr.casl
deleted file mode 100644 (file)
index 6f40d11..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-MAIN   START   BEGIN
-BEGIN  LD      GR1,A
-       ADDA    GR1,B
-    ST GR1,C
-    RET
-A      DC      3
-A      DC      1
-C      DS      1
-       END
diff --git a/as/add_loop.casl b/as/add_loop.casl
deleted file mode 100644 (file)
index 875ea98..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-MAIN   START
-BEGIN  LAD     GR0,0
-       LAD     GR1,0
-LOOP   CPA GR1,LEN
-       JZE     FIN
-    LAD        GR1,1,GR1
-       ADDA    GR0,GR1
-    JUMP       LOOP
-FIN    RET
-LEN    DC      10
-       END
diff --git a/as/add_opdspc_err.casl b/as/add_opdspc_err.casl
deleted file mode 100644 (file)
index 8ab765a..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-MAIN   START   BEGIN
-BEGIN  LD      GR1, A
-       ADDA    GR1,B
-    ST GR1, C
-    RET
-A      DC      3
-B      DC      1
-C      DS      1
-       END
diff --git a/as/add_p.casl b/as/add_p.casl
deleted file mode 100644 (file)
index ca656e0..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-MAIN   START
-BEGIN  LD      GR1,A
-       ADDA    GR1,B
-    CALL       ITOA
-    RET
-A      DC      999
-B      DC      998
-C      DS      1
-       END
diff --git a/as/adda_overflow.casl b/as/adda_overflow.casl
deleted file mode 100644 (file)
index 82c08bd..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-MAIN   START   BEGIN
-BEGIN  LD      GR0,A
-       ADDA    GR0,B
-       ST      GR0,C
-       RET
-A      DC      32766
-B      DC      29
-C      DS      1
-       END
diff --git a/as/binout.casl b/as/binout.casl
deleted file mode 100644 (file)
index 23577fc..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-BINOUT START
-       LAD     GR1,#09CD
-       LAD     GR2,1
-       PUSH    0,GR1
-       PUSH    0,GR2
-       PUSH    0,GR3
-       PUSH    0,GR4
-       LAD     GR2,0
-       LAD     GR3,15
-       LD      GR4,GR1
-       JZE     OUT1
-LOOP1  JMI     ONE
-       LAD     GR3,-1,GR3
-       SLL     GR1,1
-       JUMP    LOOP1
-LOOP2  JMI     ONE
-ZERO   LAD     GR0,48
-       JUMP    STORE
-ONE    LAD     GR0,49
-STORE  ST      GR0,OBUF,GR2
-       LAD     GR2,1,GR2
-       LAD     GR3,-1,GR3
-       CPA     GR3,NZERO
-       JMI     OUT2
-       SLL     GR1,1
-       JUMP    LOOP2
-OUT1   LAD     GR0,48
-       ST      GR0,OBUF,GR2
-       LAD     GR2,1,GR2
-OUT2   ST      GR2,OLNG
-       OUT     OBUF,OLNG
-       POP     GR4
-       POP     GR3
-       POP     GR2
-       POP     GR1
-       RET
-OBUF   DS      16
-OLNG   DS      1
-NZERO  DC      0
-       END
diff --git a/as/count_call.casl b/as/count_call.casl
deleted file mode 100644 (file)
index 9f33cfa..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-MAIN   START
-       LAD GR1,33
-    CALL COUNT1
-FIN    RET
-       END
diff --git a/as/count_call1.casl b/as/count_call1.casl
deleted file mode 100644 (file)
index 933b5a3..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-MAIN   START
-       LAD GR1,9
-    CALL COUNT1
-FIN    RET
-       END
diff --git a/as/count_call2.casl b/as/count_call2.casl
deleted file mode 100644 (file)
index b5def9e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-MAIN   START
-       LAD GR1,-1
-    CALL COUNT1
-FIN    RET
-       END
diff --git a/as/cpa1.casl b/as/cpa1.casl
deleted file mode 100644 (file)
index 4422daa..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/dc_overflow.casl b/as/dc_overflow.casl
deleted file mode 100644 (file)
index 1225f40..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-MAIN   START   BEGIN
-BEGIN  LD      GR0,A
-       ADDL    GR0,B
-       ST      GR0,C
-       RET
-A      DC      32779
-B      DC      32778
-C      DS      1
-       END
diff --git a/as/dc_spc.casl b/as/dc_spc.casl
deleted file mode 100644 (file)
index 45dc857..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-; DC命令で空白を指定した場合のテスト 
-MAIN    START
-        OUT BUF,LEN
-        RET
-BUF            DC      ' '
-LEN            DC      1
-        END
diff --git a/as/div.casl b/as/div.casl
deleted file mode 100644 (file)
index 26fd543..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-DIV    START
-BEGIN  LD      GR1,X
-       LD      GR2,A
-LOOP   SUBL    GR1,Y
-    ADDL       GR2,=1
-    CPL        GR1,Y
-       JPL     LOOP
-    JZE LOOP
-MOD    LAD     GR3,0,GR1
-       ST      GR3,M
-FIN    ST      GR2,A
-       RET
-X      DC      87
-Y      DC      11
-A      DC      0
-M      DS      1
-       END
diff --git a/as/div10.casl b/as/div10.casl
deleted file mode 100644 (file)
index b1c1de8..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-;GR1を10で割ったときの商をGR2、剰余をGR3に格納
-DIV10  START
-       LD      GR3,GR1
-       LAD     GR2,0
-LOOP   CPA     GR3,TEN
-       JMI     FIN
-    SUBL GR3,TEN
-    LAD        GR2,1,GR2
-    JUMP       LOOP
-FIN    RET
-TEN    DC      10
-       END
diff --git a/as/div10_test.casl b/as/div10_test.casl
deleted file mode 100644 (file)
index 3623a48..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-MAIN   START
-BEGIN  LAD     GR1,91
-       CALL    DIV10
-       RET
-    END
diff --git a/as/div2.casl b/as/div2.casl
deleted file mode 100644 (file)
index 89d7405..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-DIV    START
-BEGIN  LD      GR1,X
-       LD      GR2,A
-LOOP   SUBL    GR1,Y
-    ADDL       GR2,=1
-    CPL        GR1,Y
-       JPL     LOOP
-    JZE LOOP
-MOD    ST      GR1,M
-FIN    ST      GR2,A
-       RET
-X      DC      333
-Y      DC      12
-A      DC      0
-M      DS      1
-       END
diff --git a/as/div3.casl b/as/div3.casl
deleted file mode 100644 (file)
index a9eadea..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-DIV    START
-BEGIN  LD      GR3,X
-       LD      GR1,Y
-       LD      GR2,A
-       LAD     GR0,0,GR3
-LOOP   SUBL    GR3,Y
-    LAD        GR2,1,GR2
-    CPL        GR3,Y
-       JPL     LOOP
-    JZE LOOP
-       RET
-X      DC      64
-Y      DC      8
-A      DC      0
-M      DS      1
-       END
diff --git a/as/div_call.casl b/as/div_call.casl
deleted file mode 100644 (file)
index 50460e7..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-MAIN   START
-BEGIN  LD      GR0,X
-       LD      GR1,Y
-    CALL DIV
-       RET
-X      DC      101
-Y      DC      50
-       END
diff --git a/as/div_sub.casl b/as/div_sub.casl
deleted file mode 100644 (file)
index 893a2e4..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-; GR0に格納された内容とGR1に格納された内容の、
-; 商をGR2、剰余をGR3に格納する
-DIV    START
-    LAD GR2,0
-       LD      GR3,GR0
-LOOP   SUBA    GR3,GR1
-    LAD        GR2,1,GR2
-    CPA        GR3,GR1
-       JPL     LOOP
-    JZE LOOP
-       RET
-    END
diff --git a/as/ds.casl b/as/ds.casl
deleted file mode 100644 (file)
index eb15efb..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-MAIN START
-    LAD GR1,=10
-    LAD GR2,=20
-    LD GR1,0,GR1
-    LD GR2,0,GR2
-    ST GR1,A
-    LD GR3,A
-    ST GR2,B
-    LD GR3,A
-    RET
-A DS 0
-B DS 1
-    END
diff --git a/as/ds_err.casl b/as/ds_err.casl
deleted file mode 100644 (file)
index 60581b3..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-MAIN START
-    LAD GR0,=10
-    ST GR0,A
-A DS
-    RET
-    END
diff --git a/as/iotest.casl b/as/iotest.casl
deleted file mode 100644 (file)
index 74f2a74..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-IOTEST START
-       OUT OBUF1,OLEN1
-LOOP IN IOBUF,IOLEN
-       LD      GR1,IOLEN
-    JZE        RETURN
-       OUT OBUF2,OLEN2
-       OUT IOBUF,IOLEN
-       OUT OBUF3,OLEN3
-       JUMP LOOP
-RETURN RET
-; Memory
-OBUF1 DC 'LET''S START. TYPE IN'
-OLEN1 DC 20
-OBUF2 DC 'YOU TYPED'
-OLEN2 DC 9
-OBUF3 DC 'WHAT''S NEXT?'
-OLEN3 DC 12
-IOBUF DS 64
-IOLEN DS 1
-       END
diff --git a/as/itoa.casl b/as/itoa.casl
deleted file mode 100644 (file)
index 75338f2..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-;GR1に格納された数値を表示
-ITOA   START
-       PUSH 0,GR2
-       PUSH 0,GR3
-       PUSH 0,GR4
-    LAD        GR0,0
-    LAD        GR2,0
-    AND GR1,GR1
-    JPL ILOOP
-    JZE ILOOP
-    LAD GR0,1
-    CALL INV
-ILOOP  CPA     GR1,TEN
-       JMI     INEXT
-       CALL    DIV
-    ADDA       GR4,ZCHAR
-    ST GR4,STR,GR2
-    LAD        GR2,1,GR2
-    LD GR1,GR3
-    JUMP       ILOOP
-INEXT  ADDA    GR1,ZCHAR
-       ST      GR1,STR,GR2
-       LAD     GR2,1,GR2
-    CPA GR0,=1
-    JPL        PRT
-    JMI        PRT
-    LD GR1,MINUS
-       ST      GR1,STR,GR2
-       LAD     GR2,1,GR2
-PRT    ST      GR2,LEN
-       LAD     GR1,STR
-    LD GR2,LEN
-    CALL REV
-       OUT     STR,LEN
-       POP GR4
-       POP GR3
-       POP GR2
-       RET
-TEN    DC      10
-ZCHAR DC '0'
-MINUS DC '-'
-STR    DS      6
-LEN    DS      1
-    END
-;GR1を10で割ったときの商をGR3、剰余をGR4に格納
-DIV    LD      GR4,GR1
-       LAD     GR3,0
-DLOOP  CPA     GR4,TEN
-       JMI     DFIN
-    SUBL GR4,TEN
-    LAD        GR3,1,GR3
-    JUMP       DLOOP
-DFIN RET
-       END
-;アドレスがGR1、長さがGR2の文字列を逆順に並べ替える
-;例: 12345 -> 54321
-REV    START
-       PUSH    0,GR3
-    PUSH       0,GR4
-    PUSH       0,GR5
-       LAD     GR3,1
-RPU    CPA     GR2,GR3
-       JMI     RNEXT
-    LD GR4,GR1
-    ADDA       GR4,GR3
-    LD GR4,-1,GR4
-       PUSH 0,GR4
-    LAD        GR3,1,GR3
-    JUMP       RPU
-RNEXT    LAD   GR3,1
-RPO    CPA     GR2,GR3
-       JMI     RFIN
-    POP GR4
-    LD GR5,GR1
-    ADDA GR5,GR3
-    ST GR4,-1,GR5
-    LAD        GR3,1,GR3
-    JUMP RPO
-RFIN POP GR5
-       POP     GR4
-    POP        GR3
-       RET
-       END
-;GR1の内容をマイナス値にする
-;例: 10 -> -10, -20 -> 20
-INV    START
-       XOR     GR1,=#FFFF
-    LAD        GR1,1,GR1
-    RET
-       END
diff --git a/as/itoa0.casl b/as/itoa0.casl
deleted file mode 100644 (file)
index a08844e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-MAIN   START
-BEGIN  LAD     GR1,765
-       CALL    DIV10
-    ADDA       GR3,Z
-    ST GR3,A
-    LAD        GR1,A
-    LAD        GR2,1
-    SVC        2
-    LAD GR1,=#A
-    SVC 2
-       RET
-Z      DC      '0'
-A      DS      1
-    END
diff --git a/as/itoa1.casl b/as/itoa1.casl
deleted file mode 100644 (file)
index f23df07..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-MAIN   START
-       LD      GR1,I
-       LAD     GR2,10
-    LAD        GR5,0
-LOOP   CPA     GR1,GR2
-       JMI     NEXT
-       CALL    DIV
-    ADDA       GR4,Z
-    ST GR4,STR,GR5
-    LAD        GR5,1,GR5
-    LD GR1,GR3
-    JUMP       LOOP
-NEXT   ADDA    GR1,Z
-       ST      GR1,STR,GR5
-       LAD     GR5,1,GR5
-       ST &