X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=as%2Fcasl2lib%2Fsample%2Fcall_str2l.casl;fp=as%2Fcasl2lib%2Fsample%2Fcall_str2l.casl;h=211ba9cd9ff5616c3efa15de3eaefcb4959ff313;hp=0000000000000000000000000000000000000000;hb=201417091a96aa8437f7773b8cedf2875805c670;hpb=fb0bcba29bcdff5d92ff53887120ba356a00aa67 diff --git a/as/casl2lib/sample/call_str2l.casl b/as/casl2lib/sample/call_str2l.casl new file mode 100644 index 0000000..211ba9c --- /dev/null +++ b/as/casl2lib/sample/call_str2l.casl @@ -0,0 +1,44 @@ +;;; casl2 call_str2l.casl stdlib.casl +MAIN START + XOR GR4,GR4 + LAD GR6,LEN +BLP LAD GR1,STR,GR4 + LD GR2,0,GR6 + JZE FIN + LD GR5,GR1 + CALL STR2L + JOV OV + JMI NAN + LD GR1,GR3 + CALL OUTL + LD GR1,GR5 + JUMP ELP +OV OUT MSGOV,LENOV + JUMP ELP +NAN OUT MSGNAN,LENNAN +ELP ADDL GR4,GR2 + LAD GR6,1,GR6 + JUMP BLP +FIN RET +STR DC '0' + DC '1' + DC '123' + DC '1234' + DC '65535' + DC '65536' + DC '123456' + DC 'a' +LEN DC 1 + DC 1 + DC 3 + DC 4 + DC 5 + DC 5 + DC 6 + DC 1 + DC 0 +MSGOV DC 'over 65535' +LENOV DC 10 +MSGNAN DC 'not a logical integer' +LENNAN DC 21 + END