Subversion Repositories MB01 Project

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 - 1
;; QEDIT
2
 
3
TXTADDR		.EQU	$010000		; text char's address
4
LSTLINE		.EQU	$010730		; last text line address
5
STLINE		.EQU	$010780		; status line char's address
6
TXTATTR		.EQU	$010800		; text attributes address
7
STLATTR		.EQU	$010F80		; status line attributes address
8
TXTCNT		.EQU	(STLATTR - TXTATTR)
9
MAXCOLS		.EQU	80		; max. columuns
10
COLX		.EQU	$4B		; V1574
11
MAXTEXTLEN	.EQU	$F0
12
MAXLINES	.EQU	$FFFD		; max text lines count in one buffer
13
 
14
DEFLTAB		.EQU	4		; default tab value
15
MINTABVAL	.EQU	2
16
MAXTABVAL	.EQU	40
17
 
18
;;DEFCURS		.EQU	$60		; default cursor mode
19
EDEFCURS	.EQU	$C0		; default cursor mode edit window
20
					; (blinking underline)
21
					; <7>: blink
22
					; <6>: underline cursor
23
CDEFCURS	.EQU	$80		; default cursor mode command line
24
					; blinking block cursor
25
					; <7>: blink
26
					; <6>: underline cursor
27
 
28
DEFATTR		.EQU	0		; default editor window attribute
29
DEFSATTR	.EQU	1		; default status line attribute
30
DEFEATTR	.EQU	2		; default error message attribute
31
DEFCATTR	.EQU	3		; default command line attribute
32
DFGATTR		.EQU	4		; disabled flag attribute in s.l.
33
 
34
BNEXT	.EQU	0
35
BPREV	.EQU	2
36
BNDX	.EQU	4
37
BSTART	.EQU	5
38
 
39
MAXBUF		.EQU	10		; buffer count (0..9)
40
CLIPBRD		.EQU	10		; clipboard buffer number
41
BUFSIZ		.EQU	(MAXBUF + 1) * 2	; buffer table size
42
 
43
MAXFNAME	.EQU	80		; filename size
44
 
45
MINPAGE		.EQU	16		; min. # pages to alloc
46
MINFREE		.EQU	64		; min. # pages to init free list (16k)
47
 
48
; translated keys
49
KTAB		.EQU	$29
50
KCR		.EQU	$2A
51
KESC		.EQU	$2B
52
KCTLC		.EQU	$2C
53
KCTLV		.EQU	$2D
54
KCTLX		.EQU	$2E
55
 
56
; sezione COMMON -- questo permette di includere il file in piu' file
57
 
58
DPQEDT:	.SECTION page0, ref_only, common
59
	.ABSOLUTE		;; inizia sempre da $00
60
	.ORG	0x00
61
 
62
pp0		.DW		; M1F49
63
pp2		.DW		; P052
64
pp4		.DW		; M364A
65
pp6		.DW		; M3647
66
pp8		.DW		; P058
67
 
68
ix0		.DB		; M1F4A
69
ix2		.DB		; P053
70
ix4		.DB		; M364B
71
ix6		.DB		; M3648
72
ix8		.DB		; P059
73
 
74
xbuf		.DB		; P0B0 index of current buffer
75
 
76
pfree		.DW		; P00E page pointer to blocks free list
77
pbuf		.DW		; P00D page pointer to start of current buffer
78
pblk		.DB		; P04E long pointer to current block
79
ppage		.DW		; P04F
80
 
81
; these 2 bytes MUST be consecutive !
82
ixb		.DB		; P050 index of current block
83
bflag		.DB		; buffer flag
84
				; <7>: modified
85
				; <6>: ovr mode (default: ins)
86
				; <5>: indent mode
87
				; <4>: valid drive number & buffer name
88
 
89
deftab		.DB		; M313C default tab value
90
 
91
ncount		.DW		; # total lines count of current buffer
92
cline		.DW		; P038/39 current text line with cursor focus
93
ccol		.DB		; P035 current text column with cursor focus
94
ecol		.DB		; P036 text edit column
95
srow		.DB		; P05A current screen row
96
scol		.DB		; P05B current screen column
97
ccnt		.DB		; P092 # count of chars in current text line
98
fslct		.DB		; M1F48 select text flag mode
99
nslctl		.DB		; M1F4B selected text count
100
nslcth		.DB		; M1F4C
101
rcnt		.DB		; M3649 row counter in edit window
102
xcol		.DB		; P019 text column for check
103
 
104
rclip		.DW		; M1F4D/4E selection range in clipboard
105
rslctl		.DB		; M26D7 screen reverse attribute range
106
rslcth		.DB		; M26D8
107
 
108
curs		.DW		; P0D1 cursor address in edit window
109
 
110
cursmode	.DB		; current cursor mode
111
				; <7>: blink
112
				; <6>: underline cursor
113
 
114
ctmp		.DB		; P0FE temp counter (updatew)
115
ctmp2		.DB		; temp used for manage tab key
116
keyfg		.DB		; a copy of KbdFlag
117
embit		.DB		; save current bit of video ram
118
edtfg		.DB		; editor global flag
119
				; <7>: quit from editor
120
				; <6>: clipboard flag
121
				; <5>: CBM emulation mode
122
				; <1>: cut selection flag
123
				; <0>: flag while indent blanks insertion
124
 
125
stxtp		LP		; screen text long pointer
126
frev		.DB		; M2829 flag reverse attribute
127
sattp		LP		; screen attributes long pointer
128
eattr		.DB		; M1583 default editor attribute
129
slattr		.DB		; M111F default status line attribute
130
seatt		.DB		; error message attribute
131
scatt		.DB		; command line attribute
132
slfg		.DB		; status line flag
133
				; <7>: command line mode
134
				; <6>: update whole status line
135
				; <1>: update caps & num only
136
				; <0>: copy of select mode flag for s.l.
137
 
138
sbank		.DB		; save bank while setptr/updptr
139
saveps		.DB		; save palette address
140
 
141
cline1		.DW		; update current line in status line
142
ncount1		.DW		; update total lines in status line
143
ccol1		.DB		; update column in status line
144
xbuf1		.DB		; update buffer # in status line
145
bflag1		.DB		; update buffer flag in status line
146
fgatt		.DB		; disabled indicator attribute in status line
147
 
148
wtmp		.DW
149
 
150
; temporary used by editor and for 2 long pointer (6 bytes)
151
ewtmp		.DW		; editor: temp word
152
ewtmp2		.DW		; editor: temp word
153
ebtmp		.DB		; editor: temp byte
154
ebtmp2		.DB		; editor: temp byte
155
lptmp1		.EQU	ewtmp
156
lptmp2		.EQU	ewtmp2+1
157
 
158
pb		LP		; long pointer used byt cut/paste
159
pd		LP		; long pointer used by cut/paste
160
bka		.DW		; bka & bkb used by cut/past routines
161
bkb		.DW
162
 
163
tstr2		.EQU	pb	; temp. string (26 bytes)
164
 
165
; 16 bytes area for temporary usage (used by garbc routine & scroll)
166
lptc		LP		; temp. long pointer
167
lpte		LP		; temp. long pointer
168
tmp6		.DB		; 10 temp. bytes
169
tmp7		.DB
170
tmp8		.DB
171
tmp9		.DB
172
tmpa		.DB
173
tmpb		.DB
174
tmpc		.DB
175
tmpd		.DB
176
tmpe		.DB
177
tmpf		.DB
178
 
179
lptc1		.EQU	tmp6	; long pointer used by scroll up/down
180
lpte1		.EQU	tmp9	; long pointer used by scroll up/down
181
 
182
bstart		.DS	BUFSIZ	; page pointer of start block
183
bcur		.DS	BUFSIZ	; page pointer of current block
184
bndx		.DS	BUFSIZ	; current block index (low) & buffer flag (high)
185
bline		.DS	BUFSIZ	; current edit line
186
btot		.DS	BUFSIZ	; total count of edit lines
187
 
188
longp		LP		; generic long pointer
189
fsmode		DB		; <7>: cbm fs mode
190
				; <6>: pascal compiler
191
 
192
dbufsiz		.DW		; disk buffer size
193
brksav		.DW		; save break level
194
 
195
	.RELATIVE
196
	.ENDS