文本方式下字符的放大显示
程序中第10行~50行是调用该子程序显示“CAD”字样的例子,N为字符个数。该程序已在IBMPC/XT及兼容机、BASICA环境下这行通过。
10 N=3:T=1:SCREEN 0:COLOR 7,1:KEY OFF :CLS
20 READ L,C,A:GOSUB 200:T=T+1
30 IF T<=N THEN 20
40 RESTORE:DATA 6,25,67,6,35,65,6,45,68
50 END
200 DEF SEG=&HF000:K$=CHR$(32):C$=CHR$(214)
210 N1=64110!+8*A:LOCATE L,C
220 FOR I=N1 TO N1+7
230 S=PEEK(I)
240 FOR J=7 TO 0 STEP1
250 IF (SAND2^J)=0 THEN PRINT K$;ELSE PRINT C$;
260 IF J=0 THENP RINT:LOCAT E,C
270 NEXT J,I
280 RETURN