[Tuto-VB81] Save a screen in a A$ and text format...

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Post Reply
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

[Tuto-VB81] Save a screen in a A$ and text format...

Post by XavSnap »

Hi,

:mrgreen:

What in what ... for what?

An example:
You had to draw a picture on the screen using a A$ variable.
10 LET A$="ABC" and PRINT A$
SAVE "UPRG.TXT" ... Will save you program in text mode.

My program will save a part of screen drawn with Vb81's "EasyDraw" tool...
Put the screen in a A$ variable, and save it to a text file... to be Copy/paste in another program.
This process can be use to draw a graphic title, a graphic bloc or a screen mask.

- Load this attached program. (The asm program copy the screen in the A$ lines)
DRAWA.P
(2.39 KiB) Downloaded 104 times
Cap0136.jpg
Cap0136.jpg (5.7 KiB) Viewed 1167 times
- Draw the selected area with "EasyDraw" (columns can be set, but Y is optional... always 22lines)
Cap0137.jpg
Cap0137.jpg (4.16 KiB) Viewed 1167 times
- Press New-Line.
- Give a name.
... The text file will be put in the same directory... (font "Zx81_Riched" in the "Zx81_Fonts" directory)

Code: Select all

# REM ED__< __E£_7Y+_4 _K7__+ __X4__
     1  REM [HEX:\
2A,29,40,01,13,00,09,EB,\
2A,0C,40,23,3E,15,01,20,\
00,ED,B0,23,EB,01,15,00,\
09,EB,3D,20,F1,C9 ]

    10 PRINT AT 20,1;"lines(Y):"
    11 INPUT L
    12 PRINT AT 20,1;"columns(X):"
    13 INPUT C
    14 DIM A$(21,C)
    15 GOSUB 1000
    16 RAND USR 16514
    20 LET A$(01)=" ²®¶²®¹ ³                       "
    21 LET A$(02)=" ª®¹»ª  ³                       "
    22 LET A$(03)="°²®¸¶¬¶ ³                       "
    23 LET A$(04)="°¹°¯¹±  ³                       "
    24 LET A$(05)=" ±¬ ¸¬¹ ³                       "
    25 LET A$(06)="³³³³³³³³³                       "
    (...)
Recalled text file in Vb81...
Cap0138.jpg
Note:
You also can save the full screen in a text file using the "Save D_File" popup menu, with the ".BAS" argument...


Have Fun !
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Post Reply