|
|
How to set manually a filesize |
|
|
|
Written by Armywil
|
|
Monday, 26 May 2008 |
This is a good to know trick ; how to manually set a filesize to a desidered value... maybe you'll never use it, but who knows?
Ok, set yourself some size number that you want to create. I will use 8000. Now convert it to bytes by multiplying 8000*1024 so the result is 8192000 Now open the calculator ( best Scientific one ) Type in 8192000 and convert it to hex and it will become 7D0000. So, this is 6 digit number, but we need 8 digit one. Convert the result to 8 digits by adding zeroes to its left so you got number 007D0000. Now open Command Prompt. Type in: DEBUG filename.txt. Some error should show up because the filename.txt doesn't exist. Now type RCX ( command that allows us to enter a new value for the CX register ), hit Enter, and then insert last 4 hexadecimal numbers, our is 0000, and again hit Enter. Now type: RBX ( command that allows us to enter a new value for the BX register, as we are inserting the value that will PC convert into filesize ), hit Enter, then insert first 4 hexadecimal numbers, ours is 007D, and hit Enter again. After that, type W ( as for Write ) When finished, hit Q ( as for Quit ) and Enter. |
|
Last Updated ( Monday, 26 May 2008 )
|
|
|