<--  back   Last regenerated: 2017-07-25 18:23:10 kio

zasm - Z80 Assembler – Version 4.0


#target SNA

A ZX Spectrum NMI snapshot file.

The .sna snapshot file describes a ZX Spectrum 48k serving an NMI request. There are also variants for 16k or 128k Speccies, but zasm currently only supports the basic 48k variant. (send email Assembler directives: #if, #elif, #else, #endif
Pseudo instructions: if, endif
if you need the other variants!)

Information on the ZX Spectrum file formats can be found in the ZX Spectrum FAQ which can be found at WOS.

This file consists of a header section which mostly stores the Command Line Options: --z80
Pseudo instructions: .z80, .z180 and .8080
Targets: #target Z80
Z80 registers and a ram dump from location $4000 to $FFFF. This is reproduced in the assembler source file as 2 code sections:

#target sna
Assembler directives: #code
Including C Source Files: #code
#code _HEADER,0,27 ... Assembler directives: #code
Including C Source Files: #code
#code _DATA,0x4000,0xC000 ...

See the zxsp .sna template file: template_sna.asm

The first code segment must be exactly 27 bytes long. zasm will validate some of the bytes stored here.

The start address of the ram segment must be $4000 and the length must be 0xC000 bytes. The ram segment may be split into multiple segments, but they must start at 0x4000 and sum up to a total of 0xC000 bytes. zasm will check this.

The ram contents are written to the file in the uncompressed .sna format. The instruction pointer PC is not stored in the header segment but on the machine stack in ram and will be popped from it as a first action after loading this file into the emulator.

Valid HTML   Valid CSS