def ipm(): while 1: # Wait for a code image, make a code object from it # and evaluate the code object. rv = eval(Co(_getImg())) # Send a byte to indicate completion of evaluation sys.putb(0x04)
print i; if(i==5): print "if-then %-22.20f" % (1.0/i); if(i<3): print "if-(then)-else %32.32f" % (1.0*i); else: print "if-then-(else) %-.32f" % (1.0/i); print "=== check: for loop 100 func-call-loop"; for i in range(0,100): j= nulladd(i)+j; j= nulllib(j); print j print "=== check: sys module-*"; print sys.heap(); sys.putb(0x31);sys.putb(0x31);sys.putb(0x39);sys.putb(0x32); ## will display 1192 print "\r\n"; print sys.getb(); ## -1=255 returned print sys.time(); # will return zero... not implemented yet X-D #sys.wait(150); ## waiting 150ms ... looping :-< #print sys.time(); print "=== check: string module-atoi"; print string.atoi("-123"); print string.atoi(" -123",8); print string.atoi("-123",16); ##print string.atoi("-123 "); ## error trailing junk chars. print "=== check: string module-find"; print string.find("-123",'-'); print string.find("-123",'3');
# modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # # Interactive Test 065 # Tests plat module's putb and getb functions # import sys sys.puts("Type a letter: ") c = sys.getb() sys.puts("Echo: ") sys.putb(c) sys.putb(c + 1) sys.putb(c + 2) sys.putb(ord("\n"))
# modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # # Interactive Test 065 # Tests plat module's putb and getb functions # import sys sys.puts("Type a letter: ") c = sys.getb() sys.puts("Echo: ") sys.putb(c) sys.putb(c+1) sys.putb(c+2) sys.putb(ord("\n"))
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, # 0x60 - 0x67 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, # 0x68 - 0x6F 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, # 0x70 - 0x77 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, # 0x78 - 0x7F 0x0, 0x0, '1', '2', '3', '4', '5', '6', # 0x80 - 0x87 '7', '8', '9', '0', 0x0, 0x0, 0x0, 0x0, # 0x88 - 0x8F 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', # 0x90 - 0x97 'o', 'p', '[', ']', '\n', 0x0, 'a', 's', # 0x98 - 0x9F 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', # 0xA0 - 0xA7 '\'', '`', 0x0, '\\', 'z', 'x', 'c', 'v', # 0xA8 - 0xAF 'b', 'n', 'm', ',', '.', '/', 0x0, 0x0, # 0xB0 - 0xB7 0x0, ' ', 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, # 0xB8 - 0xBF """ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, # 0xC0 - 0xC7 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, # 0xC8 - 0xCF 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, # 0xD0 - 0xD7 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, # 0xD8 - 0xDF 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, # 0xE0 - 0xE7 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, # 0xE8 - 0xEF 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, # 0xF0 - 0xF7 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 # 0xF8 - 0xFF """ ] scancode = en_us[scancode] if scancode != 0x0: putb(ord(scancode))