source: trunk/AIR-BOOT/TOOLS/MERGEIMG.BAS@ 11

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
7Open "air-boot.com" For BINARY As #1
8Get$ #1, 30976, CodeBuffer$
9MBRProtectionImage& = Instr(CodeBuffer$,"AiR-BOOT MBR-Protection Image")
10If 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$
16End If
17' Calculating CodeSectors and putting the count into the image
18CodeTravelPos?? = 27136
19While Mid$(CodeBuffer$,CodeTravelPos??+1,512)=String$(512,0)
20 Decr CodeTravelPos??, 512
21Wend
22CodeSectorsUsed% = CodeTravelPos??/512
23print "Code-Sectors Used: ";CodeSectorsUsed%
24Seek #1, 16: Put$ #1, Chr$(CodeSectorsUsed%) ' Actually CodeSectors-1
25Close #1
26print "AiR-BOOT.com sucessfully updated."
27end
Note: See TracBrowser for help on using the repository browser.