#include "hgimg3.as";hgimg3.dllを使えるようにする #include "hspio.as";hspio.dllを使えるようにする #define LTP 0x00378;パラレルポートのアドレス bgscr 0,640,480,0,0,0;枠なしwindowを作成する color 0,0,0:boxf;黒で塗りつぶす chgdisp 1,640,480;スクリーンの解像度をフルカラー640×480にする mouse -1 io_init 2;GIVEIO.SYSを使えるようにする hgini;hgimg3.dllを使えるようにする *initialize dim texture,9 repeat 9,1 texload strf("upwell%02d.bmp",cnt);画像読み込み texture(cnt-1)=stat loop clscolor $000000;背景色は黒にする upwell=1;upwell01.bmpから始めます。 direction=1;順方向 STIM=0 rot=0.0;回転角度 *mainloop hgdraw;描画処理 gmode 0,480,480;Windowsのメモリ転送関数BitBltと同じ pos 320,240;中心座標 hgrotate texture(upwell-1),0,0,rot,480,480 hgsync 50;画面の更新 if STIM==5:io_out LTP,(direction+3)/2:else:io_out LTP,0;刺激呈示 stick key if key==128:goto *finish;ESCキーで終了 STIM=rnd(10);C言語の乱数は余り信じてないのですが・・・ if STIM==5:direction=-direction;方向を転換 upwell=upwell+direction if upwell>9:upwell=1 if upwell<1:upwell=9 goto *mainloop *finish io_free;GIVEIO.SYSを解放する end