X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=blobdiff_plain;f=src%2Fthreads%2Floader.S;h=dd87ea1c794bc1759ceca654fc953eaea082d763;hp=a5819dd28429080f7e6e5f7b70dd277579d12950;hb=6ffbc2b68c34c2d1e42d5f6bcd8f2b94b82d05d7;hpb=b4d3499fcc1364906853a073076df97256c9232a diff --git a/src/threads/loader.S b/src/threads/loader.S index a5819dd..dd87ea1 100644 --- a/src/threads/loader.S +++ b/src/threads/loader.S @@ -29,11 +29,12 @@ # Configure serial port so we can report progress without connected VGA. # See [IntrList] for details. sub %dx, %dx # Serial port 0. - mov $0x00e3, %ax # 9600 bps, N-8-1. + mov $0xe3, %al # 9600 bps, N-8-1. + # AH is already 0 (Initialize Port). int $0x14 # Destroys AX. call puts - .string "Pintos loader" + .string "PiLo" #### Read the partition table on each system hard disk and scan for a #### partition of type 0x20, which is the type that we use for a @@ -209,8 +210,12 @@ putc: pusha mov $0x01, %ah # Serial port output service. sub %dx, %dx # Serial port 0. - int $0x14 # Destroys AH. +2: int $0x14 # Destroys AH. + test $0x80, %ah # Output timed out? + jz 3f + movw $0x9090, 2b # Turn "int $0x14" above into NOPs. +3: cmp $'\r', %al jne popa_ret mov $'\n', %al @@ -224,8 +229,9 @@ putc: pusha read_sector: pusha - sub %eax, %eax - push %eax # LBA sector number [32:63] + sub %ax, %ax + push %ax # LBA sector number [48:63] + push %ax # LBA sector number [32:47] push %ebx # LBA sector number [0:31] push %es # Buffer segment push %ax # Buffer offset (always 0)