home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 147
/
147.d81
/
hrs2.print.epson
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
3KB
|
106 lines
100 poke56,30:clr
105 dima,b,c,x,y,z,l,k,s,h,x$,pc,px,py
110 o=6:dimo$(o),o(o),h(o),l(o),rv$(1),b(9),c(9),z%(8,3),s$(8),m1,m2,m3,m4,l1,l2
130 o$(0)="x scale "
140 o$(1)="y scale "
150 o$(2)="top margin"
160 o$(3)="left margin"
170 o$(4)="device 4-7"
175 o$(5)="density 0-9"
178 o$(6)="sideways(1)"
180 fora=.to6:reado(a),l(a),h(a):next
190 fora=.to9:readb(a):next
200 fora=.to9:readc(a):next
230 fora=.to8
240 forb=.to3:readz%(a,b):next
270 reads$(a):next
290 rv$(0)="[146]":rv$(1)=""
300 bg=peek(700):fg=peek(701):px=211:py=214:pc=58732:ky=197:sk=653
330 x=fre(0)
340 c=peek(45)+(peek(46)-2)*256
350 b=peek(49)+peek(50)*256+15
360 l1=b:l2=b+1215
390 a=256
395 poke252,l1/a:poke251,l1-peek(252)*a:poke254,l2/a:poke253,l2-peek(254)*a
410 poke780,.:sys50309
420 print"[147]";:poke53280,fg:poke53281,fg:poke646,bg:print"";:a=10:x=17
430 printspc(a)" [176][195][201][176][195][201][213][192][201][213][192][201][213][201][213]"
431 printspc(a)" [171][192] [171][192][203][202][192][201][221] [221][221][221][194]"
432 printspc(a)" [173][195][189][177] [173][192][203][202][192][203][189][202][203]"
433 printspc(a)" print program"
440 printspc(a)"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
450 printspc(a)"[221](1).........print[221]"
460 printspc(a)"[221](2).......options[171][192][174]"
470 printspc(a)"[221](_)..........exit[221] [221]"
480 printspc(a)"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189] [221]"
510 print"[176][195][195][195][195][195][195][195][174] [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174] [221]"
520 print"[194]0....60[194] [221]"spc(x)"[221] [221]"
540 print"[194]1...120[194] [221]"spc(x)"[221] [221]"
560 print"[194]2..'120[194] [221]"spc(x)"[221]_[189]"
580 print"[194]3...240[194] [221]"spc(x)"[221]"
600 print"[194]4....80[194] [221]"spc(x)"[221]"
605 print"[194]5....72[194]_[179]"spc(x)"[221]"
607 print"[194]6....90[194] [221]"spc(x)"[221]"
610 print"[171][192][192][192][192][192][192][192][179] [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
611 print"[194]7....60[194] ^"
612 print"[194]8...120[194] [176][192][192][192][192][192][192][192][177][192][192][192][192][192][192][192][174]"
613 print"[194]9...240[194] [221]up/dn to select[221]"
614 print"[173][195][195][195][195][195][195][195][189] [221]lf/rt to change[221]"
615 print" [221]+...+10 -...-10[221]"
616 print" [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]";
620 gosub850
630 poke198,.:wait198,1:getx$:a=fre(0)
640 ifx$="2"thengosub870
650 ifx$="_"then810
660 ifx$<>"1"then630
665 poke691,o(5)*13
670 fora=0to3:poke692+a,z%(o(0),a):next
680 fora=0to3:poke696+a,z%(o(1),a):next
690 print"[147]";:open15,o(4),15:close15:ifst=.then710
700 printspc(9)"printer is not present":fora=.to2500:next:goto390
710 printspc(15)"printing...":print:printspc(7)"hold down any key to cancel"
715 m1=peek(3):m2=peek(4):m3=peek(5):m4=peek(6)
720 open1,o(4),5
735 h=int(o(2)/8):l=o(2)-h*8
745 ifhthenfora=.toh:print#1,chr$(27)chr$(51)chr$(24)chr$(10);:next
755 poke2,o(3):a=b(o(5)):poke4,a/256:poke3,a-peek(4)*256:a=o(5)<7:poke5,4-a
760 poke681,27:poke682,42:poke682-a,c(o(5)):poke683-a,peek(3):poke684-a,peek(4)
765 poke6,4:poke687,27:poke688,51:poke689,24:poke690,10:sysc+256*o(6),b,255-2^l
790 close1:poke3,m1:poke4,m2:poke5,m3:poke6,m4:goto390
810 poke646,fg:print"[147]s[217]53235:g[207]147";
820 poke198,1:poke631,13:end
850 z=.:fory=.too:x=o(y):gosub1010:next
860 return
870 y=.:h=h(y):l=l(y):x=o(y):z=1
880 fora=-1to.
890 k=peek(ky):s=peek(sk)
895 ifk=43thenx=x+(x-9>l)*10
896 ifk=40thenx=x-(x+9<h)*10
900 ifk<>2then930
910 ifs=1thenx=x+(x>l)
920 ifs=.thenx=x-(x<h)
930 ifk<>7then980
940 gosub1000
950 ifs=.theny=y-(y<o)
960 ifs=1theny=y+(y>.)
970 z=1:h=h(y):l=l(y):x=o(y)
980 gosub1010
990 a=k<>1:next
1000 o(y)=x:z=.
1010 pokepy,11+y:pokepx,11:syspc
1020 printrv$(z)o$(y)"[146] ";
1030 ify>1thenprintspc(2+(x>9)+(x>99))x:return
1040 prints$(x):fora=.to25:next:return
1041 data0,0,8
1042 data0,0,8
1043 data0,0,500
1044 data0,0,255
1045 data4,4,7
1046 data7,0,9
1047 data0,0,1
1048 data480,960,960,1215,640,576,720,480,960,1215,0,1,2,3,4,5,6,75,76,90
1050 data0,0,0,0,"1.00",0,0,0,1,"1.25",0,1,0,1,"1.50",1,1,1,0,"1.75"
1080 data1,1,1,1,"2.00",1,1,1,2,"2.25",1,2,1,2,"2.50",2,2,2,1,"2.75"
1110 data2,2,2,2,"3.00"
1120 rem machine code here