50000 "A":aread A:gosub 50060:rem EURO TO ATS 50010 print "ATS ";A*B 50020 end 50030 " ":aread A:gosub 50060:rem ATS TO EURO 50040 print "EUR ";A/B 50050 end 50060 B=13.7603:return 50070 "D":aread A:B=0:rem BIN TO DEC 50080 if A<0 then 50110 50090 if A<>int A then 50110 50100 goto 50130 50110 print "Illegal function arg." 50120 end 50130 if A=0 goto 50210 50140 N=int log A 50150 for I=N to 0 step -1 50160 B=B*2:J=10^I 50170 if AJ then 50110 50200 next I 50210 print "DEC ";B 50220 end 50230 "B":aread A:ST$="":C=0:rem DEC TO BIN 50240 if A<0 then 50270 50250 if A<>int A then 50270 50260 goto 50290 50270 print "Illegal function arg." 50280 end 50290 if A=0 then 50350 50300 A=A/2:if A=int A then 50330 50310 A=int A:ST$="1"+ST$ 50320 goto 50340 50330 ST$="0"+ST$ 50340 C=C+1:goto 50290 50350 if C<17 then 50380 50360 print "Overflow" 50370 end 50380 if C>8 then 50410 50390 print "BIN ";ST$ 50400 end 50410 print "BIN ";left$ (ST$,C-8);" ";right$ (ST$,8) 50420 end