    1 REMサンプル No.1
    100 WIDTH,M,N
    110 CLS
    120 DIM P$(35),Q$(35)                 :'P$は上半分,Q$は下半分用の変数
    130 GOSUB *PINIT                      :'牌のデータをP$,Q$に読み込む
    140 GOSUB *TESTDRAW                   :'牌を描画する。
    150 CALL@11                           :'画面をタッチするまで待つ
    990 *THEEND:CLS:WIDTH,,N:CALL@20:CALL@18:KEY 0,"":END
    1000 '
    1010 *PINIT
    1020 P$(0)="0000101211202123210100FF"
    1030 Q$(0)="0109099FFDB5FDD33F3101FE"
    1040 P$(1)="0000082A29485153111100FF"
    1050 Q$(1)="0109099FFDB5FDD33F3101FE"
    1060 P$(2)="0000045455A8A90B090900FF"
    1070 Q$(2)="0109099FFDB5FDD33F3101FE"
    1080 P$(3)="0000302A3928596B596100FF"
    1090 Q$(3)="0109099FFDB5FDD33F3101FE"
    1100 P$(4)="0000207E855C7D579D0500FF"
    1110 Q$(4)="0109099FFDB5FDD33F3101FE"
    1120 P$(5)="0000283A21C0415B490100FF"
    1130 Q$(5)="0109099FFDB5FDD33F3101FE"
    1140 P$(6)="001010227128494B410100FF"
    1150 Q$(6)="0109099FFDB5FDD33F3101FE"
    1160 P$(7)="0000081A0140311B090900FF"
    1170 Q$(7)="0109099FFDB5FDD33F3101FE"
    1180 P$(8)="00082832E140715B093908FF"
    1190 Q$(8)="0109099FFDB5FDD33F3101FE"
    1200 P$(9)="00229E3359675B6F3C8100FF"
    1210 Q$(9)="018951153DF1E1E5F99101FE"
    1220 P$(10)="00000000447C4400000000FF"
    1230 Q$(10)="0101010189F98901010101FE"
    1240 P$(11)="00000000447C4400000000FF"
    1250 Q$(11)="0189F98901010189F98901FE"
    1260 P$(12)="00447C44000000447C4400FF"
    1270 Q$(12)="0189F98901010189F98901FE"
    1280 P$(13)="00427E42080F08427E4200FF"
    1290 Q$(13)="0185FD8521E12185FD8501FE"
    1300 P$(14)="447C4400447C4400447C44FF"
    1310 Q$(14)="457D4501457D4501457D45FE"
    1320 P$(15)="0203034A7B7B4A03030200FF"
    1330 Q$(15)="A5BDBDA5BDBDA5BDBDA501FE"
    1340 P$(16)="007E7E1C3870381C7E7E00FF"
    1350 Q$(16)="01FDFD71391D3971FDFD01FE"
    1360 P$(17)="4A7B7B4A7B7B4A7B7B4A00FF"
    1370 Q$(17)="A5BDBDA5BDBDA5BDBDA501FE"
    1380 P$(18)="000003070C0C0C07030000FF"
    1390 Q$(18)="010181C1616161C1810101FE"
    1400 P$(19)="00000010386C3810000000FF"
    1410 Q$(19)="01010111396D3911010101FE"
    1420 P$(20)="10386C3913060301000000FF"
    1430 Q$(20)="0101010181C191396D3911FE"
    1440 P$(21)="10386C38100010386C3810FF"
    1450 Q$(21)="11396D39110111396D3911FE"
    1460 P$(22)="10386C39130613396C3810FF"
    1470 Q$(22)="11396D3991C191396D3911FE"
    1480 P$(23)="00113B3B1100113B3B1100FF"
    1490 Q$(23)="0111B9B9110111B9B91101FE"
    1500 P$(24)="70507101382838011D141CFF"
    1510 Q$(24)="0189DDDD890189DDDD8901FE"
    1520 P$(25)="0044EEEE440044EEEE4400FF"
    1530 Q$(25)="0145EFEF450145EFEF4501FE"
    1540 P$(26)="7352730073527300735273FF"
    1550 Q$(26)="9D959D019D959D019D959DFE"
    1560 P$(27)="00003014377F292E2C0000FF"
    1570 Q$(27)="0121419199FD01C1311901FE"
    1580 P$(28)="0001121B167D3B02010000FF"
    1590 Q$(28)="01816101C1D15919F1C101FE"
    1600 P$(29)="0009090B0D091F13111100FF"
    1610 Q$(29)="01F13191711171D939E101FE"
    1620 P$(30)="0004020F013F02060C0000FF"
    1630 Q$(30)="212141F101E11111711101FE"
    1640 P$(31)="0000000000000000000000FF"
    1650 Q$(31)="0101010101010101010101FE"
    1660 P$(32)="00012A2F3B131D2D0B0300FF"
    1670 Q$(32)="012111C9C971C9F1510901FE"
    1680 P$(33)="000007043C3F08090F0C00FF"
    1690 Q$(33)="0101018181F98181010101FE"
    1700 P$(34)="00020100123F1E1E3F1200FF"
    1710 Q$(34)="015199799D3D5D99191101FE"
    1720 P$(35)="02071A7D1A0703061F0601FF"
    1730 Q$(35)="0101C1F1C181C1B17DB1C1FE"
    1740 RETURN
    2000 '
    2010 *TESTDRAW
    2020 FOR Y=1 TO 8
    2030   IF Y<5 THEN K=0 ELSE K=18
    2040   FOR X=1 TO 18
    2050     XX=X*12-1 : YY=Y*16+13+7      :'牌は横12x縦16ﾄﾞｯﾄなので
    2060     GCURSOR(XX,YY)   : GPRINT P$(K);
    2070     GCURSOR(XX,YY+8) : GPRINT Q$(K);
    2080     K=K+1
    2090   NEXT
    2100 NEXT
    2110 RETURN
