summaryrefslogtreecommitdiff
path: root/spec48.asm
blob: ab714ad003801d5266fe71f676408060c1c0ecba (plain)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
;
; Copyright (C) 2004  Ian Cowburn (ianc@noddybox.demon.co.uk)
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
;
; -------------------------------------------------------------------------
;
; $Id$
;
; -------------------------------------------------------------------------
;
; General purpose header file for the Spectrum 48K for tpasm
;

; ======================================== ULA
;
ULA	equ	0xfe

; ======================================== SCREEN
;
DFILE		equ	0x4000
ATTR		equ	0x5800
DFILE_END	equ	(ATTR-1)
ATTR_END	equ	(PRTBUFF-1)
DFILE_LEN	equ	(ATTR-DFILE)
ATTR_LEN	equ	(PRTBUFF-ATTR)

SCR_W		equ	256
TXT_W		equ	32
SCR_H		equ	192
TXT_H		equ	24

; ======================================== SYSTEM VARIABLES
;
PRTBUFF		equ	23296
SYSVAR		equ	23552
SYSVAR_END	equ	23552

TVFLAG		equ	23612
FRAMES		equ	23672
NMIADD		equ	23728
RAMTOP		equ	23730
P_RAMT		equ	23732


; ======================================== MACROS
;

; Defines a table for screen access
;
; name - label to give table
;
SCRTABLE	macro
		DW	0x4000, 0x4100, 0x4200, 0x4300
		DW	0x4400, 0x4500, 0x4600, 0x4700
		DW	0x4020, 0x4120, 0x4220, 0x4320
		DW	0x4420, 0x4520, 0x4620, 0x4720
		DW	0x4040, 0x4140, 0x4240, 0x4340
		DW	0x4440, 0x4540, 0x4640, 0x4740
		DW	0x4060, 0x4160, 0x4260, 0x4360
		DW	0x4460, 0x4560, 0x4660, 0x4760
		DW	0x4080, 0x4180, 0x4280, 0x4380
		DW	0x4480, 0x4580, 0x4680, 0x4780
		DW	0x40a0, 0x41a0, 0x42a0, 0x43a0
		DW	0x44a0, 0x45a0, 0x46a0, 0x47a0
		DW	0x40c0, 0x41c0, 0x42c0, 0x43c0
		DW	0x44c0, 0x45c0, 0x46c0, 0x47c0
		DW	0x40e0, 0x41e0, 0x42e0, 0x43e0
		DW	0x44e0, 0x45e0, 0x46e0, 0x47e0
		DW	0x4800, 0x4900, 0x4a00, 0x4b00
		DW	0x4c00, 0x4d00, 0x4e00, 0x4f00
		DW	0x4820, 0x4920, 0x4a20, 0x4b20
		DW	0x4c20, 0x4d20, 0x4e20, 0x4f20
		DW	0x4840, 0x4940, 0x4a40, 0x4b40
		DW	0x4c40, 0x4d40, 0x4e40, 0x4f40
		DW	0x4860, 0x4960, 0x4a60, 0x4b60
		DW	0x4c60, 0x4d60, 0x4e60, 0x4f60
		DW	0x4880, 0x4980, 0x4a80, 0x4b80
		DW	0x4c80, 0x4d80, 0x4e80, 0x4f80
		DW	0x48a0, 0x49a0, 0x4aa0, 0x4ba0
		DW	0x4ca0, 0x4da0, 0x4ea0, 0x4fa0
		DW	0x48c0, 0x49c0, 0x4ac0, 0x4bc0
		DW	0x4cc0, 0x4dc0, 0x4ec0, 0x4fc0
		DW	0x48e0, 0x49e0, 0x4ae0, 0x4be0
		DW	0x4ce0, 0x4de0, 0x4ee0, 0x4fe0
		DW	0x5000, 0x5100, 0x5200, 0x5300
		DW	0x5400, 0x5500, 0x5600, 0x5700
		DW	0x5020, 0x5120, 0x5220, 0x5320
		DW	0x5420, 0x5520, 0x5620, 0x5720
		DW	0x5040, 0x5140, 0x5240, 0x5340
		DW	0x5440, 0x5540, 0x5640, 0x5740
		DW	0x5060, 0x5160, 0x5260, 0x5360
		DW	0x5460, 0x5560, 0x5660, 0x5760
		DW	0x5080, 0x5180, 0x5280, 0x5380
		DW	0x5480, 0x5580, 0x5680, 0x5780
		DW	0x50a0, 0x51a0, 0x52a0, 0x53a0
		DW	0x54a0, 0x55a0, 0x56a0, 0x57a0
		DW	0x50c0, 0x51c0, 0x52c0, 0x53c0
		DW	0x54c0, 0x55c0, 0x56c0, 0x57c0
		DW	0x50e0, 0x51e0, 0x52e0, 0x53e0
		DW	0x54e0, 0x55e0, 0x56e0, 0x57e0
		ENDM