Originally posted by 19951001 at 2009-2-16 20:02:
Sector numbering starts from 0. According to the above result, the total number of sectors is 1048576, so the sector numbers should be 0..1048575, and the number of the last sector should be 1048575
Hehe, thank you for the reply! Regarding the number of sectors, I do know it.
The situation is like this: There is a software that writes the KEY into the last sector,
but after restarting the computer, the KEY is gone
I just want to make a batch processing to back up the KEY,
and write back the KEY when restarting.
But I'm not good at it and can't figure it out
The following is my batch processing for backing up the KEY:
dspt 0 0 1 /s 0.dat /y Back up sector 0 to 0.dat
dspt 0 /dpr /y Write the last sector to sector 0
dspt 0 0 1 /s K.dat /y Back up sector 0 to K.dat
dspt 0 0 1 /r 0.dat /y Restore sector 0
It's not that I'm an idiot, I want to make it universal because the number of sectors in each computer is uncertain,
I also don't know how to get the position number of the last sector,
so it's so troublesome,
This requirement is relatively special!
I just want to ask, who has a pure DOS calculator?
For example:
calc 1024-1
Get 1023 is okay
[
Last edited by zhaoliang518 on 2009-2-16 at 21:00 ]