X-Git-Url: http://cloudbase.mooo.com/gitweb/avrcpm.git/blobdiff_plain/21c909d111de095a396f08de06b30d666f4ccf9f..28cf89bfbf775cb8cf82c545f9afa68a82259a09:/init.asm diff --git a/init.asm b/init.asm index 374bdd2..f38883e 100644 --- a/init.asm +++ b/init.asm @@ -1,5 +1,4 @@ ; Various functions: init, (RAM) disk, mmc, timer -; This file needs to get split up. ; ; Copyright (C) 2010 Sprite_tm ; Copyright (C) 2010 Leo C. @@ -124,7 +123,7 @@ clr_l: .if BOOTWAIT ldi temp,10 - rcall delay_ms + call delay_ms .endif @@ -141,15 +140,14 @@ clr_l: ramtestw: mov temp,xh eor temp,xl - mem_write - adiw xl,1 + rcall dram_write_pp brcc ramtestw printstring "wait..." ldi temp2,8 ramtestwl: ldi temp,255 - rcall delay_ms + call delay_ms dec temp2 brne ramtestwl @@ -194,8 +192,7 @@ ramtestrok: ldiw x,0 ramfillw: ldi temp,MEMFILL_VAL - mem_write - adiw xl,1 + rcall dram_write_pp brcc ramfillw .endif @@ -226,9 +223,9 @@ boot_ipl2: printnewline printstring "Partinit done." - rcall dsk_cboot ;init (de)blocking buffer + rcall dsk_cboot ;init (de)blocking buffer -; Read first sector of first CP/M partition +; Read first sector of first CP/M partition (ipl) lds xl,hostparttbl+1 lds xh,hostparttbl+2 @@ -236,7 +233,7 @@ boot_ipl2: lds yh,hostparttbl+4 rcall mmcReadSect - rcall dsk_cboot ;init (de)blocking buffer +; rcall dsk_cboot ;init (de)blocking buffer ;First sector of disk or first CP/M partition is in hostbuf. @@ -245,8 +242,7 @@ boot_ipl2: ldiw x,IPLADDR iplwriteloop: ld temp,z+ - mem_write - adiw xl,1 + rcall dram_write_pp cpi zl,low(hostbuf+128) brne iplwriteloop cpi zh,high(hostbuf+128)