[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Hires - to - Lores ... Yikes
- Subject: Re: Hires - to - Lores ... Yikes
- From: "Matthew W. Miller" <mwmiller@columbus.rr.com>
- Date: Fri, 30 Jul 2004 00:22:54 GMT
- Newsgroups: comp.sys.apple2
- Organization: Road Runner High Speed Online http://www.rr.com
- References: <Mq0Mc.47557$2i3.27799@clgrps12>
- Reply-to: mwmiller@columbus.rr.com
- User-agent: slrn/0.9.8.0 (Linux)
- Xref: g2news1.google.com comp.sys.apple2:2727
On Fri, 23 Jul 2004 04:25:16 GMT, Bender MX <no@morespam.com> wrote:
> I was messing around with converting Lo-Res into Hires and for kicks,
> decided to try it the other way around ... What it will do is only
> scan from $2000 to $2400 (hires pg 1) and move it into $0400 - $0800
> (lores pg 1) memory locations
>
> Bload favorite Hires pic into page 1, bload this little utility, then
> back to (]) applesoft and type
>
> GR [return]
>
> followed by
>
> CALL 768 [return]
Repeatable version, "only" 8 octets longer. :)
$0300 ldx #$20
$0302 ldy #$04
$0304 stx $0310
$0307 sty $0313
$030a ldx #$04
$030c ldy #$00
$030e lda $2000,y
$0311 sta $0400,y
$0314 iny
$0315 bne $030e
$0317 inc $0310
$031a inc $0313
$031d dex
$031e bne $030c
$0320 rts
Hm. We could unroll the outer loop, gain a tiny bit of speed, and
shorten it slightly too:
$0300 ldy #$00
$0302 lda $2000,y
$0305 sta $0400,y
$0308 lda $2100,y
$030b sta $0500,y
$030e lda $2200,y
$0311 sta $0600,y
$0314 lda $2300,y
$0317 sta $0700,y
$031a iny
$031b bne $0302
$031c rts
Hey, that one's "only" 4 octets longer than your original routine. Yay.
--
Matthew W. Miller <mwmiller@columbus.rr.com> MPlayer does not suck.