|
Last change
on this file since 11 was 8, checked in by kiewitz, 23 years ago |
|
Added AiR-BOOT Images and support for other languages.
Note: This comment was created after rebuilding the repo. [2011-07]
|
|
File size:
919 bytes
|
| Line | |
|---|
| 1 | $COMPILE EXE
|
|---|
| 2 |
|
|---|
| 3 | $INCLUDE "GLOBAL.inc"
|
|---|
| 4 | '$INCLUDE "DOS.inc"
|
|---|
| 5 |
|
|---|
| 6 | ' Inserts MBR Protection into AiR-BOOT.com
|
|---|
| 7 | Open "air-boot.com" For BINARY As #1
|
|---|
| 8 | Get$ #1, 30976, CodeBuffer$
|
|---|
| 9 | MBRProtectionImage& = Instr(CodeBuffer$,"AiR-BOOT MBR-Protection Image")
|
|---|
| 10 | If MBRProtectionImage&>0 Then
|
|---|
| 11 | Open "mbr-prot\mbr_prot.com" For BINARY As #2
|
|---|
| 12 | Get$ #2, 1024, MBRProtectionImage$
|
|---|
| 13 | Close #2
|
|---|
| 14 | Seek #1, MBRProtectionImage&-1: Put$ #1, MBRProtectionImage$
|
|---|
| 15 | Mid$(CodeBuffer$,MBRProtectionImage&) = MBRProtectionImage$
|
|---|
| 16 | End If
|
|---|
| 17 | ' Calculating CodeSectors and putting the count into the image
|
|---|
| 18 | CodeTravelPos?? = 27136
|
|---|
| 19 | While Mid$(CodeBuffer$,CodeTravelPos??+1,512)=String$(512,0)
|
|---|
| 20 | Decr CodeTravelPos??, 512
|
|---|
| 21 | Wend
|
|---|
| 22 | CodeSectorsUsed% = CodeTravelPos??/512
|
|---|
| 23 | print "Code-Sectors Used: ";CodeSectorsUsed%
|
|---|
| 24 | Seek #1, 16: Put$ #1, Chr$(CodeSectorsUsed%) ' Actually CodeSectors-1
|
|---|
| 25 | Close #1
|
|---|
| 26 | print "AiR-BOOT.com sucessfully updated."
|
|---|
| 27 | end
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.