2013年9月15日星期日

dd command "0 +1 reads " and "1 +0 reads ," What difference does it ?

see "Orange's an operating system implementation Chapter III
chapter3/a/pmtest1.asm file after editing :
nasm pmtest1.asm-o pmtest1.bin
bximage create a a.img floppy disk ( not used here previous two chapters do a.img)
dd if = pmtest1.bin of = a.img bs = 512 count = 1 conv = notrunc

will be displayed here is 0 +1 reads . As shown below:

then use a virtual machine to run this a.img, be wrong. View a.img is using the file com files , the problem seems to be because pmtest1.asm compiled pmtest1.bin no 0xaa55 flag. Is that right ?
the previous two chapters do a.img is 1 +0 reads as shown below. Able to run successfully.

like to ask, 0 +1 and 1 +0 What is the difference ? Just started watching linux side of things , the level is too low, look great God enlighten.
------ Solution ---------------------------------------- ----
+ number represents the full block in front of the number
+ number is followed by block number indicates incomplete

First Photo inside 0 +1 , because only read 149Byte, not a complete block, because the block size is specified as 512Bytes a (bs = 512);
The second figure inside a +0, because complete read out 512Byte.
------ For reference only -------------------------------------- -
thank lisa5001

没有评论:

发表评论