]> cloudbase.mooo.com Git - avrcpm.git/blobdiff - avrcpm/cpm/ipl.asm
* More rcall --> lcall changes.
[avrcpm.git] / avrcpm / cpm / ipl.asm
index 4d229f2b741aa82914fe0d4323e17e4f88c0b805..9d50e42a0ca432442d61b5dc205c505f3593970e 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$
+;
+
+cr:    equ     13
+lf:    equ     10
+
+READ_FUNC:  equ        7
+WRITE_FUNC: equ        6
+BOOT_FUNC:  equ 5
+HOME_FUNC:  equ 4
 
-org $2000
+       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
-       
-       call printipl
-
+       ld hl,msgipl
+       call prmsg
 
-       ld b,49
+       ld b,51
        ld de,$0001
        ld hl,$3400+$A800
 loadloop:
@@ -35,7 +45,7 @@ loadloop:
        out (20),a
        ld a,h ;dma H
        out (21),a
-       ld a,1
+       ld a,1<<READ_FUNC
        out (22),a
 
        push bc
@@ -58,17 +68,16 @@ noNextTrack:
 
        jp $4A00+$A800
 
-printipl:
-       ld a,'i'
-       out (2),a
-       ld a,'p'
-       out (2),a
-       ld a,'l'
-       out (2),a
-       ld a,13
-       out (2),a
-       ld a,10
-       out (2),a
-       ret
+prmsg:
+       ld      a,(hl)
+       or      a
+       ret     z
+       out     (2),a
+       inc     hl
+       jp      prmsg
 
-end
\ No newline at end of file
+msgipl:        db      cr,lf
+       db      "ipl"
+       db      0
+       
+end