]> cloudbase.mooo.com Git - avrcpm.git/blobdiff - avrcpm/cpm/bios.asm
Tag for Version 2.0
[avrcpm.git] / avrcpm / cpm / bios.asm
index b5985f7f1852106e3e4f65bb3c682dec7f242cbb..0ae7932aa028ab0f89b14ed11bcc551844deffeb 100644 (file)
 ;
 ;    You should have received a copy of the GNU General Public License
 ;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;
+;    $Id$
+;
 
 msize: equ     62      ;size of available RAM in k
 
 bias:  equ     (msize-20) * 1024 
-ccp:   equ     $3400+bias      ;base of cpm ccp
-bdos:  equ     ccp+$806        ;base of bdos
-bios:  equ     ccp+$1600       ;base of bios
-cdisk: equ     $0004           ;current disk number (0 ... 15)
-iobyte:        equ     $0003           ;intel iobyte
-buff:  equ     $0080           ;default buffer address
+ccp:   equ     3400h+bias      ;base of cpm ccp
+bdos:  equ     ccp+806h        ;base of bdos
+bios:  equ     ccp+1600h       ;base of bios
+cdisk: equ     0004h           ;current disk number (0 ... 15)
+iobyte:        equ     0003h           ;intel iobyte
+buff:  equ     0080h           ;default buffer address
 retry: equ     3               ;max retries on disk i/o before error
 
-cr:    equ     13
-lf:    equ     10
+cr:equ 13
+lf:equ 10
 
 READ_FUNC:  equ        7
 WRITE_FUNC: equ        6
@@ -68,7 +71,7 @@ const:
 
 conin:
        in a,(0)
-       cp $ff
+       cp 0ffh
        jp nz,conin
 
        in a,(1)
@@ -90,7 +93,7 @@ punch:
        ret
 
 reader:
-       ld a,$1F
+       ld a,01Fh
        ret
 
 prmsg:
@@ -116,12 +119,12 @@ prhex:
        ;       fall thru
 
 prhexdigit:
-       and     $0f
+       and     00fh
        cp      10
        jp      c,prd1
-       add     7
+       add     a,7
 prd1:
-       add     '0'
+       add     a,'0'
        ld      c,a
        jp      conout
 
@@ -151,15 +154,15 @@ boot:
        ld      hl,7
        add     hl,de
        ld      a,(hl)          ;get drm
-       inc     a
-       and     $0fc
+       add     3               ;ToDo: this works only up to 252 dir entries
+       and     0fch
        rrca                    ;4 dir entries per sector
        rrca                    ;Number of sectors to init
        push    af
        
        ld      bc,6
        add     hl,bc
-       ld      c,(hl)          ;Start track
+       ld      c,(hl)          ;Start track (= # of reserved tracks)
        push    bc              ;Save track
        
 ; Check, if we have reserved tracks.
@@ -228,7 +231,7 @@ boot0:
        push    de
        ld      hl,dirbuf       ;Clear dirbuf
        ld      c,128
-       ld      a,$E5
+       ld      a,0E5h
 boot_cl:
        ld      (hl),a
        inc     hl
@@ -477,7 +480,7 @@ dpbrd:      dw 32           ;SPT: sectors per track
        db 7            ;BLM: Data Allocation Mask
        db 0            ;Extent mask
        dw 55           ;DSM: Disk storage capacity
-       dw 15           ;DRM, no of directory entries
+       dw 31           ;DRM, no of directory entries
        db 128          ;AL0
        db 0            ;AL1
        dw 0            ;CKS, size of dir check vector