File: tap.h

package info (click to toggle)
pasmo 0.5.3-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 828 kB
  • sloc: cpp: 8,508; asm: 3,020; sh: 790; makefile: 114
file content (58 lines) | stat: -rw-r--r-- 964 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef INCLUDE_TAP_H
#define INCLUDE_TAP_H

// tap.h
// Revision 4-dec-2004

#include "pasmotypes.h"

#include <string>


namespace tap {

class CodeHeader {
public:
	CodeHeader (address init, address size, const std::string & filename);
	void write (std::ostream & out) const;
	address size () const { return sizeof (block); }
private:
	byte block [21];
};

class CodeBlock {
public:
	CodeBlock (address sizen, const byte * datan);
	void write (std::ostream & out) const;
	address size () const;
private:
	address datasize;
	const byte * data;
	byte head [3];
	byte check;
};

class BasicHeader {
public:
	BasicHeader (const std::string & basic);
	void write (std::ostream & out) const;
private:
	byte block [21];
};

class BasicBlock {
public:
	BasicBlock (const std::string & basicn);
	void write (std::ostream & out) const;
private:
	const std::string & basic;
	address basicsize;
	byte block [3];
	byte check;
};

} // namespace tap

#endif

// End of tap.h