CPC-POWER :
CPC-SOFTS
(Base de données) -
CPCArchives
(Articles) -
NGServers
(Hébergement)
Accueil
19833 PROGRAMMES
PROTECTIONS
Dumpeurs
9930 commentaires
Liens
Contact
Donations
FORUM
Session end : 12h00m00s
Hide picture Sexe : OFF
Donations 2025 : 761.79 €
19832
© _Shareware_ (
1986
)
 
Disc-Utilities
NOTICE / MANUAL
TXT (3)
NOTICE TEXTE n° 1 (15.45 Ko)
nolist:title "******** DISC-COPY **********" org &230 FDCAD equ &FB7E ;Adresse FDC-Port WTKEY equ &BB18 ;KM WAIT KEY INKEY equ &BB1B ;KM READ KEY POSCUR equ &BB75 ;TXT SET CURSOR DISP equ &BB5A ;Display character ESC equ &FC ;ESCAPE-Taste ;*** Initialisierung call &BB00 ;KM INITIALIZE call &BB4E ;TXT INITIALIZE call INKEY ;Tastenbuffer leeren ld de,MSG000 ;Kopfzeile ausgeben call PRTMSG ld a,&FF ;Fehlermeld. abschalten rst &18 defw ERROFF call RESTRK ;Track 0 einstellen ANFANG ld hl,&0102 call POSCUR ;ab Zeile 2/Spalte 1 ld a,&14 ;Bildschirm loeschen call DISP xor a ;Alle Systemwerte nullen ld (TRC),a ;Track-Counter reset ld (DRB),a ;Drive B vorhanden-Flag ld (DRQ),a ;Quell-Drive ld (DRZ),a ;Ziel-Drive ld hl,MSG002+39 ld (hl),"A" ld a,1 ;Drive B testen rst &18 defw TESTDR cp 1 jp z,STRDTR ld a,1 ld (DRB),a ld de,MSG008 ;Kopiermeldung call PRTMSG ld de,MSG006 ;Frage QUELL-Laufwerk call PRTMSG call INKEY call WTKEY cp ESC:jp z,ABBRUCH and %00000001 xor %00000001 ld (DRQ),a ld hl,MSG005+22 add a,"A" ld (hl),a ld hl,MSG001+40 ld (hl),a ld h,34 ld l,3 push af call POSCUR pop af call DISP ld de,MSG007 ;Frage ZIEL-Laufwerk call PRTMSG call INKEY call WTKEY cp ESC:jp z,ABBRUCH and %00000001 xor %00000001 ld (DRZ),a ld hl,MSG005+44 add a,"A" ld (hl),a ld hl,MSG002+39 ld (hl),a ld h,47 ld l,3 push af call POSCUR pop af call DISP ld a,(DRQ) ld b,a ld a,(DRZ) cp b jr nz,TWODRV xor a ld (DRB),a jr STRDTR TWODRV ld de,MSG005 ;Mess. QUELL/ZIEL-Disk call PRTMSG call INKEY call WTKEY ;Warten auf Taste cp ESC:jp z,ABBRUCH ld de,ERM000 call PRTMSG STRDTR ld hl,DATA ld (MEM),hl ;Memory-Adresse ruecksetz. ld ix,SID ;SID-Zeiger ruecksetzen ld iy,SPT ;SPT- " " ld a,(DRB) and a jr nz,DRB1 STRDTR1 ld de,MSG001 ;Mess.=QUELL-Disk in A call PRTMSG call INKEY ;Tastaturpuffer loeschen call WTKEY ;Warten auf Taste cp ESC:jp z,ABBRUCH ld de,ERM000 ;Fehlermeldung loeschen call PRTMSG DRB1 ld a,(DRQ) rst &18 defw TESTDR and &EE ;Bit 4 und 0 ausblenden cp &20 jr z,LPRDTR ld de,ERM004 ;Keine QUELL-Disk call PRTMSG jr STRDTR1 LPRDTR xor a ld (RWF),a call PRTRMSG ;Track-Message ausgeben ld a,(DRQ) ld e,a ld a,(TRC) ld d,a rst &18 defw SEEKTR ;Track aufsuchen jp nc,ERROR call READID ;Sector-IDs einlesen ld a,(iy+0) ;SPT testen and a jr nz,TRKOK1 call UPIX jr ENDRTR TRKOK1 call PRINTID ld a,(iy+0) ld b,a ;Schleifenzaehler setzen LPRDSC ld hl,(MEM) ;Memory-Adresse push bc call READSEC ;*** SECTOR LESEN *** pop bc jp nc,ERROR ld (MEM),hl ;und speichern call UPIX djnz LPRDSC ENDRTR inc iy ;SPT-Zeiger hochzaehlen ld a,(TRC) ;Track-Counter inc a ;hochzaehlen ld (TRC),a cp 42 jr z,BEGWTR and %00000111 cp 0 ;8 Tracks fertig? jr nz,LPRDTR ;Nein, dann naechster BEGWTR ld hl,DATA ;Anfang Track schreiben ld (MEM),hl ;Memory-Adresse ruecks. ld ix,SID ;SID-Zeiger ruecksetzen ld iy,SPT ;SPT- " " ld a,(TRC) ;Track-Counter ruecksetzen cp 42 jr nz,NOTLST ld b,2 jr STORE NOTLST ld b,8 STORE sub a,b ld (TRC),a STWRTR ld a,(DRB) and a jr nz,DRB2 STWRTR1 ld de,MSG002 ;Mess=ZIEL-Disk call PRTMSG call INKEY ;Clear input-buffer call WTKEY ;Warten auf Taste cp ESC:jp z,ABBRUCH ld de,ERM000 call PRTMSG ;Fehlermessage loeschen DRB2 ld a,(DRZ) rst &18 defw TESTDR and &EE ;Bit 4 und 0 ausblenden jr z,LPWRTR cp &20 jr z,LPWRTR ld de,ERM006 ;Keine Ziel-Disk call PRTMSG jr STWRTR1 LPWRTR ld a,1:ld (RWF),a call PRTRMSG ld a,(DRZ) ld e,a ld a,(TRC) ld d,a rst &18 defw SEEKTR ;Track aufsuchen jp nc,ERROR ld a,(iy+0) and a jr nz,TRKOK2 call UPIX jr ENDWTR TRKOK2 push ix ;Format-Tabelle pop hl ;nach hl call FMTTRK ;*** FORMATIEREN *** jp nc,ERROR ld a,(iy+0) ld b,a ;Schleifenzaehler LPWRSC ld hl,(MEM) ;Memory-Adresse push bc call WRITSEC ;*** SECTOR SCHREIBEN *** pop bc jp nc,ERROR ld (MEM),hl ;und speichern call UPIX djnz LPWRSC ENDWTR inc iy ld a,(TRC) ;Track-Counter inc a ;hochzaehlen ld (TRC),a cp 42 jp z,ENDE and %00000111 cp 0 ;8 Tracks fertig? jr nz,LPWRTR ;Nein, dann naechster ld hl,&010C ;Sector-ID-Liste call POSCUR ;loeschen ld a,&14 call DISP jp STRDTR ;Naechste 8 Tracks lesen ENDE ld de,ERM000 call PRTMSG call RESTRK ld de,MSG999 jr ABBR1 ABBRUCH call RESTRK ld de,ERM999 ABBR1 call PRTMSG call INKEY call WTKEY and %01011111 cp "J" jp z,ANFANG rst 0 RESTRK ld de,0 rst &18 defw SEEKTR ld de,1 rst &18 defw SEEKTR ret PRTRMSG ld a,(TRC) ;Track-message ausgeben call HXTODZ push af srl a:srl a:srl a:srl a ld b,a pop af cp 9:jr nc,NOADJ ADJST add a,6 djnz ADJST NOADJ push af srl a:srl a:srl a:srl a call ASCII ld c,a:ld a,(RWF) and a:ld a,c jr nz,WRT1 ld (RNUM),a jr GON1 WRT1 ld (WNUM),a GON1 pop af and %00001111 call ASCII ld c,a:ld a,(RWF) and a:ld a,c jr nz,WRT2 ld (RNUM+1),a ld de,MSG003 jr GON2 WRT2 ld (WNUM+1),a ld de,MSG004 GON2 jp PRTMSG ASCII cp 10:jr c,NADD add a,7 NADD add a,&30 ret HXTODZ ld c,a ;HEX-Byte in a->BCD in a ld b,0 add a,0 HEXLP ld a,b ret z inc a daa ld b,a ld a,c dec a ld c,a jr HEXLP PRTMSG ld a,(de) ld h,a inc de ld a,(de) ld l,a call POSCUR ;Set cursor auf hl ld a,&12 ;Zeile loeschen call DISP inc de PRT ld a,(de) ;Lade zeichen cp &FF:ret z call DISP inc de:jr PRT READID ld bc,FDCAD ;Sector-IDs des aktuellen ld d,32 ;Tracks lesen und in FMT xor a ;speichern ld (iy),a ;SPT Nullsetzen ld (TMP),iy ;SPT-Zeiger retten ld iy,ERG di AGAIN ld e,%01001010 ;Code Sector-ID lesen call TOFDC ;an FDC ausgeben ld a,(DRQ) ;QUELL-Drive ld e,a call TOFDC ;an FDC ausgeben ld e,7 ;7 Resultate SIDRES in a,(c) cp &D0 jr nz,SIDRES inc c in a,(c) dec c ld (iy),a inc iy dec e jr nz,SIDRES ld a,1 cp (iy-6) jr z,IDERR dec d ;32 SID's gelesen? jr nz,AGAIN ;AGAIN, wenn nicht ei push ix ;SID-Zeiger retten ld iy,ERG ;ERG-Zeiger reset ld b,32 LOOPSID ld a,(iy+3) ld (ix+0),a ld a,(iy+4) ld (ix+1),a ld a,(iy+5) ld (ix+2),a ld a,(iy+6) ld (ix+3),a call VERY call c,UPIX call c,UPIY inc iy:inc iy:inc iy:inc iy:inc iy:inc iy:inc iy djnz LOOPSID pop ix ;SID-Zeiger reset ld iy,(TMP) ;SPT-Zeiger reset ret IDERR ld iy,(TMP) ;SPT auf 0 xor a ld (iy+0),a ret UPIX inc ix:inc ix:inc ix:inc ix:ret UPIY push iy ld iy,(TMP) ld a,(iy) inc a ld (iy),a pop iy ret VERY ld a,32 ;erste SID? sub a,b scf:ret z push ix push bc ld b,a VERLP ld a,(iy+3) ;Track vergleich cp (ix-4) jr nz,ENDVER ld a,(iy+5) ;SID vergleich cp (ix-2) jr nz,ENDVER pop bc pop ix and a:ret ENDVER dec ix:dec ix:dec ix:dec ix djnz VERLP pop bc pop ix scf:ret READSEC ld bc,FDCAD ld e,%01000110 ;Code Sector lesen call TOFDC ;an FDC ausgeben ld a,(DRQ) ;QUELL-Drive ld (DRV),a ;in Akt.Drive call STRTFDC di RDFDC in a,(c) jp p,RDFDC and &20 jr z,FDCEND inc c in a,(c) dec c ld (hl),a inc hl jr RDFDC WRITSEC ld bc,FDCAD ld e,%01000101 ;Code Sector schreiben call TOFDC ;an FDC ausgeben ld a,(DRZ) ;ZIEL-Drive ld (DRV),a ;in Akt.Drive call STRTFDC di WRFDC in a,(c) jp p,WRFDC and &20 jr z,FDCEND ld a,(hl) inc c out (c),a dec c inc hl jr WRFDC FMTTRK ld bc,FDCAD ld e,%01001101 ;Code Track formatieren call TOFDC ;an FDC ausgeben ld a,(DRZ) ;ZIEL-Drive ld e,a call TOFDC ld a,(ix+3) ;Sector-Size ld e,a call TOFDC ld a,(iy+0) ;Sect/Trk ld e,a call TOFDC ld e,&52 ;Gap 3 normal ld a,(iy+0) cp 10 jr c,GAPOK ld e,&35 ;Gap 3 >10 SPT GAPOK call TOFDC ld e,&E5 ;Fuellbyte call TOFDC di FMTFDC in a,(c) jp p,FMTFDC and &20 jr z,FDCEND ld a,(hl) inc c out (c),a dec c inc hl jr FMTFDC FDCEND ld e,7 ;Resultate lesen RDRES in a,(c) cp &D0 jr nz,RDRES inc c in a,(c) dec c dec e jr nz,RDRES ei:scf:ret STRTFDC ld a,(DRV) ;Aktueller Drive ld e,a ;Head+Drive call TOFDC ld a,(ix+0) ld e,a ;Track Nr. call TOFDC ld a,(ix+1) ld e,a ;Head Nr. call TOFDC ld a,(ix+2) ld e,a ;Sector-ID call TOFDC ld a,(ix+3) ld e,a ;Sector-Size call TOFDC ld a,(ix+2) ld e,a ;letzte SID call TOFDC ld e,&11 ;GAP 3 call TOFDC ld e,&FF TOFDC in a,(c) rla:jr nc,TOFDC inc c out (c),e dec c ret PRINTID ld hl,&010C ld a,(TRC) and %00000111 add a,l ld l,a call POSCUR push ix ld a,(iy+0) ;Sec/Trk ld b,a LPID ld a,(ix+2) ;Sector-ID push af srl a:srl a:srl a:srl a call ASCII call DISP pop af and %00001111 call ASCII call DISP ld a,&20 call DISP call UPIX djnz LPID pop ix:ret ERROR bit 5,A jr z,ERR1 ld de,ERM005 ;Datenfehler jr ERREND ERR1 bit 3,A jr z,ERR2 ld de,ERM007 ;Drive not ready jr ERREND ERR2 bit 2,A jr z,ERR3 ld de,ERM003 ;Sector not found jr ERREND ERR3 bit 1,A jr z,ERR4 ld de,ERM002 ;Schreibschutz jr ERREND ERR4 bit 0,A jr z,ERR5 ld de,ERM001 ;nicht formatiert jr ERREND ERR5 ld de,ERM000 ERREND call PRTMSG jp ABBRUCH ;*** Meldungen MSG000 defm 1,1,&04,2,&1C,0,26,26,&1C,1,0,0,&1d,24,24,&18 defm " CHK-Soft " defm "D I S C O 3.00 ",&A4 defm " 1986 C.Hoesle-Kienzlen",&18,&FF MSG001 defm 1,10,"Legen Sie die QUELL-Diskette " defm "in Drive A, und druecken Sie " defm "irgendeine Taste:",&FF MSG002 defm 1,10,"Legen Sie die ZIEL-Diskette " defm "in Drive A, und druecken Sie " defm "irgendeine Taste:",&FF MSG003 defm 1,10,"Track " RNUM defw 0 defm " wird gelesen.....",&FF MSG004 defm 1,10,"Track " WNUM defw 0 defm " wird geschrieben.",&FF MSG005 defm 1,10,"QUELL-Disk in Drive A, ZIEL-Disc " defm "in Drive B legen, dann ENTER druecken:",&FF MSG006 defm 1,10,"Geben Sie an, wo die QUELL-Disc liegen" defm " soll (Drive 'A' oder 'B'): ",&FF MSG007 defm 1,10,"Geben Sie an, wo die ZIEL-Disc liegen" defm " soll (Drive 'A' oder 'B'): ",&FF MSG008 defm 15,3,"Kopieren von Drive ? nach Drive ?",&FF MSG999 defm 1,10,&14,"Diskette erfolgreich kopiert." defm " Noch eine? (J/N):",&FF ;**** Fehlermeldungen ***** ERM000 defm 1,5,&ff ;Fehlermessage loeschen ERM001 defm 1,5,&14,"*** QUELL-Disk ist nicht formatiert ***",7,&FF ERM002 defm 1,5,&14,"*** ZIEL-Disk ist schreibgeschuetzt ***",7,&FF ERM003 defm 1,5,&14,"*** Sector nicht auffindbar ***",7,&FF ERM004 defm 1,5,&14,"*** QUELL-Disk nicht eingelegt, " defm "oder Drive nicht bereit! ***",7,&FF ERM005 defm 1,5,"******** Sector I/O Fehler! *********",7,7,&FF ERM006 defm 1,5,&14,"*** ZIEL-Disk fehlt / ist schreibgeschuetzt, " defm "oder Drive nicht bereit! ***",7,&FF ERM007 defm 1,5,&14,"*** Drive ist nicht bereit / Diskette fehlt! ***",7,&FF ERM999 defm 1,10,&14,&18,"COPY-Programm abgebrochen!",&18 defm " Neuer Versuch? (J/N):",7,&FF ;*** Sprungleiste ERROFF defw &C033:defb 7 FORMAT defw &C042:defb 7 SEEKTR defw &C045:defb 7 TESTDR defw &C048:defb 7 ;***** Variablen TRC defb 0 ;Track-Counter DRV defb 0 ;Aktueller Drive DRB defb 0 ;Drive B vorhanden-Flag DRQ defb 0 ;Quell-Drive DRZ defb 0 ;Ziel-Drive MEM defw 0 ;Memory-Adresse RWF defb 0 ;read/write-flag TMP defw 0 ;Temp.SPT-Zeiger SPT equ $ ;Sectoren/Track ERG equ SPT+8 ;Results READID SID equ ERG+224 ;Track+Sector-IDs/Track DATA equ SID+1024 list:end
NOTICE TEXTE n° 2 (10.72 Ko)
nolist: title "***** CLEANUP *****" org &230 BUFF equ &1000 ;Speicher fuer CAT CAT equ &BC9B ;CAT-Aufrufadresse POSCUR equ &BB75 ;Cursor positionieren CUROFF equ &BB84 ;Cursor sperren CURON equ &BB81 ;Cursor freigeben DISP equ &BB5A ;Zeichen darstellen WTKEY equ &BB18 ;Warten auf Taste INKEY equ &BB1B ;Taste einlesen CR equ &0D ;ENTER BS equ &08 ;BACKSPACE ESC equ &FC ;ESCAPE TAB equ &09 ;TAB-Taste CLR equ &10 ;CLEAR DEL equ &7F ;DELETE BLK equ &20 ;LEER-Taste CUP equ &F0 ;Cursor up CDN equ &F1 ;Cursor down CLT equ &F2 ;Cursor left CRT equ &F3 ;Cursor right ld c,7 ;Disc-ROM initialisieren ld de,&0040 ;untere Grenze ld hl,&ABFF ;obere Grenze call &BCCE ;KL INIT BACK ld iy,&A700 ;pointer auf DISCMEM INIT ld hl,MSGINIT ;Mode, Border, Inks call PRTMSG ;initialisieren ld hl,MSGHDR ;Kopfzeile ausgeben call PRTMSG ld hl,MSGDSK call PRTMSG INIT0 call INKEY call WTKEY cp ESC ret z sub "a" jp m,INIT0 cp 2 jr nc,INIT0 ld (iy+0),a add a,"A" ld (DRV),a INIT1 ld a,&15 ;Bildschirm abschalten call DISP ld de,BUFF call CAT ;Catalog erstellen ld a,6 ;Bildschirm einschalten call DISP call PRTCAT ;Catalog ausgeben ld a,c ;Anzahl Eintraege ld (COUNT),a and a ;auf 0 pruefen jp z,ERROR ld hl,MSGERL call PRTMSG EDIT ld h,2 ;Spalte ld l,5 :Zeile call LOCATE ;Cursor positionieren ld de,BUFF call INKEY ;Tastenpuffer leeren call CURON ;Cursor einschalten WAIT call WTKEY ;auf Taste warten cp ESC jp z,INIT cp CUP jp z,CURUP cp CDN jp z,CURDN cp CLT jp z,CURLFT cp CRT jp z,CURRIT cp CR jp z,CURDN cp BLK jp z,BLANK cp TAB jp z,CURRIT cp CLR jp z,CLEAR cp "X" jp z,MARK cp "x" jp z,MARK cp DEL jp z,DELETE jr WAIT CURUP ld b,1 call DECREM jr WAIT CURDN ld b,1 call INCREM jr WAIT CURLFT ld b,16 call DECREM jr WAIT CURRIT ld b,16 call INCREM jr WAIT MARK ld a,"x" ;Eintrag markieren call DISP ld a,&FE ;Loeschmarkierung ld (de),a ;in Speicher jr CURDN BLANK ld a," " ;Loeschmarkierung call DISP ;entfernen ld a,&FF ld (de),a jr CURDN ;Cursor auf naechste Zle CLEAR ld a," " ;Loeschmarkierung call DISP ;entfernen ld a,BS ;Cursor bleibt call DISP ;in der Zeile ld a,&FF ld (de),a jp WAIT DELETE ld hl,MSGDEL ;Bestaetigung abfragen call PRTMSG call INKEY ;Tastenpuffer leeren DELETE1 call WTKEY ;Warten auf Taste cp ESC jr z,DELESC ;ESC? dann ende cp DEL jr nz,DELETE1 call CUROFF ;Cursor abschalten ld hl,BUFF DELLP ld a,(COUNT) ;Anzahl Eintraege dec a ;-1 ld (COUNT),a jp m,DELEND ;nix mehr da ld a,(hl) ;zu loeschende Files cp &FE ;suchen (=&FE) call z,ERASE ;Eintrag loeschen ld de,14 ;Pointer auf add hl,de ;naechsten Eintrag jr DELLP DELEND ld hl,MSGCLR call PRTMSG jp INIT1 DELESC ld hl,MSGCLR call PRTMSG jp EDIT COUNT defb 0 ;Zaehler Eintraege ERASE push hl ;Pointer auf Filenamen ld b,11 ld de,NAME ;Pointer auf FCB ERALP1 inc hl ;naechstes Zeichen ld a,(hl) ld (de),a ;in FCB uebertragen inc de ;FCB-Pointer erhoehen ld a,4 ;4.letztes Zeichen? cp b jr nz,ERALP1E ;nein, dann weiter ld a,"." ld (de),a ;Punkt einfuegen inc de ;FCB-Pointer erhoehen ERALP1E djnz ERALP1 ;naechstes Zeichen ld b,12 ;laenge Filename ld hl,NAME ;Adresse FCB rst &18 ;CALL ERA defw DELADR pop hl ;Pointer zurueck ret DELADR defw &D493 ;Einsprungadresse ERA defb 7 ;ROM-Nr. NAME defs 12 ;Platz fuer FCB DECREM push hl ;Zeile/Spalte retten ex de,hl ;Pointer nach hl ld de,14 ;Increment setzen and a ;Flags ruecksetzen sbc hl,de ;decrementieren ex de,hl ;pointer wieder nach de pop hl ;Zeile/Spalte zurueck ld a,(de) ;auf Markierung vergl. cp &FE jr c,DECEND ld a,5 ;Tabellenanfang? cp l jr nz,NODEC ;nein, keine Spalte zur. ld l,20 ;Zeile auf Tabellenende ld a,h sub 20 ;1 Spalte zurueck ld h,a inc l NODEC dec l ;Zeile zurueck djnz DECREM ;so oft wie b angibt call LOCATE ;Cursor positionieren ret DECEND ld bc,14 ex de,hl ;pointer nach hl add hl,bc ;zuruecksetzen ex de,hl ;pointer wieder nach de call LOCATE ;Cursor setzen ret INCREM push hl ;Zeile/Spalte retten ex de,hl ;Pointer nach hl ld de,14 ;Increment setzen add hl,de ;incrementieren ex de,hl ;pointer wieder nach de pop hl ;Zeile/Spalte zurueck ld a,(de) ;auf Markierung vergl. cp &FE jr c,INCEND ld a,20 ;Tabellenende? cp l jr nz,NOINC ;nein, keine Spalte weiter ld l,5 ;Zeile auf Tabellenanfang ld a,h add a,20 ;1 Spalte weiter ld h,a dec l NOINC inc l ;Zeile weiter djnz INCREM ;so oft wie b angibt call LOCATE ;Cursor positionieren ret INCEND ld bc,14 ex de,hl ;pointer nach hl xor a sbc hl,bc ;zuruecksetzen ex de,hl ;pointer wieder nach de call LOCATE ;Cursor setzen ret PRTCAT ld b,"0" ld a,(iy+1) ;User aus DISCMEM add a,b ld (USR),a ld hl,MSGCAT call PRTMSG ;Drive und User ausg. ld h,3 ;Spalte setzen ld l,5 ;Zeile setzen ld c,0 ;Zaehler Eintraege ld de,BUFF CATLOOP call PRTMEM ;Einen Eintrag anzeigen ret nz ;<>0=kein weiterer Eintr. inc c ;Zaehler hoch inc l ;Zeile hoch ld a,21 cp l ;Zeile>20? jr nz,CATLOOP ;nein, dann weiter ld a,h add a,20 ;neue Spalte ld h,a ld l,5 ;Zeile = 5 jr CATLOOP PRTMEM call LOCATE ld a,(de) ;Eintrag vorhanden? cp &FF ret nz ;Ende, wenn nicht ld b,11 ;11 Zeichen ausgeben PRTLP inc de ;naechstes Zeichen ld a,(de) ;Zeichen holen call DISP ;ausgeben ld a,4 ;pruefen, cp b ;ob Punkt jr nz,PRTLPE ld a,"." ;Punkt ausgeben call DISP PRTLPE djnz PRTLP inc de ;Zeiger auf Anzahl inc de ;Bytes setzen push bc push hl push de ex de,hl call HEXBCD ld a,"k" call DISP pop de pop hl pop bc inc de ;naechster Eintrag xor a ;Zero-Flag setzen ret LOCATE push hl ;Zeile/Spalte retten call POSCUR ;Cursor setzen pop hl ;Zeile/Spalte zurueck ret PRTMSG ld a,(hl) ;Zeichen laden cp &FF ;vergleich mit &FF ret z ;Ende, wenn = &FF call DISP ;Zeichen ausgeben inc hl ;Pointer hochzaehlen jr PRTMSG ;naechstes Zeichen ERROR ld hl,MSGERR call PRTMSG call WTKEY jp INIT0 ;Umwandlung HEX-BCD; hl muss auf ENDE ;der Hex-Zahl zeigen. HEXBCD ld b,3 ld de,BCD xor a CLRBCD ld (de),a inc de djnz CLRBCD ld c,2 ld de,BCD NXTBYT or (hl) dec hl jr nz,CONVERT dec c jr nz,NXTBYT jr PRTBCD CONVERT scf ROTATE adc a jr nc,ROTATE ex de,hl push de ld d,a jr EVAL NXTHEX ld a,(de) dec de push de scf adc a NXTBIT ld d,a ld e,b NXTBCD ld a,(hl) adc a daa ld (hl),a inc hl dec e jr nz,NXTBCD jr nc,NOCARRY EVAL inc b ld (hl),01 NOCARRY ld hl,BCD ld a,d add a jr nz,NXTBIT pop de dec c jr nz,NXTHEX PRTBCD ld hl,BCD+1 call BCDOUT call BCDOUT dec hl call BCDOUT ld a,"0" rld jp DISP BCDOUT ld a,"0" rld cp "0" jp nz,DISP ld a," " jp DISP BCD defs 3 ;***** MESSAGES ***** MSGINIT defm &04,2,&1C,0,26,26,&1C,1,0,0,&1D,24,24,&FF MSGCAT defm &1F,2,3,"Drive " DRV defm "A, User " USR defm "0:",&1F,1,5,&14,&FF MSGHDR defm &06,&18," CHK-Soft * CLEANUP 1.1 * " defm " ",&A4," 1986 by C.Hoesle-Kienzlen ",&18,&FF MSGDEL defm &1F,2,22,&14," Loeschen durch erneutes 'DEL' bestaetigen " defm "oder mit 'ESC' abbrechen:",&FF MSGERL defm &1F,2,22,&14,"Markieren Sie die zu loeschenden Files" defm " mit 'x' und druecken Sie dann 'DEL'.",&0D,&0A,&0A,&0A defm " Mit 'ESC' koennen Sie die Operation abbrechen.",&FF MSGCLR defm &0D,&12,&FF MSGDSK defm &1F,2,10,"Diskette einlegen, und 'a' oder " defm "'b' fuer gewuenschten Drive druecken:",&0D,&0A,&0A,&0A defm " Sie koennen das Programm mit 'ESC' abbrechen.",&FF MSGERR defm " Keine Eintraege gefunden.",&0D,&0A,&0A defm " Druecken Sie eine Taste...",&FF list:end
NOTICE TEXTE n° 3 (27.42 Ko)
nolist: title "******** DISC-MONITOR 3.0 **********" INKEY equ &BB09 ;KM READ CHAR WTKEY equ &BB18 ;KM WAIT KEY CUROF equ &BB84 ;Cursor aus CURON equ &BB81 ;Cursor ein POSCUR equ &BB75 ;Positioniere Cursor GETCUR equ &BB78 ;Get Cursorposition SETCOL equ &BB6F ;Set Cursor column DISCHR equ &BB5A ;Display Character READCHR equ &BB60 ;Zeichen vom Schirm lesen ESC equ &FC ;ESC-Character OFF equ &A89D ;Adr. Offset fuer CPM SPT equ &A8A0 ;Adr. Anz. Sect./Track BLK1 equ &2000 ;Adresse Block 1 BLK2 equ &2400 ;Adresse Block 2 DIR1 equ &2800 ;Adresse Dir.Buffer DIR2 equ &2C00 ; " " 2.Teil SPNEU equ &4000 ;Anfang Spooler-Bereich ORG &100 ;*** Initialisierung call &BB00 ;KM INITIALIZE call &BB4E ;TXT INITIALIZE ld a,&FF ;Fehlermeldungen aus RST &18 defw ERROFF ld (STPTR),sp ;Stackpointer sichern ld hl,ENDE ld de,&20 ;Zeichen ab SPACE call &BBAB ;ins RAM laden call INKEY ;Clear Input Buffer ld hl,ANFANG ;Print und Screen ld de,SPOOL ;Routinen laden ld bc,ENDE-SPOOL ldir ld hl,SPNEU ;Spooler-Pointer ld (SPINP),hl ;auf Anfangswerte ld (SPOUT),hl ;setzen ld hl,BLK1 ;I/O-Buffer ld (PADR),hl ;und Seiten-Adressen ld (BUFF),hl ;initialisieren ld de,MSG000 ;Kopfzeile ausgeben call PRTMSG INIT ld ix,SID+1 call LOGIN ld a,(ix+0) ld (SEC),a xor a call CALCDTS call PRTDTS jp RDSC ACTION ld de,MSG001:call PRTMSG call INKEY:call BLINK cp ESC:ret z call CUROF:push af ld de,ERM000:call PRTMSG pop af cp &F4:jp z,PAGE1 cp &F5:jp z,PAGE2 cp &F3:jp z,NXTSEC cp &F2:jp z,PRESEC cp &F0:jp z,NXTTRK cp &F1:jp z,PRETRK and %01011111 cp "L":jp z,LESEN cp "E":jp z,EDIT cp "S":jp z,SCHREIB cp "F":jp z,FORMAT cp "R":jp z,REORG cp "I":jp z,INIT cp "D":jp z,DRUCK call PRTDTS jr ACTION PAGE1 ld de,(BUFF) jr DISP PAGE2 ld de,(BUFF) inc d DISP ld (PADR),de call HEXDUMP jp ACTION NXTSEC ld a,(ix+1) and a:jr nz,SECOK1 ld ix,SID+1 ld a,(ix+0) ld (SEC),a jr NXTTRK SECOK1 inc ix ld a,(ix+0) ld (SEC),a jp RDSEC PRESEC ld a,(ix-1) and a:jr nz,SECOK2 ld ix,SID+9 ld a,(ix+0) ld (SEC),a jr PRETRK SECOK2 dec ix ld a,(ix+0) ld (SEC),a jp RDSEC NXTTRK ld a,(TRK):inc a cp 40:jr c,TRKOK1 xor a TRKOK1 ld (TRK),a jp RDSEC PRETRK ld a,(TRK):dec a cp &FF:jr nz,TRKOK2 ld a,39 TRKOK2 ld (TRK),a jp RDSEC LESEN ld de,MSG005:call PRTMSG call GETDTS jp nc,ACTION call LOGIN call SRCHSID call PRTDTS jr RDSC RDSEC call LOGIN ;***SECTOR LESEN *** call PRTDTS call INKEY jp c,ACTION ld a,(ix+0) ld (SEC),a RDSC call READSEC jp PAGE1 READSEC ld a,(DRV):ld e,a ld a,(TRK):ld d,a ld a,(SEC):ld c,a ld hl,(BUFF) rst &18 defw READSC jp nc,ERROR ret SCHREIB ld de,MSG007:call PRTMSG call GETDTS jp nc,ACTION call LOGIN call SRCHSID call PRTDTS ld a,(ix+0) ld (SEC),a call WRITSEC jp ACTION WRITSEC ld a,(DRV):ld e,a ld a,(TRK):ld d,a ld a,(SEC):ld c,a ld hl,(BUFF) rst &18 defw WRITSC jp nc,ERROR ret EDIT ld de,MSG006:call PRTMSG ld bc,&4109 ld de,(PADR) ld hl,&0709 INPUT push hl call POSCUR pop hl:push bc call BLINK:pop bc cp ESC:jp z,ACTION cp &F2:jp z,LINKS cp &F3:jr z,RECHTS cp &F0:jp z,RAUF cp &F1:jr z,RUNTER cp &F4:jp z,SEITE1 cp &F5:jp z,SEITE2 call TSTHEX jr nc,INPUT DISPLAY call DISCHR inc h call TESTBL jr nz,INPUT dec h:ld a,h:dec a call BYTEIN ld (de),a ;Poke in Buffer push hl:push af push bc:pop hl call POSCUR pop af and &7F:cp " " ;ASCII-Ausgabe jr nc,ASCIOK ld a,"." ASCIOK call DISCHR pop hl RECHTS inc h call TESTBL jp nz,INPUT inc h call TESTBL jr nz,REON inc h REON inc b:inc e ld a,h:cp 57 jp c,INPUT ld h,7:ld b,65 inc l:inc c ld a,l:cp 25 jp c,INPUT ld c,9:ld l,9:ld e,0 jp INPUT RUNTER inc l:inc c ld a,e:add a,&10 ld e,a:ld a,l cp 25:jp c,INPUT ld l,9:ld c,9 ld a,e:and &0F ld e,a:jp INPUT LINKS dec h call TESTBL jp nz,INPUT dec h call TESTBL jr nz,LION dec h LION dec e:dec b ld a,h:cp 7 jp nc,INPUT dec l:dec c ld h,55:ld b,80 ld a,l:cp 9 jp nc,INPUT ld l,24:ld c,24 ld e,&FF:jp INPUT RAUF dec l:dec c ld a,e:sub a,&10 ld e,a:ld a,l cp 9:jp nc,INPUT ld l,24:ld c,24 ld a,e:or &F0 ld e,a:jp INPUT SEITE1 ld de,(BUFF) jr DISPGE SEITE2 ld de,(BUFF) inc d DISPGE ld (PADR),de call HEXDUMP ld de,(PADR) ld bc,&4109 ld hl,&0709 jp INPUT TESTBL push hl call POSCUR pop hl call READCHR cp " ":ret FORMAT ld de,MSG008:call PRTMSG call GETFMT jp nc,ENDFMT call DISKMSG jr nc,ENDFMT ld de,MSG008:call PRTMSG ld ix,SID+1 ld a,(DRV):ld e,a ld a,(ix+0) rst &18 defw LDFMTB NXTFMT ld a,(TR1) cp 42:jp nc,ENDFMT ld (TRK),a:inc a:ld (TR1),a call FMTRACK jp nc,ERROR call TRKMSG ld a,(TR1):ld b,a ld a,(TR2) cp b:jp nc,NXTFMT ENDFMT ld a,0:ld (TR1),a:ld (TR2),a ld ix,SID+1 call PRTDTS jp ACTION PRTFMT ld a,(DRV):add a,"A" ld (MSG009+9),a ld a,(TR1) call HXTODZ ld de,MSG009+23 call PUTASC ld a,(TR2) call HXTODZ ld de,MSG009+28 call PUTASC ld iy,SID+1 ld de,MSG009+46 ld b,9 LPPRFM ld a,(iy+0) call PUTASC inc iy:inc de djnz LPPRFM ld de,MSG009 jp PRTMSG DISKMSG ld a,(DRV):add a,"A":ld (MDRV),a ld de,MSG010:call PRTMSG call INKEY:call WTKEY cp ESC:ret TRKMSG ld hl,&1607 call POSCUR ld a,(TR1) call HXTODZ push af rra:rra:rra:rra call PROTR pop af PROTR and &0F call ASCII jp DISCHR GETFMT call PRTFMT ld hl,&0807 call POSCUR ld iy,INTBF+1 call CURON WAITINF ld a,(iy+0) call SETCOL call BLINK cp ESC:ret z cp &F2:jr z,CURLFTF cp &F3:jr z,CURRITF cp &0D:jr z,ENTERF call TSTHEX jr nc,WAITINF DISPINF call DISCHR inc iy ld a,(iy+0) and a jr nz,WAITINF ld iy,INTBF+1 jr WAITINF INTBF DEFM 0,8,22,23,27,28,45,46,48,49 DEFM 51,52,54,55,57,58,60,61,63 DEFM 64,66,67,69,70,0 CURLFTF dec iy ld a,0 cp (iy+0) jr nz,WAITINF ld iy,INTBF+23 jr WAITINF CURRITF inc iy ld a,0 cp (iy+0) jr nz,WAITINF ld iy,INTBF+1 jr WAITINF ENTERF call CUROF ld a,(INTBF+1) call SETCOL call READCHR dec a and %00000011 ld (DRV),a ld a,(INTBF+2) call BYTEIN call DZTOHX ld (TR1),a ld a,(INTBF+4) call BYTEIN call DZTOHX ld (TR2),a ld ix,SID+1 ld iy,INTBF+6 ld b,9 LPGTFM ld a,(iy+0) call BYTEIN ld (ix+0),a inc ix:inc iy:inc iy djnz LPGTFM scf:ret REORG ld de,MSG004:call PRTMSG call DISKMSG jp nc,ENDORG call READDIR ld a,(TR1) call HXTODZ ld de,MSG011+3 call PUTASC ld de,MSG011:call PRTMSG ld a,1 ;*** Blockaustausch *** ld (TR1),a inc a ld (SBL),a ld iy,SBL ld hl,DIR1 FILOOP push hl ld a,(hl) cp &E5:jp z,PUTDIR ld bc,11 inc hl ld de,MSG012+15 ldir ld a,(TR1) call HXTODZ ld de,MSG012+11 call PUTASC ld de,MSG012:call PRTMSG pop hl ld de,16 add hl,de ;Zeiger auf akt. Block ld b,e ;Loopcounter BLKLOOP ld a,(hl) and a jr z,BLKEND2 cp (iy+0) ;vergleich mit SOLL-Block jr z,BLKEND1 ld (IBL),a ;IST-Block speichern push bc ;Loopcounter retten push hl ;IST-Zeiger retten ld hl,BLK1 call READBLK ld hl,DIR1 ld de,16 BLKSRCH ld a,(hl) cp &E5:jr z,BLKFREE ld b,e add hl,de BLKLP ld a,(hl) cp (iy+0):jr z,BLKFND inc hl djnz BLKLP jr BLKSRCH BLKFND push hl ld hl,BLK2 call READBLK ld hl,BLK2 ld a,(IBL) call WRITBLK pop hl ld a,(IBL) ld (hl),a ;Dir IST update BLKFREE ld hl,BLK1 ld a,(SBL) call WRITBLK pop hl ld a,(SBL) ld (hl),a ;Dir SOLL update pop bc BLKEND1 inc (iy+0) BLKEND2 inc hl djnz BLKLOOP ld a,(TR1) ;naechstes File inc a ld (TR1),a jp FILOOP PUTDIR pop hl:xor a ld hl,DIR1 call WRITBLK ld a,1 ld hl,DIR2 call WRITBLK ENDORG xor a:ld (TR1),a ld de,ERM000:call PRTMSG jp INIT READDIR xor a ;DIR einlesen ld (TR1),a ld hl,BLK1 call READBLK ld hl,BLK2 ld a,1 call READBLK ld a,&E5 ld hl,DIR1 ld (hl),a ld de,DIR1 inc e ld bc,&7FF ldir ;DIR-buffer mit &E5 fuellen ld hl,BLK1 ld (LOCA),hl ld a,h:add a,8:ld h,a ld (LOCB),hl CHKFILE ld hl,(LOCA) ld iy,(LOCA) ld a,&E5 cp (iy+0):jr z,NXTFILE xor a cp (iy+12):jr nz,NXTFILE push hl ld de,NAM ld bc,32 ldir ;Filename in NAM pop hl LODFILE ld de,(LOCB) ld bc,32 ldir ;Filename in DIR-Buffer ld (LOCB),de ld a,(TR1):inc a:ld (TR1),a ld a,&E5 ld (iy+0),a ;Eintrag geloescht ld a,&80 ;Pruefen auf Extent cp (iy+15):jr nz,NXTFILE ld iy,BLK1 ld ix,NAM inc (ix+12) ;EXT-Nr. hochzaehlen FINDEXT ld b,13 push iy FINDLP ld a,(ix+0) cp (iy+0):jr nz,ENDFIND inc ix:inc iy djnz FINDLP pop hl:push hl:pop iy jr LODFILE ENDFIND pop hl ld de,32 add hl,de push hl:pop iy ld de,DIR1 and a sbc hl,de jr z,NXTFILE ld ix,NAM jr FINDEXT NXTFILE ld hl,(LOCA) ld de,32 add hl,de ld (LOCA),hl ld de,DIR1 and a sbc hl,de jp nz,CHKFILE scf:ret READBLK ld (BUFF),hl call CALCDTS call READSEC ld a,(SEC) inc a ld (SEC),a and &0F ld b,a call LDSPT cp b jr nc,RDNXTSC ld a,(SEC) and &F0 or 1 ld (SEC),a ld a,(TRK) inc a ld (TRK),a RDNXTSC ld hl,(BUFF) inc h:inc h ld (BUFF),hl call READSEC ld hl,BLK1 ld (BUFF),hl scf:ret WRITBLK ld (BUFF),hl call CALCDTS call WRITSEC ld a,(SEC) inc a ld (SEC),a and &0F ld b,a call LDSPT cp b jr nc,WRNXTSC ld a,(SEC):and &F0 or 1:ld (SEC),a ld a,(TRK):inc a:ld (TRK),a WRNXTSC ld hl,(BUFF) inc h:inc h ld (BUFF),hl call WRITSEC ld hl,BLK1 ld (BUFF),hl scf:ret DRUCK ld a,(MSG013+9);pruefen ob Spooler voll cp "8":jr nz,PRBOK ld de,ERM007:call PRTMSG jp ACTION PRBOK ld de,(SPINP) ld hl,MSG002+2 call PLOOP1 ld hl,MSG003+4 call PLOOP1 ld hl,BLK1 ld c,32 PLINE ld b,&10 push hl call PRADR call LEER PNXTHEX ld a,b and %00000011 call z,LEER ld a,(hl) call PUTASC call LEER inc hl djnz PNXTHEX pop hl call LEER:call PRADR call LEER:call LEER ld b,&10 PNXTASC ld a,(hl) call PASC inc hl djnz PNXTASC call CRLF dec c jr nz,PLINE ld a,&0C ;FF als Ende-Markierung ld (de),a ;des Blocks setzen inc de:ld (SPINP),de ld a,(SPIFLG):inc a:cp 8:jr nz,NOIEND ld hl,SPNEU:ld (SPINP),hl:xor a NOIEND ld (SPIFLG),a ld a,(MSG013+9);Spool-Nr. hochsetzen inc a:ld (MSG013+9),a cp "1":call z,TICKADD ld de,MSG013:call PRTMSG jp ACTION PRADR ld a,h:and &0F:call PUTASC:ld a,l:jp PUTASC LEER ld a,' ':ld (de),a:inc de:ret PASC and &7F:cp ' ':jr nc,OKASC ld a,'.' OKASC ld (de),a:inc de:ret PLOOP1 ld a,(hl) cp ' ':jr c,PEND1 cp &7F:jr nc,PEND1 ld (de),a inc hl:inc de jr PLOOP1 PEND1 call CRLF:ld (de),a inc de:ret CRLF ld a,&0D:ld (de),a:inc de:ld a,&0A:ld (de),a:inc de:ret TICKADD ld hl,SPOOL ;Adresse Tickerblock ld de,1 ;Tick-Count ld bc,1 ;Reload-Count jp &BCE9 ;KL ADD TICKER HEXDUMP call CUROF di:ld a,8 ld de,MSG003 ld (de),a call PRTMSG ld hl,&C280 ;Adresse Schirm ld (SCR),hl ;fuer Turboscreen ld hl,(PADR) ;HL=Anfangsadresse ld c,16 ZEILE ld b,&10 push hl call PRAD:call BLANK NEXTHEX ld a,b and %00000011 call z,BLANK ld a,(hl) call PRHEX:call BLANK inc hl djnz NEXTHEX pop hl call BLANK:call PRAD call BLANK:call BLANK ld b,&10 NEXTASC ld a,(hl) ;ASCII-Ausgabe and &7F:cp ' ' jr nc,ASCOK ld a,'.' ASCOK call SCREEN inc hl djnz NEXTASC dec c jr nz,ZEILE ld a,25 ld de,MSG003 ld (de),a ei:jp PRTMSG PRAD ld a,h ;Ausgabe Hexadresse and &0F call PRHEX ld a,l PRHEX push af rra:rra:rra:rra call PROUT pop af PROUT and &0F:call ASCII jp SCREEN BLANK push hl:ld hl,(SCR):inc hl:ld (SCR),hl:pop hl:ret ASCII cp 10:jr c,NADD add a,7 NADD add a,&30:ret GETDTS ld hl,&0807:call POSCUR ld iy,INTAB+1:call CURON WAITIN ld a,(iy+0):call SETCOL call BLINK cp ESC:ret z cp &F2:jr z,CURLFT cp &F3:jr z,CURRIT cp &0D:jr z,ENTER call TSTHEX jr nc,WAITIN DISPIN call DISCHR ld a,18 cp (iy+0):jr z,BLKIN ld a,19 cp (iy+0):jr nz,NOBLK BLKIN ld hl,FLG set 0,(hl) NOBLK inc iy ld a,(iy+0) and a jr nz,WAITIN ld iy,INTAB+1 jr WAITIN INTAB DEFM 0,8,18,19,29,30,41,42,0 CURLFT dec iy ld a,0 cp (iy+0) jr nz,WAITIN ld iy,INTAB+7 jr WAITIN CURRIT inc iy ld a,0 cp (iy+0) jr nz,WAITIN ld iy,INTAB+1 jr WAITIN ENTER call CUROF ld a,(INTAB+1) call SETCOL call READCHR dec a and %00000011 ld (DRV),a ld a,(INTAB+2) call BYTEIN ld hl,FLG bit 0,(hl) jp nz,CALCDTS ld a,(INTAB+4) call BYTEIN call DZTOHX ld (TRK),a ld a,(INTAB+6) call BYTEIN ld (SEC),a scf:ret BYTEIN push bc:push hl:push af call GETCHR sla a:sla a:sla a:sla a ld b,a pop af inc a call GETCHR or b pop hl:pop bc:ret GETCHR call SETCOL call READCHR cp ":" jr c,CHROK sub a,7 CHROK sub a,&30 ret HXTODZ ld c,a ;HEX nach BCD ld b,0:add a,0 HEXLP ld a,b:ret z inc a:daa ld b,a:ld a,c dec a:ld c,a jr HEXLP DZTOHX ld b,a ;BCD nach HEX and &0F:ld c,a ld a,b:sub c rrca:rrca add a,b:add a,c rra:ret TSTHEX cp "0":jr c,NOHEX cp ":":ret c and %01011111 cp "A":jr c,NOHEX cp "G":ret c NOHEX and a:ret SRCHSID ld a,(SEC) ld bc,9:ld hl,SID+1 cpir jr z,FOUND ld a,%00000100 jp ERROR FOUND dec hl:push hl:pop ix scf:ret CALCDTS ld hl,FLG res 0,(hl):ld (BLK),a ld h,0:ld l,a:add hl,hl call LDSPT ld d,0:ld e,a:xor a MINUS sbc hl,de:jr c,MINEND inc a:jr MINUS MINEND adc hl,de:ld b,a call LDOFF add a,b:ld (TRK),a ld a,(SEC):and &F0 ld b,a:ld a,l and &0F:or b ld (SEC),a:scf:ret CALCBLK xor a:ld (BLK),a call LDOFF ld b,a:ld a,(TRK) cp b:ret c ld hl,0:ld de,0 sub b:jr z,NOMULT ld b,a call LDSPT ld e,a BLMULT add hl,de djnz BLMULT NOMULT ld a,(ix+0) and &0f:dec a ld e,a:add hl,de srl h:rr l:ld a,l ld (BLK),a:ret LDSPT push iy ld iy,SPT jr LDOFF1 LDOFF push iy ld iy,OFF LDOFF1 ld a,(DRV) and a jr nz,DRVB ld a,(iy+0) pop iy:ret DRVB ld a,(iy+&40) pop iy:ret PRTDTS ld a,(DRV) add a,&41 ld (MSG002+9),a call CALCBLK ld a,(BLK) ld de,MSG002+19 call PUTASC ld a,(TRK) call HXTODZ ld de,MSG002+30 call PUTASC ld a,(SEC) ld de,MSG002+42 call PUTASC ld de,MSG002 call PRTMSG ld de,MSG013 jp PRTMSG PUTASC push af ;Lade (de) und (de+1) mit ASCII in a srl a:srl a:srl a:srl a call ASCII:ld (de),a inc de:pop af and &0F:call ASCII ld (de),a:inc de:ret FMTRACK ld a,(DRV):ld e,a ld a,(TRK):ld d,a ld ix,SID+1 ld a,(ix+0) and &C0 ld c,a ;C mit Format laden ld b,9 ld hl,FMTAB ;Formatierungs-Tabelle LPFMT ld (hl),d ;mit Angaben versehen inc hl:inc hl ld a,(ix+0) ld (hl),a inc hl:inc hl inc ix djnz LPFMT ld hl,FMTAB rst &18 defw FMTTRK ;*** FORMATIEREN *** jp nc,ERROR ret LOGIN ld a,(DRV) rst &18 defw TESTDR jr c,DRVOK ld a,(&BE4C) ;Statusregister 0 abfragen cp &48:jr nz,DRVOK ld a,%00001000 jp ERROR DRVOK ld a,(TRK) cp 42:jr c,TRKOK ld a,%00010000 jp ERROR TRKOK ld d,a ld a,(DRV):ld e,a rst &18 defw SEEKTR jp nc,ERROR READID ld bc,&FB7E ;Sector-IDs des aktuellen ld d,9 ;Tracks lesen und in SID push ix ;speichern ld ix,SID+1 ld iy,ERG di AGAIN ld e,%01001010 ;Code Sector-ID lesen call TOFDC ;an FDC ausgeben ld a,(DRV) ld e,a call TOFDC ;an FDC ausgeben ld e,7 ;7 Resultate RESRD in a,(c) cp &D0:jr nz,RESRD inc c:in a,(c):dec c ld (iy+0),a ;speichern in ERG inc iy dec e:jr nz,RESRD ld iy,ERG ld a,(iy+0) ;SR0 testen and %10011000 jr nz,RESERR ld a,(iy+5) ;SID speichern ld (ix+0),a inc ix dec d ;9 Sectoren gelesen? jr nz,AGAIN ;AGAIN, wenn nicht ei call SORTSID pop ix ld a,(DRV):ld e,a ld a,(SID+2) rst &18 defw LDFMTB ret TOFDC in a,(c) add a,a:jr nc,TOFDC inc c:out (c),e:dec c ret RESERR ei:pop ix jp ERROR SORTSID ld ix,SID+1 ld c,0:ld b,8 PASS1 ld a,(ix+0) cp (ix+1) jr c,NOCHG jr z,NOCHG ld d,(ix+1) jr nz,NOZERO ld d,0 NOZERO ld (ix+0),d ld (ix+1),a ld c,1 NOCHG inc ix djnz PASS1 dec c jr z,SORTSID ret ERROR bit 5,a:jr z,ERR0 ld de,ERM006 ;Datenfehler jr ERREND ERR0 bit 4,a:jr z,ERR1 ld de,ERM005 ;falscher Track jr ERREND ERR1 bit 3,a:jr z,ERR2 ld de,ERM004 ;Drive not ready jr ERREND ERR2 bit 2,a:jr z,ERR3 ld de,ERM003 ;Sector not found jr ERREND ERR3 bit 1,a:jr z,ERR4 ld de,ERM002 ;Schreibschutz jr ERREND ERR4 bit 0,a:jr z,ERR5 ld de,ERM001 ;nicht formatiert jr ERREND ERR5 ld de,ERM008 ERREND call PRTMSG call PRTDTS ld sp,(STPTR) jp ACTION BLINK ld c,10 call CURON CURLP1 ld b,&FF CURLP2 call INKEY ret c djnz CURLP2 dec c jr nz,CURLP1 ld c,10 call CUROF CURLP3 ld b,&FF CURLP4 call INKEY ret c djnz CURLP4 dec c jr nz,CURLP3 jr BLINK ;*** Meldungen MSG000 defm 1,1,4,2,&1C,0,26,26,&1C,1,0,0,&1D,24,24 defm &18," CHK-Soft " defm " D I M O 3.0 ",&A4 defm " 1986 C.Hoesle-Kienzlen",&18,&FF MSG001 defm 5,1," Aktion (D,E,F,I,L,R,S) ?",8,&FF MSG002 defm 7,1," Drive A ù Block 00 ù Track 00 ù Sector 00",&FF MSG003 defm 8,1,&14,&18," 0 1 2 3 4 5 6 7 " defm " 8 9 A B C D E F ASCII ",&18,&FF MSG004 defm 3,1,&18," Disketten-Reorganisation ",&18,&FF MSG005 defm 5,1,&18," Sector lesen ",&18,&FF MSG006 defm 5,1,&18," Sector-Buffer editieren ",&18,&FF MSG007 defm 5,1,&18," Sector schreiben ",&18,&FF MSG008 defm 5,1,&18," Track formatieren ",&18,&FF MSG009 defm 7,1," Drive A ù von Track 00 - 00 ù Sector ID's: " MFSI defs 30,&20 defb &FF MSG010 defm 5,1,"Legen Sie die Diskette in Drive " MDRV defm "A und druecken Sie eine Taste:",&FF MSG011 defm 5,1," 00 Eintraege gefunden.",&FF MSG012 defm 7,1," Eintrag 00 >xxxxxxxxxxx< wird bearbeitet.",&FF ;*** Fehlermeldungen ERM000 defm 3,1,&1F,1,5,&12,&FF ERM001 defm 3,1,"*** Track ist nicht formatiert ***",7,&FF ERM002 defm 3,1,"*** Diskette ist schreibgeschuetzt ***",7,&FF ERM003 defm 3,1,"*** Sector nicht auffindbar ***",7,&FF ERM004 defm 3,1,"*** Drive ist nicht bereit " defm "oder enthaelt keine Diskette! ***",7,&FF ERM005 defm 3,1,"*** Track nicht auffindbar ***",7,&FF ERM006 defm 3,1,7,"******** Sector ist defekt! *********",7,&FF ERM007 defm 3,1,7,"*** Drucker-Buffer ist voll ***",&FF ERM008 defm 3,1,7,"*** Laufwerk ist defekt! ***",&FF ;*** Sprungleiste ERROFF defw &C033:defb 7 LDFMTB defw &C039:defb 7 READSC defw &C03C:defb 7 WRITSC defw &C03F:defb 7 FMTTRK defw &C042:defb 7 SEEKTR defw &C045:defb 7 TESTDR defw &C048:defb 7 ;Variablen FLG defb 0 ;Flags DRV defb 0 ;Drive BLK defb 0 ;Block TRK defb 0 ;Track TR1 defb 0 ;von TRK TR2 defb 0 ;bis TRK SEC defb 0 ;Aktueller Sector IBL defb 0 ;IST-Block SBL defb 0 ;SOLL-Block SID defs 11,0 ;Sector-Tabelle ERG defs 7 ;Resultate FDC NAM defs 32 ;Buffer fuer Filename STPTR defw 0 ;Stackpointer LOCA defw 0 ;Zeiger auf Filename LOCB defw 0 ; " BUFF defw 0 ;Adresse Speicher fuer I/O PADR defw 0 ;Adresse 1.Seite ;Formatierungs-Tabelle FMTAB defm 0,0,5,2,0,0,1,2,0,0,6,2,0,0,2,2,0,0,7,2 defm 0,0,3,2,0,0,8,2,0,0,4,2,0,0,9,2 ANFANG ORG &9700,à SPOOL defm 0,0,0,0,0,0,0,0,0,&81 defw SPOOLA defw 0 SPOUT defw 0 ;Spool-out-Pointer SPINP defw 0 ;Spool-in-Pointer SPOFLG defb 0 ;Spooler-Out-Flag SPIFLG defb 0 ;Spooler-In-Flag MSG013 defm 7,72,"Spool: 0",&FF SPOOLA call &BD2E ;Printer busy? ret c di:push de:push hl ld de,(SPOUT) ;Pointer aktuell.Zeichen ld a,(de) ;Zeichen in Accu push af call &BD31 ;Zeichen an Drucker inc de ld (SPOUT),de ;Pointer speichern pop af:cp &0C ;Test auf Form-Feed jp nz,SPLEND ;Ende wenn nicht FF ld a,(SPOFLG):inc a:cp 8:jp nz,NOOEND ld de,SPNEU:ld (SPOUT),de:xor a NOOEND ld (SPOFLG),a ld a,(MSG013+9);Spool-Nr. holen dec a:ld (MSG013+9),a cp "0":jp nz,SPLDIS ld hl,SPOOL call &BCEC ;Spooler-Event ausklinken ld de,SPNEU:ld (SPINP),de:ld (SPOUT),de xor a:ld (SPIFLG),a:ld (SPOFLG),a SPLDIS call GETCUR:push hl ld de,MSG013:call PRTMSG pop hl:call POSCUR SPLEND pop hl:pop de:ei:ret PRTMSG ld a,(de):ld l,a:inc de ld a,(de):ld h,a call POSCUR ld a,&12 ;Zeile loeschen call DISCHR inc de PRT ld a,(de) ;Lade Zeichen cp &FF:ret z call DISCHR inc de:jr PRT ;******* turbo-screen ****** SCREEN di:push bc push de push hl call &BBA5 ;TXT GET MATRIX ld de,(SCR) ;Adresse Char.Pos. push de ld c,8 ;Schleifenzaehler ld b,c LOOPCHR ld a,(hl) ;Bitmaske in a ld (de),a ;auf Schirm ausgeben ld a,d ;Adresse naechstes Byte add a,c ;hl+&800 ld d,a ;naechste Rasterzeile inc hl ;pointer next Byte djnz LOOPCHR pop hl ;Screen-Adresse zurueck inc hl ;Adresse naechstes Zeichen ld (SCR),hl pop hl pop de pop bc ei:ret SCR defw 0 ENDE list:end
CPC-POWER/CPCSOFTS
, programmation par
Kukulcan
© 2007-2025 tous droits réservés.
Reproduction sans autorisation interdite. Tous les titres utilisés appartiennent à leurs propriétaires respectifs.
Hébergement Web, Mail et serveurs de jeux haute performance