X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp-cpm3.git/blobdiff_plain/50f3b8f0cb6ccbdc5c1ea8f916f3d95b197d3d04..40df51aed30ddcd710c7356f8098516c27088392:/cbios/boot.180 diff --git a/cbios/boot.180 b/cbios/boot.180 index 5256539..c0ecc11 100644 --- a/cbios/boot.180 +++ b/cbios/boot.180 @@ -17,10 +17,18 @@ include z180reg.inc -bdos equ 5 - ccpsize equ 0c80h + ; CP/M BDOS Function Interfaces + +resetdsk equ 13 +open equ 15 +read equ 20 +setdma equ 26 +setmulti equ 44 +bdos equ 5 + + if banked tpa$bank equ 1 else @@ -89,21 +97,26 @@ hwini_skip: ?ldccp: ; First time, load the A:CCP.COM file into TPA - call resetdsk + ld c,resetdsk + call bdos xor a ld (ccp$fcb+15),a ; zero extent ld hl,0 ld (fcb$nr),hl ; start at beginning of file ld de,ccp$fcb - call open ; open file containing CCP + ld c,open ; open file containing CCP + call bdos inc a jp z,no$ccp ; error if no file... ld de,0100h - call setdma ; start of TPA + ld c,setdma ; start of TPA + call bdos ld de,128 - call setmulti ; allow up to 16k bytes + ld c,setmulti ; allow up to 16k bytes + call bdos ld de,ccp$fcb - call read ; load the thing + ld c,read ; load the thing + call bdos ; read records ; now, ; copy CCP to bank 0 for reloading ld hl,0100h @@ -119,11 +132,8 @@ ld$1: call ?bnksl ; select extra bank pop af ld (hl),a ; save the byte - inc hl - dec bc ; bump pointer, drop count - ld a,b - or c ; test for done - jp nz,ld$1 + cpi ; bump pointer, drop count + jp pe,ld$1 pop af call ?bnksl ; restore original bank ret @@ -153,30 +163,6 @@ rl$1: ret - ; CP/M BDOS Function Interfaces - -resetdsk: - ld c,13 - jp bdos ; reset disk system - -open: - ld c,15 - jp bdos ; open file control block - -setdma: - ld c,26 - jp bdos ; set data transfer address - -setmulti: - ld c,44 - jp bdos ; set record count - -read: - ld c,20 - jp bdos ; read records - - - ccp$fcb:db 1,'CCP ','COM',0,0,0,0 ds 16 fcb$nr: db 0,0,0