From: j8takagi Date: Tue, 23 Feb 2010 22:08:37 +0000 (+0900) Subject: 足し算電卓のCASLファイルを追加 X-Git-Tag: v0.1~19 X-Git-Url: https://j8takagi.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc0df14951032b54c9da8b21068aac4a6a834289;p=YACASL2.git 足し算電卓のCASLファイルを追加 --- diff --git a/as/app/calc_addl.casl b/as/app/calc_addl.casl new file mode 100644 index 0000000..c0e538e --- /dev/null +++ b/as/app/calc_addl.casl @@ -0,0 +1,25 @@ +MAIN START + XOR GR1,GR1 + XOR GR2,GR2 +LOOP LD GR2,GR1 + CALL INL + JOV OV + AND GR0,GR0 + JZE FIN + CPL GR0,=#FFFF + JZE NAN + ADDL GR1,GR2 + JOV OV + CALL OUTL + JUMP LOOP +OV OUT OVMSG,MLEN1 + CALL OUTL + JUMP LOOP +NAN OUT NANMSG,MLEN2 + JUMP LOOP +FIN RET +OVMSG DC 'Over 65535' +MLEN1 DC 10 +NANMSG DC 'Not A Number' +MLEN2 DC 12 + END