![](/images/new-backgrounds/1333090/333090189x1.webp)
#include <stdio.h> #include <fcntl.h>
#define MONTH | "\214\216" |
#define TILDE | "\201\140" |
#define DAY | "\223\372" |
#define CLUSTER "\201\100\033&f0S\033&a0P%s%d\033&a270P\033&f1S" FILE *prn;
main()
{
int point_size=24; int offset;
char OFFSET[40];
prn = fopen("lpt1","wb"); /* open lpt1 for writing */
offset = ( | 36 | * point_size * 300) / |
|
| ||
/* |
| */ |
| |||
( | 256 | * | 72 | ); |
|
|
/* used to | ||||||
place cluster */ |
|
|
|
| ||
/* send UEL to get to PJL */ | ||||||
fprintf(prn,"@PJL ENTER LANGUAGE=PCL\n"); | /* Enter PCL */ | |||||
fprintf(prn,"\33E"); |
| /* Esc E to reset printer */ | ||||
fprintf(prn,"\33&t31P"); | /* text parsing = | |||||
fprintf(prn,"\33(19K"); |
| /* symbol set = Win3.1J */ | ||||
fprintf(prn,"\33&a270P"); | /* print direction = 270 */ | |||||
fprintf(prn,"\33*p500x1300Y"); | /* set CAP position */ | |||||
fprintf(prn,"\33(s1p%dv0s0b28752T",point_size); | /* | |||||
/* select vertical writing mode */ | ||||||
fprintf(prn, CLUSTER MONTH, OFFSET, 11); |
| /* print month */ | ||||
fprintf(prn, CLUSTER DAY, OFFSET, 16); |
| /* print day */ | ||||
fprintf(prn, TILDE); |
|
|
| /* print tilde */ | ||
fprintf(prn, CLUSTER MONTH, OFFSET, 11); |
| /* print month */ | ||||
fprintf(prn, CLUSTER DAY, OFFSET, 17); |
| /* print day */ | ||||
fprintf(prn,"\f"); |
|
|
| /* formfeed */ | ||
/* send UEL to get to PJL */ | ||||||
} |
|
|
|
|
|
|