;i/o ports to write to writeLatchHigh = $C081 writeLatchLow = $C080 ;ProDOS defines command = $42 ;ProDOS command unit = $43 ;7=drive 6-4=slot 3-0=not used buflo = $44 ;low address of buffer bufhi = $45 ;hi address of buffer blklo = $46 ;low block blkhi = $47 ;hi block ioerr = $27 ;I/O error code nodev = $28 ;no device connected wperr = $2B ;write protect error ;for relocatable code ioAddressLo = $FA ioAddressHi = $FB tempY = $FC blockHalfCounter = $FD lowLatch = $FE highLatch = $FF knownRts = $FF58 ;autostart ROM next card sloop = $FABA keyboard = $C000 clearKeyboard = $C010 .org $C700 ;code is relocatable ; but set to $c700 for ; readability ;ID bytes for booting and drive detection cpx #$20 ;ID bytes for ProDOS and the ldy #$00 ; Apple Autostart ROM cpx #$03 ; cpx #$3C ;this one for older II's ;check for ESC key and if so, jump to next slot in autostart lda keyboard cmp #$9B bne start jmp sloop ;zero out block numbers and buffer address start: sty buflo sty blklo sty blkhi iny ;set command = 1 for read block sty command jsr knownRts ;jump to known RTS to get our address from the stack tsx lda $0100,x ;this for example would be $C7 in slot 7 sta bufhi ;keep the slot here asl asl asl asl sta unit ;display copyright message ldy #