*/25FEB10:00 --EPRINT--

ORG $8600

OBJ $8600

KEYCLR EQU $C010

KEYHIT EQU $C000

PRTRDY EQU $C1C1

PRTOUT EQU $C090

RADR EQU $06

PARMH EQU $A0

PARML EQU $A1

FP2INT EQU $E10C

*

PAGE1 JMP ENTRYA

PAGE2 LDA #$40

STA PAGE

JMP HIRES

ENTRYA LDA #$20

STA PAGE

HIRES JSR FP2INT ;LSB OF USR PARM IS SCRN HEIGHT

LDA PARML ;MSB BITS 0-5 ARE WIDTH

AND #$C0

STA HEIGHT ;MSB BIT 6 ON MEANS INVERSE PIC

BIT HEIGHT

BVC NODEC

DEC HEIGHT

NODEC LDA PARMH

AND #$3F

STA WIDTH

LDA #0

BIT PARMH

BVC NINV

LDA #$FF

NINV STA PRTMASK

LDA HEIGHT ;THIS ROUTINE TAKES EACH PIXEL IN THE HIRES PAGE

ASL

STA GRPRINT+2 ; AND EXPANDS IT TO A 1X3 BLOCK TO MAINTAIN THE

LDA #0

ROL

STA GRPRINT+3 ;SET UP WIDTH OF GRAPHICS PRINT LINE

I1 LDA #$0D ;PRINT A <CR>

JSR PUTBYTE

LDA #TABSET-STRING

JSR PUTSTR ;SET A TAB STOP TO CENTER PICTURE ON PAGE

LDA #GRSETUP-STRING

JSR PUTSTR ;PUT EPSON INTO GRAPHICS MODE

LDY WIDTH ;PRINT IMAGE GOING FROM RIGHT TO LEFT

DEY

NEXTCOL JSR GRLINE

NEXTROW JSR ROWCALC

STA TMP

LDA #0

ASL TMP ;DISCARD HIGH BIT

ASL TMP ;BIT 6

BCS K1

ORA #$70

K1 ASL TMP ;BIT 5

BCS K2

ORA #$0E

K2 ASL TMP ;BIT 4

BCS K3

ORA #$1

K3 JSR PUTIT

BCC NEXTROW

JSR GRLINE

NEXTROWB JSR ROWCALC

ASL

ASL

ASL

STA TMP

LDA #0

ASL TMP ;BIT 4

BCS K4

ORA #$60

K4 ASL TMP ;BIT 3

BCS K5

ORA #$1C

K5 ASL TMP ;BIT 2

BCS K6

ORA #$03

K6 JSR PUTIT ;PRINT DOUBLE WIDE

BCC NEXTROWB

JSR GRLINE

NEXTROWC JSR ROWCALC

ASL

ASL

ASL

ASL

ASL

STA TMP

LDA #0

ASL TMP ;BIT 2

BCS K7

ORA #$40

K7 ASL TMP ;BIT 1

BCS K8

ORA #$38

K8 ASL TMP ;BIT 0

BCS K9

ORA #$07

K9 JSR PUTIT

BCC NEXTROWC

DEY

BMI DONEA

JMP NEXTCOL

DONEA LDA #TEXTSET-STRING

JSR PUTSTR

DONEB RTS

*

PUTSTR STY TMP

TAY

M0 LDA STRING,Y

BMI M1

JSR PUTBYTE

INY

BNE M0

M1 LDY TMP

RTS

*

PUTBYTE STA PRTOUT

PB1 BIT PRTRDY

BMI PB1

RTS

*

GRLINE LDA #CRLF-STRING

JSR PUTSTR

LDA #GRPRINT-STRING

JSR PUTSTR

LDX #0

RTS

*

PUTIT JSR PUTBYTE

JSR PUTBYTE

INX

CPX HEIGHT

RTS

*

ROWCALC STX TMP

TXA

AND #7

ASL

ASL

ORA PAGE

STA RADR+1

LDA TMP

LSR

LSR

LSR

LSR

AND #3

ORA RADR+1

STA RADR+1

LDA #0

ROR

STA RADR

LDA #0

BIT TMP

BVC NZ1

LDA #$28

JMP DOR

NZ1 BPL DOR

LDA #$50

DOR ORA RADR

STA RADR

LDA (RADR),Y

EOR PRTMASK

RTS

********************

STRING EQU *

GRSETUP DFB $1B,$41,$7,$1B,$4F,$1B,$3D,$0D,$FF

GRPRINT DFB $1B,$4B,0,0,$FF

TEXTSET DFB $1B,$32,$0D,$1B,$4E,$06,$0D,$0C,$FF

TABSET DFB $1B,$44,6,0,$0D,$FF

CRLF DFB $0D,$0A,9,$FF

WIDTH DS 1

HEIGHT DS 1

PRTMASK DS 1

TMP DS 1

PAGE DS 1

F