情報処理試験 2011(平成23)年秋期のフォルダを更新
authorj8takagi <j8takagi@nifty.com>
Wed, 6 Jun 2018 10:16:13 +0000 (19:16 +0900)
committerj8takagi <j8takagi@nifty.com>
Wed, 6 Jun 2018 10:16:13 +0000 (19:16 +0900)
as/fe_tests/2011_10/Q12/btod1.casl
as/fe_tests/2011_10/Q12/btod2.casl
as/fe_tests/2011_10/Q12/call_btod.casl [new file with mode: 0644]

index 4532738..537b16e 100644 (file)
@@ -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
index 073898e..b461463 100644 (file)
@@ -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 (file)
index 0000000..a36354c
--- /dev/null
@@ -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