@option{-g} for @option{-p}.
Incidentally, these commands work by passing special commands
-@command{put} and @command{get} on the kernel's command line and copying
+@command{extract} and @command{append} on the kernel's command line and copying
to and from a special simulated ``scratch'' disk. If you're very
curious, you can look at the @command{pintos} script as well as
@file{filesys/fsutil.c} to learn the implementation details.
{
int error_code;
asm ("movl $1f, %0; movb %b2, %1; 1:"
- : "=&a" (error_code), "=m" (*udst) : "r" (byte));
+ : "=&a" (error_code), "=m" (*udst) : "q" (byte));
return error_code != -1;
}
@end verbatim
Then, push the address of each string plus a null pointer sentinel, on
the stack, in right-to-left order. These are the elements of
-@code{argv}. The order ensures that @code{argv[0]} is at the lowest
-virtual address. Word-aligned accesses are faster than unaligned
-accesses, so for best performance round the stack pointer down to a
-multiple of 4 before the first push.
+@code{argv}. The null pointer sentinel ensures that @code{argv[argc]}
+is a null pointer, as required by the C standard. The order ensures
+that @code{argv[0]} is at the lowest virtual address. Word-aligned
+accesses are faster than unaligned accesses, so for best performance
+round the stack pointer down to a multiple of 4 before the first push.
Then, push @code{argv} (the address of @code{argv[0]}) and @code{argc},
in that order. Finally, push a fake ``return address'': although the