主题:[讨论]高难QB例子
真的看不懂啊
求高手帮帮忙啊
DEFINT I-N
CLS
DIM DDATA(100),CH(100)
DIM IZER(I),DH(100)
IADR1 = &H300
OUT IADR1, &H92
INPUT "CLOCK:" A
INPUT "TIME:" B
LOOP= A * B
BEEP
BEEP
NUM = 100: NCH = 2
FOR I = 1 TO NUM
LOOP1 = LOOP
100 FOR j = 1 TO 6
OUT &H302, NCH
NEXT j
OUT &H302, &H10
2000 IF INP(IADR1 + 1) > 127 THEN 2000
IH = INP(IADR1 + 1)
IL = INP(IADR1)
izer(i) = IH * 256 + IL
DDATA(i) = 10 * (izer(i) - 2047) / 4095
IF LOOP1 = LOOP THEN 3000 ELSE 4000
3000 CH(i) = DDATA(i)
LOOP1 = LOOP1 - 1
IF LOOP1 = 0 THEN 150 ELSE 100
4000 DH(i) = ddata(i)
LOOP1 = LOOP1 - 1
IF LOOP1 = 0 THEN 150 ELSE 100
150 PRINT I ,DDATA(I)
NEXT I
BEEP
BEEP
OPEN "O", #1, "ALEX.txt"
FOR I = 1 TO 100
PRINT #1, I, DDATA(I)
NEXT I
CLOSE #1