From: j8takagi Date: Tue, 9 Feb 2010 12:19:57 +0000 (+0900) Subject: コマンドテストCASLファイルの追加 X-Git-Tag: v0.1~47^2~8 X-Git-Url: https://j8takagi.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1f7164cea1d3e5aebb76dc26543b1de593b92bb;p=YACASL2.git コマンドテストCASLファイルの追加 --- c1f7164cea1d3e5aebb76dc26543b1de593b92bb diff --cc as/cmd/DC/dc_i0.casl index 3a949e7,0000000..cf8f20c mode 100644,000000..100644 --- a/as/cmd/DC/dc_i0.casl +++ b/as/cmd/DC/dc_i0.casl @@@ -1,27 -1,0 +1,27 @@@ - ;; DC命令で、-32768〜32768の範囲にない10進数値を指定 ++;; DC 10進定数/16進定数 +MAIN START + RET + DC 0 + DC 1 + DC 10 + DC 32767 + DC 32768 + DC 65535 + DC 65536 + DC 65537 + DC -1 + DC -10 + DC -32767 + DC -32768 + DC -32769 + DC #0 + DC #1 + DC #01 + DC #001 + DC #0001 + DC #10 + DC #11 + DC #F + DC #000F + DC #FFFF + END diff --cc as/cmd/DC/dc_i1.casl index ebe8569,0000000..c9352bd mode 100644,000000..100644 --- a/as/cmd/DC/dc_i1.casl +++ b/as/cmd/DC/dc_i1.casl @@@ -1,5 -1,0 +1,5 @@@ - ;; DC命令で、-32768〜32768の範囲にない10進数値を指定 ++;; DC 10進定数/16進定数 +MAIN START + RET - DC 1, 10, 32767, 32768, 65535, 65536, 65537,-1, -10, -32767, -32768, -32769, #0, #1, #01, #001, #0001, #10, #11,#F, #000F, #FFFF ++ DC 1,10,32767,32768,65535,65536,65537,-1,-10,-32767,-32768,-32769,#0,#1,#01,#001,#0001,#10,#11,#F,#000F,#FFFF + END diff --cc as/cmd/DC/dc_i_of.casl index 0000000,0000000..0b36f5a new file mode 100644 --- /dev/null +++ b/as/cmd/DC/dc_i_of.casl @@@ -1,0 -1,0 +1,14 @@@ ++;; DC -32768〜32768の範囲にない10進数値 ++MAIN START ++ RET ++ DC 32767 ++ DC 32768 ++ DC 65535 ++ DC 65536 ++ DC 131073 ; 65536 * 2 + 1 ++ DC -32768 ++ DC -32769 ++ DC -65535 ++ DC -65536 ++ DC -131073 ; -65536 * 2 - 1 ++ END diff --cc as/cmd/DS/ds.casl index 0000000,0000000..39ea1e9 new file mode 100644 --- /dev/null +++ b/as/cmd/DS/ds.casl @@@ -1,0 -1,0 +1,14 @@@ ++;;; DS ++MAIN START ++ LAD GR1,A ++ LAD GR1,B ++ LAD GR1,C ++ LAD GR1,D ++ LAD GR1,E ++ RET ++A DS 1 ++B DS 2 ++C DS 4 ++D DS 0 ++E DC #FFFF ++ END diff --cc as/cmd/JMI/jmi_m.casl index 0000000,0000000..0dc7216 new file mode 100644 --- /dev/null +++ b/as/cmd/JMI/jmi_m.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JMI OSZ:010 ++MAIN START ++ LD GR1,A ++ AND GR1,GR1 ++ JMI TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC -1 ++ END diff --cc as/cmd/JMI/jmi_ov.casl index 0000000,0000000..4541927 new file mode 100644 --- /dev/null +++ b/as/cmd/JMI/jmi_ov.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JMI OSZ:001 ++MAIN START ++ LD GR1,A ++ SRL GR1,1 ++ JMI TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC #0003 ++ END diff --cc as/cmd/JMI/jmi_p.casl index 0000000,0000000..ecf7fef new file mode 100644 --- /dev/null +++ b/as/cmd/JMI/jmi_p.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JMI OSZ:000 ++MAIN START ++ LD GR1,A ++ AND GR1,GR1 ++ JMI TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC 1 ++ END diff --cc as/cmd/JMI/jmi_z.casl index 0000000,0000000..5f98af9 new file mode 100644 --- /dev/null +++ b/as/cmd/JMI/jmi_z.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JMI OSZ:001 ++MAIN START ++ LD GR1,A ++ AND GR1,GR1 ++ JMI TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC 0 ++ END diff --cc as/cmd/JNZ/jnz_m.casl index 0000000,0000000..e88d234 new file mode 100644 --- /dev/null +++ b/as/cmd/JNZ/jnz_m.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JNZ OSZ:010 ++MAIN START ++ LD GR1,A ++ AND GR1,GR1 ++ JNZ TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC -1 ++ END diff --cc as/cmd/JNZ/jnz_ov.casl index 0000000,0000000..559fb3f new file mode 100644 --- /dev/null +++ b/as/cmd/JNZ/jnz_ov.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JNZ OSZ:001 ++MAIN START ++ LD GR1,A ++ SRL GR1,1 ++ JNZ TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC #0003 ++ END diff --cc as/cmd/JNZ/jnz_p.casl index 0000000,0000000..7a03678 new file mode 100644 --- /dev/null +++ b/as/cmd/JNZ/jnz_p.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JNZ OSZ:000 ++MAIN START ++ LD GR1,A ++ AND GR1,GR1 ++ JNZ TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC 1 ++ END diff --cc as/cmd/JNZ/jnz_z.casl index 0000000,0000000..89bd1a3 new file mode 100644 --- /dev/null +++ b/as/cmd/JNZ/jnz_z.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JNZ OSZ:001 ++MAIN START ++ LD GR1,A ++ AND GR1,GR1 ++ JNZ TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC 0 ++ END diff --cc as/cmd/JOV/jov_m.casl index 0000000,0000000..14a39ab new file mode 100644 --- /dev/null +++ b/as/cmd/JOV/jov_m.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JOV OSZ:010 ++MAIN START ++ LD GR1,A ++ AND GR1,GR1 ++ JOV TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC -1 ++ END diff --cc as/cmd/JOV/jov_ov.casl index 0000000,0000000..b477f09 new file mode 100644 --- /dev/null +++ b/as/cmd/JOV/jov_ov.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JOV OSZ:001 ++MAIN START ++ LD GR1,A ++ SRL GR1,1 ++ JOV TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC #0003 ++ END diff --cc as/cmd/JOV/jov_p.casl index 0000000,0000000..7401ccf new file mode 100644 --- /dev/null +++ b/as/cmd/JOV/jov_p.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JOV OSZ:000 ++MAIN START ++ LD GR1,A ++ AND GR1,GR1 ++ JOV TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC 1 ++ END diff --cc as/cmd/JOV/jov_z.casl index 0000000,0000000..fb72464 new file mode 100644 --- /dev/null +++ b/as/cmd/JOV/jov_z.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JOV OSZ:001 ++MAIN START ++ LD GR1,A ++ AND GR1,GR1 ++ JOV TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC 0 ++ END diff --cc as/cmd/JPL/jpl_m.casl index 0000000,0000000..9e0c157 new file mode 100644 --- /dev/null +++ b/as/cmd/JPL/jpl_m.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JPL OSZ:010 ++MAIN START ++ LD GR1,A ++ AND GR1,GR1 ++ JPL TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC -1 ++ END diff --cc as/cmd/JPL/jpl_ov.casl index 0000000,0000000..58729f6 new file mode 100644 --- /dev/null +++ b/as/cmd/JPL/jpl_ov.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JPL OSZ:001 ++MAIN START ++ LD GR1,A ++ SRL GR1,1 ++ JPL TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC #0003 ++ END diff --cc as/cmd/JPL/jpl_p.casl index 0000000,0000000..09c8964 new file mode 100644 --- /dev/null +++ b/as/cmd/JPL/jpl_p.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JPL OSZ:000 ++MAIN START ++ LD GR1,A ++ AND GR1,GR1 ++ JPL TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC 1 ++ END diff --cc as/cmd/JPL/jpl_z.casl index 0000000,0000000..5717e2a new file mode 100644 --- /dev/null +++ b/as/cmd/JPL/jpl_z.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JPL OSZ:001 ++MAIN START ++ LD GR1,A ++ AND GR1,GR1 ++ JPL TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC 0 ++ END diff --cc as/cmd/JUMP/jump_m.casl index 0000000,0000000..e80f243 new file mode 100644 --- /dev/null +++ b/as/cmd/JUMP/jump_m.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JUMP OSZ:010 ++MAIN START ++ LD GR1,A ++ AND GR1,GR1 ++ JUMP TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC -1 ++ END diff --cc as/cmd/JUMP/jump_ov.casl index 0000000,0000000..7a2ae38 new file mode 100644 --- /dev/null +++ b/as/cmd/JUMP/jump_ov.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JUMP OSZ:001 ++MAIN START ++ LD GR1,A ++ SRL GR1,1 ++ JUMP TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC #0003 ++ END diff --cc as/cmd/JUMP/jump_p.casl index 0000000,0000000..7d4be42 new file mode 100644 --- /dev/null +++ b/as/cmd/JUMP/jump_p.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JUMP OSZ:000 ++MAIN START ++ LD GR1,A ++ AND GR1,GR1 ++ JUMP TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC 1 ++ END diff --cc as/cmd/JUMP/jump_z.casl index 0000000,0000000..39e43c9 new file mode 100644 --- /dev/null +++ b/as/cmd/JUMP/jump_z.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JUMP OSZ:001 ++MAIN START ++ LD GR1,A ++ AND GR1,GR1 ++ JUMP TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC 0 ++ END diff --cc as/cmd/JZE/jze_m.casl index 0000000,0000000..904ff9e new file mode 100644 --- /dev/null +++ b/as/cmd/JZE/jze_m.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JZE OSZ:010 ++MAIN START ++ LD GR1,A ++ AND GR1,GR1 ++ JZE TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC -1 ++ END diff --cc as/cmd/JZE/jze_ov.casl index 0000000,0000000..38ab4ae new file mode 100644 --- /dev/null +++ b/as/cmd/JZE/jze_ov.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JZE OSZ:001 ++MAIN START ++ LD GR1,A ++ SRL GR1,1 ++ JZE TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC #0003 ++ END diff --cc as/cmd/JZE/jze_p.casl index 0000000,0000000..20f208b new file mode 100644 --- /dev/null +++ b/as/cmd/JZE/jze_p.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JZE OSZ:000 ++MAIN START ++ LD GR1,A ++ AND GR1,GR1 ++ JZE TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC 1 ++ END diff --cc as/cmd/JZE/jze_z.casl index 0000000,0000000..73ee48d new file mode 100644 --- /dev/null +++ b/as/cmd/JZE/jze_z.casl @@@ -1,0 -1,0 +1,11 @@@ ++;;; JZE OSZ:001 ++MAIN START ++ LD GR1,A ++ AND GR1,GR1 ++ JZE TO ++ LAD GR1,0 ++ JUMP FIN ++TO LAD GR1,#FFFF ++FIN RET ++A DC 0 ++ END diff --cc as/cmd/LAD/lad0.casl index 875e53d,875e53d..3171666 --- a/as/cmd/LAD/lad0.casl +++ b/as/cmd/LAD/lad0.casl @@@ -1,3 -1,3 +1,4 @@@ ++;;; LAD r,adr LAD START LAD GR1,5 RET diff --cc as/cmd/LAD/lad0_l.casl index 0000000,0000000..0a9c296 new file mode 100644 --- /dev/null +++ b/as/cmd/LAD/lad0_l.casl @@@ -1,0 -1,0 +1,5 @@@ ++;;; LAD r,adr ++MAIN START ++ LAD GR1,='A' ++ RET ++ END diff --cc as/cmd/LAD/lad1.casl index 3700cbc,3700cbc..ff3e22d --- a/as/cmd/LAD/lad1.casl +++ b/as/cmd/LAD/lad1.casl @@@ -1,5 -1,5 +1,6 @@@ --MAIN START BEGIN --BEGIN LD GR1,A ++;;; LAD r,adr,x ++MAIN START ++ LD GR1,A LAD GR1,1,GR1 RET A DC 3 diff --cc as/cmd/LAD/lad1_ov.casl index 0000000,5d75b42..5d75b42 mode 000000,100644..100644 --- a/as/cmd/LAD/lad1_ov.casl +++ b/as/cmd/LAD/lad1_ov.casl diff --cc as/cmd/LAD/lad1_s.casl index 0000000,0000000..3c63c8d new file mode 100644 --- /dev/null +++ b/as/cmd/LAD/lad1_s.casl @@@ -1,0 -1,0 +1,7 @@@ ++;;; LAD r,adr,x ++MAIN START ++ LD GR1,A ++ LAD GR1,-1,GR1 ++ RET ++A DC 3 ++ END diff --cc as/cmd/LD/ld0.casl index dd84f32,0000000..d0e02a6 mode 100644,000000..100644 --- a/as/cmd/LD/ld0.casl +++ b/as/cmd/LD/ld0.casl @@@ -1,5 -1,0 +1,9 @@@ +MAIN START - LAD GR1,3 - LD GR0,GR1 ++ LD GR0,A ++ LD GR0,B ++ LD GR0,C + RET ++A DC 7 ++B DC -7 ++C DC 0 + END diff --cc as/cmd/LD/ld1.casl index 56b035f,0000000..37c03ef mode 100644,000000..100644 --- a/as/cmd/LD/ld1.casl +++ b/as/cmd/LD/ld1.casl @@@ -1,5 -1,0 +1,39 @@@ +MAIN START - LD GR0,A ++ LAD GR1,#FFFF ++ LD GR2,GR1 ++ LD GR3,GR1 ++ LD GR4,GR1 ++ LD GR5,GR1 ++ LD GR6,GR1 ++ LD GR7,GR1 ++ LD GR0,GR1 ++ LD GR1,GR1 ++ LAD GR2,#FFFE ++ LD GR2,GR2 ++ LD GR3,GR2 ++ LD GR4,GR2 ++ LD GR5,GR2 ++ LD GR6,GR2 ++ LD GR7,GR2 ++ LD GR0,GR2 ++ LD GR1,GR2 ++ LAD GR3,#FFFE ++ LD GR3,GR3 ++ LD GR4,GR3 ++ LD GR5,GR3 ++ LD GR6,GR3 ++ LD GR7,GR3 ++ LD GR0,GR3 ++ LD GR1,GR3 ++ LD GR2,GR3 ++ LAD GR0,1 ++ LD GR1,GR0 ++ LD GR2,GR0 ++ LD GR3,GR0 ++ LD GR4,GR0 ++ LD GR5,GR0 ++ LD GR6,GR0 ++ LD GR7,GR0 ++ LD GR0,GR0 + RET - A DC 1,1,2,3,5,8 + END diff --cc as/cmd/LD/ld2.casl index 5e3fc3a,0000000..21d6790 mode 100644,000000..100644 --- a/as/cmd/LD/ld2.casl +++ b/as/cmd/LD/ld2.casl @@@ -1,6 -1,0 +1,13 @@@ - ; LDコマンド - MAIN START BEGIN - BEGIN LAD GR0,3 - LD GR1,GR0 - RET - END ++MAIN START ++ LAD GR1,A ++ LD GR0,0,GR1 ++ LD GR2,2,GR1 ++ LD GR3,3,GR1 ++ LD GR4,4,GR1 ++ LD GR5,5,GR1 ++ LD GR6,6,GR1 ++ LD GR7,7,GR1 ++ LD GR1,1,GR1 ++ RET ++A DC 2,3,5,7,11,13,17,19 ++ END diff --cc as/err/dc_c1_err.casl index 0000000,0000000..dd05608 new file mode 100644 --- /dev/null +++ b/as/err/dc_c1_err.casl @@@ -1,0 -1,0 +1,7 @@@ ++;; DC 文字定数 ++MAIN START ++ RET ++ DC ' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFG' ++ DC 'GHIJKLMNOPQRSTUVWXYZ[\]^_abcdefghijklmnop' ++ DC 'pqrstuvwxyz{|}~' ++ END