home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / utils / dskbuf / ramdrv5.mac < prev    next >
Text File  |  1994-07-13  |  15KB  |  572 lines

  1.     TITLE    RAMDRIV5.MAC
  2. ;
  3. ;***********************************************************************
  4. ;
  5. ;    RAMDRIV - A program that permits extended memory to function as
  6. ;    a fast disk drive.  This program does not require modification
  7. ;    of the existing BIOS.
  8. ;
  9. ;    Copyright 1982, by
  10. ;    Herbert B. Shore
  11. ;    Department of Physics
  12. ;    San Diego State University
  13. ;    San Diego, CA 92182
  14. ;    (619) 265-6159
  15. ;
  16. ;    Released to the public domain for non-commercial use.
  17. ;
  18. ;    RAMDRIV has been extensively modified by Paul J. Gans.  Changes
  19. ;    are copyright (c) by Paul J. Gans, Department of Chemistry, New
  20. ;    York University, New York, NY  10003 (212) 598-2515
  21. ;
  22. ;    New or modified features include:
  23. ;
  24. ;    For RAMDRIV5:
  25. ;
  26. ;    1.  Code has been converted to Z80 code throughout.
  27. ;    2.  The target assembler is now Microsoft's M80.
  28. ;    3.  The code is now self-loading.  The original RAMLD program is
  29. ;        no longer required.
  30. ;    4.  It is no longer required to have contiguous memory banks of
  31. ;        the same size.  Available memory is controlled by the
  32. ;        BLEN table described below.
  33. ;    5.  Track size is now a variable multiple of 1K and can be
  34. ;        changed through an equate.
  35. ;    6.  The original ALV parameter has been dropped in favor of
  36. ;        TRAKLEN, the number of kilobytes per track.
  37. ;    7.  The DRAM parameter has been dropped.  Extended (bank)
  38. ;        addresses are now contained in the BLEN table.
  39. ;    8.  The program now uses both the directory buffer and the host
  40. ;        buffer in the local BIOS instead of its own buffer.
  41. ;        This requires that the user know the addresses of both
  42. ;        of these buffers in his or her BIOS.  To accomodate
  43. ;        those who choose not to use the BIOS buffers, two DS
  44. ;        definitions are required a few lines after the label
  45. ;        WBOOT1.  The proper spot is commented in the code
  46. ;        below.
  47. ;
  48. ;
  49. ;    INSTALLATION of RAMDRIV5:
  50. ;
  51. ;    RAMDRIV assumes that the user's system has "extra" memory
  52. ;    available beyond the normal 64K maximum directly addressable
  53. ;    in Z80 systems.  This memory may be either "bank select" or
  54. ;    S-100 extended addressing.
  55. ;
  56. ;    RAMDRIV is installed by setting a number of equates and by
  57. ;    properly configuring the BLEN table located near the end of
  58. ;    the code.  After the proper values have been set by equates and
  59. ;    the BLEN table has been set up, the code should be assembled
  60. ;    using M80.  The commands for so doing are:
  61. ;
  62. ;    >M80 =RAMDRIV5/L    <== /L optionally produces a .PRN file
  63. ;    >L80 /P:100,RAMDRIV5,RAMDRIV5/N/E
  64. ;
  65. ;    The equates for DIRBUF and RAMBUF must be set to reflect the
  66. ;    location of these buffers in the user's BIOS.  If this is not
  67. ;    feasible, see the comments at the label WBOOT1.
  68. ;
  69. ;    Equates that must be set are defined and explained below.
  70. ;
  71. ;    In normal use the user must also configure the BLEN table for
  72. ;    his or her system and recompile.  There is one BLEN table entry
  73. ;    for each bank of memory to be used by RAMDRIV.  It is assumed
  74. ;    that each of these banks starts at address 0000 and proceeds
  75. ;    upward to some value without any holes.  It is also assumed that
  76. ;    at least the upper 1K of system memory is global, thus no bank
  77. ;    can exceed 63K.
  78. ;
  79. ;    A BLEN table entry consists of two bytes for each bank of memory
  80. ;    to be used by RAMDRIV.  The first byte is the number of kilo-
  81. ;    bytes available for RAMDRIV in that bank.  This value is placed
  82. ;    into the BLEN table as the value divided by TRAKLEN.  The actual
  83. ;    number of kilobytes of that bank used by RAMDRIV is the integral
  84. ;    part of the division.  For instance a 30K bank of memory would
  85. ;    be indicated to the system as 30/TRAKLEN.
  86. ;
  87. ;    The second byte in the BLEN table entry    is the extended (or 
  88. ;    bank) address byte for that bank of memory.  There is one such 
  89. ;    entry pair for each bank.  The table is terminated by a single 
  90. ;    zero byte.
  91. ;
  92. ;    Thus a system with 20K at a bank addressed as 0DEH and 8K at a
  93. ;    bank addressed as 70H could have a BLEN table as:
  94. ;
  95. ;        BLEN:    DB    20/TRAKLN,0DEH
  96. ;            DB    08/TRAKLN,70H
  97. ;            DB    0
  98. ;
  99. ;    while the same system in which the user wanted to reserve 4K on
  100. ;    the board at 0DEH for some other purpose could have a BLEN table
  101. ;    as:
  102. ;
  103. ;        BLEN:    DB    16/TRAKLN,0DEH
  104. ;            DB    08/TRAKLN,70H
  105. ;            DB    0
  106. ;
  107. ;    
  108. ;************************************************************************
  109. ;
  110. ;  The code and tables in this file will reside in high memory, above the
  111. ;  existing BIOS.  The system is self-loading.  Typing RAMDRIV3 from the
  112. ;  console is sufficient to initiate RAMDRIV3.
  113. ;
  114.     .Z80
  115. ;
  116. FALSE    EQU    0
  117. TRUE    EQU    NOT FALSE
  118. ;
  119. ;  The following equates are system dependent.
  120. ;
  121. ;  DIRBUF:  This is the address of the CP/M directory buffer in the
  122. ;    user's BIOS.  CP/M 2.x systems are required to have such a buffer
  123. ;    available.  The address will vary in different implementations.
  124. ;
  125. ;  RAMBUF:  This is the address of the CP/M host buffer in the user's
  126. ;    BIOS.  In a normal CP/M 2.x system this buffer will be at least 1K
  127. ;    long.  The address will vary in different implementations.
  128. ;
  129. ;  PANEL:  If you have an (IMSAI-type) front panel, set PANEL=TRUE.  The
  130. ;    lights will display the extended address, simulating the LED on the
  131. ;    door of the disk drive.  Flipping switch D0 up will "write protect"
  132. ;    the RAM drive.
  133. ;
  134. ;  RAMDRIV:  Set to a memory location above BIOS.  Less than 1K of
  135. ;    GLOBAL memory is required at this location; i.e. the same block
  136. ;    of memory must be accessible independent of the setting of the ex-
  137. ;    tended address bus or any bank byte.
  138. ;
  139. ;  PRAM:  The extended address of regular program RAM.  Usually this is
  140. ;    00H, but need not be.
  141. ;
  142. ;  XPORT:  The output port that sets the extended address bus or bank
  143. ;    byte.
  144. ;
  145. ;  DNAME:  The alphabetic designation of the RAM drive.
  146. ;
  147. ;  LIGHTS:  The output port for front panel lights.  This is signif-
  148. ;    icant only if PANEL is TRUE.
  149. ;
  150. ;  SWITCH:  The input port for front panel switches.  This is signif-
  151. ;    icant only if PANEL is TRUE.
  152. ;
  153. ;  TRAKLN:  The number of kilobytes per track.  This must be a minimum
  154. ;    of 1K and a maximum no greater than the smallest bank of memory to
  155. ;    be made available to RAMDRIV.  A good value to use is the greatest
  156. ;    common divisor of each of the memory banks to be used by RAMDRIV.
  157. ;
  158. ;  DIRECT:  The number of directory entries permitted on the RAM drive.
  159. ;    The number specified must be a multiple of 32.  I used 32 to leave
  160. ;    the maximum space for program files.
  161. ;
  162.     .Z80
  163. ;
  164. DIRBUF    EQU    0F77FH        ; CP/M BIOS directory buffer address
  165. RAMBUF    EQU    0F7FFH        ; CP/M BIOS host buffer
  166. PANEL    EQU    FALSE        ;IMSAI FRONT PANEL
  167. RAMDRIV    EQU    0FC00H        ;START OF PROGRAM.
  168. PRAM    EQU    00H        ;EXTENDED ADDR. OF MAIN RAM
  169. XPORT    EQU    0FDH        ;PORT TO SET EXT. ADDR.
  170. DNAME    EQU    'C'        ;DRIVE NAME OF RAMDRIV.
  171.     IF    PANEL
  172. LIGHTS    EQU    0FFH        ;FRONT PANEL LIGHTS.
  173. SWITCH    EQU    0FFH        ;FRONT PANEL SWITCHES.
  174.     ENDIF    
  175. TRAKLN    EQU     4        ; kilobytes per track
  176. DIRECT    EQU    32        ;NO. OF DIRECTORY ENTRIES.
  177. ;
  178. ;  These equates will normally not need to be changed.
  179. ;
  180. BDOS    EQU    5
  181. DELCHR    EQU    0E5H        ;DELETED DIRECTORY ENTRY.
  182. DNUMB    EQU    DNAME - 'A'    ;RAMDRIV DRIVE NUMBER
  183. CR    EQU    0DH
  184. LF    EQU    0AH
  185. ;
  186. ;
  187. ;  The code below replaces the original loader code, since that
  188. ;  mechanism will not work on a program compiled under M80.  The
  189. ;  M80 .PHASE commands have been used rather than the original
  190. ;  ORG's.
  191. ;
  192.     LD    DE,SIGNON    ; print signon message from loader
  193.     LD    C,9
  194.     CALL    BDOS
  195. ;
  196.     LD    HL,(0001)    ; check to see if BIOS modified
  197.     INC    HL        ; point to jump vector
  198.     LD    E,(HL)
  199.     INC    HL
  200.     LD    D,(HL)
  201.     EX    DE,HL
  202.     LD    DE,RAMDRIV
  203.     AND    A        ; clear carry
  204.     SBC    HL,DE        ; WBOOT minus RAMDRIV
  205.     JP    C,CONTIN    ; if carry we are OK
  206.     LD    DE,NOWAY
  207.     LD    C,9
  208.     CALL    BDOS
  209.     JP    0
  210. ;
  211. SIGNON:    DB    'RAMDRIV5'
  212.     DB    CR,LF,'$'
  213. NOWAY:    DB    'Cannot load RAMDRIV',CR,LF
  214.     DB    'Cold boot system and try again'
  215.     DB    CR,LF,'$'
  216. ;
  217. CONTIN:    LD    HL,SETUP
  218.     LD    DE,RAMDRIV
  219.     LD    BC,1023
  220.     LDIR
  221.     JP    RAMDRIV
  222. ;
  223.     .PHASE    RAMDRIV
  224. ;
  225. ;  ORIGINAL JUMP TABLE FROM BIOS
  226. ;
  227. WBOOT1:    DS    48
  228. WCK:                ;END OF BIOS TABLE.
  229. ;
  230. CSV:    DS    DIRECT/4    ; this should probably be zero since no
  231. ;                    checking is done
  232. ALV:    DS    72        ; this is allocation vector space which
  233. ;                    must have 1 bit available per block.
  234. ;                    this value corresponds to 576 1K
  235. ;                    blocks.
  236. ;
  237. ;  If the user does not wish to (or cannot) use the directory and host
  238. ;  buffers in the system BIOS, the buffers can alternatively be defined
  239. ;  here.  In this case the following lines should be uncommented and the
  240. ;  corresponding equates above commented.
  241. ;
  242. ;DIRBUF: DS    128        ; directory buffer
  243. ;RAMBUF: DS    128        ; bank communication buffer
  244. ;
  245. ENDTBL:                ;END OF DATA TABLES.
  246. ;
  247.     .DEPHASE
  248. ;
  249. ;  The following code is executed once to set up the RAMDRIV system.  In
  250. ;  order to conserve space it will be overwritten by data buffers during
  251. ;  actual access to RAMDRIV.
  252. ;
  253. ;
  254. SETUP:    
  255. ;
  256.     .PHASE    RAMDRIV
  257. ;
  258. ;  Determine the amount of available RAMDRIV memory
  259. ;
  260.     XOR    A
  261.     LD    C,A
  262.     LD    HL,BLEN        ; RAMDRIV memory table
  263.     LD    DE,0002        ; table entry increment
  264. BCHEK0:    LD    A,(HL)        ; get bank kilobytesa
  265.     OR    A        ; zero means end of table
  266.     JR    Z,BCHEK1
  267.     ADD    A,C        ; accumulate count
  268.     LD    C,A        ; and save it
  269.     ADD    HL,DE        ; point to next BLEN entry
  270.     JR    BCHEK0
  271. ;
  272. BCHEK1:    CP    C        ; is there any ram available at all?
  273.     JR    NZ,RAMOK    ; jump if there is
  274.     LD    DE,NORAM    ; no ram, tell the user
  275.     LD    C,9
  276.     CALL    BDOS
  277.     RET            ; avoid warm boots!
  278. ;
  279. NORAM:    DB    'Cannot activate RAMDRIV.  No available RAM.'
  280.     DB    CR,LF,'$'
  281. ;
  282. RAMOK:    XOR    A        ; clear counter
  283.     LD    B,TRAKLN    ; the count must be multiplied
  284. ;                    by TRAKLN to yeild kilobytes
  285. RAMOK1:    ADD    A,C        ; multiply by repeated adding
  286.     DJNZ    RAMOK1
  287. ;
  288.     DEC    A        ; RAMDRIV kilobytes minus 1
  289.     LD    (DSM),A        ; maximum block number to DPB
  290. ;
  291. ;  MODIFY BIOS JUMP TABLES
  292. ;
  293.     IF    $ LT WCK    ;MAKE SURE THAT WBOOT1 TABLE
  294.     JP    BJUMP        ;WILL NOT OVERWRITE
  295.     ENDIF            ;BJUMP ROUTINE.
  296.     IF    $ LT WCK
  297.     DEFS    WCK - $
  298.     ENDIF    
  299. ;
  300. BJUMP:    LD    HL,(1)        ;GET ADDRESS OF WARM BOOT
  301.     LD    DE,WBOOT1    ;TRANSFER TABLE FROM BIOS UP HERE
  302.     LD    BC,48        ;48 BYTES
  303.     LDIR    
  304.     LD    HL,WBOOT2    ;TRANSFER OUR TABLE TO BIOS
  305.     LD    DE,(0001)
  306.     LD    BC,48
  307.     LDIR    
  308. ;
  309. ;  PRINT MESSAGE AND ASK QUESTION
  310. ;
  311.     LD    DE,QUEST
  312.     LD    C,9        ;PRINT STRING
  313.     CALL    BDOS
  314.     LD    C,1        ;GET CHARACTER
  315.     CALL    BDOS
  316.     RES    5,A        ;CONVERT TO UPPER CASE.
  317.     CP    'Y'
  318.     JP    NZ,QUIT
  319. ;
  320. ;  CLEAR DIRECTORY OF RAMDRIV
  321. ;
  322.     LD    BC,0000        ; directory on track 0 sector 0
  323.     CALL    MAP
  324.     OUT    (XPORT),A
  325.     IF    PANEL
  326.     CPL    
  327.     OUT    (LIGHTS),A    ;TO IMSAI FRONT PANEL
  328.     ENDIF    
  329.     EX    DE,HL        ; HL = base location of directory
  330.     LD    DE,32        ;EVERY 32 BYTES
  331.     LD    B,DIRECT    ;NO. OF ENTRIES.
  332.     LD    A,DELCHR
  333. CLEAR:    LD    (HL),A
  334.     ADD    HL,DE
  335.     DJNZ    CLEAR
  336.     LD    A,PRAM        ;RESET EXT. ADDR.
  337.     OUT    (XPORT),A
  338.     IF    PANEL
  339.     CPL    
  340.     OUT    (LIGHTS),A
  341.     ENDIF    
  342. ;
  343. QUIT:    LD    DE,CRLF
  344.     LD    C,9
  345.     CALL    BDOS
  346.     JP    0        ;BACK TO CP/M.
  347. ;
  348. QUEST:    DB    CR,LF
  349.     DB    'RAMDRIV active on drive ',DNAME
  350.     DB    CR,LF
  351.     DB    'Should directory of drive ',DNAME
  352.     DB    ' be cleared (Y/N)? $'
  353. CRLF:    DB    CR,LF,'$'
  354. ;
  355. ;  NEW TABLE COPIED INTO BIOS
  356. ;
  357. WBOOT2:    JP    WBOOT
  358.     JP    WBOOT1+3
  359.     JP    WBOOT1+6
  360.     JP    WBOOT1+9
  361.     JP    WBOOT1+12
  362.     JP    WBOOT1+15
  363.     JP    WBOOT1+18
  364.     JP    HOME        ;21
  365.     JP    SELDSK        ;24
  366.     JP    SETTRK        ;27
  367.     JP    SETSEC        ;30
  368.     JP    SETDMA        ;33
  369.     JP    READ        ;36
  370.     JP    WRITE        ;39
  371.     JP    WBOOT1+42
  372.     JP    SECTRN        ;45
  373. ;
  374. ;  IMPLEMENT BIOS FUNCTIONS
  375. ;
  376.     IF    $ LT ENDTBL    ;MAKE SURE THAT BIOS
  377.     DEFS    ENDTBL - $    ; FUNCTIONS BEGIN
  378.     ENDIF            ; AFTER TABLES.
  379. ;
  380. WBOOT:    LD    HL,80H        ;SET INITIAL DMA ADDR.
  381.     LD    (DMAADR),HL
  382.     JP    WBOOT1        ;BACK TO BIOS
  383. ;
  384. ;
  385. HOME:    LD    A,(DISK)    ;CHECK DISK NUMBER.
  386.     CP    DNUMB        ;IS IT THE RAMDRIV?
  387.     JP    NZ,WBOOT1+21    ;IF NOT, LET BIOS HANDLE IT.
  388.     LD    A,0        ;SET "TRACK" TO 0
  389.     LD    (XTRAK),A
  390.     RET    
  391. ;
  392. ;
  393. SELDSK:    LD    A,C        ;CHECK REQUESTED DISK,
  394.     LD    (DISK),A
  395.     CP    DNUMB
  396.     JP    NZ,WBOOT1+24
  397.     LD    HL,DPH        ;RETURN DISK PAR. HEADER.
  398.     RET    
  399. ;
  400. ;  DISK PARAMETER HEADER FOR RAMDRIV
  401. ;
  402. DPH:    
  403.     DW    0        ;NO SECTOR TRANSLATION
  404.     DW    0,0,0        ;SCRATCH
  405.     DW    DIRBUF        ;LOC. OF SCRATCHPAD AREA.
  406.     DW    DPB        ;DISK PARAMETER BLOCK
  407.     DW    CSV        ;DIR. CHECK AREA
  408.     DW    ALV        ;ALLOC. VECTOR.
  409. ;
  410. ;  DISK PARAMETER BLOCK
  411. ;
  412. DPB:    
  413.     DW    (1024*TRAKLN)/128    ;SECTORS PER TRACK
  414.     DB    3        ;BSH
  415.     DB    7        ;BLM
  416.     DB    0        ;EXM
  417. DSM:    DW    62        ;MAX BLOCK NO.
  418.     DW    DIRECT-1    ;HIGHEST DIRECT. NO.
  419. ;
  420. AL0    EQU    LOW (0FFH SHL (8-DIRECT/32))
  421. AL1    EQU    0
  422. ;
  423.     DB    AL0,AL1        ;DIRECTORY BLOCKS.
  424. ;
  425. CKS    EQU    0        ;CHECK DIRECT. ENTRIES.
  426. ;
  427.     DW    CKS
  428.     DW    0        ;NO SKIPPED TRACKS.
  429. ;
  430. ;
  431. SETTRK:    LD    A,(DISK)
  432.     CP    DNUMB
  433.     JP    NZ,WBOOT1+27
  434.     LD    A,C        ;TRACK NO.
  435.     LD    (XTRAK),A
  436.     RET    
  437. ;
  438. ;
  439. SETSEC:    LD    A,(DISK)
  440.     CP    DNUMB
  441.     JP    NZ,WBOOT1+30
  442.     LD    (SECTOR),BC
  443.     RET    
  444. ;
  445. ;
  446. SETDMA:    LD    (DMAADR),BC    ;SAVE DMA ADDR. BOTH HERE
  447.     JP    WBOOT1+33    ;AND IN BIOS.
  448. ;
  449. ;
  450. READ:    LD    A,(DISK)
  451.     CP    DNUMB
  452.     JP    NZ,WBOOT1+36
  453.     LD    BC,(SECTOR)    ; but we asssume sector fits in one byte
  454.     LD    A,(XTRAK)    ;SET EXTENDED ADDRESS.
  455.     LD    B,A
  456.     CALL    MAP        ; to compute bank and offset
  457.     OUT    (XPORT),A
  458.     IF    PANEL
  459.     CPL    
  460.     OUT    (LIGHTS),A
  461.     ENDIF    
  462.     EX    DE,HL
  463.     LD    DE,RAMBUF    ;TEMPORARY BUFFER.
  464.     LD    BC,128        ;SECTOR=128 BYTES.
  465.     LDIR    
  466.     LD    A,PRAM        ;RESET ADDR.
  467.     OUT    (XPORT),A
  468.     IF    PANEL
  469.     CPL    
  470.     OUT    (LIGHTS),A
  471.     ENDIF    
  472.     LD    HL,RAMBUF    ;MOVE FROM BUFFER
  473.     LD    DE,(DMAADR)    ; back to main ram
  474.     LD    BC,128
  475.     LDIR    
  476.     XOR    A        ; show no errors
  477.     RET    
  478. ;
  479. ;
  480. WRITE:    LD    A,(DISK)
  481.     CP    DNUMB
  482.     JP    NZ,WBOOT1+39
  483.     IF    PANEL
  484.     IN    A,(SWITCH)    ;CHECK D0 OF FRONT PANEL
  485.     AND    1
  486.     RET    NZ        ;RETURN IF WRITE PROTECT.
  487.     ENDIF    
  488.     LD    HL,(DMAADR)    ;DMA --> BUFFER
  489.     LD    DE,RAMBUF
  490.     LD    BC,128
  491.     LDIR    
  492. ;
  493.     LD    BC,(SECTOR)    ; but we assume sector < 256
  494.     LD    A,(XTRAK)
  495.     LD    B,A
  496.     CALL    MAP
  497.     OUT    (XPORT),A
  498.     IF    PANEL
  499.     CPL    
  500.     OUT    (LIGHTS),A
  501.     ENDIF    
  502.     LD    HL,RAMBUF    ;BUFFER --> RAMDRIV.
  503.     LD    BC,128
  504.     LDIR
  505. ;
  506.     LD    A,PRAM
  507.     OUT    (XPORT),A
  508.     IF    PANEL
  509.     CPL    
  510.     OUT    (LIGHTS),A
  511.     ENDIF    
  512.     XOR    A        ; show no error
  513.     RET    
  514. ;
  515. ;
  516. SECTRN:    LD    A,(DISK)
  517.     CP    DNUMB
  518.     JP    NZ,WBOOT1+45
  519.     LD    H,B
  520.     LD    L,C
  521.     RET    
  522. ;
  523. ;
  524. ;  Subroutine to calculate RAM address and bank
  525. ;
  526. ;    called with  B = track number (starts from 0)
  527. ;             C = sector number (starts from 0)
  528. ;
  529. ;    returns with A = extended address byte
  530. ;            DE = offset into bank for start of sector
  531. ;
  532. MAP:    XOR    A        ; clear A
  533.     LD    A,B        ; track number to A
  534.     LD    DE,2        ; increment for BLEN table
  535.     LD    HL,BLEN
  536. ;
  537. MAP1:    SUB    (HL)        ; subtract bank length in K's
  538.     JR    C,MAP2        ; jump if track in this bank
  539.     ADD    HL,DE        ; point to next BLEN entry
  540.     JR    MAP1        ; repeat till done
  541. ;
  542. MAP2:    ADD    A,(HL)        ; A = relative track number in bank
  543.     RLCA            ; multiply by 4K
  544.     RLCA
  545.     RLCA
  546.     RLCA
  547.     LD    E,D        ; clear E
  548.     LD    D,C        ; multiply sector number by 128
  549.     RR    D
  550.     RR    E
  551.     ADD    A,D        ; add to track starting address
  552.     LD    D,A        ; DE = sector start in bank
  553.     INC    HL
  554.     LD    A,(HL)        ; A = extended (bank) address
  555.     RET
  556. ;
  557. BLEN:    DB    32/TRAKLN,0FFH    ; first bank has 32K at FF
  558.     DB    32/TRAKLN,0FEH    ; second bank has 32K at FE
  559.     DB    04/TRAKLN,001H    ; third bank has 4K at 01
  560.     DB    0        ; end of table
  561. ;
  562. ;  DATA STORAGE AREA
  563. ;
  564. DISK:    DB    0
  565. XTRAK:    DB    0
  566. DMAADR:    DW    80H
  567. SECTOR:    DW    0
  568. ;
  569.     .DEPHASE
  570. ;
  571.     END    
  572.