home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Club Elmshorn Atari PD
/
CCE_PD.iso
/
pc
/
0400
/
CCE_0472.ZIP
/
CCE_0472.PD
/
HPDESK3
/
FASTPRN
/
FASTPRN.S
< prev
next >
Wrap
Text File
|
1991-10-18
|
3KB
|
161 lines
biosvec = $B4
savptr = $4A2
HZ200 = $4BA
prt_vec = $50A
mfpport = $FFFA01
mfpddr = $FFFA05
soundchip = $FF8800
TEXT
prgstart: move.l 4(sp),basesave
pea.l meldung
move.w #9,-(sp)
trap #1
addq.l #6,sp
pea.l init
move.w #$26,-(sp)
trap #$E
addq.l #6,sp
tst d0
beq init_ok
pea.l meldung2
move.w #9,-(sp)
trap #1
addq.l #6,sp
clr.l -(sp)
trap #1
init_ok: move.l basesave,a1
move.l #$100,d0
add.l $C(a1),d0
add.l $14(a1),d0
add.l $1C(a1),d0
clr.w -(sp)
move.l d0,-(sp)
move.w #$31,-(sp)
trap #1
init: move.l biosvec,a1
move.l xb_id,d0
cmp.l -8(a1),d0
bne install
move #1,d0
rts
install: move.l biosvec,oldbios
lea.l tdisp,a1
move.l a1,biosvec
lea.l dumpin,a1
move.l a1,prt_vec
clr d0
rts
magic: dc.b 'XBRA'
xb_id: dc.b 'ECKI'
oldbios: dc.l 0
tdisp: lea.l 6(sp),a1
btst.b #$D,(sp)
bne.b sup
move usp,a1
sup: cmpi.l #$30000,(a1)
beq.b newprt
cmpi.l #$80000,(a1)
beq.b newstat
movea.l oldbios,a0
jmp (a0)
newstat: lea.l _bstat,a0
bra jover
newprt: lea.l _bprn,a0
jover: movea.l savptr,a1
move.w (sp)+,d0
move.w d0,-(a1)
move.l (sp)+,-(a1)
movem.l d1-d7/a2-a7,-(a1)
move.l a1,savptr
btst.l #$D,d0
bne.b super
move usp,sp
super: move 4(sp),d0
jsr (a0)
movea.l savptr,a1
movem.l (a1)+,d1-d7/a2-a7
move.l (a1)+,-(sp)
move.w (a1)+,-(sp)
move.l a1,savptr
rte
_bstat: moveq.l #-1,d0
and.b #$FE,mfpddr
btst #0,mfpport
beq statend
moveq.l #0,d0
statend: rts
dumpin: move 4(sp),d0
_bprn: move.l HZ200,d2
sub.l errtime,d2
cmp.l #2000,d2
bcs olderror
move.l HZ200,d2
wait: and.b #$FE,mfpddr
btst #0,mfpport
beq goon
move.l HZ200,d1
sub.l d2,d1
cmp.l #6000,d1
blt wait
olderror: clr.l d0
move.l HZ200,errtime
rts
goon: move.w SR,-(sp)
or.w #$0700,SR
lea.l soundchip,a1
move.b #7,(a1)
move.b (a1),d1
or.b #%11000000,d1
move.b d1,2(a1)
move.b #$0F,(a1)
move.b d0,2(a1)
move.b #$0E,(a1)
move.b (a1),d1
and.b #$DF,d1
move.b d1,2(a1)
* move #100,d2
*w2: nop
* dbf d2,w2
or.b #$20,d1
move.b d1,2(a1)
move.w (sp)+,SR
move.l #-1,d0
rts
DATA
meldung: dc.b $D,$A,'Centronics-Driver '
dc.b '(c) 1991 by Ecki & c`t',$D,$A,$0
meldung2: dc.b '...aborted: Driver already'
dc.b ' installed',$A,$0
EVEN
errtime: dc.l 0
EVEN
basesave: ds.l 1