From: j8takagi Date: Wed, 6 Jun 2018 10:16:13 +0000 (+0900) Subject: 情報処理試験 2011(平成23)年秋期のフォルダを更新 X-Git-Tag: v0.3p3~4 X-Git-Url: https://j8takagi.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26d2b1e3f1b8d08b4089d2442784be654cdf2226;p=YACASL2.git 情報処理試験 2011(平成23)年秋期のフォルダを更新 --- diff --git a/as/fe_tests/2011_10/Q12/btod1.casl b/as/fe_tests/2011_10/Q12/btod1.casl index 4532738..537b16e 100644 --- a/as/fe_tests/2011_10/Q12/btod1.casl +++ b/as/fe_tests/2011_10/Q12/btod1.casl @@ -1,28 +1,28 @@ - BTOD START - RPUSH - LD GR6,GR3 - LAD GR7,4,GR3 - LAD GR3,UDAT ; 除数の初期設定 - LP CALL DIV - OR ,='0' - ST ,0,GR6 ; 10 進数字1文字格納 - CPL GR6,GR7 - JZE FIN - LAD GR6,1,GR6 - LD GR1,GR4 ; 被除数の再設定 - LD GR2,GR5 - - JUMP LP - FIN RPOP - RET - UDAT DC 0 - DC 10000 - DC 0 - DC 1000 - DC 0 - DC 100 - DC 0 - DC 10 - DC 0 - DC 1 - END +BTOD START + RPUSH + LD GR6,GR3 + LAD GR7,4,GR3 + LAD GR3,UDAT ; 除数の初期設定 +LP CALL DIV + OR GR2,='0' + ST GR2,0,GR6 ; 10進数字1文字格納 + CPL GR6,GR7 + JZE FIN + LAD GR6,1,GR6 + LD GR1,GR4 ; 被除数の再設定 + LD GR2,GR5 + LAD GR3,2,GR3 + JUMP LP +FIN RPOP + RET +UDAT DC 0 + DC 10000 + DC 0 + DC 1000 + DC 0 + DC 100 + DC 0 + DC 10 + DC 0 + DC 1 + END diff --git a/as/fe_tests/2011_10/Q12/btod2.casl b/as/fe_tests/2011_10/Q12/btod2.casl index 073898e..b461463 100644 --- a/as/fe_tests/2011_10/Q12/btod2.casl +++ b/as/fe_tests/2011_10/Q12/btod2.casl @@ -1,18 +1,17 @@ - BTOD START - RPUSH - LAD GR6,4,GR3 - LD GR7,GR3 - LAD GR3,DAT - LP CALL DIV - OR ,='0' - ST ,0,GR6 - CPL GR6,GR7 - JZE FIN - LAD GR6,-1,GR6 - JUMP LP - FIN RPOP - RET - DAT DC 0 - DC - END - +BTOD START + RPUSH + LAD GR6,4,GR3 + LD GR7,GR3 + LAD GR3,DAT +LP CALL DIV + OR GR5,='0' + ST GR5,0,GR6 + CPL GR6,GR7 + JZE FIN + LAD GR6,-1,GR6 + JUMP LP +FIN RPOP + RET +DAT DC 0 + DC 10 + END diff --git a/as/fe_tests/2011_10/Q12/call_btod.casl b/as/fe_tests/2011_10/Q12/call_btod.casl new file mode 100644 index 0000000..a36354c --- /dev/null +++ b/as/fe_tests/2011_10/Q12/call_btod.casl @@ -0,0 +1,10 @@ +MAIN START + LAD GR1,#0000 + LAD GR2,#054D + LAD GR3,STR + CALL BTOD + OUT STR,LEN + RET +STR DS 5 +LEN DC 5 + END