41 DOUBLE HEIGHT Here is an example of an assembly language program embedded within a BASIC program between the two brackets [ and ] which enables you to type in double height letters on the screen. 10 REM DOUBLE HEIGHT IN TELETEXT 20 WIDTH 36: MODE 7 30 VDU 28,0,23,39,0 40 write=!&20E AND &FFFF 50 DIM PROG 100 60 FOR PASS = 0 TO 1 70 P%= PROG 80 [ 90 OPT PASS*3 100 CMP#&D : BNE noter 110 PHA :JSR write 120 LDA#&8D : JSR write 140 LDA#&08 : JSR write 150 LDA#&8D : JSR write 160 PLA : RTS 170 .noter CMP #&20 : BCS legal 180 JMP write 190 .legal PHA : JSR write 200 LDA #$0B : JSR write 210 LDA #&08 : JSR write 220 PLA : PHA : JSR write 230 LDA #&0A : JSR write 240 PLA :
RTS 250 ] 260 NEXT PASS 270 !&20E=!&20E AND &FFFF0000 OR PROG 280 END Line 270 changes the ‘write character’ routine indirection vector so that all output is sent to the new routine given above. This routine tests for a ‘return’ code (line 100) and if it finds one it issues Teletext double height control codes on to the next two lines. Otherwise the routine just prints the characters on two lines one above the other so as to produce a double height character. This routine has a quite different effect in non-Teletext modes. Try it. Press BREAK after you have finished with this program. Before we leave this section, here are a few points about entering lines into BASIC. 1.
Control characters, for example CTRL B , will only be ‘reflected’ in BASIC and not entered into any program lines, strings etc.