A2osX/LIB/LIBPAK.S.OUT.txt
2019-09-27 16:53:44 +02:00

100 lines
1.6 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NEW
AUTO 3,1
.LIST OFF
*--------------------------------------
Pak.Out.Init lda #$80
sta Pak.Out.Mask
stz Pak.Out.Byte
rts
*--------------------------------------
Pak.Out.Close bit Pak.Out.Mask
bmi .8
lda Pak.Out.Byte
jmp Pak.Out.PutByte
.8 clc
rts
*--------------------------------------
Pak.Out.PutCA jsr Pak.Out.PutBitC
bcs Pak.Out.Put.rts
Pak.Out.PutA ldy #8
.1 asl
jsr Pak.Out.PutBitC
bcs Pak.Out.Put.rts
dey
bne .1
Pak.Out.Put.rts rts
*--------------------------------------
Pak.Out.PutYBits
asl
jsr Pak.Out.PutBitC
bcs .9
dey
bne Pak.Out.PutYBits
.9 rts
*--------------------------------------
Pak.Out.PutBitC pha
bcc .1
lda Pak.Out.Mask
tsb Pak.Out.Byte
clc
.1 lsr Pak.Out.Mask
bne .8
jsr Pak.Out.PutByte
bcs .9
jsr Pak.Out.Init
.8 pla
* clc
rts
.9 pla
* sec
rts
*--------------------------------------
Pak.Out.PutByte inc Pak.DstCnt
bne .1
inc Pak.DstCnt+1
beq .9
.1 bit Pak.bPass2
bmi .6
phx
tax
inc Pak.CntL,x
bne .2
inc Pak.CntH,x
.2 plx
bra .7
.6 sta (ZPDstPtr)
inc ZPDstPtr
bne .2
inc ZPDstPtr+1
.7 inc Pak.Stat+S.PAKSTAT.PASS2,x
bne .8
inc Pak.Stat+S.PAKSTAT.PASS2+1,x
.8 clc
rts
.9 sec
rts
*--------------------------------------
MAN
SAVE USR/SRC/LIB/LIBPAK.S.OUT
LOAD USR/SRC/LIB/LIBPAK.S
ASM