2 ; Christian Groessler, June 2000
4 ; void __fastcall__ scroll (signed char numlines);
5 ; numlines > 0 scrolls up
6 ; numlines < 0 scrolls down
10 .importzp tmp1,tmp4,ptr1,ptr2
25 adc #1 ; make positive
28 cmp #24 ; scroll >= the whole screen?
39 sta ptr1+1 ; point to last line on screen
54 lda #24 ; # of lines on screen
56 sbc tmp1 ; # of lines to move
59 ;very simple, could be improved
61 scrold: ldy #39 ; # of chars on a line - 1
81 ; fill new scrolled in lines with space
83 ldx tmp1 ; # of new lines
100 up: sta tmp1 ; # of lines to scroll
101 cmp #24 ; scroll >= the whole screen?
105 ;multiply by 40 (xsize)
108 adc SAVMSC ; add start of screen mem
117 lda #24 ; # of lines on screen
119 sbc tmp1 ; # of lines to move
122 ;very simple, could be improved
124 scroll: ldy #39 ; # of chars on a line - 1
144 ; fill new scrolled in lines with space
146 ldx tmp1 ; # of new lines