Blame | Last modification | View Log | Download | RSS feed
;; QEDIT
TXTADDR .EQU $010000 ; text char's address
LSTLINE .EQU $010730 ; last text line address
STLINE .EQU $010780 ; status line char's address
TXTATTR .EQU $010800 ; text attributes address
STLATTR .EQU $010F80 ; status line attributes address
TXTCNT .EQU (STLATTR - TXTATTR)
MAXCOLS .EQU 80 ; max. columuns
COLX .EQU $4B ; V1574
MAXTEXTLEN .EQU $F0
MAXLINES .EQU $FFFD ; max text lines count in one buffer
DEFLTAB .EQU 4 ; default tab value
MINTABVAL .EQU 2
MAXTABVAL .EQU 40
;;DEFCURS .EQU $60 ; default cursor mode
EDEFCURS .EQU $C0 ; default cursor mode edit window
; (blinking underline)
; <7>: blink
; <6>: underline cursor
CDEFCURS .EQU $80 ; default cursor mode command line
; blinking block cursor
; <7>: blink
; <6>: underline cursor
DEFATTR .EQU 0 ; default editor window attribute
DEFSATTR .EQU 1 ; default status line attribute
DEFEATTR .EQU 2 ; default error message attribute
DEFCATTR .EQU 3 ; default command line attribute
DFGATTR .EQU 4 ; disabled flag attribute in s.l.
BNEXT .EQU 0
BPREV .EQU 2
BNDX .EQU 4
BSTART .EQU 5
MAXBUF .EQU 10 ; buffer count (0..9)
CLIPBRD .EQU 10 ; clipboard buffer number
BUFSIZ .EQU (MAXBUF + 1) * 2 ; buffer table size
MAXFNAME .EQU 80 ; filename size
MINPAGE .EQU 16 ; min. # pages to alloc
MINFREE .EQU 64 ; min. # pages to init free list (16k)
; translated keys
KTAB .EQU $29
KCR .EQU $2A
KESC .EQU $2B
KCTLC .EQU $2C
KCTLV .EQU $2D
KCTLX .EQU $2E
; sezione COMMON -- questo permette di includere il file in piu' file
DPQEDT: .SECTION page0, ref_only, common
.ABSOLUTE ;; inizia sempre da $00
.ORG 0x00
pp0 .DW ; M1F49
pp2 .DW ; P052
pp4 .DW ; M364A
pp6 .DW ; M3647
pp8 .DW ; P058
ix0 .DB ; M1F4A
ix2 .DB ; P053
ix4 .DB ; M364B
ix6 .DB ; M3648
ix8 .DB ; P059
xbuf .DB ; P0B0 index of current buffer
pfree .DW ; P00E page pointer to blocks free list
pbuf .DW ; P00D page pointer to start of current buffer
pblk .DB ; P04E long pointer to current block
ppage .DW ; P04F
; these 2 bytes MUST be consecutive !
ixb .DB ; P050 index of current block
bflag .DB ; buffer flag
; <7>: modified
; <6>: ovr mode (default: ins)
; <5>: indent mode
; <4>: valid drive number & buffer name
deftab .DB ; M313C default tab value
ncount .DW ; # total lines count of current buffer
cline .DW ; P038/39 current text line with cursor focus
ccol .DB ; P035 current text column with cursor focus
ecol .DB ; P036 text edit column
srow .DB ; P05A current screen row
scol .DB ; P05B current screen column
ccnt .DB ; P092 # count of chars in current text line
fslct .DB ; M1F48 select text flag mode
nslctl .DB ; M1F4B selected text count
nslcth .DB ; M1F4C
rcnt .DB ; M3649 row counter in edit window
xcol .DB ; P019 text column for check
rclip .DW ; M1F4D/4E selection range in clipboard
rslctl .DB ; M26D7 screen reverse attribute range
rslcth .DB ; M26D8
curs .DW ; P0D1 cursor address in edit window
cursmode .DB ; current cursor mode
; <7>: blink
; <6>: underline cursor
ctmp .DB ; P0FE temp counter (updatew)
ctmp2 .DB ; temp used for manage tab key
keyfg .DB ; a copy of KbdFlag
embit .DB ; save current bit of video ram
edtfg .DB ; editor global flag
; <7>: quit from editor
; <6>: clipboard flag
; <5>: CBM emulation mode
; <1>: cut selection flag
; <0>: flag while indent blanks insertion
stxtp LP ; screen text long pointer
frev .DB ; M2829 flag reverse attribute
sattp LP ; screen attributes long pointer
eattr .DB ; M1583 default editor attribute
slattr .DB ; M111F default status line attribute
seatt .DB ; error message attribute
scatt .DB ; command line attribute
slfg .DB ; status line flag
; <7>: command line mode
; <6>: update whole status line
; <1>: update caps & num only
; <0>: copy of select mode flag for s.l.
sbank .DB ; save bank while setptr/updptr
saveps .DB ; save palette address
cline1 .DW ; update current line in status line
ncount1 .DW ; update total lines in status line
ccol1 .DB ; update column in status line
xbuf1 .DB ; update buffer # in status line
bflag1 .DB ; update buffer flag in status line
fgatt .DB ; disabled indicator attribute in status line
wtmp .DW
; temporary used by editor and for 2 long pointer (6 bytes)
ewtmp .DW ; editor: temp word
ewtmp2 .DW ; editor: temp word
ebtmp .DB ; editor: temp byte
ebtmp2 .DB ; editor: temp byte
lptmp1 .EQU ewtmp
lptmp2 .EQU ewtmp2+1
pb LP ; long pointer used byt cut/paste
pd LP ; long pointer used by cut/paste
bka .DW ; bka & bkb used by cut/past routines
bkb .DW
tstr2 .EQU pb ; temp. string (26 bytes)
; 16 bytes area for temporary usage (used by garbc routine & scroll)
lptc LP ; temp. long pointer
lpte LP ; temp. long pointer
tmp6 .DB ; 10 temp. bytes
tmp7 .DB
tmp8 .DB
tmp9 .DB
tmpa .DB
tmpb .DB
tmpc .DB
tmpd .DB
tmpe .DB
tmpf .DB
lptc1 .EQU tmp6 ; long pointer used by scroll up/down
lpte1 .EQU tmp9 ; long pointer used by scroll up/down
bstart .DS BUFSIZ ; page pointer of start block
bcur .DS BUFSIZ ; page pointer of current block
bndx .DS BUFSIZ ; current block index (low) & buffer flag (high)
bline .DS BUFSIZ ; current edit line
btot .DS BUFSIZ ; total count of edit lines
longp LP ; generic long pointer
fsmode DB ; <7>: cbm fs mode
; <6>: pascal compiler
dbufsiz .DW ; disk buffer size
brksav .DW ; save break level
.RELATIVE
.ENDS