Demo for printing on EPSON compaktibilite with ESC chars
Delphi & Pascal (česká wiki)
Category: KMP (Club of young programmers)
Author: Ľuboš Saloky
Program: Tlacdemo.pas, Tlacdem2.pas
File exe: Tlacdemo.exe, Tlacdem2.exe
Author: Ľuboš Saloky
Program: Tlacdemo.pas, Tlacdem2.pas
File exe: Tlacdemo.exe, Tlacdem2.exe
Demo for printing on EPSON compaktibilite with ESC chars. Printed with printer on port LPT1.
{ tlacdem2.pas } { Demo pre tlaciarne LC20 kompaktibilne s pomocou ESC sekvencii. } { Tlaci na tlaciaren pripojenu na port LPT1. } { } { Author: Ľuboš Saloky } { Datum: 01.01.1996 http://www.trsek.com } {$G+} program Demo_pre_LC20; const Demo1:String= #27'D'#3#13#0#27#107#48#27#120#49'Písma k dispozícii:'#13#10#9#27#120#48+ 'Písmo Draft'#13#10#9#27#107#48#27#120#49'Písmo Courier'#13#10#9#27#107#49+ #27#120#49'Písmo Sanserif'#13#10#9#27#107#55#27#120#49'Písmo Orator s '+ 'kapitálkami'#13#10#9#27#107#56#27#120#49' s malými písmenkami'+ #13#10#27#52#9#27#107#56#27#120#49'a samozrejme '#27#107#55#27#120#49+ 'kurzíva '#27#107#49#27#120#49'pre '#27#107#48#27#120#49'všetky '#27#120#48+ 'písma.'#13#10#27#53#13#10; Demo2:String= #27#107#48#27#120#49'Hustoty písmen:'#13#10#9#27#80'Pica - 10 znakov na palec,'+ #13#10#9#27#77'Elite - 12 znakov na palec,'#13#10#9#15#27#80'Zhustená Pica - 17 '+ 'znakov na palec,'#13#10#9#27#77'Zhustená Elite - 20 znakov na palec,'#13#10+ #27#80#18#9#27'p1a proporcionálne písmo.'#27'p0'#13#10#13#10#9#27'W1Široké,'#27'W0'+ #27'w1Vysoké'#27'w0'#13#10#9#27'h'#1'2 x zväčšené'#13#10; Demo3:String= #9#27'h'#2'4x zväčšené'#13#10#27'h'#0#13#10#13#10#13#10#27'Q'#47'Rôzne'+ ' veľkosti riadkov a medzier:'#13#10#27'a1'#13#10 ; PomStr:String=#27#65#255#27#32#255'MEDZERY SA MENIA'#13#10; Demo4:String= #13#10#27'a0'#27#51#36#27#32#0#13#10'Ďalšie vlastnosti:'#13#10#9#27'ETučné'+ #27'F, '#27'GDvakrát bodkované'#27'H, '#27'-1Podčiarknuté'#27'-0, '#13#10+ #9#27'S0HORNÝ INDEX'#27'T a '#27'S1DOLNÝ INDEX'#27'T'#13#10#13#10; var i:integer; procedure PrintStr;assembler; asm xor ch,ch mov cl,byte[si] inc si @DalsiZnak: mov ah,5 mov dl,byte[si] inc si int 21h loop @DalsiZnak end; BEGIN asm lea si,Demo1 call PrintStr lea si,Demo2 call PrintStr lea si,Demo3 call PrintStr mov i,1 @DalsiR1: lea si,PomStr mov cx,i mov byte[si+3],cl mov byte[si+6],cl call PrintStr inc i cmp i,7 jbe @DalsiR1 mov i,7 @DalsiR2: lea si,PomStr mov cx,i mov byte[si+3],cl mov byte[si+6],cl call PrintStr dec i cmp i,1 jae @DalsiR2 lea si,Demo4 call PrintStr end; END.