Screen Store and Recall Basic Routines for VDC in C128 ------------------------------------------------------ 5 rem vdc screen store/recall demo routines 10 printchr$(147):print"using the two routines given in this sample," 20 print:print"one can store and recall the vdc screen of c128" 30 print:print:print"for related questions, you can e-mail to ilker ficicilar" 40 print:print"filker@newton.physics.metu.edu.tr" 50 fori=0to14:print:next 60 print"-"tab(32)"press a key"tab(79)"-"chr$(19)tab(79)" " 70 geta$:ifa$=""goto70 80 gosub300:printchr$(147)"press a key to recall the screen back" 90 geta$:ifa$=""goto90 100 gosub200:printchr$(19):fori=0to23:print:next 110 print"issue the 'cont' command to redraw it" 120 end 130 goto100 199 end 200 bank15:rem recalling the vdc 80 screen 210 sysdec("cdcc"),0 ,18:sysdec("cdcc"),0,19 220 sysdec("cdcc"),16,32:sysdec("cdcc"),0,33 230 sysdec("cdcc"),160,24:fori=0to15:sysdec("cdcc"),255,30:next:return 300 bank15:rem storing the vdc 80 screen 310 sysdec("cdcc"),16,18:sysdec("cdcc"),0,19 320 sysdec("cdcc"),0 ,32:sysdec("cdcc"),0,33 330 sysdec("cdcc"),160,24:fori=0to15:sysdec("cdcc"),255,30:next:return 390 : 400 rem related vdc registers 410 : 420 rem 19,18 = destination (19 = low byte) 430 rem 33,32 = source (33 = low byte) 440 rem 24 = copy/fill selection 450 rem 30 = number of bytes to be copied 460 : 470 rem vdc memory map 480 : 490 rem $0000-$07ff = screen memory 500 rem $0800-$0fff = attributes memory 510 rem $1000-$1fff = unused (but we used it to store the copy) 520 rem $2000-$3fff = font data (1 char = upper 8 byte of 16 bytes) 530 : 540 rem related kernal calls 550 : 560 rem $cdcc = write to vdc register x the value a 570 rem $cdda = read the vdc register x into a 580 : Ilker Ficicilar