- thecode[mbrpno++]=0
- thecode[mbrpno++]=0
- thecode[mbrpno++]=0
- thecode[mbrpno++]=0
- (( thecode[mbrpno++] = psz & 0xFF ))
- (( thecode[mbrpno++] = (psz >> 8) & 0xFF ))
- (( thecode[mbrpno++] = (psz >> 16) & 0xFF ))
- (( thecode[mbrpno++] = (psz >> 24) & 0xFF ))
+ # partition offset, size (LBA)
+ (( thecode[mbrpno++] = pofs & 0xFF ))
+ (( thecode[mbrpno++] = (pofs >> 8) & 0xFF ))
+ (( thecode[mbrpno++] = (pofs >> 16) & 0xFF ))
+ (( thecode[mbrpno++] = (pofs >> 24) & 0xFF ))
+ (( pssz = psz - pofs ))
+ (( thecode[mbrpno++] = pssz & 0xFF ))
+ (( thecode[mbrpno++] = (pssz >> 8) & 0xFF ))
+ (( thecode[mbrpno++] = (pssz >> 16) & 0xFF ))
+ (( thecode[mbrpno++] = (pssz >> 24) & 0xFF ))