home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / osborne / window.bas (.txt) < prev   
Encoding:
GW-BASIC  |  1985-02-10  |  3.3 KB  |  99 lines

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