Skip to main content
Home Documents Lisa FR3TO1.Text
FR3TO1.Text

FR3TO1.Text

Lisa · TEXT
FilenameFR3TO1.Text
Size0.00 MB
Subsection firmware / ROM88
Downloads2
Enjoying MacTrove? Anonymous downloads are free and unlimited. Create a free account to track favorites, contribute metadata corrections, and join the community chat.
Contents
.Page
;++
;		FR3TO1 will take three bytes and create one composite byte from them.
;
;		Input register usage:
;			A :=	>CCCCCCCC<
;			X :=	>BBBBBBBB<
;			Y :=	>AAAAAAAA<
;
;		Output register usage:
;			A :=	>00AABBCC< == Nibblized
;--

FR3TO1	.Equ *			; From three to one routine
	Lsr	A		; Ignore low six bits of "A" as they
	Lsa	A		;  will get shifted out and lost
	Sta	Temp1		; >00CCxxxx<
	Txa
	And	#0C0		; Clear low bits
	Ora	Temp1		; >BBCCxxxx<
	Lsr	A
	Lsr	A
	Sta	Temp1		; >00BBCCxx<
	Tya
	And	#0C0		; Clear low bits
	Ora	Temp!		; >AABBCCxx<
	Lsr	A
	Lsr	A		; >00AABBCC<
	Tax
	Lda	Nibl,X		; Nibblize the new composite byte
	Rts
mp.ls