| Home | Ruff-In | MTutor | GradientFill | FB code | FBLoan | TW-Form | JaxGUI | Other DownLoads | PBCC Code | GW Code | Fix 2000/ XP | Text Screen Shots | QB code
GW Code

ConASCII

 
The following is example code that can be used to display premade screens or boxes in GW-Basic.

                                          POP File
 
To save any portion of the Screen, click on the area you desire and Click on Copy from the Menu Bar. In the SaveFile dialog,  click on POP  (*.POP). The portion or full screen will be saved with its row and column numbers included.
 
To Load your POP file and display it on the screen, use something like the following. It should display at the same Row and Column location where it was saved at.
 
10 KEY OFF
100 GOSUB 500
110 COLOR 7, 0
120 KE$ = INKEY$ : IF KE$ = "" GOTO 120
130 CLS
150 END
500 DEF SEG = &HB800
510 OPEN "testpop.Pop" FOR INPUT AS #1
520    RR1$ = INPUT$(4, 1) : R1  = VAL(RR1$)
530    RR2$ = INPUT$(4, 1) : R2  = VAL(RR2$)
540    CC1$ = INPUT$(4, 1) : C1  = VAL(CC1$)
550    CC2$ = INPUT$(3, 1) : C2  = VAL(CC2$)
600    HI = R2 - R1 + 1
610    LO = R1 * 160 - 160 + (C1 * 2) - 3
620    COL = (C2 - C1 + 1) * 2
630    FOR Y = 1 TO HI
640       S$ = INPUT$(COL, 1)
650       FOR X = 1 TO COL
670          C$ = MID$(S$, X, 1)
680          POKE LO+X, ASC(C$)
690       NEXT X
700       LO = LO + 160
710    NEXT Y
720 CLOSE 1
730 RETURN    
 
 
                                      Binary File
 
To Save a Binary file, that would be a full screen without row and column addresses included. Go to the Page you want to save using Page up  or Page down and Click on Binary  (*.BNY) in the Save Dialog Box. When asked how many screens, Enter 1. You can save all the screens you want to the file, but we'll just use one in this case.
 
To display it, you can use the following code. This method of displaying a screen  is not equal to BLOAD.
 
 
10 KEY OFF
20 COLOR 3, 3 : CLS
100 GOSUB 500
110 COLOR 7, 0
120 KE$ = INKEY$ : IF KE$ = "" GOTO 120
130 CLS
150 END
500 DEF SEG = &HB800
510 OPEN "Menuscn.bny" FOR INPUT AS #1
540   FOR X = 0 TO 3999
550      C$ = INPUT$(1, 1)
560      POKE X, ASC(C$)
570   NEXT X
580 CLOSE 1
585 DEF SEG
590 RETURN
 
 
                                         
                                              BLOAD
 
To Save a screen to a BLOAD file Select the whole and click on Copy, or press Alt+g. From Save Dialog select Bload (*.BSA)
 
This program uses BLOAD to display the screen and then the Screen is loaded into an Array. After a Key is hit, the screen is erased. After a 2 second wait the screen is displayed again.
 
 
10 KEY OFF
20 DEF SEG = &HB800
30 BLOAD "menu.bsa", 0
35 DIM SCN%(4000)
40 FOR X = 1 TO 4000
50    SCN%(X) = PEEK(X)
60 NEXT X
70 WHILE INKEY$  = "" : WEND
80 CLS
81 S = TIMER
82 IF TIMER < S+2 THEN GOTO 82
90 FOR X = 1 TO 4000
100   POKE X, SCN%(X)
110 NEXT X
115 KE$ = ""
120 WHILE INKEY$  = "" : WEND
130 CLS
135 DEF SEG
140 END
 

 
                                                                   DATA
 
This little program is Generated to either a file or to the Clipboard. Some Colors don't do well with the Clipboard and some don't work with a file. You may try either one. But most of the colors work with both.
 
To generate it to a file, select the area by clicking on its top left and bottom right corners and then click on Copy. Click on PBDOS & QB DATA (*.BAS) in the Save File Dialog.
 
To put it in the Windows Clipboard, Click on the corners and select Copy PB/QB/GW DOS Code to ClipBoard in the Area Drop on the Menu. You don't need to use Copy on the Menu bar like what is required for saving it to a File.
 
50 KEY OFF
100  R1 =  8
110  C1 =  49
120  R2 =  24
140 GOSUB 500
145 COLOR 7, 0
147 WHILE INKEY$ = "" : WEND
148 CLS
150 END
500 HI = R2 - R1 + 1
510 DEF SEG = &HB800
525 LO = R1 * 160 - 160 + (C1 * 2) - 3
530 FOR Y = 1 TO HI
540    READ S$
560    FOR X = 1 TO LEN(S$)
570       C$ = MID$(S$, X, 1)
580       POKE LO+X, ASC(C$)
590    NEXT X
600    LO = LO + 160
610 NEXT Y
620 RETURN

1000 DATA "ÚOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄO¿O"
1010 DATA "³O OIO OdOoOnO'OtO OkOnOoOwO OhOoOwO OmOuOcOhO ODOAOTOAO³O"
1020 DATA "³O OiOsO OaOlOlOoOwOeOdO OiOnO OQOBO,O ObOuOtO OiOfO O O³O"
1030 DATA "³O OiOtO OiOsO OnOoOtO ObOeOiOnOgO OuOsOeOdO,O OiOtO O O³O"
1040 DATA "³O OwOoOuOlOdO ObOeO OaO OgOoOoOdO OpOlOaOcOeO OtOoO O O³O"
1050 DATA "³O OsOtOoOrOeO OaO OsOcOrOeOeOnO OoOrO OPOOOPO O O O O O³O"
1060 DATA "³O ObOoOxOeOsO.O O O O O O O O O O O O O O O O O O O O O³O"
1070 DATA "³O O O O O O O O O O O O O O O O O O O O O O O O O O O O³O"
1090 DATA "³O O A A A A A A A A A A A A A A A A A A A A A A A O O O³O"
1100 DATA "³O OCOOONOAOSOCOIOIO OhOaOsO O1O0O3O OKOBO OoOfO O O O O³O"
1110 DATA "³O OSOcOrOeOeOnOsO OaOnOdO ObOoOxOeOsO OsOtOoOrOeOdO O O³O"
1120 DATA "³O OiOnO ODOAOTOAO OiOnO OSOUOBOSO.O OPOBOCOCO O O O O O³O"
1130 DATA "³O OaOlOlOoOwOsO O6O4O OKOBO OoOfO ODOAOTOAO OiOnO O O O³O"
1140 DATA "³O OeOaOcOhO OSOUOBO,O OiOsO OwOhOyO OIO OcOaOnO O O O O³O"
1150 DATA "³O OdOoO OtOhOaOtO.O O O O O O O O O O O O O O O O O O O³O"
1160 DATA "³O O A A A A A A A A A A O O O O O O O O O O O O O O O O³O"
1170 DATA "ÀOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÄOÙO"