Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2 > #22221
| From | Steve Nickolas <usotsuki@buric.co> |
|---|---|
| Newsgroups | comp.sys.apple2 |
| Subject | Some crude disk image tools |
| Date | 2014-10-24 03:29 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <alpine.DEB.2.02.1410240318230.59485@localhost> (permalink) |
http://3.buric.co/dsktools.dsk.gz These two tools, MAKE.IMAGE and BURN.IMAGE, are written primarily in BASIC and read/write PO disk images of 140K disks. This is perhaps useful for transferring to a high capacity disk to sneakernet to a PC for extraction (read: not very useful). There are 3 short ML routines included in the programs. Here is the first, the block read wedge: 0000- .org $0300 0300- 20 00 BF rentry: jsr $BF00 0303- 80 .byte $80 0304- 11 03 .word @3 0306- 90 04 bcc @1 0308- A9 FF lda #$FF 030A- D0 02 bne @2 030C- A9 00 @1: lda #$00 030E- 85 05 @2: sta $05 0310- 60 rts 0311- 03 @3: .byte $03 0312- 60 .byte $60 0313- 00 80 .word $8000 0315- 00 00 .word $0000 The second has "81" at 303 instead of "80", and does block writes. The third checks for a zeroed block, used by Sparse Mode: 0000- .org $0320 0320- A0 00 entry: ldy #$00 0322- 84 05 sty $05 0324- B9 00 40 @1: lda $4000, y 0327- D0 09 bne @2 0329- B9 00 41 lda $4100, y 032C- D0 04 bne @2 032E- C8 iny 032F- D0 F3 bne @1 0331- 60 rts 0332- C6 05 @2: dec $05 0334- 60 rts An explanation of Sparse Mode: If a block's contents are all $00, it will skip writing the block to a file, and those 512 bytes will not be allocated in the directory, saving disk space. This is useful on a 2-floppy system as you could get some disk images to save despite filesystem overhead. This is the default. as scanning 512 bytes for 0 is time-consuming in BASIC, I wrote a function in ASM to do the work. Apart from the above functions, everything else is written in straight BASIC. -uso.
Back to comp.sys.apple2 | Previous | Next — Next in thread | Find similar | Unroll thread
Some crude disk image tools Steve Nickolas <usotsuki@buric.co> - 2014-10-24 03:29 +0000
Some crude disk image tools Antoine Vignau <antoine.vignau@laposte.net> - 2014-10-24 04:52 -0700
Re: Some crude disk image tools Steve Nickolas <usotsuki@buric.co> - 2014-10-24 13:52 +0000
Re: Some crude disk image tools Antoine Vignau <antoine.vignau@laposte.net> - 2014-10-24 12:05 -0700
csiph-web