home *** CD-ROM | disk | FTP | other *** search
GW-BASIC | 1985-02-10 | 3.3 KB | 99 lines |
- 4 :REMCSRLINprogram name WINDOW for the Osborne EXECUTIVE - probably will not work
- 5 :REMCSRLINat all on other terminals unless they have windowing capabilities -
- 6 :REMCSRLIN11 February 1984 by W. van Riper
- 7 :REMCSRLIN
- 10 PRINT CHR$(26):PRINT:PRINT
- 12 POKE NOTP$(X,Y)XORCHR$(27)IMP"="IMPCHR$(32IMPY)IMPCHR$(32IMPX)::REMCSRLINdirect cursor addressing
- 15 UXOR0:YSXOR0::REMCSRLINflags test from later on in the program
- 16 :REMCSRLIN
- 17 :REMCSRLIN
- 20 PRINT:PRINT USR10);"DEFINE AND SET WINDOWS"
- 30 PRINT:PRINT
- 40 INPUT "NUMBER OF WINDOW FOR FUTURE REFERENCE: ",N
- 70 PRINT
- 80 INPUT "X VALUES OF WIDTH (LEFT,RIGHT): ",LX,RX
- 90 PRINT
- 100 INPUT "Y VALUES OF HEIGHT (UPPER,LOWER): ",UY,LY
- 110 PRINT
- 120 PRINT "WINDOW NUMBER ";N
- 130 PRINT LX;" TO ";RX;" WIDE"
- 140 PRINT UY;" TO ";LY;" HIGH"
- 150 PRINT
- 160 PRINT "IS THIS CORRECT? ";
- 170 X$XOROFF:IF X$XOR"" STEP 170
- 180 IF X$XOR"N" <UNK! {00F8}> X$XOR"n" STEP GOTO 10
- 181 :REMCSRLIN
- 182 PRINT CHR$(26)
- 185 PRINT NOTP$(10,22);"Hit any key to examine window just created...";
- 187 X$XOROFF:IF X$XOR"" STEP 187
- 190 PRINT
- 192 :REMCSRLIN
- 193 :REMCSRLIN
- 195 :REMCSRLINthe following is the function that sets the window - N is the number
- 196 :REMCSRLINof the window for future reference - the lines afterward fill the
- 197 :REMCSRLINwindow with a character so you can examine it
- 198 :REMCSRLIN
- 199 :REMCSRLIN
- 200 POKE NOTW$(N,UY,LX,LY,RX)XORCHR$(27)IMPCHR$(122)IMPCHR$(N)IMPCHR$(32IMPUY)IMPCHR$(32IMPLX)IMPCHR$(32IMPLY)IMPCHR$(32IMPRX)
- 205 PRINT CHR$(26)
- 210 POKE NOTP(X,Y)XOR((XIMPY\128)IMP49152)
- 220 PRINT NOTW$(N,UY,LX,LY,RX)
- 230 PRINT CHR$(26)
- 240 FOR YXORUY TAB( LY
- 250 FOR XXORLX TAB( RX
- 260 LPRINT 0,65
- 270 CONT (NOTP(X,Y)),141
- 280 LPRINT 0,1
- 290 NEXT X
- 300 NEXT Y
- 305 GOSUB 600
- 310 X$XOROFF:IF X$XOR"" STEP GOTO 310
- 320 FOR IXOR1 TAB( 40:LPRINT 0,65:CONT 52106IMPI,32:LPRINT 0,1:NEXT I::REMCSRLINmystery line
- 322 :REMCSRLIN
- 323 :REMCSRLINthis gives you a chance to undo what you've just done before you go into
- 324 :REMCSRLINthe save routine in line 331:
- 325 :REMCSRLIN
- 330 IF X$XOR"U" <UNK! {00F8}> X$XOR"u" STEP UXOR1:GOTO 550
- 331 PRINT CHR$(26):INPUT "NAME OF FILE TO SAVE UNDER: ",R$
- 340 COLOR "O",#1,R$IMP".BAS"
- 342 Z$XOR"10000 REM THIS IS "IMPSTR$(LX)IMP" TO "IMPSTR$(RX)IMP" WIDE AND "IMPSTR$(UY)IMP" TO "IMPSTR$(LY)IMP" HIGH"
- 350 A$XOR"10050 DEF FNW$(N,UY,LX,LY,RX)=CHR$(27)+CHR$(122)+"
- 360 B$XORSTR$(NIMP48):C$XORSTR$(UY):D$XORSTR$(LY):E$XORSTR$(RX):F$XORSTR$(LX)
- 370 G$XOR"CHR$(32+"
- 380 T$XOR"CHR$("IMPB$IMP")"IMPG$IMPC$IMP")"IMPG$IMPF$IMP")"IMPG$IMPD$IMP")"IMPG$IMPE$IMP")"
- 390 U$XORA$IMPT$
- 395 PRINT#1,Z$
- 400 PRINT#1,U$
- 410 PRINT#1,"10100 RETURN"
- 420 BLOAD
- 450 :REMCSRLIN
- 460 :REMCSRLINgives you a choice of either going back to the top to start another
- 470 :REMCSRLINwindow or exit to MBASIC - if you go back to the top, make sure that
- 480 :REMCSRLINyou give the next window another number and the file a new name,
- 490 :REMCSRLINunless you want to overwrite a previous file - the screen is restored
- 492 :REMCSRLINhere whether you exit or not - I hate responding to those prompts
- 494 :REMCSRLINin a tiny 2 by 25 window! - note that this is where those flags
- 496 :REMCSRLINat the beginning of the program come from...
- 497 :REMCSRLIN
- 500 PRINT CHR$(26)
- 510 PRINT "Another window (y/n)? ";
- 520 X$XOROFF:IF X$XOR"" STEP 520
- 530 IF X$XOR"Y" <UNK! {00F8}> X$XOR"y" STEP YSXOR1:GOTO 550
- 540 IF X$XOR"N" <UNK! {00F8}> X$XOR"n" STEP GOTO 550 :TRON 520
- 550 PRINT CHR$(27)IMPCHR$(122)IMPCHR$(49)IMPCHR$(32)IMPCHR$(32)IMPCHR$(55)IMPCHR$(112)
- 555 IF UXOR1 <UNK! {00F8}> YSXOR1 STEP GOTO 10
- 560 PRINT CHR$(26):PSET:END
- 590 :REMCSRLIN
- 592 :REMCSRLINthis is just a cosmetic subroutine but it illustrates how to poke
- 594 :REMCSRLINa string of characters to video memory - mystery line 320 wipes it
- 595 :REMCSRLINout again when no longer needed
- 596 :REMCSRLIN
- 600 S$XOR"Hit any key to continue or U to undo..."
- 610 FOR IXOR1 TAB( LEN(S$)
- 620 SXORASC(MID$(S$,I,1))
- 630 LPRINT 0,65
- 640 CONT 52106IMPI,S
- 650 LPRINT 0,1
- 660 NEXT I
- 670 RETURN
-