home *** CD-ROM | disk | FTP | other *** search
- PAGE 72,135
- TITLE Multiformatter.V10
- ;------------------------ MAKROS ------------------------
- set_Folge MACRO f1, f2, f3, f4, f5, f6, f7, f8, f9
- push ax ;AX sichern
- mov si, offset Struktur ;Adresse F-Tabelle
- mov al, f1
- mov [si+ 2], al
- mov al, f2
- mov [si+ 6], al
- mov al, f3
- mov [si+10], al
- mov al, f4
- mov [si+14], al
- mov al, f5
- mov [si+18], al
- mov al, f6
- mov [si+22], al
- mov al, f7
- mov [si+26], al
- mov al, f8
- mov [si+30], al
- mov al, f9
- mov [si+34], al
- pop ax
- ENDM
-
- clrs MACRO
- mov ah,0Fh
- int 10h ;Videomodus lesen -> AL
- mov ah,00h
- int 10h ;und schreiben
- ENDM
-
- set_backg_color MACRO Farbe
- mov ah,11
- mov bh,0
- mov bl,Farbe
- int 10h
- ENDM
-
- set_LP_Tabelle MACRO
- mov cx,DS ;DS sichern
- mov dx,0000h
- mov DS,dx
- mov ax,DS:007Ah ;Segment holen
- mov DS,ax ;und speichern
- mov si,DS:0078h ;Offset holen
- mov al, 9 ;9 Sekt./Spur
- mov DS:[si+4], al
- mov DS,cx ;DS zurück
- ENDM
-
- set_Typ MACRO ;Floppy-Typ setzen
- mov ah, 23
- mov al, cs:Floppy
- int 13h
- ENDM
-
- Ausgabe MACRO Text,Farbe,Spalten_Nr,Zeilen_Nr,Z_pro_Zeile
- LOCAL Text_Anfang
- LOCAL Text_Ende
- LOCAL Weiter
- ;-------- Text ausgeben -----------------------------------
- mov si,offset Text ;Textstring Adr.nach si
- mov Spalte, Spalten_Nr
- mov Zeile, Zeilen_Nr
- mov Attribut, Farbe
- Text_Anfang:
- mov ah,2
- mov bh,0
- int 10h ;Cursor positionieren
- mov al,[si] ;Zeichen nach al
- cmp al,36 ;Ende? ($-Zeichen)
- je Text_Ende
- mov ah,9
- mov bh,0
- mov cx,1 ;ein Zeichen ausgeben
- int 10h
- inc si ;nächstes Zeichen
- cmp Spalte, Z_pro_Zeile ;Zeile zuende ?
- jne Weiter ;wenn nicht, weiter
- mov Spalte, Spalten_Nr
- inc Zeile
- Weiter: inc Spalte ;nächste Spalte
- jmp Text_Anfang
- Text_Ende:
- ENDM
- ;-----------------------------------------------------------
- Zeile equ dh
- Spalte equ dl
- Attribut equ bl
- schwarz equ 4
- weiß equ 112
- weiß_bl equ 240
- gruen equ 2
- rot_schwarz equ 64
- rot_weiß equ 79
- rot_weiß_bl equ 207
- rot_gelb equ 78
- CR equ 13
- LF equ 10
-
- .model small
- .stack
- .code
- ;* Diskstruktur: Spurnummer, Seite, Sek.nr, Bytes pro Sektor
- Struktur DB '#', 'S', 1, 2
- DB '#', 'S', 2, 2
- DB '#', 'S', 3, 2
- DB '#', 'S', 4, 2
- DB '#', 'S', 5, 2
- DB '#', 'S', 6, 2
- DB '#', 'S', 7, 2
- DB '#', 'S', 8, 2
- DB '#', 'S', 9, 2
-
- Folge1 DB' 1-2-3-4-5-6-7-8-9 : normale Sektorenfolge $'
- Folge2 DB' 1-2-3-4-5-6-7-8-8 : Kopierschutz Format $'
- Folge3 DB' 9-8-7-6-5-4-3-2-1 : Schneckenpost $'
- Folge4 DB' 1-6-2-7-3-8-4-9-5 : toter Ritter $'
- Folge5 DB' 1-9-2-8-3-7-4-6-5 : Zauberspiegel $'
- Folge6 DB' 1-2-3-4-9-8-7-6-5 : Hägar der Schreckliche $'
-
- F_Count DB '?'
-
- Folgetxt DB' Über die Leertaste lassen sich verschiedene'
- DB 'Sektorenfolgen für eine Formatierung wählen. '
- DB 'Nach RETURN kann dann mit diesen Einstellungen'
- DB 'über den Menüpunkt "Ganze Diskette form." ein'
- DB 'Sonderformat auf die Diskette gebracht werden.'
- DB '$'
-
- OK DB ' ╒═════════════════════════════╕ '
- DB ' │ Fehlerfreie Ausführung │ '
- DB ' └─────────────────────────────┘ $'
-
- Fehler DB ' '
- DB' FEHLER! Diskette schreibgeschütz oder '
- DB' Sektor defekt bzw. unformatiert !!!!! $'
-
- Fehler2 DB ' '
- DB' Diskettenstation nicht bereit !!!!!!!! '
- DB' Floppykabel u. Anschlüsse überprüfen ! $'
-
- Bootsek DB ' '
- Bootdat DB 235, 52, 144, 84, 79, 79, 76, 66
- DB 79, 88, 03, 0, 2, 2, 1, 0
- DB 2, 112, 0, 208, 2, 253, 2, 0
- DB 9, 0, 2, 0, 0, 0, 0, 0
- DB 0, 0, 0, 0, 0, 0, 0, 0
- DB 0, 0, 0, 0, 0, 0, 0, 18
- DB 0, 0, 0, 0, 1, 0, 250, 51
- DB 192, 142, 208, 188, 0, 124, 22, 7
- DB 187, 120, 0, 54, 197, 55, 30, 86
- DB 22, 83, 191, 43, 124, 185, 11, 0
- DB 252, 172, 38, 128, 61, 0, 116, 3
- DB 38, 138, 5, 170, 138, 196, 226, 241
- DB 6, 31, 137, 71, 2, 199, 7, 43
- DB 124, 251, 205, 19, 114, 103, 160, 16
- DB 124, 152, 247, 38, 22, 124, 3, 6
- DB 28, 124, 3, 6, 14, 124, 163, 63
- DB 124, 163, 55, 124, 184, 32, 0, 247
- DB 38, 17, 124, 139, 30, 11, 124, 3
- DB 195, 72, 247, 243, 1, 6, 55, 124
- DB 187, 0, 5, 161, 63, 124, 232, 159
- DB 0, 184, 1, 2, 232, 179, 0, 114
- DB 25, 139, 251, 185, 11, 0, 190, 227
- DB 125, 243, 166, 117, 13, 141, 127, 32
- DB 190, 238, 125, 185, 11, 0, 243, 166
- DB 116, 24, 190, 119, 125, 232, 106, 0
- DB 50, 228, 205, 22, 94, 31, 143, 4
- DB 143, 68, 2, 205, 25, 190, 210, 125
- DB 235, 235, 161, 28, 5, 51, 210, 247
- DB 54, 11, 124, 254, 192, 162, 60, 124
- DB 161, 55, 124, 163, 61, 124, 187, 0
- DB 7, 161, 55, 124, 232, 73, 0, 161
- DB 24, 124, 42, 6, 59, 124, 64, 56
- DB 6, 60, 124, 115, 3, 160, 60, 124
- DB 80, 232, 78, 0, 88, 114, 198, 40
- DB 6, 60, 124, 116, 12, 1, 6, 55
- DB 124, 247, 38, 11, 124, 3, 216, 235
- DB 208, 138, 46, 21, 124, 138, 22, 253
- DB 125, 139, 30, 61, 124, 234, 0, 0
- DB 112, 0, 172, 10, 192, 116, 34, 180
- DB 14, 187, 7, 0, 205, 16, 235, 242
- DB 51, 210, 247, 54, 24, 124, 254, 194
- DB 136, 22, 59, 124, 51, 210, 247, 54
- DB 26, 124, 136, 22, 42, 124, 163, 57
- DB 124, 195, 180, 2, 139, 22, 57, 124
- DB 177, 6, 210, 230, 10, 54, 59, 124
- DB 139, 202, 134, 233, 138, 22, 253, 125
- DB 138, 54, 42, 124, 205, 19, 195, 13
- DB 10, 75, 101, 105, 110, 101, 32, 83
- DB 121, 115, 116, 101, 109, 100, 105, 115
- DB 107, 101, 116, 116, 101, 44, 32, 111
- DB 100, 101, 114, 32, 68, 105, 115, 107
- DB 101, 116, 116, 101, 110, 102, 101, 104
- DB 108, 101, 114, 33, 13, 10, 68, 105
- DB 115, 107, 101, 116, 116, 101, 32, 101
- DB 105, 110, 108, 101, 103, 101, 110, 32
- DB 117, 110, 100, 32, 101, 105, 110, 101
- DB 32, 84, 97, 115, 116, 101, 32, 100
- DB 114, 129, 99, 107, 101, 110, 33, 13
- DB 10, 0, 13, 10, 83, 116, 97, 114
- DB 116, 102, 101, 104, 108, 101, 114, 33
- DB 13, 10, 0, 73, 79, 32, 32, 32
- DB 32, 32, 32, 83, 89, 83, 77, 83
- DB 68, 79, 83, 32, 32, 32, 83, 89
- DB 83, 0, 0, 0, 0, 0, 85, 170
-
- Fat DB 253, 255, 255 ;Seite 0, Sektor 1-2 FAT-1
- DB 1021 DUP (0)
- DB 253, 255, 255 ;Seite 0, Sektor 3-4 FAT-2
- DB 1021 DUP (0)
- Root DB 2560 DUP (0) ;Seite 0, Sektor 5-9 (+ 10-11)
-
- r_Fat DB 1024 DUP ('?') ;Platz zum Lesen der 2-ten FAT
- DB '$'
-
- Titel DB '╔════════════════════════════════════════════'
- DB '══════════════════════════════════╗'
- DB '║ toolbox Multiformatter (C) 1990 by '
- DB 'DMV-Verlag & U.Schmitz ║'
- DB '╠═══════════════════════════╦════════════════'
- DB '══════════════════════════════════╣'
- DB '║ ║ '
- DB ' ║'
- DB '║ ║ '
- DB ' ║'
- DB '║ ║ '
- DB ' ║'
- DB '║ ║ '
- DB ' ║'
- DB '║ ║ '
- DB ' ║'
- DB '║ ║ '
- DB ' ║'
- DB '║ ║ '
- DB ' ║'
- DB '║ ║ '
- DB ' ║'
- DB '║ ║ '
- DB ' ║'
- DB '║ ║ '
- DB ' ║'
- DB '║ ║ '
- DB ' ║'
- DB '║ ║ '
- DB ' ║'
- DB '║ ║ '
- DB ' ║'
- DB '║ ║ '
- DB ' ║'
- DB '║ ║ '
- DB ' ║'
- DB '║ ║ '
- DB ' ║'
- DB '║ ║ '
- DB ' ║'
- DB '║ ║ '
- DB ' ║'
- DB '╚═══════════════════════════╩════════════════'
- DB '══════════════════════════════════╝$'
-
- Text1 DB ' Hilfstext anzeigen $'
- Text2 DB ' Bootsektor schreiben $'
- Text3 DB ' FAT#2->FAT#1 kopieren $'
- Text4 DB ' Sektorenfolge ändern $'
- Text5 DB ' Ganze Diskette form. $'
- Text6 DB ' Programm beenden $'
-
- Text1H DB ' Gibt eine Kurzbeschreibung der Funktionen de'
- DB 's Multiformatters aus $'
- Text2H DB ' Schreibt einen kompletten Bootsektor für 360'
- DB ' KB-Disketten in Laufwerk A:$'
- Text3H DB ' Restauriert die FAT durch Übertragen der zwe'
- DB 'iten auf die erste FAT $'
- Text4H DB ' Ermöglicht das Erstellen von Fastloadern ode'
- DB 'r eines Kopierschutzes $'
- Text5H DB ' Formatiert eine komplette 360 Kbyte-Diskette'
- DB ' und schreibt Bootsektor $'
- Text6H DB ' Rückkehr zu DOS '
- DB ' $'
-
- Hilfstxt DB' Mit dem toolbox Multiformatter lassen sich'
- DB'360 KByte Disketten 30% schneller formatieren.'
- DB'Defekte FATs können bei intakter zweiter FAT'
- DB'durch diese ersetzt und so restauriert werden.'
- DB'Durch Änderung der Sektorenfolge ist es mög-'
- DB'lich, Spezialformate für Schnelladedisketten'
- DB'oder Kopierschutzzwecke zu erstellen. '
- DB'Die Bedienung erfolgt über die Cursortasten,'
- DB'wobei man den jeweiligen Menüpunkt mit RETURN'
- DB'startet. Ein einmal aktivierter Programmpunkt'
- DB'wird durch einen blinkenden Menübalken ange-'
- DB'zeigt. '
- DB' '
- DB'(C) toolbox & U.S. '
- DB'DMV-Verlag '
- DB'Postfach 250 '
- DB'3440 Eschwege '
- DB'$ '
-
- Space DB' '
- DB' $'
-
- Balken1 DB'░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░$'
-
- Balken2 DB'░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░$'
-
- Form_txt DB' '
- DB'Formatiere 2 Seiten m. 40 Spuren zu 9 Sektoren'
- DB' ╔══════════════════════════════════════════╗ '
- DB' ║ ║ '
- DB' ╟──────────────────────────────────────────╢ '
- DB' ║ ║ '
- DB' ╚══════════════════════════════════════════╝ '
- DB'$'
-
- Wahl DB '?'
-
- Zaehler DB '?'
-
- w_Zaehler DB '??'
-
- Seite DB '?'
-
- Sektor_n DB '?'
-
- Floppy DB '?'
-
- format_error DB '?'
-
-
- hide_cursor proc
- mov ah,1
- mov ch,255 ;Startzeile Cursor
- mov cl,255 ;Endzeile Cursor
- int 10h
- ret
- hide_cursor endp
-
- show_Cursor proc
- mov ah,1
- mov ch,6 ;Startzeile Cursor
- mov cl,7 ;Endzeile Cursor
- int 10h
- ret
- show_Cursor endp
-
- Titelbild proc
- Ausgabe Titel rot_weiß 0 0 80
- ret
- Titelbild endp
-
- read_Typ proc
- mov ah, 21
- mov dl, 0
- int 13h
- mov cs:Floppy, ah ;Floppy-Typ
- ret
- read_Typ endp
-
- Menu proc
- Ausgabe Text1 weiß 3 4 80
- Ausgabe Text2 weiß 3 7 80
- Ausgabe Text3 weiß 3 10 80
- Ausgabe Text4 weiß 3 13 80
- Ausgabe Text5 weiß 3 16 80
- Ausgabe Text6 weiß 3 19 80
- ret
- Menu endp
-
- write_Bootsektor proc
- mov ah,03h ;Sektor schreiben
- mov dl,0 ;Laufwerk A
- mov dh,cs:Seite ;Seite (0-1)
- mov ch,0 ;Bootspur (0-39)
- mov cl,1 ;Startsektor (1-9)
- mov al,CS:Sektor_n ;Anzahl Sektoren
- mov bx,cs ;Segment Puffer
- mov es,bx ;al * 512 Bytes
- mov bx,offset Bootdat ;Offset Puffer
- int 13h ;write Bootsektor
- ret
- write_Bootsektor endp
-
- verify_Bootsektor proc
- mov ah,04h ;verify Sektor
- mov dl,0 ;Laufwerk 0
- mov dh,cs:Seite ;Seite (0-1)
- mov ch,0 ;Bootspur (0-39)
- mov cl,1 ;Startsektor (1-9)
- mov al,CS:Sektor_n ;Anzahl Sektoren
- mov bx,cs ;Segment Puffer
- mov es,bx
- mov bx,offset Bootdat ;Offset Puffer
- int 13h ;verify Bootsektor
- ret
- verify_Bootsektor endp
-
- read_FAT2 proc
- mov ah,02h ;Sektor lesen
- mov dl,0 ;Laufwerk A
- mov dh,0 ;Seite (0-1)
- mov ch,0 ;Bootspur (0-39)
- mov cl,4 ;Startsektor (1-9)
- mov al,2 ;Anzahl Sektoren
- mov bx,cs ;Segment Puffer
- mov es,bx ;al * 512 Bytes
- mov bx,offset r_FAT ;Offset Puffer
- int 13h ;lese FAT
- ret
- read_FAT2 endp
-
- write_FAT1 proc
- mov ah,03h ;Sektor schreiben
- mov dl,0 ;Laufwerk A
- mov dh,0 ;Seite (0-1)
- mov ch,0 ;Bootspur (0-39)
- mov cl,2 ;Startsektor (1-9)
- mov al,2 ;Anzahl Sektoren
- mov bx,cs ;Segment Puffer
- mov es,bx ;al * 512 Bytes
- mov bx,offset r_FAT ;Offset Puffer
- int 13h ;schreibe FAT
- ret
- write_FAT1 endp
-
- init_Disk proc
- mov ah,10h ;LW bereit ?
- mov dl,80h
- int 13h
- jnc i_weiter
- Ausgabe Fehler2 rot_weiß_bl 30 17 76
- i_weiter: mov ah,11h
- mov dl,80h
- int 13h ;Rekalibrierung
- jnc ii_weiter
- Ausgabe Fehler2 rot_weiß_bl 30 17 76
- ii_weiter:ret
- init_Disk endp
-
- write_Root proc
- mov ah,03h ;Sektor schreiben
- mov dl,0 ;Laufwerk A
- mov dh,cs:Seite ;Seite (0-1)
- mov ch,0 ;Bootspur (0-39)
- mov cl,1 ;Startsektor (1-9)
- mov al,CS:Sektor_n ;Anzahl Sektoren
- mov bx,cs ;Segment Puffer
- mov es,bx ;al * 512 Bytes
- mov bx,offset Root ;Offset Puffer
- int 13h ;write Bootsektor
- ret
- write_Root endp
-
- verify_Root proc
- mov ah,04h ;verify
- mov dl,0 ;Laufwerk A
- mov dh,cs:Seite ;Seite (0-1)
- mov ch,0 ;Bootspur (0-39)
- mov cl,1 ;Startsektor (1-9)
- mov al,CS:Sektor_n ;Anzahl Sektoren
- mov bx,cs ;Segment Puffer
- mov es,bx ;al * 512 Bytes
- mov bx,offset Root ;Offset Puffer
- int 13h ;write Bootsektor
- ret
- verify_Root endp
-
- clr_Window proc
- mov cs:w_Zaehler,0003h ;Zähler init
- clr_1: mov al, cs:w_Zaehler
- inc al
- mov cs:w_Zaehler,al
- Ausgabe Space rot_schwarz 30 al 76
- mov al, cs:w_Zaehler
- cmp al,19 ;n Zeilen löschen
- jle clr_1
- ret
- clr_Window endp
-
- old_Balken1 proc
- mov si, 0
- mov bx, offset Balken1
- mov al, 176 ;Zeichen
- old_1: mov [bx], al
- inc bx
- inc si
- cmp si, 40
- jne old_1
- ret
- old_Balken1 endp
-
- old_Balken2 proc
- mov si, 0
- mov bx, offset Balken2
- mov al, 176 ;Zeichen
- old_2: mov [bx], al
- inc bx
- inc si
- cmp si, 40
- jne old_2
- ret
- old_Balken2 endp
-
- format_Disk proc
- sub si,si
- f_Start:
- set_Typ ;setzt Laufwerkstyp
- mov ch, cs:Zaehler
- mov dh, cs:Seite
- mov bx,offset Struktur
- mov [bx],ch ;aktuelle Spur
- mov [bx+1],dh
-
- mov [bx+4],ch
- mov [bx+5],dh
-
- mov [bx+8],ch
- mov [bx+9],dh
-
- mov [bx+12],ch
- mov [bx+13],dh
-
- mov [bx+16],ch
- mov [bx+17],dh
-
- mov [bx+20],ch
- mov [bx+21],dh
-
- mov [bx+24],ch
- mov [bx+25],dh
-
- mov [bx+28],ch
- mov [bx+29],dh
-
- mov [bx+32],ch
- mov [bx+33],dh
-
- mov ah,5 ;Sektor formatieren
- mov dl,0 ;Laufwerk A
- mov al,9 ;9 Sekt. pro Spur
- mov bx, cs
- mov es,bx ;Segment nach ES
- mov bx, offset Struktur ;Offset nach bx
- int 13h
- jnc format_OK
- inc si
- cmp si,5 ;bis zu 5 Fehler
- je format_Fehler
- jmp f_Start ;neuer Versuch
- format_Fehler:
- stc ;Fehler, Carry setzen
- format_OK:
- ret
- format_Disk endp
-
- ;-------- Hauptprogramm ------------------------------------
- start:
- mov ax,cs
- mov ds,ax
- mov CS:F_Count, 1
- set_LP_Tabelle ;Laufwerksparameter T.
- call read_Typ ;Laufwerkstyp ermitteln
- clrs
- set_backg_color 4 ;Hintergrund rot
- call hide_cursor
- call Titelbild
- call Menu
- Ausgabe Text1 schwarz 3 4 80
- Ausgabe Text1H gruen 3 23 80
- beginn_lesen:
- mov cs:Wahl,1
- neu_lesen:
- mov ah,08 ;Zeichen lesen
- int 21h
- cmp al,13 ;Menüp. start (CR) ?
- jne weiter_1 ;Nein !
- jmp Ende_Start ;Menüpunkt starten !
- weiter_1:
- cmp al,0 ;Cursortaste ???
- jne neu_lesen
- int 21h ;2mal fuer code ->AL
- cmp al,72 ;Cursor up
- jne up_lesen
- mov al,cs:Wahl
- dec al
- mov cs:Wahl,al
- jmp ende_lesen
- up_lesen:
- cmp al,80 ;Cursor down
- jne ende_lesen
- mov al,cs:Wahl
- inc al
- mov cs:Wahl,al
- ende_lesen:
- sub ax,ax
- mov al,cs:Wahl
- cmp ax,7 ;max. Menüpunkte + 1
- jne Menu_Punkte_1
- mov cs:Wahl,1
-
- Menu_Punkte_1:
- cmp ax,0
- jne Menu_Punkte_2
- mov cs:Wahl,6
-
- Menu_Punkte_2:
- ;ausgewählten Menüpunkt hell hervorheben
- call Menu
- sub ax,ax
- mov al,cs:Wahl
- Punkt_1:
- cmp ax,1
- jne Punkt_2
- Ausgabe Text1 schwarz 3 4 80
- Ausgabe Text1H gruen 3 23 80
- jmp Ende_Start
- Punkt_2:
- cmp ax,2
- jne Punkt_3
- Ausgabe Text2 schwarz 3 7 80
- Ausgabe Text2H gruen 3 23 80
- jmp Ende_Start
- Punkt_3:
- cmp ax,3
- jne Punkt_4
- Ausgabe Text3 schwarz 3 10 80
- Ausgabe Text3H gruen 3 23 80
- jmp Ende_Start
- Punkt_4:
- cmp ax,4
- jne Punkt_5
- Ausgabe Text4 schwarz 3 13 80
- Ausgabe Text4H gruen 3 23 80
- jmp Ende_Start
- Punkt_5:
- cmp ax,5
- jne Punkt_6
- Ausgabe Text5 schwarz 3 16 80
- Ausgabe Text5H gruen 3 23 80
- jmp Ende_Start
- Punkt_6:
- Ausgabe Text6 schwarz 3 19 80
- Ausgabe Text6H gruen 3 23 80
- jmp Ende_Start
- Ende_Start:
- ;----- Menüfunktionen ausführen !!!!!!!!!!!!!!!!!!!!!!!!!!!!
- ;EXECUTE PROGRAMM
- cmp al, 13 ;Programm ausführen?
- je weiter_e ;Nein, zurück !!!
- jmp Start_2
- weiter_e: sub ax,ax
- mov al, cs:Wahl ;Programmnummer
- cmp ax,1
- je weiter_f
- jmp Epunkt_2
- weiter_f:
-
- ;* START PROGRAMMPUNKT-1 -----------------------------------
- Ausgabe Hilfstxt rot_schwarz 30 4 76
-
- ;* START PROGRAMMPUNKT-2 -----------------------------------
- Epunkt_2:
- cmp ax,2
- je weiter_g
- jmp Epunkt_3
- weiter_g:
- Ausgabe Text2 weiß_bl 3 7 80
- call clr_Window
- call init_Disk ;Floppy init
- jc BAD_1 ;bei Fehler Abbruch
- mov cs:Seite, 0
- mov cs:Sektor_n, 1 ;Nur Bootsektor
- call write_Bootsektor
- call write_Bootsektor ;CF=1 bei Error
- jc BAD_0
- call verify_Bootsektor ;CF=1 bei Error
- jnc OK_2 ;kein Fehler ?
- BAD_0: Ausgabe Fehler rot_weiß_bl 30 17 76
- Ausgabe Text2 schwarz 3 7 80
- BAD_1: jmp Start_2
-
- OK_2: Ausgabe OK rot_weiß 30 15 76
- Ausgabe Text2 schwarz 3 7 80
-
- ;* START PROGRAMMPUNKT-3 -----------------------------------
- Epunkt_3:
- cmp ax,3
- je Fat_Start
- jmp Epunkt_4
- Fat_Start:
- Ausgabe Text3 weiß_bl 3 10 80
- call clr_Window
- call init_Disk
- call read_FAT2
- jnc Fat_weiter ;nein
- Ausgabe Fehler rot_weiß_bl 30 17 76
- jmp Start_2
- Fat_weiter:
- call write_FAT1
- jc Fat_Fehler ;ja
- Ausgabe Text3 schwarz 3 10 80
- Ausgabe OK rot_weiß 30 15 76
- jmp Start_2 ;nein
- Fat_Fehler:
- Ausgabe Fehler rot_weiß_bl 30 17 76
- jmp Start_2 ;weiter
-
- ;* START PROGRAMMPUNKT-4 -----------------------------------
- Epunkt_4:
- cmp ax,4
- je folge_weiter
- jmp Epunkt_5
- folge_weiter:
- Ausgabe Text4 weiß_bl 3 13 80
- call clr_Window
- call init_Disk
- Ausgabe Folgetxt rot_schwarz 30 4 76
- ;-----------------------------------------------------
- mov al, CS:F_Count
- jmp old_f
- lese_Folge:
- mov ah,08 ;Zeichen lesen
- int 21h ;->al
-
- cmp al, 13 ;Start ?
- jne Folge_X ;Nein
- ;-----------------------------------------------------
- jmp Ende_Folge
- Folge_X:
- cmp al, 32
- jne lese_Folge ;falsche Eingabe
- lese_1:
- ;-- Folge anzeigen
- mov al,cs:F_Count
- inc al
- old_f:
- mov cs:F_Count, al
- cmp al, 1
- jne F_2
- Ausgabe Folge1 rot_gelb 32 12 76
- set_Folge 1 2 3 4 5 6 7 8 9
- jmp lese_Folge
- F_2:
- cmp al, 2
- jne F_3
- Ausgabe Folge2 rot_gelb 32 12 76
- set_Folge 1 2 3 4 5 6 7 8 8
-
- jmp lese_Folge
- F_3:
- cmp al, 3
- jne F_4
- Ausgabe Folge3 rot_gelb 32 12 76
- set_Folge 9 8 7 6 5 4 3 2 1
- jmp lese_Folge
- F_4:
- cmp al, 4
- jne F_5
- Ausgabe Folge4 rot_gelb 32 12 76
- set_Folge 1 6 2 7 3 8 4 9 5
- jmp lese_Folge
- F_5:
- cmp al, 5
- jne F_6
- Ausgabe Folge5 rot_gelb 32 12 76
- set_Folge 1 9 2 8 3 7 4 6 5
- jmp lese_Folge
- F_6:
- cmp al, 6
- jne F_7
- Ausgabe Folge6 rot_gelb 32 12 76
- set_Folge 1 2 3 4 9 8 7 6 5
- jmp lese_Folge
-
- F_7: mov cs:F_Count, 0
- mov al,1
- jmp lese_1
-
- Ende_Folge:
- Ausgabe Text4 schwarz 3 13 80
- jmp Start_2 ;ENDE und weiter
-
- ;* START PROGRAMMPUNKT-5 -----------------------------------
- Epunkt_5:
- cmp ax,5
- je weiter_6
- jmp Epunkt_6
- weiter_6:
-
- call clr_Window ;Fenster löschen
- Ausgabe Form_txt rot_schwarz 30 4 76
- Ausgabe Text5 weiß_bl 3 16 80
- Ausgabe Balken1 rot_schwarz 34 6 78
- Ausgabe Balken2 rot_schwarz 34 8 78
-
- mov cs:Zaehler, 0 ;Zähler init
- mov cs:Seite, 0 ;Seite init
- call init_Disk ;Disk init
- Schleife_5:
- jnc form_weiter
- Ausgabe Fehler rot_weiß_bl 30 17 76
- Ausgabe Text5 schwarz 3 16 80
- jmp Start_2 ;Abbruch, 5 Errors
- form_weiter:
- call format_Disk ;eine Spur format.
- jc Schleife_5 ;FEHLER
- ;----- Balken zeichnen ----------------------------------
- mov ch, cs:Zaehler
-
- mov al, cs:Seite
- cmp al, 1
- je BalkenB
- mov ax, offset Balken1
- jmp BalkenA
- BalkenB: mov ax, offset Balken2
- BalkenA: add al, ch
- mov si, ax
- mov al, 219
- mov [si], al
-
- Ausgabe Balken1 rot_schwarz 34 6 78
- Ausgabe Balken2 rot_schwarz 34 8 78
- ;--------------------------------------------------------
- mov ch, cs:Zaehler
- inc ch ;nächste Spur
- cmp ch,40 ;letzter Track ???
- mov cs:Zaehler, ch
- je Ende_5 ;Ende
- clc
- jmp Schleife_5 ;nächste Spur form.
- Ende_5: mov al, cs:Seite ;schon 2-te Seite ?
- cmp al, 0
- jne w_Boot ;beide Seiten fertig
- inc al
- mov cs:Zaehler, 0 ;Zähler für Seite 2
- mov cs:Seite, al ;Seite 2
- jmp Schleife_5
-
- w_Boot:
- mov cs:Seite,0
- mov cs:Sektor_n, 9 ;Bootsek.+ FAT
- call write_Bootsektor
- call verify_Bootsektor
- jnc w_Root ;OK und weiter
- call write_Bootsektor ;2-ter Versuch
- call verify_Bootsektor
- jnc w_Root
- Ausgabe Fehler rot_weiß_bl 30 17 76
- jmp weiter_nix
-
- w_Root: mov cs:Seite,1 ;Seite 2
- mov cs:Sektor_n, 2 ;DIR Seite 2
- call write_Root ;Root Seite 2 (1)
- call verify_Root ;verify
- jnc weiter_nix ;OK und weiter
- Ausgabe Fehler rot_weiß_bl 30 17 76
- call old_Balken1
- call old_Balken2
- jmp Start_2
- weiter_nix:
- Ausgabe Text5 schwarz 3 16 80
- Ausgabe OK rot_weiß 30 15 76
- call old_Balken1
- call old_Balken2
-
- ;* START PROGRAMMPUNKT-6 -----------------------------------
- Epunkt_6:
- cmp ax,6
- jne Start_2
- jmp Ende_Programm
- Start_2:
- jmp neu_lesen
-
- Ende_Programm:
- clrs
- call show_cursor ;Cursor restaurieren
- mov al,0 ;Errorlevel
- mov ah,4Ch ;Beende Programm
- int 21h
- end start