Small memory dump program

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
User avatar
1024MAK
Posts: 5101
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Small memory dump program

Post by 1024MAK »

If you have enough RAM, you can define an array. Then copy data (PEEK) from the ZX81 'display file' area of memory into the array.

When you save a BASIC program, variables including arrays are saved. When loading, do not use RUN, instead use GOTO 1. Then the array and the data in it is not lost. The screen data can then be copied (POKEd) back to the 'display file'.

To reduce the amount of memory needed, use a string array and convert the numbers returned by PEEK to characters.

This is only practical if your system has at least 16K RAM.

For more on this, read through chapter 22 and chapters 27 and 28 in the Sinclair ZX81 BASIC Programming manual.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
User avatar
siggi
Posts: 988
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: Small memory dump program

Post by siggi »

zxooner wrote: Wed Sep 05, 2018 12:41 pm Is there any way that the data could be sent to the pc instead of a printer (thaf the 81 thinks is a printer) so the picture can be saved on the pc that way? I've pre-ordered the ZXpand+ and I was wondering if the possibility existed alongside a serial link.
Indeed there is a possibility: ZeddyNet and TNFS :mrgreen:

My Zeddy has a patched rom, which does not have any printer routines inside. Instead it has an interface to external printer drivers in ram.
So I can load a printer driver into ram above 32K, which forwards printed data to
- a normal Sinclair printer
- a Centronics-Printer (via interface cards having e. g. a Z80 PIO)
- a network printer (a PC acting as TNFS server) somewhere in the internet

Usually I use the network printer to "print" into a file on my PC. All usual LPRINT, LLIST, COPY commands then write into a file (via ZeddyNet) on my PC.

Siggi
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
User avatar
zxooner
Posts: 30
Joined: Thu Aug 30, 2018 6:06 pm

Re: Small memory dump program

Post by zxooner »

Thank you for the suggestions! I got a ram pack today and I was hoping to be able to have a bit more of an experiment with things with 16kb under my belt but sadly it's duff as I just get the white screen with it plugged in.

@mrtinb, apologies for hijacking your thread!
low res art for the Public Domain at the ArtBeSassy archive.
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Small memory dump program

Post by mrtinb »

You could start a new.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
zxooner
Posts: 30
Joined: Thu Aug 30, 2018 6:06 pm

Re: Small memory dump program

Post by zxooner »

mrtinb wrote: Thu Sep 06, 2018 7:17 pm You could start a new.
done (-:
low res art for the Public Domain at the ArtBeSassy archive.
Post Reply