BASIC compiler/interpreter for PIC32MX/MZ-80K
修訂 | 15216e085388af2b3a1213ee5bf2f042ff37ec94 (tree) |
---|---|
時間 | 2019-03-30 05:58:35 |
作者 | Katsumi <kmorimatsu@sour...> |
Commiter | Katsumi |
KM-BASIC web ver 0.6
@@ -261,6 +261,7 @@ basic.compileCommand=function(command){ | ||
261 | 261 | case "USEPCG": |
262 | 262 | case "PCG": |
263 | 263 | case "DEBUG": |
264 | + case "LOG": | |
264 | 265 | return [{"command": m[1], "param": m[2]}]; |
265 | 266 | case "LABEL": |
266 | 267 | if (!m[2].match(/^[A-Z][A-Z0-9]{0,5}$/)) { |
@@ -598,6 +599,10 @@ basic.run=function(){ | ||
598 | 599 | param=runenv.eval(param); |
599 | 600 | alert(""+(typeof param)+"\n"+param); |
600 | 601 | }; |
602 | + runenv.LOG=function(param){ | |
603 | + param=runenv.eval(param); | |
604 | + console.log(""+(typeof param)+": "+param); | |
605 | + }; | |
601 | 606 | // Functions |
602 | 607 | var INT=function(param){ |
603 | 608 | if ((typeof param)!='number') return param; |
@@ -19,7 +19,7 @@ | ||
19 | 19 | <script type="text/javascript" src="./audio.js"></script> |
20 | 20 | <script type="text/javascript" src="./music.js"></script> |
21 | 21 | <script type="text/javascript" src="./basic.js"></script> |
22 | - <title>KM-BASIC web v0.5 for KM-1120</title> | |
22 | + <title>KM-BASIC web v0.6 for KM-1120</title> | |
23 | 23 | </head> |
24 | 24 | <body> |
25 | 25 | <div class="side" id="side"> |
@@ -34,12 +34,12 @@ | ||
34 | 34 | <div class="buttons"> |
35 | 35 | <input id="RUNbutton" value="Run" type="button" onclick="button.run();"/> |
36 | 36 | <input id="STOPbutton" value="Stop" type="button" onclick="button.stop();" /><br /> |
37 | - <input id="Sbutton" value="S" type="button" onmousedown="button.start(1);" onmouseout="button.start(0);" onmouseup="button.start(0);"/> | |
38 | - <input id="Fbutton" value="F" type="button" onmousedown="button.fire(1);" onmouseout="button.fire(0);" onmouseup="button.fire(0);"/> | |
39 | - <input id="Lbutton" value="←" type="button" onmousedown="button.left(1);" onmouseout="button.left(0);" onmouseup="button.left(0);"/> | |
40 | - <input id="Ubutton" value="↑" type="button" onmousedown="button.up(1);" onmouseout="button.up(0);" onmouseup="button.up(0);"/> | |
41 | - <input id="Dbutton" value="↓" type="button" onmousedown="button.down(1);" onmouseout="button.down(0);" onmouseup="button.down(0);"/> | |
42 | - <input id="Rbutton" value="→" type="button" onmousedown="button.right(1);" onmouseout="button.right(0);" onmouseup="button.right(0);"/> | |
37 | + <input id="Sbutton" value="S" type="button" ontouchstart="button.start(1);" ontouchend="button.start(0);" onmousedown="button.start(1);" onmouseout="button.start(0);" onmouseup="button.start(0);"/> | |
38 | + <input id="Fbutton" value="F" type="button" ontouchstart="button.fire(1);" ontouchend="button.fire(0);" onmousedown="button.fire(1);" onmouseout="button.fire(0);" onmouseup="button.fire(0);"/> | |
39 | + <input id="Lbutton" value="←" type="button" ontouchstart="button.left(1);" ontouchend="button.left(0);" onmousedown="button.left(1);" onmouseout="button.left(0);" onmouseup="button.left(0);"/> | |
40 | + <input id="Ubutton" value="↑" type="button" ontouchstart="button.up(1);" ontouchend="button.up(0);" onmousedown="button.up(1);" onmouseout="button.up(0);" onmouseup="button.up(0);"/> | |
41 | + <input id="Dbutton" value="↓" type="button" ontouchstart="button.down(1);" ontouchend="button.down(0);" onmousedown="button.down(1);" onmouseout="button.down(0);" onmouseup="button.down(0);"/> | |
42 | + <input id="Rbutton" value="→" type="button" ontouchstart="button.right(1);" ontouchend="button.right(0);" onmousedown="button.right(1);" onmouseout="button.right(0);" onmouseup="button.right(0);"/> | |
43 | 43 | </div> |
44 | 44 | <!-- BASIC Source --> |
45 | 45 | <textarea id="basicsource" class="basicsource">REM Write BASIC code here.</textarea> |
@@ -1,6 +1,6 @@ | ||
1 | 1 | ******************************************** |
2 | 2 | |
3 | - KM-BASIC web ver 0.5.0-beta | |
3 | + KM-BASIC web ver 0.6.0-beta | |
4 | 4 | |
5 | 5 | Copyright (C) 2012 Katsumi Morimatsu |
6 | 6 |
@@ -73,6 +73,9 @@ INPUT$() | ||
73 | 73 | パレット番号は、15迄が有効です。 |
74 | 74 | |
75 | 75 | <バージョン履歴> |
76 | +・ver 0.6 | |
77 | + ・一部の環境でボタンが動作しない不具合を解消 | |
78 | +<バージョン履歴> | |
76 | 79 | ・ver 0.5 |
77 | 80 | ・WAITステートメントを追加 |
78 | 81 | ・SCROLLステートメントを追加 |