.scr_set_mode equ &bc0e
.kl_l_rom_enable equ &b906
.kl_l_rom_disable equ &b909
.kl_u_rom_disable equ &b903
org &4000
nolist
ld a,2
call scr_set_mode
call kl_l_rom_enable
ld hl,&3900
ld de,font_data
ld bc,&4000-&3900
ldir
call kl_l_rom_disable
call kl_u_rom_disable
call initialise_scroller
.main_loop
ld b,&f5
.ll1 in a,(c)
rra
jr nc,ll1
halt
halt
halt
call scroll_message
jp main_loop
.initialise_scroller
ld hl,scroll_text
ld a,(hl)
jr sm2
.scroll_message ld a,0
dec a
and 7
ld (scroll_message+1),a
jr nz,scroll_block
.sm1 ld hl,scroll_text
inc hl
ld a,(hl)
or a
jr nz,sm2
ld hl,scroll_text
ld a,(hl)
.sm2 ld (sm1+1),hl
sub ' '
ld l,a
ld h,0
add hl,hl
add hl,hl
add hl,hl
ld de,font_data
add hl,de
ld de,column_buffer
ldi
ldi
ldi
ldi
ldi
ldi
ldi
ldi
.scroll_block
ld b,8
ld hl,&c000+79
ld de,&800+79
ld ix,column_buffer
.pixel_scroll
rl (ix+0)
inc ix
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
dec hl
rl (hl)
add hl,de
dec b
jp nz,pixel_scroll
ret
.column_buffer defs 8
.scroll_text defb "THIS IS A TOTALLY AMAZING, SUPER SMOOTH, PIXEL PERFECT FANTASTIC PIXEL SCROLL ........... ",0
.font_data equ $+1