program Superscript(input,output); { TURBO Pascal Lader und Demo Nach einem BASIC Programm von (c) 1987 M. Uphoff } type GX_MCode = array[0..456] of byte; longstr = string[255]; var GX_MProg : GX_MCode absolute $F000; texts : longstr; typ : integer; ch : char; const normals = #27#0; lights = #27#1; fetts = #27#2; ustrs = #27#4; inverss = #27#8; breits = #27#16; hochs = #27#32; expos = #27#64; indexs = #27#128; breithochs = #27#48; expobreits = #27#80; titels = #27#255; GX_Data:GX_MCode = ( {0000} $fd,$e1,$d1,$c1,$e1,$61,$fd,$e5,$2d,$25,$22,$bd,$f1,$eb,$7e,$b7, {0010} $c8,$4f,$06,$00,$32,$bc,$f1,$23,$11,$e9,$f1,$ed,$b0,$01,$26,$f0, {0020} $cd,$5a,$fc,$e9,$00,$c9,$3a,$bc,$f1,$47,$21,$e9,$f1,$7e,$fe,$1b, {0030} $20,$0b,$23,$05,$c8,$7e,$32,$bb,$f1,$23,$05,$c8,$7e,$c5,$e5,$6f, {0040} $26,$00,$29,$29,$29,$11,$00,$b8,$19,$11,$c9,$f1,$01,$08,$00,$ed, {0050} $b0,$21,$01,$01,$22,$bf,$f1,$3a,$bb,$f1,$fe,$ff,$28,$29,$1f,$dc, {0060} $bc,$f0,$1f,$dc,$ce,$f0,$1f,$dc,$b6,$f0,$1f,$dc,$de,$f0,$1f,$dc, {0070} $ec,$f0,$1f,$dc,$17,$f1,$1f,$dc,$3d,$f1,$1f,$dc,$3a,$f1,$cd,$66, {0080} $f1,$e1,$c1,$23,$10,$a7,$c9,$21,$c9,$f1,$06,$08,$ed,$5b,$bd,$f1, {0090} $7a,$90,$57,$14,$c5,$d5,$e5,$06,$08,$4e,$cb,$01,$21,$c9,$f1,$38, {00a0} $03,$21,$c1,$f1,$cd,$92,$f1,$1c,$7b,$10,$ef,$e1,$d1,$c1,$23,$10, {00b0} $e2,$32,$bd,$f1,$18,$cb,$21,$d0,$f1,$36,$ff,$c9,$f5,$21,$c9,$f1, {00c0} $06,$08,$7e,$cb,$3f,$a6,$77,$23,$10,$f8,$f1,$cb,$87,$c9,$f5,$21, {00d0} $c9,$f1,$06,$08,$7e,$cb,$3f,$b6,$77,$23,$10,$f8,$f1,$c9,$f5,$21, {00e0} $c9,$f1,$06,$08,$7e,$2f,$77,$23,$10,$fa,$f1,$c9,$f5,$3e,$02,$32, {00f0} $bf,$f1,$dd,$21,$c9,$f1,$0e,$08,$06,$08,$dd,$7e,$00,$1f,$dd,$cb, {0100} $00,$1e,$dd,$cb,$10,$1e,$dd,$cb,$00,$2e,$dd,$cb,$10,$1e,$10,$ed, {0110} $dd,$23,$0d,$20,$e3,$f1,$c9,$3e,$02,$32,$c0,$f1,$11,$d0,$f1,$cd, {0120} $2a,$f1,$3a,$bf,$f1,$3d,$c8,$11,$e0,$f1,$21,$08,$00,$19,$06,$08, {0130} $1a,$1b,$77,$2b,$77,$2b,$10,$f8,$af,$c9,$af,$18,$02,$3e,$02,$32, {0140} $c0,$f1,$11,$d8,$f1,$cd,$50,$f1,$3a,$bf,$f1,$3d,$c8,$11,$e8,$f1, {0150} $cd,$5c,$f1,$21,$fc,$ff,$19,$01,$08,$00,$ed,$b8,$af,$12,$1b,$12, {0160} $1b,$12,$1b,$12,$1b,$c9,$21,$c9,$f1,$ed,$4b,$bf,$f1,$ed,$5b,$bd, {0170} $f1,$d5,$e5,$15,$05,$05,$cc,$92,$f1,$14,$cd,$92,$f1,$14,$04,$04, {0180} $cc,$92,$f1,$e1,$11,$10,$00,$19,$d1,$1c,$0d,$20,$e4,$ed,$53,$bd, {0190} $f1,$c9,$7b,$fe,$5a,$d0,$7a,$fe,$20,$d0,$c5,$d5,$e5,$16,$00,$07, {01a0} $17,$17,$17,$6f,$7a,$ce,$b6,$67,$7e,$23,$66,$6f,$eb,$29,$29,$19, {01b0} $29,$eb,$e1,$01,$08,$00,$ed,$b0,$d1,$c1,$c9,$00,$00,$00,$00,$00, {01c0} $00,$00,$00,$00,$00,$00,$00,$00,$00); procedure MCODE(x,y:byte;var msg:longstr); external $F000; procedure script(x,y:byte;msg:longstr); var mytxt : longstr; Begin mytxt:=msg; MCODE(x,y,mytxt); End; procedure IniMCode; Begin GX_MProg:=GX_Data; End; procedure GetGrad(var msg:longstr); var grads : char; i : integer; Begin grads:='3'; for i:=1 to 3 do begin msg:=msg+'A'+indexs+grads+breits+'X'+expos+grads+breits+' + '; grads:=pred(grads); end; End; function spaces(len:byte):longstr; var i : integer; msg : longstr; Begin msg:=''; for i:=1 to len do msg:=msg+' '; spaces:=msg; End; BEGIN IniMCode; clrscr; script(4,8,breithochs+'DMV pr{sentiert:'); script(2,20,titels+'SUPERSCRIPT'); script(60,22,normals+'(c) 1987 Matthias Uphoff'); script(8,28,breits+'Weiter mit einer beliebigen Taste...'); repeat until keypressed; read(kbd,ch); clrscr; script(1,2,fetts+'SUPERSCRIPT'+normals+' stellt auf dem Joyce verschiedene Schrifttypen und -gr|~en zur Verf}gung:'); script(20,5,normals+'normal '+ustrs+'unterstrichen'+lights+' light '+fetts+'fett '+inverss+'invers'); script(1,9,hochs+'doppelte H|he '+expobreits+'doppelte Breite '+breithochs+'und beides zusammen'); script(20,12,normals+'Weiterhin sind '+fetts+'Exponenten '+normals+'und '+fetts+'Indizes '+normals+'m|glich.'); script(20,14,normals+'Hier zum Beispiel ein Polynom 3. Grades:'); texts:=breits+'Y = '; GetGrad(texts); script(20,17,texts+breits+'A'+indexs+'0'); script(15,22,normals+'Nat}rlich lassen sich auch verschiedene Schriftformen mischen:'); script(15,28,breits+'Ende mit einer beliebigen Taste...'); script(15,25,'------------>'); repeat script(45,25,expos+spaces(30)); script(45,25,indexs+spaces(30)); typ:=random(256); str(typ,texts); script(45,25,#27+chr(typ)+'Schrifttyp'+texts); delay(500); until keypressed; read(kbd,ch); clrscr; END.