Topic: Easy2Boot

Date 12/03/2020

By SteveSi

Subject Re: GRUB4DOS

--locate= will find that string
--replace= will replace the G character with 00 hex byte
--number=1 means only do this once on the first string match that you find
(md)0x1A00+400 is a memory address. It starts at '512-byte sector' number 0x1A00 and extends for a length of 400 sectors
0x1A00 = 512x6656=3407872
400x512 = 204800
so it will search memory from address 3407872 for a length of 204800 and change the first string of 'GRUB4DOS 0.4' to 00 'RUB4DOS 0.4'.
Since a 00 byte is interpreted as an 'end of string' marker by C, when the C printf statement is executed to print the string, no string is printed.
The > nul part is just redirecting any messages that the cat command normally outputs to the screen, to the device 'nul' which means 'nowhere' so that the user does not see any of the cat command output on the screen.

Back