Spectrum tape interface: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 93: Line 93:


=== Data block ===
=== Data block ===
==== Arrays ====
Number and string arrays are stored on tape in the same format as in RAM [http://www.worldofspectrum.org/ZXBasicManual/zxmanchap24.html|] except that the very first byte (the name of the array) is absent. The name of the array stored in the second byte of ''Parameter 1'' in header block.
Number and string arrays are stored on tape in the same format as in RAM [http://www.worldofspectrum.org/ZXBasicManual/zxmanchap24.html|] except that the very first byte (the name of the array) is absent. The name of the array stored in the second byte of ''Parameter 1'' in header block.


Line 142: Line 143:
Note: although the array name is saved, you cannot just ''LOAD "" DATA'', you have to explicitly say where to load: e.g. ''LOAD "" DATA w()'', but you can use any letter regardless of the original name.
Note: although the array name is saved, you cannot just ''LOAD "" DATA'', you have to explicitly say where to load: e.g. ''LOAD "" DATA w()'', but you can use any letter regardless of the original name.


==== BASIC programs ====
Program files are stored as a sequence of lines each stored the same way it is in RAM:
Program files are stored as a sequence of lines each stored the same way it is in RAM:
  Line number[2BE] Length[2] Text[] 0x0D[1]
  Line number[2BE] Length[2] Text[] 0x0D[1]
Note that numeric literals will be stored in both text and binary (text[] 0x0E[1] zxfloat[5]).
Note that numeric literals will be stored in both text and binary (text[] 0x0E[1] zxfloat[5]).


==== CODE, SCREEN$ - bytes ====
Code files are stored as a flat sequence of bytes, in the order they appear in RAM.
Code files are stored as a flat sequence of bytes, in the order they appear in RAM.


[[Category:Native file formats]]
[[Category:Native file formats]]
162

edits

Navigation menu