2 ; Copyright (C) 2010 Sprite_tm
4 ; This program is free software: you can redistribute it and/or modify
5 ; it under the terms of the GNU General Public License as published by
6 ; the Free Software Foundation, either version 3 of the License, or
7 ; (at your option) any later version.
9 ; This program is distributed in the hope that it will be useful,
10 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ; GNU General Public License for more details.
14 ; You should have received a copy of the GNU General Public License
15 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
17 msize: equ 62 ;size of available RAM in k
19 bias: equ (msize-20) * 1024
20 ccp: equ $3400+bias ;base of cpm ccp
21 bdos: equ ccp+$806 ;base of bdos
22 bios: equ ccp+$1600 ;base of bios
23 cdisk: equ $0004 ;current disk number (0 ... 15)
24 iobyte: equ $0003 ;intel iobyte
25 buff: equ $0080 ;default buffer address
26 retry: equ 3 ;max retries on disk i/o before error
32 nsects: equ ($-ccp)/128 ;warm start sector count
56 db msize - (msize/10)*10 + '0' ;modulo doesn't work?
76 ld d,1 ;sektor (0 based)
101 cp 26 ;if sector >= 26 then change tracks
217 ;translate sector bc using table at de, res into hl
235 ;Disk Parameter Header
237 dw trans ;XLT: Address of translation table
238 dw 0 ;000: Scratchpad
239 dw 0 ;000: Scratchpad
240 dw 0 ;000: Scratchpad
241 dw dirbuf ;DIRBUF: Address of a dirbuff scratchpad
242 dw dpb ;DPB: Address of a disk parameter block
243 dw chk ;CSV: Address of scratchpad area for changed disks
244 dw all ;ALV: Address of an allocation info sratchpad
247 dw 26 ;SPT: sectors per track
248 db 3 ;BSH: data allocation block shift factor
249 db 7 ;BLM: Data Allocation Mask
251 dw 242 ;DSM: Disk storage capacity
252 dw 63 ;DRM, no of directory entries
255 dw 16 ;CKS, size of dir check vector
256 dw 2 ;OFF, no of reserved tracks
259 db 0,1,2,3,4,5,6,7,8,9
260 db 10,11,12,13,14,15,16,17,18,19
261 db 19,20,21,22,23,24,25,26