10 'TEST PROGRAM FOR SCROLL ROUTINE 20 'PROGRAM BY: LEE M. BUCK -- 3/17/83 30 'PUT THE ROUTINE AS HIGH AS POSSIBLE IN MEMORY 40 'IF TOTAL MEMORY IS 64K OR LESS SPACE MUST BE RESERVED WITHIN BASIC WORK 50 'AREA. RESERVE SPACE USING THE 'CLEAR' COMMAND AT THE BEGINNING OF PGM. 60 'OR USE THE /M OPTION WHEN STARTING BASIC(A). (SEE THE BASIC MANUAL) 70 CLS: KEY OFF 80 ' PUT SOMETHING ON THE SCREEN 90 FOR ROW=1 TO 22 100 FOR COL=1 TO 79 110 PRINT CHR$(ROW+64); 120 NEXT COL 130 PRINT 140 NEXT ROW 150 ' 160 'CALCULATE THE SEGMENT REQUIRED TO PUT ROUTINE AT HIGH MEMORY LOCATION 170 ' 180 PGM.SIZE=&H39 'SIZE OF MACHINE LANGUAGE PROGRAM 190 MEM.SIZE=160 'TOTAL K's OF MACHINE MEMORY (LESS RAMDISK MEMORY) 200 SEGMENT=MEM.SIZE*64-CINT(PGM.SIZE/16) 210 ' 220 DEF SEG=SEGMENT 'SET SEGMENT AT HIGH MEMORY LOCATION 230 ' 240 'LOAD THE SUBROUTINE INTO MEMORY. IT ONLY NEEDS TO BE DONE ONCE. 250 BLOAD "SCROLL.BLD",0 'BE SURE TO SET THE OFFSET TO ZERO 260 ' 270 'GET THE SUBROUTINE PARAMETERS 280 BEEP 290 LOCATE 23,1 300 INPUT "ULR,ULC,LRR,LRC,ATR,LEN";ULR%,ULC%,LRR%,LRC%,ATTR%,LNGTH% 310 ' 320 ' CALL THE SUBROUTINE 330 DEF SEG=SEGMENT 'MAKE SURE SEGMENT IS SET 340 SCROLL=0 'SET THE OFFSET 350 CALL SCROLL(ULR%,ULC%,LRR%,LRC%,ATTR%,LNGTH%) 360 ' 370 SOUND 500,5: SOUND 700,5: SOUND 1000,5 380 LOCATE 12,25: PRINT " SUCCESS !! " 390 'PRESS 'ENTER' TO DO IT AGAIN; 'Esc' TO QUIT 400 DEF SEG : POKE 106,0 410 Q$=INKEY$ : IF Q$="" GOTO 410 420 IF Q$=CHR$(13) THEN 280 'DO IT AGAIN WITH 'CARRIAGE RETURN' KEY PRESS 430 IF Q$<>CHR$(27) THEN 400 'KEEP WAITING UNTILL 'Esc' KEY PRESS 440 END