screen scroll (text) in the foreground and bild2.raw on screen128 in the background.
it's a great thing.
greetings
Code: Select all
SCREEN128
BVLOAD "bild2.raw" ,0,0
gosub ascii
HScroll=0
ScrollAmount = 1
StartEdit:
Loop:
Key$=GET
if Key$="Q" then GOSUB links
if Key$="E" then GOSUB rechts
Goto loop
end
links:
if HScroll>ScrollAmount then
HScroll=HScroll-ScrollAmount
SLEEP 0
POKEN $9F37,CHR$(HScroll MOD 256) + CHR$(HScroll/256)
end if
return
rechts:
HScroll=HScroll+ScrollAmount
SLEEP 0
POKEN $9F37,CHR$(HScroll MOD 256) + CHR$(HScroll/256)
return
ascii:
line$ = SPC(256) 'this way 256 bytes are reservers, so no relocation of string space needed
line$=""
for i = 1 to 128
'Build a string of 128 pairs of letter B CHR$(2) and a color byte CHR$(2)
line$ = line$ + CHR$(3) + CHR$(4)
next
'VPOKE a line at a time
For d= 0 to GETROWS()-1
VPOKEN 1,$b000 + (d*256),line$
next d
return