]> cloudbase.mooo.com Git - avrcpm.git/commitdiff
* cpm/bios.asm:
authorLeo <erbl259-lmu@yahoo.de>
Mon, 16 Aug 2010 12:55:24 +0000 (12:55 +0000)
committerLeo <erbl259-lmu@yahoo.de>
Mon, 16 Aug 2010 12:55:24 +0000 (12:55 +0000)
  - Correct rounding of drm/4. Should do 16 bit.
* cpm/ipl.asm:
  - Bugfix: define cr and lf.
* cpm/Makefile:
  - cpm.bin: Copy (all) 7 sectors from bios.bin.
  - New Target cpmdsk/BIOS.MAC: Convert bios.asm to M80 syntax.

git-svn-id: svn://cu.loc/avr-cpm/trunk@78 57430480-672e-4586-8877-bcf8adbbf3b7

avrcpm/cpm/Makefile
avrcpm/cpm/bios.asm
avrcpm/cpm/ipl.asm

index 80c9ef68d75a4d97f1ebb7aaf82f19e644e12b27..424ae9ea745207d27a9a055474b86138425af38a 100644 (file)
@@ -9,14 +9,17 @@ diskimage: cpm.bin cpmdsk/*
 cpm.bin: ipl.bin bios.bin CPM.SYS
        dd conv=sync bs=128  count=1 if=ipl.bin > cpm.bin
        dd conv=sync bs=128 count=44 if=CPM.SYS >> cpm.bin
-       dd conv=sync bs=128  count=6 if=bios.bin >> cpm.bin
+       dd conv=sync bs=128  count=7 if=bios.bin >> cpm.bin
 
 ipl.bin: ipl.asm
        z80asm ipl.asm -o ipl.bin -lipl.lst
 
 bios.bin: bios.asm
        z80asm bios.asm -o bios.bin -lbios.lst
-
+       
+cpmdsk/BIOS.MAC: bios.asm
+       awk -f z80asm_to_mac.awk bios.asm >cpmdsk/BIOS.MAC
+       
 clean:
        rm -f bios.lst bios.bin
        rm -f ipl.lst ipl.bin
index 1f44c6453d663ef949e746e5b014ceab8f1ff0d3..0ae7932aa028ab0f89b14ed11bcc551844deffeb 100644 (file)
@@ -28,8 +28,8 @@ 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
@@ -154,7 +154,7 @@ boot:
        ld      hl,7
        add     hl,de
        ld      a,(hl)          ;get drm
-       inc     a
+       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
@@ -162,7 +162,7 @@ boot:
        
        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.
index 1f91ef4397752c5c5f18aa9a5053459e10d03db4..9d50e42a0ca432442d61b5dc205c505f3593970e 100644 (file)
 ;    $Id$
 ;
 
-org $2000
-       ; IPL for the CP/M-emu in an AVR. Loads CPM from the 'disk' from
-       ; track 0 sector 2 to track 1 sector 26.
+cr:    equ     13
+lf:    equ     10
 
 READ_FUNC:  equ        7
 WRITE_FUNC: equ        6
 BOOT_FUNC:  equ 5
 HOME_FUNC:  equ 4
 
+       org $2000
+       ; IPL for the CP/M-emu in an AVR. Loads CPM from the 'disk' from
+       ; track 0 sector 2 to track 1 sector 26.
+
        ld sp,$1000
        ld hl,msgipl
        call prmsg