reading simultaneous keys pressed
and how can we read them in a zxbasic-compiler snippet?
thanks!
guest@macbook_mint1 /mnt/sda4/trabalhos/programacao/8bit/zxspectrum/ftpupload/zxspectrumstuff_20111001/borielzxbasiccompiler/_sandboxes/_sandbox_03 $ zxb.py -tB
a _keytest.bas
Generating LALR tables
WARNING: Token 'BIN' defined, but not used
WARNING: There is 1 unused token
Generating LALR tables
WARNING: Token 'UMINUS' defined, but not used
WARNING: There is 1 unused token
guest@macbook_mint1 /mnt/sda4/trabalhos/programacao/8bit/zxspectrum/ftpupload/zxspectrumstuff_20111001/borielzxbasiccompiler/_sandboxes/_sandbox_03 $ zxb.py --v
ersion
Generating LALR tables
WARNING: Token 'BIN' defined, but not used
WARNING: There is 1 unused token
Generating LALR tables
WARNING: Token 'UMINUS' defined, but not used
WARNING: There is 1 unused token
zxb.py 1.2.8-s758
guest@macbook_mint1 /mnt/sda4/trabalhos/programacao/8bit/zxspectrum/ftpupload/zxspectrumstuff_20111001/borielzxbasiccompiler/_sandboxes/_sandbox_03 $
10 print at 0,0;" "
20 print (255-(in 65278)) band 31;" "
21 print (255-(in 65022)) band 31;" "
22 print (255-(in 64510)) band 31;" "
23 print (255-(in 63486)) band 31;" "
24 print (255-(in 61438)) band 31;" "
25 print (255-(in 57342)) band 31;" "
26 print (255-(in 49150)) band 31;" "
27 print (255-(in 32766)) band 31;" "
30 goto 10
cls
main:
print at 0,0;" "
v1=((255-(in 64510)) band 2)/2 bor ((255-(in 65022)) band 2) bor ((255-(in 65022)) band 1)*4 bor ((255-(in 65022)) band 4)*2
v2=((255-(in 61438)) band 8)/8 bor ((255-(in 61438)) band 16)/8 bor ((255-(in 63486)) band 16)/4 bor ((255-(in 61438)) band 4)*2
v3=v1 bor v2
print v3;" "
goto main
Users browsing this forum: No registered users and 1 guest