 
*  -0_EQU/S                   Apr / 08 / 95
*------------------------------------------
*  Common system EQUate file
*  Fixed address EQUs inn CPU & VDP
 
*  Editor and System equates
*---------------------------
 
*  Use only for entry and exit code
 
CFILE# EQU  >FFA6             FWb equates
VFILF  EQU  >FFAE             VFILL
VSBRF  EQU  >FFB2             VSBR to R0
VMBRF  EQU  >FFB6             Data VMBR
VMBWF  EQU  >FFBA             Data VMBW
 
KSCANF EQU  >FFD0             Enhanced KSCAN
FILENT EQU  >FFCC
FWREG  EQU  >FF7C             Main FW workspace
NAMBUF EQU  >FF62
ESFLAG EQU  >FF60             FW master <esc> flag
CMRET  EQU  >FF5C             FW re-entry pointer
BTLN   EQU  >FF58
QDXFL  EQU  >FF52             QD flag
INDSK  EQU  >FF2C
INCOL  EQU  >FF26             FW color index
QDSAV  EQU  >FF20
EDPRNT EQU  >FF1E             Ed printer name pointer
COLRS  EQU  >FF1C             FW color table
HDFLAG EQU  >FF02
PLDADR EQU  >FEFE
CPUDEL EQU  >FEE2             CPU clock timer
FILCLN EQU  >FEDC             Clear mailbox
VMBWR  EQU  >FED4
VSTRWF EQU  >FEC4
BL2UT  EQU  12
 
FLNBFF EQU  >8322             Start of FILENT buffer
 
USL    EQU  >E9B0             Start of FW (include UL)
HIC    EQU  >E200
 
PAD    EQU  >8300
SCNWS  EQU  >8308             Main workspace for ED
DR#    EQU  >8320             R12 of SCNWS
BUFMWS EQU  >8328             Buffer manager workspace
TBLND  EQU  BUFMWS+2          R1 of BUFMWS
EDBFND EQU  BUFMWS+4          R2 of BUFMWS
FASTVW EQU  >8388             Video driver placed in PAD for speed
DSPACE EQU  >83B6             Fast space data
FLOOPC EQU  >83B8             Fast inner loop
FAC    EQU  >834A
SCLEN  EQU  >8354
SCNAME EQU  >8356
KEYRT  EQU  >8375
TIMER  EQU  >8379
GPLST  EQU  >837C
CRULST EQU  >83D0             Used by DSRlinks
STADDR EQU  >83D2
GPLWS  EQU  >83E0             System equates
SOUND  EQU  >8400
VDPRD  EQU  >8800
VDPWD  EQU  >8C00
VDPWA  EQU  >8C02
VDPID  EQU  >8C04
 
*  General screen equates
*------------------------
 
C24    EQU  24                Normal screen length
LLL    EQU  80                Normal line length
LLLL   EQU  86                Normal line length with line #
 
*  VBank #0  Memory Map
*----------------------
 
FCSRP  EQU  >08F0             Cursor pattern in FW table
VCSRP  EQU  >10F0             Cursor pattern in shifted table
 
****  >0000  -- >0870         Edit/View screen
 
       DORG >0870
 
COMVE  BSS  >76+4             Edit-mode Key-table   (>76)
COMVC  BSS  >76+4             Comd-mode Key-table   (>76)
PBF1   BSS  >100              Sector buffer
PABBUF EQU  PBF1              PAB buffer can overlap PBF1
VDPPAB BSS  >38               PAB
FFSCOD BSS  >22               17 words fast search code
TEXTV  EQU  $                 Text Message storage  to >1000
 
****  >1000 -- >1800          Pattern table ( shifted complete )
 
       DORG >1800
 
CATBF  BSS  >71C              SD Catalog buffer  13 x 20 x 7
CATEX  BSS  >208              Extra page for sub/dirs
CATMAX EQU  $-CATBF/13        Max # entries
RSMSV  BSS  >56+2             RS message line
TMPBF  BSS  >50               SD old file buffer
RSFBUV BSS  >50               RS/FS  storage
SDLBUV BSS  >50               Deleted Line
TABBUV BSS  >C6               9 tabsets  * 22  = 3*>42
PCEBUV BSS  >18               Printer codes - entry         >1800
PCXBUV BSS  >18               Printer codes - exit          >0924
DSKBUV BSS  >06               For DSKx. name                >02d4
PSDBUV BSS  >50               PrintDir device               -----
*-----------------------                                    >23F8
HLPBUV BSS  >280   8*>50      Help screen titles            >0F00
VFLBUV BSS  >280   8*>50      View file pathname list
WFLBUV BSS  >280              Workfile list buffer
PRDBUV BSS  >280              Print device list
HDPBUV BSS  >280              Hard-path list
EDWBUV BSS  >280              Edit-Ring current file list
*                                                           -----
*                                                           >32F8
HLPVO  EQU  >0                Offset reference table
VFLVO  EQU  >2                Into list buffer tables
WFLVO  EQU  >4
PRDVO  EQU  >6
HDPVO  EQU  >8
EDWVO  EQU  >A
 
****  >3BD4 -- >3FF0          Disk buffer (AVPC worst-case pushdown)
 
DSKLIM EQU  >3BD4
 
*  VBank #1 memory map
*---------------------
 
SDIRVS EQU  >0000             SD screen set up at boot
HELPVS EQU  >1000             Help screen
 
*  Color tables in VBank #1
 
COLTB1 EQU  >0A00             Tables between screens
COLTB2 EQU  >0C00
COLTB3 EQU  >1A00
COLTB4 EQU  >1C00
COLTB5 EQU  >1E00
 
*  Pattern table for SD screen & FW storage
 
VB1STO EQU  >2000             Store pattern table and FW  >1FD8
SDPATT EQU  >0C84             SD Pattern table register
EDPATT EQU  >0284             ED
 
*  Color table values for VR3 ( VR10 = 1)
 
COLTM1 EQU  >2F83             TM2 Color tables
COLTM2 EQU  >3783             View mode - single bar at top
COLTM3 EQU  >6F83    >5F      SD directory
COLTM4 EQU  >7783             All blank - for Help & hibits
COLTM5 EQU  >7F83
 
*  VBank 2 memory map
*-----------------------
*  Used for Help storage      8 x 26-line files
 
 
*  VBank #3 layout
*-----------------
 
FSTORV EQU  >0000             Name storage #0
LSTORV EQU  >00A0             Line Table #0 and data
FSTORE EQU  >2000             Name #2
LSTORE EQU  >20A0             Line table #2
LTABL2 EQU  >2000->A0         2 file ring
LTABL4 EQU  >1000->A0         4 file ring
LTABL8 EQU  >0800->A0         8 file ring
 
*  Hi-Mem Buffers
*----------------
 
FILNAM EQU  >A000             FW mailbox also >50
FTLNAM EQU  >A050             Temp file mailbox
 
*  Start of hi-mem code and EY file at >A050
*-----------------------------------------------------
*  Buffer manager, Utilities, Show Directory permanent
*-----------------------------------------------------
*  Entry code temporary only
 
*  Memory references in upper hi-mem
*-------------------------------------
*  Original pattern storage + FW blocK
 
       DORG >E000
 
PSTORE BSS  >800               CPU buffer temp for Char patterns
PTTBLN EQU  $-PSTORE
FSTLEN EQU  >FFD8-PSTORE
 
*  Copy/Paste buffer at end SD code - length >780
 
*  Line Table storage area
*-------------------------------------------------
*  Size limit on LTab+misc >1F60 is VB3 storage
*  TBL is the start of the line table - grows down
 
       DORG >E6A6             >E6E2 - >3C
 
TBL    BSS  2                 >E6A6
MKTBL  BSS  2                 >E6A8
RMRG   BSS  2                 >E6AA
LMRG   BSS  2                 >E6AC
CRNTAB BSS  1                 >E6AE
CRNTBL BSS  1                 >E6AF
EOF    BSS  2                 >E6B0
EOFONS BSS  2                 >E6B2
EOFM1  BSS  2                 >E6B4
FORMO  BSS  4                 >E6B6
TABTP  BSS  16                >E6BA
TABTND EQU  $-1
INDT   BSS  2                 >E6CA
FORMM2 EQU  FORMO-2
PURGED BSS  2                 >E6CC
CHNGED BSS  2                 >E6CE
EDWIDN BSS  2                 >E6D0     ID # for window
SVERGS BSS  16                >E6D2
 
RNFEND EQU $                  Limit for save LTab+Misc
LTABM2 EQU RNFEND-LTABL2
LTABM4 EQU RNFEND-LTABL4
LTABM8 EQU RNFEND-LTABL8
 
       DORG >E6E2             >E762 - >80
 
*  Segment content tables
*------------------------
*  Allow for 32 entries each
*  Ring files use varoius areas
 
TXSEGS BSS >40                Segment max occupancy
TXSEGT BSS >40                Projected (for block copy)
 
*  End marker for ringfile data
 
 
*  Block-inlined VDP code and buffer
*-----------------------------------
*  Use buffer area also for SD
 
       DORG >E762             >F6C6 - >E00 - >164
 
INBLEN EQU  >1FF              # instructions in block
FVLLEN EQU  LLL
 
CVBLOK BSS  2*FVLLEN+2        Inline C2V code
FVBLOK BSS  2*FVLLEN+2        Inlinine VINIT code
RDBLOK BSS  2*INBLEN+2        Inline Vwrite code
WRBLOK BSS  2*INBLEN+2        Inline Vread code
LTBLOK BSS  2*INBLEN+2        Inline line table insert code
BYTVBF BSS  INBLEN+1          CPU buffer for MOVMEM
PBF2C  EQU  BYTVBF            Use same during SD
MSG24  EQU  BYTVBF            4*>56  initial FW message
EVRWSP BSS  >20               Workspace for EVRAM setup
BLOCWS EQU  EVRWSP->20        For block mark code
 
*  Temporaries used by SD - place above PBF2C
*  Assumes BYTVBF block buffer NOT used in SD
 
DREGS  EQU  PBF2C+>100        SD registers
MAXCNT EQU  DREGS+>20         Max # files in DIR
MAXPAG EQU  MAXCNT+2          Max # pages in DIR
PGFTOP EQU  MAXPAG+2          Top of current page
CSRFIL EQU  PGFTOP+2          File # on page under cursor
DVF80  EQU  CSRFIL+2          Current file flag
TEMPF  EQU  DVF80+2           Temp storage
DRBLN  EQU  TEMPF+2           Length word for DRBLN
DRBF   EQU  DRBLN+2           Working line/name  buffer
MFBUF  EQU  DRBF+>50          Name buffer
 
*  CPU Text buffer absolute addresses
*  Buffers could go back to overlapping screen buffer
*----------------------------------------------------
*  Use only after FW stored in VB #1
 
       DORG >F6C6             >F7C8->0102
 
BUFFRS EQU  $
LINBF0 BSS  >56
LINBUF EQU  LINBF0+6
LNBFM1 EQU  LINBUF-1
TEMPM6 BSS  6
TMPBUF BSS  >50
TMPBND EQU  TMPBUF+>4F
SQSBUF BSS  >56
 
ERMBUF EQU  LINBF0            Double duty
ERMBP6 EQU  ERMBUF+6
ERMNP1 EQU  ERMBUF+86         Runs into TMP
 
       DORG >F7C8            >FFD8->810
 
CPUSCN BSS  >810              CPU screen text buffer
CPUSND EQU  $
 
CTXTM6 EQU  CPUSCN+>56        Start of 2nd line
CTEXT  EQU  CPUSCN+>5C        Command entry
CTXTND EQU  CTEXT+>50
 
*  Temp use buffers at top of text buffer
 
REPBM6 EQU  $->AC             >FF2C
REPBUF EQU  REPBM6+6          >FF32
DEVNAM EQU  REPBUF+>50        >FF82 - temp for SD pdev name
REPBND EQU  $-1               >FFD7 - leave 6 more for initial TABs
MGBUF  EQU  REPBM6-LLL
 
 
*  Message pointer table offsets
*-------------------------------
 
VERPT  EQU  0                 Version # pointer
TXTRAN EQU  2                 Block length data
MODEP  EQU  4                 Edit...
MSVPT  EQU  6                 Save File
MLFPT  EQU  8                 Load File
MPFPT  EQU  10                Print file
MLTPT  EQU  12                Load Temp
MSTPT  EQU  14                Save Temp
MDPPT  EQU  16                SDir Print
MQEPT  EQU  18                Quit
MODFP  EQU  20                LF,...
MODLP  EQU  22                Move,..
MODSP  EQU  24                Find,Repl
MFSPT  EQU  26                Find
MRSPT  EQU  28                Replace
MMLPT  EQU  30                Move
MCLPT  EQU  32                Copy
MSLPT  EQU  34                Show
MDLPT  EQU  36                Delete
MPGPT  EQU  38                Save First
IOERP  EQU  40                IO Error
TBFPT  EQU  42                TBFull
MTABP  EQU  44                Tabset select
EMLPT  EQU  46                Marker - enter line
MMTPT  EQU  48                Tabs
CMLPT  EQU  50                Command line entries
RSMSP  EQU  52                RS running msg
HDMPT  EQU  54                Hard path entry
WLDPT  EQU  56                Wildcard entry
PSTPT  EQU  58                Paste
EDTPT  EQU  60                Edit ring
PLWPT  EQU  62                Please wait
 
*  Restart relocatable code
 
       RORG
 
*---------------------------------------------------
 
 
