From de713c17dd16b31585e7709ea1f381b89d90bbb0 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Wed, 20 Apr 2016 09:35:47 -0700 Subject: [PATCH] v2 with partial track support --- 0BOOT.S | 30 +++++++++++++++++++++++++++--- DOS33L.S | 37 +++++++++++++++++++++++++++++++++++++ readme.md | 1 + 3 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 DOS33L.S diff --git a/0BOOT.S b/0BOOT.S index df93393..fbfd734 100644 --- a/0BOOT.S +++ b/0BOOT.S @@ -1,5 +1,5 @@ ;bootable zpage seek/read -;copyright (c) Peter Ferrie 2015 +;copyright (c) Peter Ferrie 2015-16 ;thanks to 4am for inspiration and testing ;assemble using ACME !cpu 6502 @@ -8,7 +8,8 @@ tracks = $d1 ;user-defined address = $d1 ;user-defined entry = $d1d1 ;user-defined - version = 1 + sectors = $00 ;user-defined, sectors to load from partial track (increase tracks first) + version = 2 ;memory usage: ;256 bytes ($200-2FF) static table @@ -62,17 +63,35 @@ bne + ;branch always *=$839 jsr preread + lda #>(entry-1) + pha + lda #<(entry-1) + pha + ldx #<((tracks*16)+sectors) + lda #address jmp $bf00 ;DOS 3.3 launcher entrypoint ;build read/seek call-sequence per track - + +!if sectors>0 { + txa + pha + lda #0 { +++ +} pha lda #<(seek-1) pha ;push seek twice for two phases @@ -143,6 +162,11 @@ count inittrk ldx #$f0 +initsec +!if sectors>0 { + !byte $2c + ldx #<(-sectors) +} stx iocb + ldy #dct, 0 +address !byte 0 + !byte 0, 0, 1, 0, 0, $60, 1 +dct !byte 1, $ef, $d8, 0 diff --git a/readme.md b/readme.md index 79031fd..a3afabc 100644 --- a/readme.md +++ b/readme.md @@ -5,5 +5,6 @@ fast bootable Read Track/Sector routine. - full-track read in one revolution - runs entirely from zpage - can load up to 11 complete tracks +- can load up to 12 additional sectors ($0400-bfff) - DOS 3.3 Launcher compatible - requires only 3 pages in memory