home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zodiac Super OZ
/
MEDIADEPOT.ISO
/
FILES
/
13
/
N_B_V203.ZIP
/
CPY_ALL.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
6KB
|
116 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME CPY_ALL .DMO ║ by ╘════════════════─ ║ ║
│ │ ║ Don Schullian, Jr. ║ ║
│ ╘══════════════════════════╝ ║ ║
│ A license is hereby granted to the holder to use this source code in ║ ║
│ any program, commercial or otherwise, without receiving the express ║ ║
│ permission of the copyright holder and without paying any royalties, ║ ║
│ as long as this code is not distributed in any compilable format. ║ ║
│ IE: source code files, PowerBASIC Unit files, and printed listings ║ ║
╘═╤═════════════════════════════════════════════════════════════════════╝ ║
│ .................................... ║
╘═══════════════════════════════════════════════════════════════════════╝
$endif
'.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
$STACK 2048
$STRING 8
$INCLUDE "DAS-NB01.INC"
$INCLUDE "DAS-NB02.INC"
$INCLUDE "DAS-NBT1.INC"
$INCLUDE "DAS-NBT4.INC"
SCREEN 0,,2,0 ' use Apage 2
FileSpec$ = "DMO\DASLOGO.DAT" ' CORRECT?
IF DIR$( FileSpec$ ) = "" THEN ' just in case
TBoxFILL 1, 1, 25, 80, 177, 7 ' fill Apage 2
ELSE '
OPEN "B", #1, FileSpec$ ' read in the data
GET$ #1, 4005, Scrn$ ' that was stored
TBoxWrite Scrn$ ' fTBoxREAD$ & write
CLOSE ' to Apage 2
Scrn$ = "" ' don't need this anymore
END IF '
'──────────────────────────────────────────────
SCREEN 0,,1,0 ' Apage 1 is a test screen
Col? = 1 : Cols? = 80 '
Rows? = 25 '
FOR Row? = 1 TO 12 '
TBoxDRAW Row?, Col?, Rows?, Cols?, 1, 15 '
INCR Col?, 2 : DECR Cols?, 4 '
DECR Rows?, 2 '
NEXT '
Tprint 13, 30, "This is a test screen.", 14 '
'───────────────────────────────────────────────
SCREEN 0,,0,0 ' working on Apage 0 now
Push? = 0 '
'
DO '
TBoxCopy 1, 1, 25, 80, 2, 0 ' copy page 2 to page 0
G% = fAnyKey% ' clear kbrd & wait for a key
UCASEkey G% ' ucase it
SELECT CASE G% '
CASE 27, 81 : EXIT LOOP '
CASE 90 : IF Push? = 0 THEN ' because we are storing the
Push? = 1 ' menu screen on page 2 we
G$ = "ON " ' have to write the change
ELSE ' to that screen by 1st
Push? = 0 ' setting the Apage to 2
G$ = "OFF" ' then we go back to Apage 0
END IF ' There really are easier
SCREEN 0,,2,0 ' ways to do all of this but
Tprint 25, 56, G$, 0 ' as a demo it shows how to
SCREEN 0,,0,0 ' use the Apage with Tprint
ITERATE '
CASE 65 : CopyTBoxBL 1, 1, 25, 80, 1
CASE 66 : CopyTBoxBR 1, 1, 25, 80, 1
CASE 67 : CopyTBoxTL 1, 1, 25, 80, 1
CASE 68 : CopyTBoxTR 1, 1, 25, 80, 1
CASE 69 : CopyTBoxRND 1, 1, 25, 80, 1
CASE 70 : CopyTBoxVBH 1, 1, 25, 80, 1
CASE 71 : CopyTBoxVBV 1, 1, 25, 80, 1
CASE 72 : CopyTBoxZIO 1, 1, 25, 80, 1
CASE 73 : CopyTBoxDN 1, 1, 25, 80, 1, Push?
CASE 74 : CopyTBoxHIO 1, 1, 25, 80, 1, Push?
CASE 75 : CopyTBoxHOI 1, 1, 25, 80, 1, Push?
CASE 76 : CopyTBoxLF 1, 1, 25, 80, 1, Push?
CASE 77 : CopyTBoxRT 1, 1, 25, 80, 1, Push?
CASE 78 : CopyTBoxUP 1, 1, 25, 80, 1, Push?
CASE 79 : CopyTBoxVIO 1, 1, 25, 80, 1, Push?
CASE 80 : CopyTBoxVOI 1, 1, 25, 80, 1, Push?
CASE ELSE : CALL DemoHelp : ITERATE
END SELECT
DELAY 1
LOOP
CLS
END
SUB DemoHelp LOCAL PUBLIC
T$ = "There are 16 different ways to copy data from any" +_
"video page to the currently active page (Apage)." +_
"Eight of these have the extra feature of pushing" +_
"the area being cleared. The following keys allow" +_
"you to see the different styles:" + CHR$(13,10) +_
CHR$(13,10) +_
"^<A> thru <P> for the 16 different styles" + CHR$(13,10) +_
"^<Z> to turn ON/OFF the push feature" + CHR$(13,10) +_
"^<Q> quit to DOS"
REPLACE "^" WITH CHR$(9) IN T$ ' use tabs to center text
SCREEN 0,,3,0 ' we'll use page 3 to
TBoxDraw 7, 14, 11, 53, 1, 47 ' draw & print our help
TprintTEXT 8, 16, 9, 49, T$, 0, &h0D0A, 5, 47 ' box then back to
SCREEN 0,,0,0 ' page 0
CopyTBoxVIO 7, 14, 11, 53, 3, 0 ' now copy the box
fAnyKey ' wait a key-press
CopyTBoxVOI 7, 14, 11, 53, 2, 0 ' restore original box
END SUB