' --------------------------------------------------- schnirpsel --------- ' Ludi's kleiner Masterbootspion ' ------------------------------ ' Achtung - im Unterprogramm MasterBootLesen ja nich reg 1,&H0302 schreiben, ' sonst wird der Masterbootsektor mit Humbug ueberschrieben, der in ' 7000:0000 steht. Koenner koennen natuerlich so den MasterBootSektor ' aendern. Falls etwas schief geht - DOS-BOOT-Diskette und fdisk /mbr !!! ' Wird nach Compilierung kein Parameter oder "0" angegeben, so wird auf die ' erste Festplatte zugegriffen. Bei "1" auf die zweite Festplatte. ' ' Bitte beachten, dass 512 Bytes ab 7000:0000 brutal ueberschrieben werden. ' Man koennte das Zeuchs auch in ein Array laden. Wuerd ich in Pascal tun. ' Hier iss es mir aber egal :-) ' ' Ludwig Catta - rums, jetzt aber raus, mit Maedels eine "Heisse Liebe" ' verdruecken - Vanilleeis mit Himbeeren. Schmatz! ' ----------------------------------------------------------- ' Anzeige der Partitionstabelle Spur 0, Kopf 0, Sektor 1 ' Anzeige des BOOT-Sektors. Ludwigs Beschaeftigung vom 1.7.95 ' ----------------------------------------------------------- ' BASIC-Prograemmelchen aus dem Stegreif - sorry ' fuffzehn Minuten - jede Minute mehr iss Luxus! ' Master-Boot nach 7000:0000 laden (Oink :-( ) co$ = command$ hd$ = "1.Festplatte" : if co$="1" then hd$="2.Festplatte" gosub MasterBootLesen b(0)=0 : b(1)=0 : b(2)=0 : b(3)=0 cls : color 14,4 : print t$=" Ludi's Masterbootspionierprogramm V0.009á :-) hehe! " for i=78 to 1 step -1 locate 1,i : print left$(t$,80-i) : delay 0.03 next i print color 7,0 print : color 14,1 print " Partitionstabelle Spur 0, Kopf 0, Sektor 1 (Offset 01BE) ";hd$;" " color 7,0 : print space$(80); for i=0 to 4 if i<4 then print using "#";i+1; if i<4 then print ".Partition "; if i=4 then print "Ende Partit. "; for j=0 to 15 a=peek(&H1BE+16*i+j) if a<16 then a$="0"+hex$(a) else a$=hex$(a) if i=4 and j>1 then a$=" " print a$;" "; ' Sektoranzahl in Byte 12,13,14,15 if j=12 then a1=a/1000 if j=13 then a2=a/1000 if j=14 then a3=a/1000 if j=15 then a4=a/1000 next j if i=4 then goto Fertig b= 256*(256*(256*a4 + a3) + a2) + a1 b(i)=b b= 512*b/1000 print using "#####.### MBytes"; b next i Fertig: b = b(0)+b(1)+b(2)+b(3) b = 512*b/1000 print using "ä####.### Total"; b print : input "Enter-Taste druecken!",a : cls ' ------------------------------------------------------ ' Bootsektor zeigen for k=0 to 1 print: print "Boot-Sektor Teil";k+1;"von 2 .... ";hd$ for j=0 to 15 c$="" a=256*k+16*j a$=hex$(a): if len(a$)<4 then a$=string$(4-len(a$),"0")+a$ print a$;" "; for i=0 to 15 b = peek(256*k+16*j+i) b$= hex$(b): if b<16 then b$="0"+b$ print b$;" "; if ((b>32) and (b<127)) then c$=c$+chr$(b) else c$=c$+"." next i print " ";c$ next j if k=0 then input "Enter-Taste druecken!",a : cls next k print tab(44);"Ende ^^^^^ des Boot-Sektors!" print print "Na, steht ein Virus drin? - Nein??? - Glueck gehabt :-) !" print "Greetinx, "; color 14+16,4 : print " Ludwig C. "; : color 7,0 print " .. nochwas: Parameter 0 oder 1 fuer 1./2. Festplatte!": print end ' --- Unterprograemmelchen zum Lesen des MasterBootSektors --- MasterBootLesen: reg 1,&H0202 : 'AH=2 lesen, AL=Sektorzahl reg 3,&H0001 : 'CH=Zylindernummer, CL=Sektornummer reg 4,&H0080 : 'DH=Kopfnummer, DL=Laufwerknummer 80=1.HD 81=2.HD if co$="0" then reg 4,&H0080 if co$="1" then reg 4,&H0081 reg 9,&H7000 : 'Segment zum Speichern reg 2,&H0000 : 'Offset zum Speichern call interrupt &H13 def seg = &H7000 'Programmiermethode der Brutalen Art :-( hehe return