10.02.2013 Views

a E i - Commodore Is Awesome

a E i - Commodore Is Awesome

a E i - Commodore Is Awesome

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

41 in<br />

gram<br />

pade<br />

IN<br />

IN<br />

AS<br />

:G-<br />

iE<br />

32<br />

97<br />

IE<br />

I<br />

.<br />

stored in the next free location in the<br />

output buffer. If the program is<br />

dealing with a reversed character then<br />

it will store #592 in the next free<br />

location (R VS OFF) and again increment<br />

$4B by #S0 I<br />

When each character has been<br />

fully processed and stored in the output<br />

buffer (including RVS ON and<br />

RVS OFF codes) the Y-register is incremented<br />

by #501. When the Yregister<br />

reaches # $28 one row of text<br />

has been processed and is stored in the<br />

output buffer. The routine at $40AF<br />

then sends the processed data to the<br />

printer, followed by a carriage return.<br />

The X-register is incremented by#S0 I<br />

and compared with #$19. If it is less<br />

than tt $19 then the text screen row<br />

location (stored in #$22 #523) is<br />

incremented by #528 and the whole<br />

process repeated for the next row.<br />

When all rows have been printed<br />

the printer is set to the default font and<br />

the channel to the printer is closed.<br />

Page zero is restored by the routine at<br />

$4291 and the program returns to Basic<br />

as if nothing had happened.<br />

The program works because each<br />

high resolution image on the screen is<br />

actually made up of 64,000 dots (each<br />

individually selectable) arranged in a<br />

definite (though rather complex)<br />

pattern. In much the same way the<br />

printer produces its images using a<br />

pattern of dots, although the way the<br />

dots are organised is very different.<br />

In essence then, this program must<br />

translate the pattern of dots on the<br />

screen, to a pattern recognisable by the<br />

printer, while preserving the image to<br />

be printed.<br />

Because there are 64,000 dots some<br />

or all of which have to be translated<br />

and sent to the printer, it can be seen<br />

that a great deal of processing has to be<br />

done. The programmer/user will want<br />

their printout as quickly as possible (in<br />

business this would be essential - time<br />

is money), so the whole routine has<br />

been written in machine code. This<br />

gives a considerable time saving over<br />

MONITOR: FUNKEY 1<br />

PC SP AC •IP. YP SP<br />

FFFF o e FF Fr FF F8<br />

>055F 0 9 0 6 OA 0 9 0 7 0 6 0 4 [3 5 R AM P.P.1<br />

>0567 5 1 5 9 5 1 3 1 3 6 3 3 3 8 1 4 ..ve i3 1 , kE* 1<br />

>056F OD 4 4 4 C 4 F 4 1 4 4 2 2 4 4 ,<br />

>0577 vikcooac 4 9 5 2 4 5 4 3 5 4 4 F 5 2 5 9 le Nd ftECNN<br />

>057F ET 5 3 5 9 5 3 1 1 3 6 3 6 3 4 ,<br />

F<br />

>05A7<br />

R W 335 VOn M7 5.:3<br />

4 3 4 E 4 3 4 C 5 2 -0<br />

>058F OD 1 4 4 5 3 4 1 5 6 4 5 2 2 5 2 :Pit g l;1 5 Mit4<br />

)0597 5<br />

1M0044N<br />

5 4 € 0 1 ) 4 e 4 5 4 C 5 0 OD I n i.m .n o g<br />

>053F 0 0 e l) 4.10 Oo 0 0 FF FF FF Aw im m kkk<br />

PLUS/4 AND MPS 801 ill<br />

the equivalent Basic program which<br />

took 25 minutes to produce a single<br />

high-res screen dump. In machine code<br />

this process is reduced to three<br />

minutes. This is still fairly slow -but is<br />

the maximum speed obtainable using<br />

the MPS-801 printer. The reason for<br />

this is the size of the printers input<br />

buffer - 90 bytes. A single row of the<br />

high-res screen uses 320 bytes. In order<br />

for the printer to produce a single row<br />

of the high-res screen its buffer must be<br />

filled and emptied four times. This<br />

I MONITOR: GRATEX<br />

PC SR AC XR YR SP<br />

; FFFF 00 FF FF FF F8<br />

• 4000 20 84 42 JSR 14284<br />

• 4003 AD 13 FF LDR $FF13<br />

• 4006 09 D1 C M P 4$131<br />

• 4008 DO OS E N E $403F<br />

• 400A AO 08 L D Y *$08<br />

. 400C 4C 11 40 JMP $4011<br />

• 400F AO 07 L D Y 4107<br />

• 4011 R2 04 L D X 1404<br />

•<br />

•<br />

•<br />

•<br />

•<br />

•<br />

•<br />

•<br />

•<br />

•<br />

.<br />

4068<br />

406E<br />

4070<br />

4071<br />

4073<br />

4074<br />

4076<br />

4078<br />

40711<br />

407E<br />

4080<br />

4C 98 40 RIP 14098<br />

69 20 A D C 4$20<br />

38 S E C<br />

E9 40 S E C 4$40<br />

18 C L C<br />

10 08 E F L t407E<br />

69 40 A D C 1440<br />

99 30 44 STR $443D1Y<br />

4C 92 40 JMP 1.4098<br />

69 40 A D C 4140<br />

28 S E C<br />

• 4012 R9 04 L D A 4004 • 4081 E9 60 S E C 4$60<br />

• 4015 20 BA FF JSR $FFER • 4083 18 C L C<br />

• 4018 A9 00 L D A 4$00 • 4084 10 08 E E L t4OSE<br />

• 401A 20 BD FF JSR $FFED • 4086 69 80 A D C 4$80<br />

• 401D 20 CO FF JSR $FFC0 • 4088 99 3D 44 SIR $443D,Y<br />

. -4020 A2 04 L D X 4404 . 4088 40 98 40 JMP $4098<br />

• 4022 20 C9 FF JSR $FFC9 • 408E 69 60 A D C 4$60<br />

• 4025 RA 00 L D R 4$00 • 4090 38 S E C<br />

• 4027 85 22 S I R 1.22 • 4091 E9 80 S E C 4$80<br />

• 4029 A9 OC L D A 4$0C . 4093 18 C L C<br />

• 402E 85 23 S T P $23 • 4094 10 05 E F L 1.4098<br />

• 40211 A2 00 L D X 4100 • 4096 69 CO A D C 4$C0<br />

• 402F AO 00 L D Y 4$00 • 4098 99 3D 44 SIR $443D.Y<br />

• 4031 98 T Y R . 409E 68 P L R<br />

• 4022 85 48 S I R $48 • 409C R8 T A Y<br />

• 4034 38 S E C • 40913 08 I N Y<br />

• 4035 81 22 L D A ($22),Y • 409E E6 4B I N C $48<br />

• 4037 85 SE S I R $5E • 40A0 AS SD L D A ISD<br />

. 4029 29 7F A N D 4$7F • 40R2 29 80 A N D WO<br />

• 4038 09 22 CMP 4$22 • 40R4 FO 03 B E Q $40A9<br />

• 403D DO 07 B N E $4046 • 40R6 20 F4 40 JSR $40F4<br />

• 403F 18 C L C • 40A9 CO 28 C P Y 4$28<br />

• 4040 A5 5E L D A 15E . 40A2 DO 87 E N E 1.4034<br />

4042 69 05 A D C 4$05 • 40A0 AO 00 L D Y 4100<br />

• 4044 85 SE S I R t5E . 40AF 29 311 44 LDR 1443D.Y<br />

. 4046 RS 5E L D A $5E • 4082 20 D2 FF JSR $FFD2<br />

• 4048 85 5D S I R $511 • 4085 C8 T H Y<br />

• 404A 38 S E C • 40E6 04 48 C P Y 148<br />

. 404P 98 T Y A • 4088 DO ES E N E 1.40AF<br />

• 4040 48 P H A • 40ER R9 OD L D R 4$011<br />

• 404D AS 48 L D A $48 • 40E0 20 D2 FF JSR $FFD2<br />

• 404F R8 T R Y • 408F E8 I N X<br />

• 4050 AS SE L D A $5E • 4000 E0 19 C P X 4$19<br />

• 4052 29 80 A N D 4180 • 4002 DO OE E N E $40112<br />

• 4054 FO 09 H Q 1.405P • 4004 A9 91 L D A 4$91<br />

• 4056 20 E2 40 JSR 140E2 • 4006 20 112 FF JSP tFFD2<br />

• 4059 AS SE L D A 1.5E • 4009 R9 04 L D A 4$04<br />

• 405E 29 7F A N D 417F • 40CE 20 C3 FF JSR $FFC3<br />

. 405D 85 SE S I R $5E • 400E 20 91 42 JSR 14291<br />

• 405F AS SE L D A t5E • 40131 60 R T S<br />

• 4061 E9 20 S E C 4$20 • 4002 18 C L C<br />

• 4063 18 C L C • 4003 A5 22 L D A 1.22<br />

4064 10 08 E F L $405E • 40115 28 A D C #4<br />

. 4066 69 60 A D C 41.60 • 40117 85 22 7 S T A $22<br />

• 4068 99 3P 44 STA $4431),Y • 40119 AS 23<br />

28<br />

L D A $23<br />

Y O U R COMMODOREjanuary1987<br />

105<br />

involves reading 90 bytes of translated<br />

data from the computer - telling the<br />

computer not to send any more data -<br />

printing the 90 bytes now in the input<br />

buffer - request the next 90 bytes and<br />

so on. In other words the printer head<br />

must make four passes for each row of<br />

high<br />

- Budding electronic enthusiasts<br />

res may fi nd a way to make the input<br />

sbuffer c larger and so reduce the printing<br />

rtime, e the rest of us will have to wait two<br />

eminutes. n<br />

.<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!