mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-29 00:31:52 +00:00
19 lines
260 B
C
19 lines
260 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
int main(int argc, char **argv) {
|
||
|
|
||
|
int disk,track,sector;
|
||
|
int block;
|
||
|
|
||
|
disk=atoi(argv[1]);
|
||
|
track=atoi(argv[2]);
|
||
|
sector=atoi(argv[3]);
|
||
|
|
||
|
block=((disk+1)<<9)|(track<<3)|(sector>>1);
|
||
|
|
||
|
printf("%d",block);
|
||
|
|
||
|
return 0;
|
||
|
}
|