changeset 7:59cb42810ad9

remove generated file
author mir3636
date Sun, 16 Dec 2018 12:29:39 +0900
parents b5220d63570e
children 01422193c564
files Makefile source/entry.s source/main.c uprogs/cat.asm uprogs/cat.sym uprogs/echo.asm uprogs/echo.sym uprogs/forktest.asm uprogs/grep.asm uprogs/grep.sym uprogs/init.asm uprogs/init.sym uprogs/initcode uprogs/initcode.S uprogs/initcode.asm uprogs/initcode.out uprogs/kill.asm uprogs/kill.sym uprogs/ln.asm uprogs/ln.sym uprogs/ls.asm uprogs/ls.sym uprogs/mkdir.asm uprogs/mkdir.sym uprogs/rm.asm uprogs/rm.sym uprogs/sh.asm uprogs/sh.sym uprogs/stressfs.asm uprogs/stressfs.sym uprogs/usertests.asm uprogs/usertests.sym uprogs/usys.asm uprogs/wc.asm uprogs/wc.sym uprogs/zombie.asm uprogs/zombie.sym
diffstat 37 files changed, 4 insertions(+), 36215 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sun Oct 22 18:51:04 2017 +0900
+++ b/Makefile	Sun Dec 16 12:29:39 2018 +0900
@@ -31,7 +31,8 @@
 LIBRARIES := csud
 
 #CFLAGS := -fno-pic -static -Wno-packed-bitfield-compat -fno-builtin -fno-strict-aliasing -fshort-wchar -O2 -Wall -MD -ggdb -Werror -fno-omit-frame-pointer -fno-stack-protector -Wa,-march=armv6 -Wa,-mcpu=arm1176jzf-s -I include
-CFLAGS :=  -mfloat-abi=hard -fno-pic -static -Wno-packed-bitfield-compat -fno-builtin -fno-strict-aliasing -fshort-wchar -O2 -Wall -MD -ggdb -fno-omit-frame-pointer -fno-stack-protector -Wa,-march=armv6 -Wa,-mcpu=arm1176jzf-s -I include
+#CFLAGS := -mfpu=neon -mfloat-abi=hard -fno-pic -static -Wno-packed-bitfield-compat -fno-builtin -fno-strict-aliasing -fshort-wchar -O2 -Wall -MD -ggdb -fno-omit-frame-pointer -fno-stack-protector -Wa,-march=armv6 -Wa,-mcpu=arm1176jzf-s -I include
+CFLAGS := -mfloat-abi=hard -fno-pic -static -Wno-packed-bitfield-compat -fno-builtin -fno-strict-aliasing -fshort-wchar -O2 -Wall -MD -ggdb -Werror -fno-omit-frame-pointer -fno-stack-protector -mfloat-abi=hard -Wa,-march=armv6 -Wa,-mcpu=arm1176jzf-s -I include
 
 CC := gcc
 
--- a/source/entry.s	Sun Oct 22 18:51:04 2017 +0900
+++ b/source/entry.s	Sun Dec 16 12:29:39 2018 +0900
@@ -98,6 +98,7 @@
 .global getsystemtime
 getsystemtime:
 	ldr r0, =0xFE003004 /* addr of the time-stamp lower 32 bits */
+	//ldr r0, =0xFE1E2020 /* addr of the time-stamp lower 32 bits */
 	ldrd r0, r1, [r0]
 	bx lr
 
--- a/source/main.c	Sun Oct 22 18:51:04 2017 +0900
+++ b/source/main.c	Sun Dec 16 12:29:39 2018 +0900
@@ -50,7 +50,7 @@
 
 void enableirqminiuart(void);
 
-int cmain()
+__code cmain()
 {
 
   mmuinit1();
--- a/uprogs/cat.asm	Sun Oct 22 18:51:04 2017 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1762 +0,0 @@
-
-_cat:     file format elf32-littlearm
-
-
-Disassembly of section .text:
-
-00000000 <main>:
-int
-main(int argc, char *argv[])
-{
-  int fd, i;
-
-  if(argc <= 1){
-   0:	e3500001 	cmp	r0, #1
-  }
-}
-
-int
-main(int argc, char *argv[])
-{
-   4:	e92d49f8 	push	{r3, r4, r5, r6, r7, r8, fp, lr}
-   8:	e1a07000 	mov	r7, r0
-   c:	e28db01c 	add	fp, sp, #28
-    exit();
-  }
-}
-
-int
-main(int argc, char *argv[])
-  10:	c2814004 	addgt	r4, r1, #4
-  14:	c3a05001 	movgt	r5, #1
-{
-  int fd, i;
-
-  if(argc <= 1){
-  18:	da000012 	ble	68 <main+0x68>
-    cat(0);
-    exit();
-  }
-
-  for(i = 1; i < argc; i++){
-    if((fd = open(argv[i], 0)) < 0){
-  1c:	e5940000 	ldr	r0, [r4]
-  20:	e3a01000 	mov	r1, #0
-  24:	eb000137 	bl	508 <open>
-  28:	e1a06004 	mov	r6, r4
-  2c:	e2844004 	add	r4, r4, #4
-  30:	e2508000 	subs	r8, r0, #0
-  34:	ba000006 	blt	54 <main+0x54>
-      printf(1, "cat: cannot open %s\n", argv[i]);
-      exit();
-    }
-    cat(fd);
-  38:	eb00000e 	bl	78 <cat>
-  if(argc <= 1){
-    cat(0);
-    exit();
-  }
-
-  for(i = 1; i < argc; i++){
-  3c:	e2855001 	add	r5, r5, #1
-    if((fd = open(argv[i], 0)) < 0){
-      printf(1, "cat: cannot open %s\n", argv[i]);
-      exit();
-    }
-    cat(fd);
-    close(fd);
-  40:	e1a00008 	mov	r0, r8
-  44:	eb000108 	bl	46c <close>
-  if(argc <= 1){
-    cat(0);
-    exit();
-  }
-
-  for(i = 1; i < argc; i++){
-  48:	e1550007 	cmp	r5, r7
-  4c:	1afffff2 	bne	1c <main+0x1c>
-      exit();
-    }
-    cat(fd);
-    close(fd);
-  }
-  exit();
-  50:	eb0000c4 	bl	368 <exit>
-    exit();
-  }
-
-  for(i = 1; i < argc; i++){
-    if((fd = open(argv[i], 0)) < 0){
-      printf(1, "cat: cannot open %s\n", argv[i]);
-  54:	e3a00001 	mov	r0, #1
-  58:	e59f1014 	ldr	r1, [pc, #20]	; 74 <main+0x74>
-  5c:	e5962000 	ldr	r2, [r6]
-  60:	eb000213 	bl	8b4 <printf>
-      exit();
-  64:	eb0000bf 	bl	368 <exit>
-main(int argc, char *argv[])
-{
-  int fd, i;
-
-  if(argc <= 1){
-    cat(0);
-  68:	e3a00000 	mov	r0, #0
-  6c:	eb000001 	bl	78 <cat>
-    exit();
-  70:	eb0000bc 	bl	368 <exit>
-  74:	00000bb0 	.word	0x00000bb0
-
-00000078 <cat>:
-
-char buf[512];
-
-void
-cat(int fd)
-{
-  78:	e92d4818 	push	{r3, r4, fp, lr}
-  7c:	e1a04000 	mov	r4, r0
-  80:	e28db00c 	add	fp, sp, #12
-  int n;
-  while((n = read(fd, buf, sizeof(buf))) > 0)
-  84:	ea000002 	b	94 <cat+0x1c>
-    write(1, buf, n);
-  88:	e3a00001 	mov	r0, #1
-  8c:	e59f102c 	ldr	r1, [pc, #44]	; c0 <cat+0x48>
-  90:	eb0000e8 	bl	438 <write>
-
-void
-cat(int fd)
-{
-  int n;
-  while((n = read(fd, buf, sizeof(buf))) > 0)
-  94:	e3a02c02 	mov	r2, #512	; 0x200
-  98:	e1a00004 	mov	r0, r4
-  9c:	e59f101c 	ldr	r1, [pc, #28]	; c0 <cat+0x48>
-  a0:	eb0000d7 	bl	404 <read>
-  a4:	e2502000 	subs	r2, r0, #0
-  a8:	cafffff6 	bgt	88 <cat+0x10>
-    write(1, buf, n);
-  if(n < 0){
-  ac:	08bd8818 	popeq	{r3, r4, fp, pc}
-    printf(1, "cat: read error\n");
-  b0:	e3a00001 	mov	r0, #1
-  b4:	e59f1008 	ldr	r1, [pc, #8]	; c4 <cat+0x4c>
-  b8:	eb0001fd 	bl	8b4 <printf>
-    exit();
-  bc:	eb0000a9 	bl	368 <exit>
-  c0:	00000bf0 	.word	0x00000bf0
-  c4:	00000b9c 	.word	0x00000b9c
-
-000000c8 <strcpy>:
-#include "user.h"
-#include "arm.h"
-
-char*
-strcpy(char *s, char *t)
-{
-  c8:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
-  char *os;
-
-  os = s;
-  while((*s++ = *t++) != 0)
-  cc:	e1a02000 	mov	r2, r0
-#include "user.h"
-#include "arm.h"
-
-char*
-strcpy(char *s, char *t)
-{
-  d0:	e28db000 	add	fp, sp, #0
-  char *os;
-
-  os = s;
-  while((*s++ = *t++) != 0)
-  d4:	e4d13001 	ldrb	r3, [r1], #1
-  d8:	e3530000 	cmp	r3, #0
-  dc:	e4c23001 	strb	r3, [r2], #1
-  e0:	1afffffb 	bne	d4 <strcpy+0xc>
-    ;
-  return os;
-}
-  e4:	e28bd000 	add	sp, fp, #0
-  e8:	e8bd0800 	pop	{fp}
-  ec:	e12fff1e 	bx	lr
-
-000000f0 <strcmp>:
-
-int
-strcmp(const char *p, const char *q)
-{
-  f0:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
-  f4:	e28db000 	add	fp, sp, #0
-  while(*p && *p == *q)
-  f8:	e5d03000 	ldrb	r3, [r0]
-  fc:	e5d12000 	ldrb	r2, [r1]
- 100:	e3530000 	cmp	r3, #0
- 104:	1a000004 	bne	11c <strcmp+0x2c>
- 108:	ea000005 	b	124 <strcmp+0x34>
- 10c:	e5f03001 	ldrb	r3, [r0, #1]!
- 110:	e3530000 	cmp	r3, #0
- 114:	0a000006 	beq	134 <strcmp+0x44>
- 118:	e5f12001 	ldrb	r2, [r1, #1]!
- 11c:	e1530002 	cmp	r3, r2
- 120:	0afffff9 	beq	10c <strcmp+0x1c>
-    p++, q++;
-  return (uchar)*p - (uchar)*q;
-}
- 124:	e0620003 	rsb	r0, r2, r3
- 128:	e28bd000 	add	sp, fp, #0
- 12c:	e8bd0800 	pop	{fp}
- 130:	e12fff1e 	bx	lr
-}
-
-int
-strcmp(const char *p, const char *q)
-{
-  while(*p && *p == *q)
- 134:	e5d12001 	ldrb	r2, [r1, #1]
- 138:	eafffff9 	b	124 <strcmp+0x34>
-
-0000013c <strlen>:
-  return (uchar)*p - (uchar)*q;
-}
-
-uint
-strlen(char *s)
-{
- 13c:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 140:	e28db000 	add	fp, sp, #0
-  int n;
-
-  for(n = 0; s[n]; n++)
- 144:	e5d03000 	ldrb	r3, [r0]
- 148:	e3530000 	cmp	r3, #0
- 14c:	01a00003 	moveq	r0, r3
- 150:	0a000006 	beq	170 <strlen+0x34>
- 154:	e1a02000 	mov	r2, r0
- 158:	e3a03000 	mov	r3, #0
- 15c:	e5f21001 	ldrb	r1, [r2, #1]!
- 160:	e2833001 	add	r3, r3, #1
- 164:	e1a00003 	mov	r0, r3
- 168:	e3510000 	cmp	r1, #0
- 16c:	1afffffa 	bne	15c <strlen+0x20>
-    ;
-  return n;
-}
- 170:	e28bd000 	add	sp, fp, #0
- 174:	e8bd0800 	pop	{fp}
- 178:	e12fff1e 	bx	lr
-
-0000017c <memset>:
-memset(void *dst, int c, uint n)
-{
-  char *p=dst;
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 17c:	e3520000 	cmp	r2, #0
-  return n;
-}
-
-void*
-memset(void *dst, int c, uint n)
-{
- 180:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 184:	e28db000 	add	fp, sp, #0
-  char *p=dst;
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 188:	0a000006 	beq	1a8 <memset+0x2c>
- 18c:	e6ef1071 	uxtb	r1, r1
- 190:	e1a03002 	mov	r3, r2
-}
-
-void*
-memset(void *dst, int c, uint n)
-{
-  char *p=dst;
- 194:	e1a0c000 	mov	ip, r0
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 198:	e2533001 	subs	r3, r3, #1
- 19c:	e4cc1001 	strb	r1, [ip], #1
- 1a0:	1afffffc 	bne	198 <memset+0x1c>
- 1a4:	e0800002 	add	r0, r0, r2
-  return (void *)p;
-}
- 1a8:	e28bd000 	add	sp, fp, #0
- 1ac:	e8bd0800 	pop	{fp}
- 1b0:	e12fff1e 	bx	lr
-
-000001b4 <strchr>:
-
-char*
-strchr(const char *s, char c)
-{
- 1b4:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 1b8:	e28db000 	add	fp, sp, #0
-  for(; *s; s++)
- 1bc:	e5d03000 	ldrb	r3, [r0]
- 1c0:	e3530000 	cmp	r3, #0
- 1c4:	1a000004 	bne	1dc <strchr+0x28>
- 1c8:	ea000008 	b	1f0 <strchr+0x3c>
- 1cc:	e5d03001 	ldrb	r3, [r0, #1]
- 1d0:	e2800001 	add	r0, r0, #1
- 1d4:	e3530000 	cmp	r3, #0
- 1d8:	0a000004 	beq	1f0 <strchr+0x3c>
-    if(*s == c)
- 1dc:	e1530001 	cmp	r3, r1
- 1e0:	1afffff9 	bne	1cc <strchr+0x18>
-      return (char*)s;
-  return 0;
-}
- 1e4:	e28bd000 	add	sp, fp, #0
- 1e8:	e8bd0800 	pop	{fp}
- 1ec:	e12fff1e 	bx	lr
-strchr(const char *s, char c)
-{
-  for(; *s; s++)
-    if(*s == c)
-      return (char*)s;
-  return 0;
- 1f0:	e1a00003 	mov	r0, r3
- 1f4:	eafffffa 	b	1e4 <strchr+0x30>
-
-000001f8 <gets>:
-}
-
-char*
-gets(char *buf, int max)
-{
- 1f8:	e92d49f0 	push	{r4, r5, r6, r7, r8, fp, lr}
- 1fc:	e28db018 	add	fp, sp, #24
- 200:	e24dd00c 	sub	sp, sp, #12
- 204:	e1a08000 	mov	r8, r0
- 208:	e1a07001 	mov	r7, r1
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 20c:	e1a06000 	mov	r6, r0
- 210:	e3a05000 	mov	r5, #0
- 214:	ea000008 	b	23c <gets+0x44>
-    cc = read(0, &c, 1);
- 218:	eb000079 	bl	404 <read>
-    if(cc < 1)
- 21c:	e3500000 	cmp	r0, #0
- 220:	da00000b 	ble	254 <gets+0x5c>
-      break;
-    buf[i++] = c;
- 224:	e55b301d 	ldrb	r3, [fp, #-29]
-    if(c == '\n' || c == '\r')
- 228:	e1a05004 	mov	r5, r4
- 22c:	e353000a 	cmp	r3, #10
- 230:	1353000d 	cmpne	r3, #13
-
-  for(i=0; i+1 < max; ){
-    cc = read(0, &c, 1);
-    if(cc < 1)
-      break;
-    buf[i++] = c;
- 234:	e4c63001 	strb	r3, [r6], #1
-    if(c == '\n' || c == '\r')
- 238:	0a00000a 	beq	268 <gets+0x70>
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
-    cc = read(0, &c, 1);
- 23c:	e3a02001 	mov	r2, #1
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 240:	e0854002 	add	r4, r5, r2
- 244:	e1540007 	cmp	r4, r7
-    cc = read(0, &c, 1);
- 248:	e3a00000 	mov	r0, #0
- 24c:	e24b101d 	sub	r1, fp, #29
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 250:	bafffff0 	blt	218 <gets+0x20>
-      break;
-    buf[i++] = c;
-    if(c == '\n' || c == '\r')
-      break;
-  }
-  buf[i] = '\0';
- 254:	e3a03000 	mov	r3, #0
- 258:	e7c83005 	strb	r3, [r8, r5]
-  return buf;
-}
- 25c:	e1a00008 	mov	r0, r8
- 260:	e24bd018 	sub	sp, fp, #24
- 264:	e8bd89f0 	pop	{r4, r5, r6, r7, r8, fp, pc}
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 268:	e1a05004 	mov	r5, r4
- 26c:	eafffff8 	b	254 <gets+0x5c>
-
-00000270 <stat>:
-  return buf;
-}
-
-int
-stat(char *n, struct stat *st)
-{
- 270:	e92d4830 	push	{r4, r5, fp, lr}
- 274:	e1a05001 	mov	r5, r1
- 278:	e28db00c 	add	fp, sp, #12
-  int fd;
-  int r;
-
-  fd = open(n, O_RDONLY);
- 27c:	e3a01000 	mov	r1, #0
- 280:	eb0000a0 	bl	508 <open>
-  if(fd < 0)
- 284:	e2504000 	subs	r4, r0, #0
-    return -1;
- 288:	b3e05000 	mvnlt	r5, #0
-{
-  int fd;
-  int r;
-
-  fd = open(n, O_RDONLY);
-  if(fd < 0)
- 28c:	ba000004 	blt	2a4 <stat+0x34>
-    return -1;
-  r = fstat(fd, st);
- 290:	e1a01005 	mov	r1, r5
- 294:	eb0000c2 	bl	5a4 <fstat>
- 298:	e1a05000 	mov	r5, r0
-  close(fd);
- 29c:	e1a00004 	mov	r0, r4
- 2a0:	eb000071 	bl	46c <close>
-  return r;
-}
- 2a4:	e1a00005 	mov	r0, r5
- 2a8:	e8bd8830 	pop	{r4, r5, fp, pc}
-
-000002ac <atoi>:
-
-int
-atoi(const char *s)
-{
- 2ac:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 2b0:	e28db000 	add	fp, sp, #0
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 2b4:	e5d03000 	ldrb	r3, [r0]
- 2b8:	e2432030 	sub	r2, r3, #48	; 0x30
- 2bc:	e6ef2072 	uxtb	r2, r2
- 2c0:	e3520009 	cmp	r2, #9
-int
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
- 2c4:	83a00000 	movhi	r0, #0
-  while('0' <= *s && *s <= '9')
- 2c8:	8a000009 	bhi	2f4 <atoi+0x48>
- 2cc:	e1a02000 	mov	r2, r0
-int
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
- 2d0:	e3a00000 	mov	r0, #0
-  while('0' <= *s && *s <= '9')
-    n = n*10 + *s++ - '0';
- 2d4:	e0800100 	add	r0, r0, r0, lsl #2
- 2d8:	e0830080 	add	r0, r3, r0, lsl #1
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 2dc:	e5f23001 	ldrb	r3, [r2, #1]!
-    n = n*10 + *s++ - '0';
- 2e0:	e2400030 	sub	r0, r0, #48	; 0x30
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 2e4:	e2431030 	sub	r1, r3, #48	; 0x30
- 2e8:	e6ef1071 	uxtb	r1, r1
- 2ec:	e3510009 	cmp	r1, #9
- 2f0:	9afffff7 	bls	2d4 <atoi+0x28>
-    n = n*10 + *s++ - '0';
-  return n;
-}
- 2f4:	e28bd000 	add	sp, fp, #0
- 2f8:	e8bd0800 	pop	{fp}
- 2fc:	e12fff1e 	bx	lr
-
-00000300 <memmove>:
-{
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 300:	e3520000 	cmp	r2, #0
-  return n;
-}
-
-void*
-memmove(void *vdst, void *vsrc, int n)
-{
- 304:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 308:	e28db000 	add	fp, sp, #0
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 30c:	da000005 	ble	328 <memmove+0x28>
-    n = n*10 + *s++ - '0';
-  return n;
-}
-
-void*
-memmove(void *vdst, void *vsrc, int n)
- 310:	e0802002 	add	r2, r0, r2
-{
-  char *dst, *src;
-  
-  dst = vdst;
- 314:	e1a03000 	mov	r3, r0
-  src = vsrc;
-  while(n-- > 0)
-    *dst++ = *src++;
- 318:	e4d1c001 	ldrb	ip, [r1], #1
- 31c:	e4c3c001 	strb	ip, [r3], #1
-{
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 320:	e1530002 	cmp	r3, r2
- 324:	1afffffb 	bne	318 <memmove+0x18>
-    *dst++ = *src++;
-  return vdst;
-}
- 328:	e28bd000 	add	sp, fp, #0
- 32c:	e8bd0800 	pop	{fp}
- 330:	e12fff1e 	bx	lr
-
-00000334 <fork>:
- 334:	e92d4000 	push	{lr}
- 338:	e92d0008 	push	{r3}
- 33c:	e92d0004 	push	{r2}
- 340:	e92d0002 	push	{r1}
- 344:	e92d0001 	push	{r0}
- 348:	e3a00001 	mov	r0, #1
- 34c:	ef000040 	svc	0x00000040
- 350:	e8bd0002 	pop	{r1}
- 354:	e8bd0002 	pop	{r1}
- 358:	e8bd0004 	pop	{r2}
- 35c:	e8bd0008 	pop	{r3}
- 360:	e8bd4000 	pop	{lr}
- 364:	e12fff1e 	bx	lr
-
-00000368 <exit>:
- 368:	e92d4000 	push	{lr}
- 36c:	e92d0008 	push	{r3}
- 370:	e92d0004 	push	{r2}
- 374:	e92d0002 	push	{r1}
- 378:	e92d0001 	push	{r0}
- 37c:	e3a00002 	mov	r0, #2
- 380:	ef000040 	svc	0x00000040
- 384:	e8bd0002 	pop	{r1}
- 388:	e8bd0002 	pop	{r1}
- 38c:	e8bd0004 	pop	{r2}
- 390:	e8bd0008 	pop	{r3}
- 394:	e8bd4000 	pop	{lr}
- 398:	e12fff1e 	bx	lr
-
-0000039c <wait>:
- 39c:	e92d4000 	push	{lr}
- 3a0:	e92d0008 	push	{r3}
- 3a4:	e92d0004 	push	{r2}
- 3a8:	e92d0002 	push	{r1}
- 3ac:	e92d0001 	push	{r0}
- 3b0:	e3a00003 	mov	r0, #3
- 3b4:	ef000040 	svc	0x00000040
- 3b8:	e8bd0002 	pop	{r1}
- 3bc:	e8bd0002 	pop	{r1}
- 3c0:	e8bd0004 	pop	{r2}
- 3c4:	e8bd0008 	pop	{r3}
- 3c8:	e8bd4000 	pop	{lr}
- 3cc:	e12fff1e 	bx	lr
-
-000003d0 <pipe>:
- 3d0:	e92d4000 	push	{lr}
- 3d4:	e92d0008 	push	{r3}
- 3d8:	e92d0004 	push	{r2}
- 3dc:	e92d0002 	push	{r1}
- 3e0:	e92d0001 	push	{r0}
- 3e4:	e3a00004 	mov	r0, #4
- 3e8:	ef000040 	svc	0x00000040
- 3ec:	e8bd0002 	pop	{r1}
- 3f0:	e8bd0002 	pop	{r1}
- 3f4:	e8bd0004 	pop	{r2}
- 3f8:	e8bd0008 	pop	{r3}
- 3fc:	e8bd4000 	pop	{lr}
- 400:	e12fff1e 	bx	lr
-
-00000404 <read>:
- 404:	e92d4000 	push	{lr}
- 408:	e92d0008 	push	{r3}
- 40c:	e92d0004 	push	{r2}
- 410:	e92d0002 	push	{r1}
- 414:	e92d0001 	push	{r0}
- 418:	e3a00005 	mov	r0, #5
- 41c:	ef000040 	svc	0x00000040
- 420:	e8bd0002 	pop	{r1}
- 424:	e8bd0002 	pop	{r1}
- 428:	e8bd0004 	pop	{r2}
- 42c:	e8bd0008 	pop	{r3}
- 430:	e8bd4000 	pop	{lr}
- 434:	e12fff1e 	bx	lr
-
-00000438 <write>:
- 438:	e92d4000 	push	{lr}
- 43c:	e92d0008 	push	{r3}
- 440:	e92d0004 	push	{r2}
- 444:	e92d0002 	push	{r1}
- 448:	e92d0001 	push	{r0}
- 44c:	e3a00010 	mov	r0, #16
- 450:	ef000040 	svc	0x00000040
- 454:	e8bd0002 	pop	{r1}
- 458:	e8bd0002 	pop	{r1}
- 45c:	e8bd0004 	pop	{r2}
- 460:	e8bd0008 	pop	{r3}
- 464:	e8bd4000 	pop	{lr}
- 468:	e12fff1e 	bx	lr
-
-0000046c <close>:
- 46c:	e92d4000 	push	{lr}
- 470:	e92d0008 	push	{r3}
- 474:	e92d0004 	push	{r2}
- 478:	e92d0002 	push	{r1}
- 47c:	e92d0001 	push	{r0}
- 480:	e3a00015 	mov	r0, #21
- 484:	ef000040 	svc	0x00000040
- 488:	e8bd0002 	pop	{r1}
- 48c:	e8bd0002 	pop	{r1}
- 490:	e8bd0004 	pop	{r2}
- 494:	e8bd0008 	pop	{r3}
- 498:	e8bd4000 	pop	{lr}
- 49c:	e12fff1e 	bx	lr
-
-000004a0 <kill>:
- 4a0:	e92d4000 	push	{lr}
- 4a4:	e92d0008 	push	{r3}
- 4a8:	e92d0004 	push	{r2}
- 4ac:	e92d0002 	push	{r1}
- 4b0:	e92d0001 	push	{r0}
- 4b4:	e3a00006 	mov	r0, #6
- 4b8:	ef000040 	svc	0x00000040
- 4bc:	e8bd0002 	pop	{r1}
- 4c0:	e8bd0002 	pop	{r1}
- 4c4:	e8bd0004 	pop	{r2}
- 4c8:	e8bd0008 	pop	{r3}
- 4cc:	e8bd4000 	pop	{lr}
- 4d0:	e12fff1e 	bx	lr
-
-000004d4 <exec>:
- 4d4:	e92d4000 	push	{lr}
- 4d8:	e92d0008 	push	{r3}
- 4dc:	e92d0004 	push	{r2}
- 4e0:	e92d0002 	push	{r1}
- 4e4:	e92d0001 	push	{r0}
- 4e8:	e3a00007 	mov	r0, #7
- 4ec:	ef000040 	svc	0x00000040
- 4f0:	e8bd0002 	pop	{r1}
- 4f4:	e8bd0002 	pop	{r1}
- 4f8:	e8bd0004 	pop	{r2}
- 4fc:	e8bd0008 	pop	{r3}
- 500:	e8bd4000 	pop	{lr}
- 504:	e12fff1e 	bx	lr
-
-00000508 <open>:
- 508:	e92d4000 	push	{lr}
- 50c:	e92d0008 	push	{r3}
- 510:	e92d0004 	push	{r2}
- 514:	e92d0002 	push	{r1}
- 518:	e92d0001 	push	{r0}
- 51c:	e3a0000f 	mov	r0, #15
- 520:	ef000040 	svc	0x00000040
- 524:	e8bd0002 	pop	{r1}
- 528:	e8bd0002 	pop	{r1}
- 52c:	e8bd0004 	pop	{r2}
- 530:	e8bd0008 	pop	{r3}
- 534:	e8bd4000 	pop	{lr}
- 538:	e12fff1e 	bx	lr
-
-0000053c <mknod>:
- 53c:	e92d4000 	push	{lr}
- 540:	e92d0008 	push	{r3}
- 544:	e92d0004 	push	{r2}
- 548:	e92d0002 	push	{r1}
- 54c:	e92d0001 	push	{r0}
- 550:	e3a00011 	mov	r0, #17
- 554:	ef000040 	svc	0x00000040
- 558:	e8bd0002 	pop	{r1}
- 55c:	e8bd0002 	pop	{r1}
- 560:	e8bd0004 	pop	{r2}
- 564:	e8bd0008 	pop	{r3}
- 568:	e8bd4000 	pop	{lr}
- 56c:	e12fff1e 	bx	lr
-
-00000570 <unlink>:
- 570:	e92d4000 	push	{lr}
- 574:	e92d0008 	push	{r3}
- 578:	e92d0004 	push	{r2}
- 57c:	e92d0002 	push	{r1}
- 580:	e92d0001 	push	{r0}
- 584:	e3a00012 	mov	r0, #18
- 588:	ef000040 	svc	0x00000040
- 58c:	e8bd0002 	pop	{r1}
- 590:	e8bd0002 	pop	{r1}
- 594:	e8bd0004 	pop	{r2}
- 598:	e8bd0008 	pop	{r3}
- 59c:	e8bd4000 	pop	{lr}
- 5a0:	e12fff1e 	bx	lr
-
-000005a4 <fstat>:
- 5a4:	e92d4000 	push	{lr}
- 5a8:	e92d0008 	push	{r3}
- 5ac:	e92d0004 	push	{r2}
- 5b0:	e92d0002 	push	{r1}
- 5b4:	e92d0001 	push	{r0}
- 5b8:	e3a00008 	mov	r0, #8
- 5bc:	ef000040 	svc	0x00000040
- 5c0:	e8bd0002 	pop	{r1}
- 5c4:	e8bd0002 	pop	{r1}
- 5c8:	e8bd0004 	pop	{r2}
- 5cc:	e8bd0008 	pop	{r3}
- 5d0:	e8bd4000 	pop	{lr}
- 5d4:	e12fff1e 	bx	lr
-
-000005d8 <link>:
- 5d8:	e92d4000 	push	{lr}
- 5dc:	e92d0008 	push	{r3}
- 5e0:	e92d0004 	push	{r2}
- 5e4:	e92d0002 	push	{r1}
- 5e8:	e92d0001 	push	{r0}
- 5ec:	e3a00013 	mov	r0, #19
- 5f0:	ef000040 	svc	0x00000040
- 5f4:	e8bd0002 	pop	{r1}
- 5f8:	e8bd0002 	pop	{r1}
- 5fc:	e8bd0004 	pop	{r2}
- 600:	e8bd0008 	pop	{r3}
- 604:	e8bd4000 	pop	{lr}
- 608:	e12fff1e 	bx	lr
-
-0000060c <mkdir>:
- 60c:	e92d4000 	push	{lr}
- 610:	e92d0008 	push	{r3}
- 614:	e92d0004 	push	{r2}
- 618:	e92d0002 	push	{r1}
- 61c:	e92d0001 	push	{r0}
- 620:	e3a00014 	mov	r0, #20
- 624:	ef000040 	svc	0x00000040
- 628:	e8bd0002 	pop	{r1}
- 62c:	e8bd0002 	pop	{r1}
- 630:	e8bd0004 	pop	{r2}
- 634:	e8bd0008 	pop	{r3}
- 638:	e8bd4000 	pop	{lr}
- 63c:	e12fff1e 	bx	lr
-
-00000640 <chdir>:
- 640:	e92d4000 	push	{lr}
- 644:	e92d0008 	push	{r3}
- 648:	e92d0004 	push	{r2}
- 64c:	e92d0002 	push	{r1}
- 650:	e92d0001 	push	{r0}
- 654:	e3a00009 	mov	r0, #9
- 658:	ef000040 	svc	0x00000040
- 65c:	e8bd0002 	pop	{r1}
- 660:	e8bd0002 	pop	{r1}
- 664:	e8bd0004 	pop	{r2}
- 668:	e8bd0008 	pop	{r3}
- 66c:	e8bd4000 	pop	{lr}
- 670:	e12fff1e 	bx	lr
-
-00000674 <dup>:
- 674:	e92d4000 	push	{lr}
- 678:	e92d0008 	push	{r3}
- 67c:	e92d0004 	push	{r2}
- 680:	e92d0002 	push	{r1}
- 684:	e92d0001 	push	{r0}
- 688:	e3a0000a 	mov	r0, #10
- 68c:	ef000040 	svc	0x00000040
- 690:	e8bd0002 	pop	{r1}
- 694:	e8bd0002 	pop	{r1}
- 698:	e8bd0004 	pop	{r2}
- 69c:	e8bd0008 	pop	{r3}
- 6a0:	e8bd4000 	pop	{lr}
- 6a4:	e12fff1e 	bx	lr
-
-000006a8 <getpid>:
- 6a8:	e92d4000 	push	{lr}
- 6ac:	e92d0008 	push	{r3}
- 6b0:	e92d0004 	push	{r2}
- 6b4:	e92d0002 	push	{r1}
- 6b8:	e92d0001 	push	{r0}
- 6bc:	e3a0000b 	mov	r0, #11
- 6c0:	ef000040 	svc	0x00000040
- 6c4:	e8bd0002 	pop	{r1}
- 6c8:	e8bd0002 	pop	{r1}
- 6cc:	e8bd0004 	pop	{r2}
- 6d0:	e8bd0008 	pop	{r3}
- 6d4:	e8bd4000 	pop	{lr}
- 6d8:	e12fff1e 	bx	lr
-
-000006dc <sbrk>:
- 6dc:	e92d4000 	push	{lr}
- 6e0:	e92d0008 	push	{r3}
- 6e4:	e92d0004 	push	{r2}
- 6e8:	e92d0002 	push	{r1}
- 6ec:	e92d0001 	push	{r0}
- 6f0:	e3a0000c 	mov	r0, #12
- 6f4:	ef000040 	svc	0x00000040
- 6f8:	e8bd0002 	pop	{r1}
- 6fc:	e8bd0002 	pop	{r1}
- 700:	e8bd0004 	pop	{r2}
- 704:	e8bd0008 	pop	{r3}
- 708:	e8bd4000 	pop	{lr}
- 70c:	e12fff1e 	bx	lr
-
-00000710 <sleep>:
- 710:	e92d4000 	push	{lr}
- 714:	e92d0008 	push	{r3}
- 718:	e92d0004 	push	{r2}
- 71c:	e92d0002 	push	{r1}
- 720:	e92d0001 	push	{r0}
- 724:	e3a0000d 	mov	r0, #13
- 728:	ef000040 	svc	0x00000040
- 72c:	e8bd0002 	pop	{r1}
- 730:	e8bd0002 	pop	{r1}
- 734:	e8bd0004 	pop	{r2}
- 738:	e8bd0008 	pop	{r3}
- 73c:	e8bd4000 	pop	{lr}
- 740:	e12fff1e 	bx	lr
-
-00000744 <uptime>:
- 744:	e92d4000 	push	{lr}
- 748:	e92d0008 	push	{r3}
- 74c:	e92d0004 	push	{r2}
- 750:	e92d0002 	push	{r1}
- 754:	e92d0001 	push	{r0}
- 758:	e3a0000e 	mov	r0, #14
- 75c:	ef000040 	svc	0x00000040
- 760:	e8bd0002 	pop	{r1}
- 764:	e8bd0002 	pop	{r1}
- 768:	e8bd0004 	pop	{r2}
- 76c:	e8bd0008 	pop	{r3}
- 770:	e8bd4000 	pop	{lr}
- 774:	e12fff1e 	bx	lr
-
-00000778 <putc>:
-#include "stat.h"
-#include "user.h"
-
-static void
-putc(int fd, char c)
-{
- 778:	e92d4800 	push	{fp, lr}
- 77c:	e28db004 	add	fp, sp, #4
- 780:	e24b3004 	sub	r3, fp, #4
- 784:	e24dd008 	sub	sp, sp, #8
-  write(fd, &c, 1);
- 788:	e3a02001 	mov	r2, #1
-#include "stat.h"
-#include "user.h"
-
-static void
-putc(int fd, char c)
-{
- 78c:	e5631001 	strb	r1, [r3, #-1]!
-  write(fd, &c, 1);
- 790:	e1a01003 	mov	r1, r3
- 794:	ebffff27 	bl	438 <write>
-}
- 798:	e24bd004 	sub	sp, fp, #4
- 79c:	e8bd8800 	pop	{fp, pc}
-
-000007a0 <printint>:
-    return q;
-}
-
-static void
-printint(int fd, int xx, int base, int sgn)
-{
- 7a0:	e92d4ff0 	push	{r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 7a4:	e1a04000 	mov	r4, r0
-  char buf[16];
-  int i, neg;
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
- 7a8:	e1a00fa1 	lsr	r0, r1, #31
- 7ac:	e3530000 	cmp	r3, #0
- 7b0:	03a03000 	moveq	r3, #0
- 7b4:	12003001 	andne	r3, r0, #1
-    return q;
-}
-
-static void
-printint(int fd, int xx, int base, int sgn)
-{
- 7b8:	e28db020 	add	fp, sp, #32
-  char buf[16];
-  int i, neg;
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
- 7bc:	e3530000 	cmp	r3, #0
-    return q;
-}
-
-static void
-printint(int fd, int xx, int base, int sgn)
-{
- 7c0:	e24dd014 	sub	sp, sp, #20
- 7c4:	e59f909c 	ldr	r9, [pc, #156]	; 868 <printint+0xc8>
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
-    neg = 1;
-    x = -xx;
- 7c8:	12611000 	rsbne	r1, r1, #0
-  int i, neg;
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
-    neg = 1;
- 7cc:	13a03001 	movne	r3, #1
-  } else {
-    x = xx;
-  }
-
-  b = base;
-  i = 0;
- 7d0:	e3a0a000 	mov	sl, #0
- 7d4:	e24b6034 	sub	r6, fp, #52	; 0x34
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
-            q = q | (1 << i);
- 7d8:	e3a08001 	mov	r8, #1
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- 7dc:	e3a07000 	mov	r7, #0
-    int i;
-
-    for(i=31;i>=0;i--){
- 7e0:	e3a0001f 	mov	r0, #31
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- 7e4:	e1a0c007 	mov	ip, r7
-    int i;
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
- 7e8:	e1a0e031 	lsr	lr, r1, r0
- 7ec:	e20ee001 	and	lr, lr, #1
- 7f0:	e18ec08c 	orr	ip, lr, ip, lsl #1
-        if(r >= d) {
- 7f4:	e152000c 	cmp	r2, ip
-            r = r - d;
-            q = q | (1 << i);
- 7f8:	91877018 	orrls	r7, r7, r8, lsl r0
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
- 7fc:	9062c00c 	rsbls	ip, r2, ip
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
- 800:	e2500001 	subs	r0, r0, #1
- 804:	2afffff7 	bcs	7e8 <printint+0x48>
-
-  b = base;
-  i = 0;
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
- 808:	e0000792 	mul	r0, r2, r7
-  }while((x = y) != 0);
- 80c:	e3570000 	cmp	r7, #0
-
-  b = base;
-  i = 0;
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
- 810:	e0601001 	rsb	r1, r0, r1
- 814:	e28a5001 	add	r5, sl, #1
- 818:	e7d91001 	ldrb	r1, [r9, r1]
- 81c:	e7c6100a 	strb	r1, [r6, sl]
-  }while((x = y) != 0);
- 820:	11a01007 	movne	r1, r7
-
-  b = base;
-  i = 0;
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
- 824:	11a0a005 	movne	sl, r5
- 828:	1affffeb 	bne	7dc <printint+0x3c>
-  }while((x = y) != 0);
-  if(neg)
- 82c:	e3530000 	cmp	r3, #0
-    buf[i++] = '-';
- 830:	124b2024 	subne	r2, fp, #36	; 0x24
- 834:	10823005 	addne	r3, r2, r5
- 838:	128a5002 	addne	r5, sl, #2
-
-  while(--i >= 0)
- 83c:	e2455001 	sub	r5, r5, #1
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
-  }while((x = y) != 0);
-  if(neg)
-    buf[i++] = '-';
- 840:	13a0202d 	movne	r2, #45	; 0x2d
- 844:	15432010 	strbne	r2, [r3, #-16]
-
-  while(--i >= 0)
-    putc(fd, buf[i]);
- 848:	e7d61005 	ldrb	r1, [r6, r5]
- 84c:	e1a00004 	mov	r0, r4
-    buf[i++] = digits[x - y * b];
-  }while((x = y) != 0);
-  if(neg)
-    buf[i++] = '-';
-
-  while(--i >= 0)
- 850:	e2455001 	sub	r5, r5, #1
-    putc(fd, buf[i]);
- 854:	ebffffc7 	bl	778 <putc>
-    buf[i++] = digits[x - y * b];
-  }while((x = y) != 0);
-  if(neg)
-    buf[i++] = '-';
-
-  while(--i >= 0)
- 858:	e3750001 	cmn	r5, #1
- 85c:	1afffff9 	bne	848 <printint+0xa8>
-    putc(fd, buf[i]);
-}
- 860:	e24bd020 	sub	sp, fp, #32
- 864:	e8bd8ff0 	pop	{r4, r5, r6, r7, r8, r9, sl, fp, pc}
- 868:	00000bc8 	.word	0x00000bc8
-
-0000086c <div>:
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- 86c:	e3a03000 	mov	r3, #0
-{
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
- 870:	e92d0830 	push	{r4, r5, fp}
- 874:	e1a02000 	mov	r2, r0
- 878:	e28db008 	add	fp, sp, #8
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
- 87c:	e3a0c01f 	mov	ip, #31
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- 880:	e1a00003 	mov	r0, r3
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
-            q = q | (1 << i);
- 884:	e3a05001 	mov	r5, #1
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
- 888:	e1a04c32 	lsr	r4, r2, ip
- 88c:	e2044001 	and	r4, r4, #1
- 890:	e1843083 	orr	r3, r4, r3, lsl #1
-        if(r >= d) {
- 894:	e1530001 	cmp	r3, r1
-            r = r - d;
-            q = q | (1 << i);
- 898:	21800c15 	orrcs	r0, r0, r5, lsl ip
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
- 89c:	20613003 	rsbcs	r3, r1, r3
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
- 8a0:	e25cc001 	subs	ip, ip, #1
- 8a4:	2afffff7 	bcs	888 <div+0x1c>
-            r = r - d;
-            q = q | (1 << i);
-        }
-    }
-    return q;
-}
- 8a8:	e24bd008 	sub	sp, fp, #8
- 8ac:	e8bd0830 	pop	{r4, r5, fp}
- 8b0:	e12fff1e 	bx	lr
-
-000008b4 <printf>:
-}
-
-// Print to the given fd. Only understands %d, %x, %p, %s.
-void
-printf(int fd, char *fmt, ...)
-{
- 8b4:	e92d000e 	push	{r1, r2, r3}
- 8b8:	e92d4ff0 	push	{r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 8bc:	e28db020 	add	fp, sp, #32
- 8c0:	e1a05000 	mov	r5, r0
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- 8c4:	e59b4004 	ldr	r4, [fp, #4]
- 8c8:	e5d48000 	ldrb	r8, [r4]
- 8cc:	e3580000 	cmp	r8, #0
- 8d0:	0a000027 	beq	974 <printf+0xc0>
-        ap++;
-      } else if(c == 's'){
-        s = (char*)*ap;
-        ap++;
-        if(s == 0)
-          s = "(null)";
- 8d4:	e59f712c 	ldr	r7, [pc, #300]	; a08 <printf+0x154>
-  char *s;
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
- 8d8:	e28b6008 	add	r6, fp, #8
-{
-  char *s;
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
- 8dc:	e3a0a000 	mov	sl, #0
- 8e0:	ea000008 	b	908 <printf+0x54>
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
-    c = fmt[i] & 0xff;
-    if(state == 0){
-      if(c == '%'){
- 8e4:	e3580025 	cmp	r8, #37	; 0x25
-        state = '%';
- 8e8:	01a0a008 	moveq	sl, r8
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
-    c = fmt[i] & 0xff;
-    if(state == 0){
-      if(c == '%'){
- 8ec:	0a000002 	beq	8fc <printf+0x48>
-        state = '%';
-      } else {
-        putc(fd, c);
- 8f0:	e1a00005 	mov	r0, r5
- 8f4:	e1a01008 	mov	r1, r8
- 8f8:	ebffff9e 	bl	778 <putc>
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- 8fc:	e5f48001 	ldrb	r8, [r4, #1]!
- 900:	e3580000 	cmp	r8, #0
- 904:	0a00001a 	beq	974 <printf+0xc0>
-    c = fmt[i] & 0xff;
-    if(state == 0){
- 908:	e35a0000 	cmp	sl, #0
- 90c:	0afffff4 	beq	8e4 <printf+0x30>
-      if(c == '%'){
-        state = '%';
-      } else {
-        putc(fd, c);
-      }
-    } else if(state == '%'){
- 910:	e35a0025 	cmp	sl, #37	; 0x25
- 914:	1afffff8 	bne	8fc <printf+0x48>
-      if(c == 'd'){
- 918:	e3580064 	cmp	r8, #100	; 0x64
- 91c:	0a00002c 	beq	9d4 <printf+0x120>
-        printint(fd, *ap, 10, 1);
-        ap++;
-      } else if(c == 'x' || c == 'p'){
- 920:	e3580078 	cmp	r8, #120	; 0x78
- 924:	13580070 	cmpne	r8, #112	; 0x70
- 928:	13a09000 	movne	r9, #0
- 92c:	03a09001 	moveq	r9, #1
- 930:	0a000013 	beq	984 <printf+0xd0>
-        printint(fd, *ap, 16, 0);
-        ap++;
-      } else if(c == 's'){
- 934:	e3580073 	cmp	r8, #115	; 0x73
- 938:	0a000018 	beq	9a0 <printf+0xec>
-          s = "(null)";
-        while(*s != 0){
-          putc(fd, *s);
-          s++;
-        }
-      } else if(c == 'c'){
- 93c:	e3580063 	cmp	r8, #99	; 0x63
- 940:	0a00002a 	beq	9f0 <printf+0x13c>
-        putc(fd, *ap);
-        ap++;
-      } else if(c == '%'){
- 944:	e3580025 	cmp	r8, #37	; 0x25
-        putc(fd, c);
- 948:	e1a0100a 	mov	r1, sl
- 94c:	e1a00005 	mov	r0, r5
-          s++;
-        }
-      } else if(c == 'c'){
-        putc(fd, *ap);
-        ap++;
-      } else if(c == '%'){
- 950:	0a000002 	beq	960 <printf+0xac>
-        putc(fd, c);
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
- 954:	ebffff87 	bl	778 <putc>
-        putc(fd, c);
- 958:	e1a00005 	mov	r0, r5
- 95c:	e1a01008 	mov	r1, r8
- 960:	ebffff84 	bl	778 <putc>
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- 964:	e5f48001 	ldrb	r8, [r4, #1]!
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- 968:	e1a0a009 	mov	sl, r9
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- 96c:	e3580000 	cmp	r8, #0
- 970:	1affffe4 	bne	908 <printf+0x54>
-        putc(fd, c);
-      }
-      state = 0;
-    }
-  }
-}
- 974:	e24bd020 	sub	sp, fp, #32
- 978:	e8bd4ff0 	pop	{r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 97c:	e28dd00c 	add	sp, sp, #12
- 980:	e12fff1e 	bx	lr
-    } else if(state == '%'){
-      if(c == 'd'){
-        printint(fd, *ap, 10, 1);
-        ap++;
-      } else if(c == 'x' || c == 'p'){
-        printint(fd, *ap, 16, 0);
- 984:	e1a00005 	mov	r0, r5
- 988:	e4961004 	ldr	r1, [r6], #4
- 98c:	e3a02010 	mov	r2, #16
- 990:	e3a03000 	mov	r3, #0
- 994:	ebffff81 	bl	7a0 <printint>
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- 998:	e3a0a000 	mov	sl, #0
- 99c:	eaffffd6 	b	8fc <printf+0x48>
-        ap++;
-      } else if(c == 'x' || c == 'p'){
-        printint(fd, *ap, 16, 0);
-        ap++;
-      } else if(c == 's'){
-        s = (char*)*ap;
- 9a0:	e4968004 	ldr	r8, [r6], #4
-        ap++;
-        if(s == 0)
-          s = "(null)";
- 9a4:	e3580000 	cmp	r8, #0
- 9a8:	01a08007 	moveq	r8, r7
-        while(*s != 0){
- 9ac:	e5d81000 	ldrb	r1, [r8]
- 9b0:	e3510000 	cmp	r1, #0
- 9b4:	0a000004 	beq	9cc <printf+0x118>
-          putc(fd, *s);
- 9b8:	e1a00005 	mov	r0, r5
- 9bc:	ebffff6d 	bl	778 <putc>
-      } else if(c == 's'){
-        s = (char*)*ap;
-        ap++;
-        if(s == 0)
-          s = "(null)";
-        while(*s != 0){
- 9c0:	e5f81001 	ldrb	r1, [r8, #1]!
- 9c4:	e3510000 	cmp	r1, #0
- 9c8:	1afffffa 	bne	9b8 <printf+0x104>
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- 9cc:	e1a0a001 	mov	sl, r1
- 9d0:	eaffffc9 	b	8fc <printf+0x48>
-      } else {
-        putc(fd, c);
-      }
-    } else if(state == '%'){
-      if(c == 'd'){
-        printint(fd, *ap, 10, 1);
- 9d4:	e1a00005 	mov	r0, r5
- 9d8:	e4961004 	ldr	r1, [r6], #4
- 9dc:	e3a0200a 	mov	r2, #10
- 9e0:	e3a03001 	mov	r3, #1
- 9e4:	ebffff6d 	bl	7a0 <printint>
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- 9e8:	e3a0a000 	mov	sl, #0
- 9ec:	eaffffc2 	b	8fc <printf+0x48>
-        while(*s != 0){
-          putc(fd, *s);
-          s++;
-        }
-      } else if(c == 'c'){
-        putc(fd, *ap);
- 9f0:	e4961004 	ldr	r1, [r6], #4
- 9f4:	e1a00005 	mov	r0, r5
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- 9f8:	e1a0a009 	mov	sl, r9
-        while(*s != 0){
-          putc(fd, *s);
-          s++;
-        }
-      } else if(c == 'c'){
-        putc(fd, *ap);
- 9fc:	e6ef1071 	uxtb	r1, r1
- a00:	ebffff5c 	bl	778 <putc>
- a04:	eaffffbc 	b	8fc <printf+0x48>
- a08:	00000bdc 	.word	0x00000bdc
-
-00000a0c <free>:
-free(void *ap)
-{
-  Header *bp, *p;
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
- a0c:	e59f3098 	ldr	r3, [pc, #152]	; aac <free+0xa0>
-static Header base;
-static Header *freep;
-
-void
-free(void *ap)
-{
- a10:	e92d0830 	push	{r4, r5, fp}
-  Header *bp, *p;
-
-  bp = (Header*)ap - 1;
- a14:	e240c008 	sub	ip, r0, #8
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
- a18:	e5932000 	ldr	r2, [r3]
-static Header base;
-static Header *freep;
-
-void
-free(void *ap)
-{
- a1c:	e28db008 	add	fp, sp, #8
-  Header *bp, *p;
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
- a20:	e152000c 	cmp	r2, ip
- a24:	e5921000 	ldr	r1, [r2]
- a28:	2a000001 	bcs	a34 <free+0x28>
- a2c:	e15c0001 	cmp	ip, r1
- a30:	3a000007 	bcc	a54 <free+0x48>
-    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
- a34:	e1520001 	cmp	r2, r1
- a38:	3a000003 	bcc	a4c <free+0x40>
- a3c:	e152000c 	cmp	r2, ip
- a40:	3a000003 	bcc	a54 <free+0x48>
- a44:	e15c0001 	cmp	ip, r1
- a48:	3a000001 	bcc	a54 <free+0x48>
-static Header base;
-static Header *freep;
-
-void
-free(void *ap)
-{
- a4c:	e1a02001 	mov	r2, r1
- a50:	eafffff2 	b	a20 <free+0x14>
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
-    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
-      break;
-  if(bp + bp->s.size == p->s.ptr){
- a54:	e5104004 	ldr	r4, [r0, #-4]
-  if(p + p->s.size == bp){
-    p->s.size += bp->s.size;
-    p->s.ptr = bp->s.ptr;
-  } else
-    p->s.ptr = bp;
-  freep = p;
- a58:	e5832000 	str	r2, [r3]
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
-    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
-      break;
-  if(bp + bp->s.size == p->s.ptr){
- a5c:	e08c5184 	add	r5, ip, r4, lsl #3
- a60:	e1550001 	cmp	r5, r1
-    bp->s.size += p->s.ptr->s.size;
- a64:	05911004 	ldreq	r1, [r1, #4]
- a68:	00814004 	addeq	r4, r1, r4
- a6c:	05004004 	streq	r4, [r0, #-4]
-    bp->s.ptr = p->s.ptr->s.ptr;
- a70:	05921000 	ldreq	r1, [r2]
- a74:	05911000 	ldreq	r1, [r1]
-  } else
-    bp->s.ptr = p->s.ptr;
- a78:	e5001008 	str	r1, [r0, #-8]
-  if(p + p->s.size == bp){
- a7c:	e5921004 	ldr	r1, [r2, #4]
- a80:	e0824181 	add	r4, r2, r1, lsl #3
- a84:	e15c0004 	cmp	ip, r4
-    p->s.size += bp->s.size;
-    p->s.ptr = bp->s.ptr;
-  } else
-    p->s.ptr = bp;
- a88:	1582c000 	strne	ip, [r2]
-    bp->s.size += p->s.ptr->s.size;
-    bp->s.ptr = p->s.ptr->s.ptr;
-  } else
-    bp->s.ptr = p->s.ptr;
-  if(p + p->s.size == bp){
-    p->s.size += bp->s.size;
- a8c:	0510c004 	ldreq	ip, [r0, #-4]
- a90:	008c1001 	addeq	r1, ip, r1
- a94:	05821004 	streq	r1, [r2, #4]
-    p->s.ptr = bp->s.ptr;
- a98:	05101008 	ldreq	r1, [r0, #-8]
- a9c:	05821000 	streq	r1, [r2]
-  } else
-    p->s.ptr = bp;
-  freep = p;
-}
- aa0:	e24bd008 	sub	sp, fp, #8
- aa4:	e8bd0830 	pop	{r4, r5, fp}
- aa8:	e12fff1e 	bx	lr
- aac:	00000be4 	.word	0x00000be4
-
-00000ab0 <malloc>:
-  return freep;
-}
-
-void*
-malloc(uint nbytes)
-{
- ab0:	e92d49f8 	push	{r3, r4, r5, r6, r7, r8, fp, lr}
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
- ab4:	e2804007 	add	r4, r0, #7
-  if((prevp = freep) == 0){
- ab8:	e59f50d4 	ldr	r5, [pc, #212]	; b94 <malloc+0xe4>
-malloc(uint nbytes)
-{
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
- abc:	e1a041a4 	lsr	r4, r4, #3
-  return freep;
-}
-
-void*
-malloc(uint nbytes)
-{
- ac0:	e28db01c 	add	fp, sp, #28
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
-  if((prevp = freep) == 0){
- ac4:	e5953000 	ldr	r3, [r5]
-malloc(uint nbytes)
-{
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
- ac8:	e2844001 	add	r4, r4, #1
-  if((prevp = freep) == 0){
- acc:	e3530000 	cmp	r3, #0
- ad0:	0a00002b 	beq	b84 <malloc+0xd4>
- ad4:	e5930000 	ldr	r0, [r3]
- ad8:	e5902004 	ldr	r2, [r0, #4]
-    base.s.ptr = freep = prevp = &base;
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
- adc:	e1520004 	cmp	r2, r4
- ae0:	2a00001b 	bcs	b54 <malloc+0xa4>
-morecore(uint nu)
-{
-  char *p;
-  Header *hp;
-
-  if(nu < 4096)
- ae4:	e59f80ac 	ldr	r8, [pc, #172]	; b98 <malloc+0xe8>
-        p->s.size -= nunits;
-        p += p->s.size;
-        p->s.size = nunits;
-      }
-      freep = prevp;
-      return (void*)(p + 1);
- ae8:	e1a07184 	lsl	r7, r4, #3
- aec:	ea000003 	b	b00 <malloc+0x50>
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
-  if((prevp = freep) == 0){
-    base.s.ptr = freep = prevp = &base;
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
- af0:	e5930000 	ldr	r0, [r3]
-    if(p->s.size >= nunits){
- af4:	e5902004 	ldr	r2, [r0, #4]
- af8:	e1540002 	cmp	r4, r2
- afc:	9a000014 	bls	b54 <malloc+0xa4>
-        p->s.size = nunits;
-      }
-      freep = prevp;
-      return (void*)(p + 1);
-    }
-    if(p == freep)
- b00:	e5952000 	ldr	r2, [r5]
- b04:	e1a03000 	mov	r3, r0
- b08:	e1500002 	cmp	r0, r2
- b0c:	1afffff7 	bne	af0 <malloc+0x40>
-morecore(uint nu)
-{
-  char *p;
-  Header *hp;
-
-  if(nu < 4096)
- b10:	e1540008 	cmp	r4, r8
-    nu = 4096;
-  p = sbrk(nu * sizeof(Header));
- b14:	81a00007 	movhi	r0, r7
- b18:	93a00902 	movls	r0, #32768	; 0x8000
-morecore(uint nu)
-{
-  char *p;
-  Header *hp;
-
-  if(nu < 4096)
- b1c:	81a06004 	movhi	r6, r4
- b20:	93a06a01 	movls	r6, #4096	; 0x1000
-    nu = 4096;
-  p = sbrk(nu * sizeof(Header));
- b24:	ebfffeec 	bl	6dc <sbrk>
- b28:	e1a03000 	mov	r3, r0
-  if(p == (char*)-1)
- b2c:	e3730001 	cmn	r3, #1
-    return 0;
-  hp = (Header*)p;
-  hp->s.size = nu;
-  free((void*)(hp + 1));
- b30:	e2800008 	add	r0, r0, #8
-  Header *hp;
-
-  if(nu < 4096)
-    nu = 4096;
-  p = sbrk(nu * sizeof(Header));
-  if(p == (char*)-1)
- b34:	0a000010 	beq	b7c <malloc+0xcc>
-    return 0;
-  hp = (Header*)p;
-  hp->s.size = nu;
- b38:	e5836004 	str	r6, [r3, #4]
-  free((void*)(hp + 1));
- b3c:	ebffffb2 	bl	a0c <free>
-  return freep;
- b40:	e5953000 	ldr	r3, [r5]
-      }
-      freep = prevp;
-      return (void*)(p + 1);
-    }
-    if(p == freep)
-      if((p = morecore(nunits)) == 0)
- b44:	e3530000 	cmp	r3, #0
- b48:	1affffe8 	bne	af0 <malloc+0x40>
-        return 0;
- b4c:	e1a00003 	mov	r0, r3
-  }
-}
- b50:	e8bd89f8 	pop	{r3, r4, r5, r6, r7, r8, fp, pc}
-    base.s.ptr = freep = prevp = &base;
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
-      if(p->s.size == nunits)
- b54:	e1540002 	cmp	r4, r2
-        prevp->s.ptr = p->s.ptr;
-      else {
-        p->s.size -= nunits;
- b58:	10642002 	rsbne	r2, r4, r2
- b5c:	15802004 	strne	r2, [r0, #4]
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
-      if(p->s.size == nunits)
-        prevp->s.ptr = p->s.ptr;
- b60:	05902000 	ldreq	r2, [r0]
-      else {
-        p->s.size -= nunits;
-        p += p->s.size;
- b64:	10800182 	addne	r0, r0, r2, lsl #3
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
-      if(p->s.size == nunits)
-        prevp->s.ptr = p->s.ptr;
- b68:	05832000 	streq	r2, [r3]
-      else {
-        p->s.size -= nunits;
-        p += p->s.size;
-        p->s.size = nunits;
- b6c:	15804004 	strne	r4, [r0, #4]
-      }
-      freep = prevp;
- b70:	e5853000 	str	r3, [r5]
-      return (void*)(p + 1);
- b74:	e2800008 	add	r0, r0, #8
- b78:	e8bd89f8 	pop	{r3, r4, r5, r6, r7, r8, fp, pc}
-    }
-    if(p == freep)
-      if((p = morecore(nunits)) == 0)
-        return 0;
- b7c:	e3a00000 	mov	r0, #0
- b80:	e8bd89f8 	pop	{r3, r4, r5, r6, r7, r8, fp, pc}
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
-  if((prevp = freep) == 0){
-    base.s.ptr = freep = prevp = &base;
- b84:	e2850004 	add	r0, r5, #4
- b88:	e5850000 	str	r0, [r5]
-    base.s.size = 0;
- b8c:	e9850009 	stmib	r5, {r0, r3}
- b90:	eaffffd3 	b	ae4 <malloc+0x34>
- b94:	00000be4 	.word	0x00000be4
- b98:	00000fff 	.word	0x00000fff
--- a/uprogs/cat.sym	Sun Oct 22 18:51:04 2017 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-00000000 .text
-00000b9c .rodata
-00000be4 .bss
-00000000 .comment
-00000000 .ARM.attributes
-00000000 .debug_aranges
-00000000 .debug_info
-00000000 .debug_abbrev
-00000000 .debug_line
-00000000 .debug_frame
-00000000 .debug_str
-00000000 .debug_loc
-00000000 .debug_ranges
-00000000 cat.c
-00000000 ulib.c
-00000000 printf.c
-00000778 putc
-000007a0 printint
-00000bc8 digits.993
-00000000 umalloc.c
-00000be4 freep
-00000be8 base
-000000c8 strcpy
-000008b4 printf
-00000300 memmove
-0000053c mknod
-00000df0 _bss_end__
-000001f8 gets
-000006a8 getpid
-00000078 cat
-00000ab0 malloc
-00000710 sleep
-00000be4 __bss_start__
-000003d0 pipe
-00000438 write
-000005a4 fstat
-000004a0 kill
-00000640 chdir
-000004d4 exec
-00000df0 __bss_end__
-0000039c wait
-00000404 read
-00000570 unlink
-00000334 fork
-000006dc sbrk
-00000744 uptime
-00000be4 __bss_start
-0000017c memset
-00000000 main
-00000df0 __end__
-000000f0 strcmp
-00000674 dup
-00000bf0 buf
-00000270 stat
-00000be4 _edata
-00000df0 _end
-000005d8 link
-00000368 exit
-000002ac atoi
-0000013c strlen
-00000508 open
-0000086c div
-000001b4 strchr
-0000060c mkdir
-0000046c close
-00000a0c free
--- a/uprogs/echo.asm	Sun Oct 22 18:51:04 2017 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1665 +0,0 @@
-
-_echo:     file format elf32-littlearm
-
-
-Disassembly of section .text:
-
-00000000 <main>:
-int
-main(int argc, char *argv[])
-{
-  int i;
-
-  for(i = 1; i < argc; i++)
-   0:	e3500001 	cmp	r0, #1
-#include "stat.h"
-#include "user.h"
-
-int
-main(int argc, char *argv[])
-{
-   4:	e92d4878 	push	{r3, r4, r5, r6, fp, lr}
-   8:	e1a06000 	mov	r6, r0
-   c:	e28db014 	add	fp, sp, #20
-  int i;
-
-  for(i = 1; i < argc; i++)
-  10:	da000011 	ble	5c <main+0x5c>
-  14:	e3a04001 	mov	r4, #1
-  18:	e1a05001 	mov	r5, r1
-    printf(1, "%s%s", argv[i], i+1 < argc ? " " : "\n");
-  1c:	e2844001 	add	r4, r4, #1
-  20:	e1540006 	cmp	r4, r6
-  24:	e5b52004 	ldr	r2, [r5, #4]!
-  28:	e3a00001 	mov	r0, #1
-  2c:	e59f102c 	ldr	r1, [pc, #44]	; 60 <main+0x60>
-  30:	0a000007 	beq	54 <main+0x54>
-  34:	e59f3028 	ldr	r3, [pc, #40]	; 64 <main+0x64>
-  38:	e2844001 	add	r4, r4, #1
-  3c:	eb000205 	bl	858 <printf>
-  40:	e1540006 	cmp	r4, r6
-  44:	e5b52004 	ldr	r2, [r5, #4]!
-  48:	e3a00001 	mov	r0, #1
-  4c:	e59f100c 	ldr	r1, [pc, #12]	; 60 <main+0x60>
-  50:	1afffff7 	bne	34 <main+0x34>
-  54:	e59f300c 	ldr	r3, [pc, #12]	; 68 <main+0x68>
-  58:	eb0001fe 	bl	858 <printf>
-  exit();
-  5c:	eb0000aa 	bl	30c <exit>
-  60:	00000b40 	.word	0x00000b40
-  64:	00000b48 	.word	0x00000b48
-  68:	00000b4c 	.word	0x00000b4c
-
-0000006c <strcpy>:
-#include "user.h"
-#include "arm.h"
-
-char*
-strcpy(char *s, char *t)
-{
-  6c:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
-  char *os;
-
-  os = s;
-  while((*s++ = *t++) != 0)
-  70:	e1a02000 	mov	r2, r0
-#include "user.h"
-#include "arm.h"
-
-char*
-strcpy(char *s, char *t)
-{
-  74:	e28db000 	add	fp, sp, #0
-  char *os;
-
-  os = s;
-  while((*s++ = *t++) != 0)
-  78:	e4d13001 	ldrb	r3, [r1], #1
-  7c:	e3530000 	cmp	r3, #0
-  80:	e4c23001 	strb	r3, [r2], #1
-  84:	1afffffb 	bne	78 <strcpy+0xc>
-    ;
-  return os;
-}
-  88:	e28bd000 	add	sp, fp, #0
-  8c:	e8bd0800 	pop	{fp}
-  90:	e12fff1e 	bx	lr
-
-00000094 <strcmp>:
-
-int
-strcmp(const char *p, const char *q)
-{
-  94:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
-  98:	e28db000 	add	fp, sp, #0
-  while(*p && *p == *q)
-  9c:	e5d03000 	ldrb	r3, [r0]
-  a0:	e5d12000 	ldrb	r2, [r1]
-  a4:	e3530000 	cmp	r3, #0
-  a8:	1a000004 	bne	c0 <strcmp+0x2c>
-  ac:	ea000005 	b	c8 <strcmp+0x34>
-  b0:	e5f03001 	ldrb	r3, [r0, #1]!
-  b4:	e3530000 	cmp	r3, #0
-  b8:	0a000006 	beq	d8 <strcmp+0x44>
-  bc:	e5f12001 	ldrb	r2, [r1, #1]!
-  c0:	e1530002 	cmp	r3, r2
-  c4:	0afffff9 	beq	b0 <strcmp+0x1c>
-    p++, q++;
-  return (uchar)*p - (uchar)*q;
-}
-  c8:	e0620003 	rsb	r0, r2, r3
-  cc:	e28bd000 	add	sp, fp, #0
-  d0:	e8bd0800 	pop	{fp}
-  d4:	e12fff1e 	bx	lr
-}
-
-int
-strcmp(const char *p, const char *q)
-{
-  while(*p && *p == *q)
-  d8:	e5d12001 	ldrb	r2, [r1, #1]
-  dc:	eafffff9 	b	c8 <strcmp+0x34>
-
-000000e0 <strlen>:
-  return (uchar)*p - (uchar)*q;
-}
-
-uint
-strlen(char *s)
-{
-  e0:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
-  e4:	e28db000 	add	fp, sp, #0
-  int n;
-
-  for(n = 0; s[n]; n++)
-  e8:	e5d03000 	ldrb	r3, [r0]
-  ec:	e3530000 	cmp	r3, #0
-  f0:	01a00003 	moveq	r0, r3
-  f4:	0a000006 	beq	114 <strlen+0x34>
-  f8:	e1a02000 	mov	r2, r0
-  fc:	e3a03000 	mov	r3, #0
- 100:	e5f21001 	ldrb	r1, [r2, #1]!
- 104:	e2833001 	add	r3, r3, #1
- 108:	e1a00003 	mov	r0, r3
- 10c:	e3510000 	cmp	r1, #0
- 110:	1afffffa 	bne	100 <strlen+0x20>
-    ;
-  return n;
-}
- 114:	e28bd000 	add	sp, fp, #0
- 118:	e8bd0800 	pop	{fp}
- 11c:	e12fff1e 	bx	lr
-
-00000120 <memset>:
-memset(void *dst, int c, uint n)
-{
-  char *p=dst;
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 120:	e3520000 	cmp	r2, #0
-  return n;
-}
-
-void*
-memset(void *dst, int c, uint n)
-{
- 124:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 128:	e28db000 	add	fp, sp, #0
-  char *p=dst;
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 12c:	0a000006 	beq	14c <memset+0x2c>
- 130:	e6ef1071 	uxtb	r1, r1
- 134:	e1a03002 	mov	r3, r2
-}
-
-void*
-memset(void *dst, int c, uint n)
-{
-  char *p=dst;
- 138:	e1a0c000 	mov	ip, r0
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 13c:	e2533001 	subs	r3, r3, #1
- 140:	e4cc1001 	strb	r1, [ip], #1
- 144:	1afffffc 	bne	13c <memset+0x1c>
- 148:	e0800002 	add	r0, r0, r2
-  return (void *)p;
-}
- 14c:	e28bd000 	add	sp, fp, #0
- 150:	e8bd0800 	pop	{fp}
- 154:	e12fff1e 	bx	lr
-
-00000158 <strchr>:
-
-char*
-strchr(const char *s, char c)
-{
- 158:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 15c:	e28db000 	add	fp, sp, #0
-  for(; *s; s++)
- 160:	e5d03000 	ldrb	r3, [r0]
- 164:	e3530000 	cmp	r3, #0
- 168:	1a000004 	bne	180 <strchr+0x28>
- 16c:	ea000008 	b	194 <strchr+0x3c>
- 170:	e5d03001 	ldrb	r3, [r0, #1]
- 174:	e2800001 	add	r0, r0, #1
- 178:	e3530000 	cmp	r3, #0
- 17c:	0a000004 	beq	194 <strchr+0x3c>
-    if(*s == c)
- 180:	e1530001 	cmp	r3, r1
- 184:	1afffff9 	bne	170 <strchr+0x18>
-      return (char*)s;
-  return 0;
-}
- 188:	e28bd000 	add	sp, fp, #0
- 18c:	e8bd0800 	pop	{fp}
- 190:	e12fff1e 	bx	lr
-strchr(const char *s, char c)
-{
-  for(; *s; s++)
-    if(*s == c)
-      return (char*)s;
-  return 0;
- 194:	e1a00003 	mov	r0, r3
- 198:	eafffffa 	b	188 <strchr+0x30>
-
-0000019c <gets>:
-}
-
-char*
-gets(char *buf, int max)
-{
- 19c:	e92d49f0 	push	{r4, r5, r6, r7, r8, fp, lr}
- 1a0:	e28db018 	add	fp, sp, #24
- 1a4:	e24dd00c 	sub	sp, sp, #12
- 1a8:	e1a08000 	mov	r8, r0
- 1ac:	e1a07001 	mov	r7, r1
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 1b0:	e1a06000 	mov	r6, r0
- 1b4:	e3a05000 	mov	r5, #0
- 1b8:	ea000008 	b	1e0 <gets+0x44>
-    cc = read(0, &c, 1);
- 1bc:	eb000079 	bl	3a8 <read>
-    if(cc < 1)
- 1c0:	e3500000 	cmp	r0, #0
- 1c4:	da00000b 	ble	1f8 <gets+0x5c>
-      break;
-    buf[i++] = c;
- 1c8:	e55b301d 	ldrb	r3, [fp, #-29]
-    if(c == '\n' || c == '\r')
- 1cc:	e1a05004 	mov	r5, r4
- 1d0:	e353000a 	cmp	r3, #10
- 1d4:	1353000d 	cmpne	r3, #13
-
-  for(i=0; i+1 < max; ){
-    cc = read(0, &c, 1);
-    if(cc < 1)
-      break;
-    buf[i++] = c;
- 1d8:	e4c63001 	strb	r3, [r6], #1
-    if(c == '\n' || c == '\r')
- 1dc:	0a00000a 	beq	20c <gets+0x70>
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
-    cc = read(0, &c, 1);
- 1e0:	e3a02001 	mov	r2, #1
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 1e4:	e0854002 	add	r4, r5, r2
- 1e8:	e1540007 	cmp	r4, r7
-    cc = read(0, &c, 1);
- 1ec:	e3a00000 	mov	r0, #0
- 1f0:	e24b101d 	sub	r1, fp, #29
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 1f4:	bafffff0 	blt	1bc <gets+0x20>
-      break;
-    buf[i++] = c;
-    if(c == '\n' || c == '\r')
-      break;
-  }
-  buf[i] = '\0';
- 1f8:	e3a03000 	mov	r3, #0
- 1fc:	e7c83005 	strb	r3, [r8, r5]
-  return buf;
-}
- 200:	e1a00008 	mov	r0, r8
- 204:	e24bd018 	sub	sp, fp, #24
- 208:	e8bd89f0 	pop	{r4, r5, r6, r7, r8, fp, pc}
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 20c:	e1a05004 	mov	r5, r4
- 210:	eafffff8 	b	1f8 <gets+0x5c>
-
-00000214 <stat>:
-  return buf;
-}
-
-int
-stat(char *n, struct stat *st)
-{
- 214:	e92d4830 	push	{r4, r5, fp, lr}
- 218:	e1a05001 	mov	r5, r1
- 21c:	e28db00c 	add	fp, sp, #12
-  int fd;
-  int r;
-
-  fd = open(n, O_RDONLY);
- 220:	e3a01000 	mov	r1, #0
- 224:	eb0000a0 	bl	4ac <open>
-  if(fd < 0)
- 228:	e2504000 	subs	r4, r0, #0
-    return -1;
- 22c:	b3e05000 	mvnlt	r5, #0
-{
-  int fd;
-  int r;
-
-  fd = open(n, O_RDONLY);
-  if(fd < 0)
- 230:	ba000004 	blt	248 <stat+0x34>
-    return -1;
-  r = fstat(fd, st);
- 234:	e1a01005 	mov	r1, r5
- 238:	eb0000c2 	bl	548 <fstat>
- 23c:	e1a05000 	mov	r5, r0
-  close(fd);
- 240:	e1a00004 	mov	r0, r4
- 244:	eb000071 	bl	410 <close>
-  return r;
-}
- 248:	e1a00005 	mov	r0, r5
- 24c:	e8bd8830 	pop	{r4, r5, fp, pc}
-
-00000250 <atoi>:
-
-int
-atoi(const char *s)
-{
- 250:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 254:	e28db000 	add	fp, sp, #0
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 258:	e5d03000 	ldrb	r3, [r0]
- 25c:	e2432030 	sub	r2, r3, #48	; 0x30
- 260:	e6ef2072 	uxtb	r2, r2
- 264:	e3520009 	cmp	r2, #9
-int
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
- 268:	83a00000 	movhi	r0, #0
-  while('0' <= *s && *s <= '9')
- 26c:	8a000009 	bhi	298 <atoi+0x48>
- 270:	e1a02000 	mov	r2, r0
-int
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
- 274:	e3a00000 	mov	r0, #0
-  while('0' <= *s && *s <= '9')
-    n = n*10 + *s++ - '0';
- 278:	e0800100 	add	r0, r0, r0, lsl #2
- 27c:	e0830080 	add	r0, r3, r0, lsl #1
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 280:	e5f23001 	ldrb	r3, [r2, #1]!
-    n = n*10 + *s++ - '0';
- 284:	e2400030 	sub	r0, r0, #48	; 0x30
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 288:	e2431030 	sub	r1, r3, #48	; 0x30
- 28c:	e6ef1071 	uxtb	r1, r1
- 290:	e3510009 	cmp	r1, #9
- 294:	9afffff7 	bls	278 <atoi+0x28>
-    n = n*10 + *s++ - '0';
-  return n;
-}
- 298:	e28bd000 	add	sp, fp, #0
- 29c:	e8bd0800 	pop	{fp}
- 2a0:	e12fff1e 	bx	lr
-
-000002a4 <memmove>:
-{
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 2a4:	e3520000 	cmp	r2, #0
-  return n;
-}
-
-void*
-memmove(void *vdst, void *vsrc, int n)
-{
- 2a8:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 2ac:	e28db000 	add	fp, sp, #0
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 2b0:	da000005 	ble	2cc <memmove+0x28>
-    n = n*10 + *s++ - '0';
-  return n;
-}
-
-void*
-memmove(void *vdst, void *vsrc, int n)
- 2b4:	e0802002 	add	r2, r0, r2
-{
-  char *dst, *src;
-  
-  dst = vdst;
- 2b8:	e1a03000 	mov	r3, r0
-  src = vsrc;
-  while(n-- > 0)
-    *dst++ = *src++;
- 2bc:	e4d1c001 	ldrb	ip, [r1], #1
- 2c0:	e4c3c001 	strb	ip, [r3], #1
-{
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 2c4:	e1530002 	cmp	r3, r2
- 2c8:	1afffffb 	bne	2bc <memmove+0x18>
-    *dst++ = *src++;
-  return vdst;
-}
- 2cc:	e28bd000 	add	sp, fp, #0
- 2d0:	e8bd0800 	pop	{fp}
- 2d4:	e12fff1e 	bx	lr
-
-000002d8 <fork>:
- 2d8:	e92d4000 	push	{lr}
- 2dc:	e92d0008 	push	{r3}
- 2e0:	e92d0004 	push	{r2}
- 2e4:	e92d0002 	push	{r1}
- 2e8:	e92d0001 	push	{r0}
- 2ec:	e3a00001 	mov	r0, #1
- 2f0:	ef000040 	svc	0x00000040
- 2f4:	e8bd0002 	pop	{r1}
- 2f8:	e8bd0002 	pop	{r1}
- 2fc:	e8bd0004 	pop	{r2}
- 300:	e8bd0008 	pop	{r3}
- 304:	e8bd4000 	pop	{lr}
- 308:	e12fff1e 	bx	lr
-
-0000030c <exit>:
- 30c:	e92d4000 	push	{lr}
- 310:	e92d0008 	push	{r3}
- 314:	e92d0004 	push	{r2}
- 318:	e92d0002 	push	{r1}
- 31c:	e92d0001 	push	{r0}
- 320:	e3a00002 	mov	r0, #2
- 324:	ef000040 	svc	0x00000040
- 328:	e8bd0002 	pop	{r1}
- 32c:	e8bd0002 	pop	{r1}
- 330:	e8bd0004 	pop	{r2}
- 334:	e8bd0008 	pop	{r3}
- 338:	e8bd4000 	pop	{lr}
- 33c:	e12fff1e 	bx	lr
-
-00000340 <wait>:
- 340:	e92d4000 	push	{lr}
- 344:	e92d0008 	push	{r3}
- 348:	e92d0004 	push	{r2}
- 34c:	e92d0002 	push	{r1}
- 350:	e92d0001 	push	{r0}
- 354:	e3a00003 	mov	r0, #3
- 358:	ef000040 	svc	0x00000040
- 35c:	e8bd0002 	pop	{r1}
- 360:	e8bd0002 	pop	{r1}
- 364:	e8bd0004 	pop	{r2}
- 368:	e8bd0008 	pop	{r3}
- 36c:	e8bd4000 	pop	{lr}
- 370:	e12fff1e 	bx	lr
-
-00000374 <pipe>:
- 374:	e92d4000 	push	{lr}
- 378:	e92d0008 	push	{r3}
- 37c:	e92d0004 	push	{r2}
- 380:	e92d0002 	push	{r1}
- 384:	e92d0001 	push	{r0}
- 388:	e3a00004 	mov	r0, #4
- 38c:	ef000040 	svc	0x00000040
- 390:	e8bd0002 	pop	{r1}
- 394:	e8bd0002 	pop	{r1}
- 398:	e8bd0004 	pop	{r2}
- 39c:	e8bd0008 	pop	{r3}
- 3a0:	e8bd4000 	pop	{lr}
- 3a4:	e12fff1e 	bx	lr
-
-000003a8 <read>:
- 3a8:	e92d4000 	push	{lr}
- 3ac:	e92d0008 	push	{r3}
- 3b0:	e92d0004 	push	{r2}
- 3b4:	e92d0002 	push	{r1}
- 3b8:	e92d0001 	push	{r0}
- 3bc:	e3a00005 	mov	r0, #5
- 3c0:	ef000040 	svc	0x00000040
- 3c4:	e8bd0002 	pop	{r1}
- 3c8:	e8bd0002 	pop	{r1}
- 3cc:	e8bd0004 	pop	{r2}
- 3d0:	e8bd0008 	pop	{r3}
- 3d4:	e8bd4000 	pop	{lr}
- 3d8:	e12fff1e 	bx	lr
-
-000003dc <write>:
- 3dc:	e92d4000 	push	{lr}
- 3e0:	e92d0008 	push	{r3}
- 3e4:	e92d0004 	push	{r2}
- 3e8:	e92d0002 	push	{r1}
- 3ec:	e92d0001 	push	{r0}
- 3f0:	e3a00010 	mov	r0, #16
- 3f4:	ef000040 	svc	0x00000040
- 3f8:	e8bd0002 	pop	{r1}
- 3fc:	e8bd0002 	pop	{r1}
- 400:	e8bd0004 	pop	{r2}
- 404:	e8bd0008 	pop	{r3}
- 408:	e8bd4000 	pop	{lr}
- 40c:	e12fff1e 	bx	lr
-
-00000410 <close>:
- 410:	e92d4000 	push	{lr}
- 414:	e92d0008 	push	{r3}
- 418:	e92d0004 	push	{r2}
- 41c:	e92d0002 	push	{r1}
- 420:	e92d0001 	push	{r0}
- 424:	e3a00015 	mov	r0, #21
- 428:	ef000040 	svc	0x00000040
- 42c:	e8bd0002 	pop	{r1}
- 430:	e8bd0002 	pop	{r1}
- 434:	e8bd0004 	pop	{r2}
- 438:	e8bd0008 	pop	{r3}
- 43c:	e8bd4000 	pop	{lr}
- 440:	e12fff1e 	bx	lr
-
-00000444 <kill>:
- 444:	e92d4000 	push	{lr}
- 448:	e92d0008 	push	{r3}
- 44c:	e92d0004 	push	{r2}
- 450:	e92d0002 	push	{r1}
- 454:	e92d0001 	push	{r0}
- 458:	e3a00006 	mov	r0, #6
- 45c:	ef000040 	svc	0x00000040
- 460:	e8bd0002 	pop	{r1}
- 464:	e8bd0002 	pop	{r1}
- 468:	e8bd0004 	pop	{r2}
- 46c:	e8bd0008 	pop	{r3}
- 470:	e8bd4000 	pop	{lr}
- 474:	e12fff1e 	bx	lr
-
-00000478 <exec>:
- 478:	e92d4000 	push	{lr}
- 47c:	e92d0008 	push	{r3}
- 480:	e92d0004 	push	{r2}
- 484:	e92d0002 	push	{r1}
- 488:	e92d0001 	push	{r0}
- 48c:	e3a00007 	mov	r0, #7
- 490:	ef000040 	svc	0x00000040
- 494:	e8bd0002 	pop	{r1}
- 498:	e8bd0002 	pop	{r1}
- 49c:	e8bd0004 	pop	{r2}
- 4a0:	e8bd0008 	pop	{r3}
- 4a4:	e8bd4000 	pop	{lr}
- 4a8:	e12fff1e 	bx	lr
-
-000004ac <open>:
- 4ac:	e92d4000 	push	{lr}
- 4b0:	e92d0008 	push	{r3}
- 4b4:	e92d0004 	push	{r2}
- 4b8:	e92d0002 	push	{r1}
- 4bc:	e92d0001 	push	{r0}
- 4c0:	e3a0000f 	mov	r0, #15
- 4c4:	ef000040 	svc	0x00000040
- 4c8:	e8bd0002 	pop	{r1}
- 4cc:	e8bd0002 	pop	{r1}
- 4d0:	e8bd0004 	pop	{r2}
- 4d4:	e8bd0008 	pop	{r3}
- 4d8:	e8bd4000 	pop	{lr}
- 4dc:	e12fff1e 	bx	lr
-
-000004e0 <mknod>:
- 4e0:	e92d4000 	push	{lr}
- 4e4:	e92d0008 	push	{r3}
- 4e8:	e92d0004 	push	{r2}
- 4ec:	e92d0002 	push	{r1}
- 4f0:	e92d0001 	push	{r0}
- 4f4:	e3a00011 	mov	r0, #17
- 4f8:	ef000040 	svc	0x00000040
- 4fc:	e8bd0002 	pop	{r1}
- 500:	e8bd0002 	pop	{r1}
- 504:	e8bd0004 	pop	{r2}
- 508:	e8bd0008 	pop	{r3}
- 50c:	e8bd4000 	pop	{lr}
- 510:	e12fff1e 	bx	lr
-
-00000514 <unlink>:
- 514:	e92d4000 	push	{lr}
- 518:	e92d0008 	push	{r3}
- 51c:	e92d0004 	push	{r2}
- 520:	e92d0002 	push	{r1}
- 524:	e92d0001 	push	{r0}
- 528:	e3a00012 	mov	r0, #18
- 52c:	ef000040 	svc	0x00000040
- 530:	e8bd0002 	pop	{r1}
- 534:	e8bd0002 	pop	{r1}
- 538:	e8bd0004 	pop	{r2}
- 53c:	e8bd0008 	pop	{r3}
- 540:	e8bd4000 	pop	{lr}
- 544:	e12fff1e 	bx	lr
-
-00000548 <fstat>:
- 548:	e92d4000 	push	{lr}
- 54c:	e92d0008 	push	{r3}
- 550:	e92d0004 	push	{r2}
- 554:	e92d0002 	push	{r1}
- 558:	e92d0001 	push	{r0}
- 55c:	e3a00008 	mov	r0, #8
- 560:	ef000040 	svc	0x00000040
- 564:	e8bd0002 	pop	{r1}
- 568:	e8bd0002 	pop	{r1}
- 56c:	e8bd0004 	pop	{r2}
- 570:	e8bd0008 	pop	{r3}
- 574:	e8bd4000 	pop	{lr}
- 578:	e12fff1e 	bx	lr
-
-0000057c <link>:
- 57c:	e92d4000 	push	{lr}
- 580:	e92d0008 	push	{r3}
- 584:	e92d0004 	push	{r2}
- 588:	e92d0002 	push	{r1}
- 58c:	e92d0001 	push	{r0}
- 590:	e3a00013 	mov	r0, #19
- 594:	ef000040 	svc	0x00000040
- 598:	e8bd0002 	pop	{r1}
- 59c:	e8bd0002 	pop	{r1}
- 5a0:	e8bd0004 	pop	{r2}
- 5a4:	e8bd0008 	pop	{r3}
- 5a8:	e8bd4000 	pop	{lr}
- 5ac:	e12fff1e 	bx	lr
-
-000005b0 <mkdir>:
- 5b0:	e92d4000 	push	{lr}
- 5b4:	e92d0008 	push	{r3}
- 5b8:	e92d0004 	push	{r2}
- 5bc:	e92d0002 	push	{r1}
- 5c0:	e92d0001 	push	{r0}
- 5c4:	e3a00014 	mov	r0, #20
- 5c8:	ef000040 	svc	0x00000040
- 5cc:	e8bd0002 	pop	{r1}
- 5d0:	e8bd0002 	pop	{r1}
- 5d4:	e8bd0004 	pop	{r2}
- 5d8:	e8bd0008 	pop	{r3}
- 5dc:	e8bd4000 	pop	{lr}
- 5e0:	e12fff1e 	bx	lr
-
-000005e4 <chdir>:
- 5e4:	e92d4000 	push	{lr}
- 5e8:	e92d0008 	push	{r3}
- 5ec:	e92d0004 	push	{r2}
- 5f0:	e92d0002 	push	{r1}
- 5f4:	e92d0001 	push	{r0}
- 5f8:	e3a00009 	mov	r0, #9
- 5fc:	ef000040 	svc	0x00000040
- 600:	e8bd0002 	pop	{r1}
- 604:	e8bd0002 	pop	{r1}
- 608:	e8bd0004 	pop	{r2}
- 60c:	e8bd0008 	pop	{r3}
- 610:	e8bd4000 	pop	{lr}
- 614:	e12fff1e 	bx	lr
-
-00000618 <dup>:
- 618:	e92d4000 	push	{lr}
- 61c:	e92d0008 	push	{r3}
- 620:	e92d0004 	push	{r2}
- 624:	e92d0002 	push	{r1}
- 628:	e92d0001 	push	{r0}
- 62c:	e3a0000a 	mov	r0, #10
- 630:	ef000040 	svc	0x00000040
- 634:	e8bd0002 	pop	{r1}
- 638:	e8bd0002 	pop	{r1}
- 63c:	e8bd0004 	pop	{r2}
- 640:	e8bd0008 	pop	{r3}
- 644:	e8bd4000 	pop	{lr}
- 648:	e12fff1e 	bx	lr
-
-0000064c <getpid>:
- 64c:	e92d4000 	push	{lr}
- 650:	e92d0008 	push	{r3}
- 654:	e92d0004 	push	{r2}
- 658:	e92d0002 	push	{r1}
- 65c:	e92d0001 	push	{r0}
- 660:	e3a0000b 	mov	r0, #11
- 664:	ef000040 	svc	0x00000040
- 668:	e8bd0002 	pop	{r1}
- 66c:	e8bd0002 	pop	{r1}
- 670:	e8bd0004 	pop	{r2}
- 674:	e8bd0008 	pop	{r3}
- 678:	e8bd4000 	pop	{lr}
- 67c:	e12fff1e 	bx	lr
-
-00000680 <sbrk>:
- 680:	e92d4000 	push	{lr}
- 684:	e92d0008 	push	{r3}
- 688:	e92d0004 	push	{r2}
- 68c:	e92d0002 	push	{r1}
- 690:	e92d0001 	push	{r0}
- 694:	e3a0000c 	mov	r0, #12
- 698:	ef000040 	svc	0x00000040
- 69c:	e8bd0002 	pop	{r1}
- 6a0:	e8bd0002 	pop	{r1}
- 6a4:	e8bd0004 	pop	{r2}
- 6a8:	e8bd0008 	pop	{r3}
- 6ac:	e8bd4000 	pop	{lr}
- 6b0:	e12fff1e 	bx	lr
-
-000006b4 <sleep>:
- 6b4:	e92d4000 	push	{lr}
- 6b8:	e92d0008 	push	{r3}
- 6bc:	e92d0004 	push	{r2}
- 6c0:	e92d0002 	push	{r1}
- 6c4:	e92d0001 	push	{r0}
- 6c8:	e3a0000d 	mov	r0, #13
- 6cc:	ef000040 	svc	0x00000040
- 6d0:	e8bd0002 	pop	{r1}
- 6d4:	e8bd0002 	pop	{r1}
- 6d8:	e8bd0004 	pop	{r2}
- 6dc:	e8bd0008 	pop	{r3}
- 6e0:	e8bd4000 	pop	{lr}
- 6e4:	e12fff1e 	bx	lr
-
-000006e8 <uptime>:
- 6e8:	e92d4000 	push	{lr}
- 6ec:	e92d0008 	push	{r3}
- 6f0:	e92d0004 	push	{r2}
- 6f4:	e92d0002 	push	{r1}
- 6f8:	e92d0001 	push	{r0}
- 6fc:	e3a0000e 	mov	r0, #14
- 700:	ef000040 	svc	0x00000040
- 704:	e8bd0002 	pop	{r1}
- 708:	e8bd0002 	pop	{r1}
- 70c:	e8bd0004 	pop	{r2}
- 710:	e8bd0008 	pop	{r3}
- 714:	e8bd4000 	pop	{lr}
- 718:	e12fff1e 	bx	lr
-
-0000071c <putc>:
-#include "stat.h"
-#include "user.h"
-
-static void
-putc(int fd, char c)
-{
- 71c:	e92d4800 	push	{fp, lr}
- 720:	e28db004 	add	fp, sp, #4
- 724:	e24b3004 	sub	r3, fp, #4
- 728:	e24dd008 	sub	sp, sp, #8
-  write(fd, &c, 1);
- 72c:	e3a02001 	mov	r2, #1
-#include "stat.h"
-#include "user.h"
-
-static void
-putc(int fd, char c)
-{
- 730:	e5631001 	strb	r1, [r3, #-1]!
-  write(fd, &c, 1);
- 734:	e1a01003 	mov	r1, r3
- 738:	ebffff27 	bl	3dc <write>
-}
- 73c:	e24bd004 	sub	sp, fp, #4
- 740:	e8bd8800 	pop	{fp, pc}
-
-00000744 <printint>:
-    return q;
-}
-
-static void
-printint(int fd, int xx, int base, int sgn)
-{
- 744:	e92d4ff0 	push	{r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 748:	e1a04000 	mov	r4, r0
-  char buf[16];
-  int i, neg;
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
- 74c:	e1a00fa1 	lsr	r0, r1, #31
- 750:	e3530000 	cmp	r3, #0
- 754:	03a03000 	moveq	r3, #0
- 758:	12003001 	andne	r3, r0, #1
-    return q;
-}
-
-static void
-printint(int fd, int xx, int base, int sgn)
-{
- 75c:	e28db020 	add	fp, sp, #32
-  char buf[16];
-  int i, neg;
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
- 760:	e3530000 	cmp	r3, #0
-    return q;
-}
-
-static void
-printint(int fd, int xx, int base, int sgn)
-{
- 764:	e24dd014 	sub	sp, sp, #20
- 768:	e59f909c 	ldr	r9, [pc, #156]	; 80c <printint+0xc8>
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
-    neg = 1;
-    x = -xx;
- 76c:	12611000 	rsbne	r1, r1, #0
-  int i, neg;
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
-    neg = 1;
- 770:	13a03001 	movne	r3, #1
-  } else {
-    x = xx;
-  }
-
-  b = base;
-  i = 0;
- 774:	e3a0a000 	mov	sl, #0
- 778:	e24b6034 	sub	r6, fp, #52	; 0x34
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
-            q = q | (1 << i);
- 77c:	e3a08001 	mov	r8, #1
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- 780:	e3a07000 	mov	r7, #0
-    int i;
-
-    for(i=31;i>=0;i--){
- 784:	e3a0001f 	mov	r0, #31
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- 788:	e1a0c007 	mov	ip, r7
-    int i;
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
- 78c:	e1a0e031 	lsr	lr, r1, r0
- 790:	e20ee001 	and	lr, lr, #1
- 794:	e18ec08c 	orr	ip, lr, ip, lsl #1
-        if(r >= d) {
- 798:	e152000c 	cmp	r2, ip
-            r = r - d;
-            q = q | (1 << i);
- 79c:	91877018 	orrls	r7, r7, r8, lsl r0
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
- 7a0:	9062c00c 	rsbls	ip, r2, ip
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
- 7a4:	e2500001 	subs	r0, r0, #1
- 7a8:	2afffff7 	bcs	78c <printint+0x48>
-
-  b = base;
-  i = 0;
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
- 7ac:	e0000792 	mul	r0, r2, r7
-  }while((x = y) != 0);
- 7b0:	e3570000 	cmp	r7, #0
-
-  b = base;
-  i = 0;
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
- 7b4:	e0601001 	rsb	r1, r0, r1
- 7b8:	e28a5001 	add	r5, sl, #1
- 7bc:	e7d91001 	ldrb	r1, [r9, r1]
- 7c0:	e7c6100a 	strb	r1, [r6, sl]
-  }while((x = y) != 0);
- 7c4:	11a01007 	movne	r1, r7
-
-  b = base;
-  i = 0;
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
- 7c8:	11a0a005 	movne	sl, r5
- 7cc:	1affffeb 	bne	780 <printint+0x3c>
-  }while((x = y) != 0);
-  if(neg)
- 7d0:	e3530000 	cmp	r3, #0
-    buf[i++] = '-';
- 7d4:	124b2024 	subne	r2, fp, #36	; 0x24
- 7d8:	10823005 	addne	r3, r2, r5
- 7dc:	128a5002 	addne	r5, sl, #2
-
-  while(--i >= 0)
- 7e0:	e2455001 	sub	r5, r5, #1
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
-  }while((x = y) != 0);
-  if(neg)
-    buf[i++] = '-';
- 7e4:	13a0202d 	movne	r2, #45	; 0x2d
- 7e8:	15432010 	strbne	r2, [r3, #-16]
-
-  while(--i >= 0)
-    putc(fd, buf[i]);
- 7ec:	e7d61005 	ldrb	r1, [r6, r5]
- 7f0:	e1a00004 	mov	r0, r4
-    buf[i++] = digits[x - y * b];
-  }while((x = y) != 0);
-  if(neg)
-    buf[i++] = '-';
-
-  while(--i >= 0)
- 7f4:	e2455001 	sub	r5, r5, #1
-    putc(fd, buf[i]);
- 7f8:	ebffffc7 	bl	71c <putc>
-    buf[i++] = digits[x - y * b];
-  }while((x = y) != 0);
-  if(neg)
-    buf[i++] = '-';
-
-  while(--i >= 0)
- 7fc:	e3750001 	cmn	r5, #1
- 800:	1afffff9 	bne	7ec <printint+0xa8>
-    putc(fd, buf[i]);
-}
- 804:	e24bd020 	sub	sp, fp, #32
- 808:	e8bd8ff0 	pop	{r4, r5, r6, r7, r8, r9, sl, fp, pc}
- 80c:	00000b50 	.word	0x00000b50
-
-00000810 <div>:
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- 810:	e3a03000 	mov	r3, #0
-{
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
- 814:	e92d0830 	push	{r4, r5, fp}
- 818:	e1a02000 	mov	r2, r0
- 81c:	e28db008 	add	fp, sp, #8
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
- 820:	e3a0c01f 	mov	ip, #31
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- 824:	e1a00003 	mov	r0, r3
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
-            q = q | (1 << i);
- 828:	e3a05001 	mov	r5, #1
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
- 82c:	e1a04c32 	lsr	r4, r2, ip
- 830:	e2044001 	and	r4, r4, #1
- 834:	e1843083 	orr	r3, r4, r3, lsl #1
-        if(r >= d) {
- 838:	e1530001 	cmp	r3, r1
-            r = r - d;
-            q = q | (1 << i);
- 83c:	21800c15 	orrcs	r0, r0, r5, lsl ip
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
- 840:	20613003 	rsbcs	r3, r1, r3
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
- 844:	e25cc001 	subs	ip, ip, #1
- 848:	2afffff7 	bcs	82c <div+0x1c>
-            r = r - d;
-            q = q | (1 << i);
-        }
-    }
-    return q;
-}
- 84c:	e24bd008 	sub	sp, fp, #8
- 850:	e8bd0830 	pop	{r4, r5, fp}
- 854:	e12fff1e 	bx	lr
-
-00000858 <printf>:
-}
-
-// Print to the given fd. Only understands %d, %x, %p, %s.
-void
-printf(int fd, char *fmt, ...)
-{
- 858:	e92d000e 	push	{r1, r2, r3}
- 85c:	e92d4ff0 	push	{r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 860:	e28db020 	add	fp, sp, #32
- 864:	e1a05000 	mov	r5, r0
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- 868:	e59b4004 	ldr	r4, [fp, #4]
- 86c:	e5d48000 	ldrb	r8, [r4]
- 870:	e3580000 	cmp	r8, #0
- 874:	0a000027 	beq	918 <printf+0xc0>
-        ap++;
-      } else if(c == 's'){
-        s = (char*)*ap;
-        ap++;
-        if(s == 0)
-          s = "(null)";
- 878:	e59f712c 	ldr	r7, [pc, #300]	; 9ac <printf+0x154>
-  char *s;
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
- 87c:	e28b6008 	add	r6, fp, #8
-{
-  char *s;
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
- 880:	e3a0a000 	mov	sl, #0
- 884:	ea000008 	b	8ac <printf+0x54>
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
-    c = fmt[i] & 0xff;
-    if(state == 0){
-      if(c == '%'){
- 888:	e3580025 	cmp	r8, #37	; 0x25
-        state = '%';
- 88c:	01a0a008 	moveq	sl, r8
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
-    c = fmt[i] & 0xff;
-    if(state == 0){
-      if(c == '%'){
- 890:	0a000002 	beq	8a0 <printf+0x48>
-        state = '%';
-      } else {
-        putc(fd, c);
- 894:	e1a00005 	mov	r0, r5
- 898:	e1a01008 	mov	r1, r8
- 89c:	ebffff9e 	bl	71c <putc>
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- 8a0:	e5f48001 	ldrb	r8, [r4, #1]!
- 8a4:	e3580000 	cmp	r8, #0
- 8a8:	0a00001a 	beq	918 <printf+0xc0>
-    c = fmt[i] & 0xff;
-    if(state == 0){
- 8ac:	e35a0000 	cmp	sl, #0
- 8b0:	0afffff4 	beq	888 <printf+0x30>
-      if(c == '%'){
-        state = '%';
-      } else {
-        putc(fd, c);
-      }
-    } else if(state == '%'){
- 8b4:	e35a0025 	cmp	sl, #37	; 0x25
- 8b8:	1afffff8 	bne	8a0 <printf+0x48>
-      if(c == 'd'){
- 8bc:	e3580064 	cmp	r8, #100	; 0x64
- 8c0:	0a00002c 	beq	978 <printf+0x120>
-        printint(fd, *ap, 10, 1);
-        ap++;
-      } else if(c == 'x' || c == 'p'){
- 8c4:	e3580078 	cmp	r8, #120	; 0x78
- 8c8:	13580070 	cmpne	r8, #112	; 0x70
- 8cc:	13a09000 	movne	r9, #0
- 8d0:	03a09001 	moveq	r9, #1
- 8d4:	0a000013 	beq	928 <printf+0xd0>
-        printint(fd, *ap, 16, 0);
-        ap++;
-      } else if(c == 's'){
- 8d8:	e3580073 	cmp	r8, #115	; 0x73
- 8dc:	0a000018 	beq	944 <printf+0xec>
-          s = "(null)";
-        while(*s != 0){
-          putc(fd, *s);
-          s++;
-        }
-      } else if(c == 'c'){
- 8e0:	e3580063 	cmp	r8, #99	; 0x63
- 8e4:	0a00002a 	beq	994 <printf+0x13c>
-        putc(fd, *ap);
-        ap++;
-      } else if(c == '%'){
- 8e8:	e3580025 	cmp	r8, #37	; 0x25
-        putc(fd, c);
- 8ec:	e1a0100a 	mov	r1, sl
- 8f0:	e1a00005 	mov	r0, r5
-          s++;
-        }
-      } else if(c == 'c'){
-        putc(fd, *ap);
-        ap++;
-      } else if(c == '%'){
- 8f4:	0a000002 	beq	904 <printf+0xac>
-        putc(fd, c);
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
- 8f8:	ebffff87 	bl	71c <putc>
-        putc(fd, c);
- 8fc:	e1a00005 	mov	r0, r5
- 900:	e1a01008 	mov	r1, r8
- 904:	ebffff84 	bl	71c <putc>
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- 908:	e5f48001 	ldrb	r8, [r4, #1]!
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- 90c:	e1a0a009 	mov	sl, r9
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- 910:	e3580000 	cmp	r8, #0
- 914:	1affffe4 	bne	8ac <printf+0x54>
-        putc(fd, c);
-      }
-      state = 0;
-    }
-  }
-}
- 918:	e24bd020 	sub	sp, fp, #32
- 91c:	e8bd4ff0 	pop	{r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 920:	e28dd00c 	add	sp, sp, #12
- 924:	e12fff1e 	bx	lr
-    } else if(state == '%'){
-      if(c == 'd'){
-        printint(fd, *ap, 10, 1);
-        ap++;
-      } else if(c == 'x' || c == 'p'){
-        printint(fd, *ap, 16, 0);
- 928:	e1a00005 	mov	r0, r5
- 92c:	e4961004 	ldr	r1, [r6], #4
- 930:	e3a02010 	mov	r2, #16
- 934:	e3a03000 	mov	r3, #0
- 938:	ebffff81 	bl	744 <printint>
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- 93c:	e3a0a000 	mov	sl, #0
- 940:	eaffffd6 	b	8a0 <printf+0x48>
-        ap++;
-      } else if(c == 'x' || c == 'p'){
-        printint(fd, *ap, 16, 0);
-        ap++;
-      } else if(c == 's'){
-        s = (char*)*ap;
- 944:	e4968004 	ldr	r8, [r6], #4
-        ap++;
-        if(s == 0)
-          s = "(null)";
- 948:	e3580000 	cmp	r8, #0
- 94c:	01a08007 	moveq	r8, r7
-        while(*s != 0){
- 950:	e5d81000 	ldrb	r1, [r8]
- 954:	e3510000 	cmp	r1, #0
- 958:	0a000004 	beq	970 <printf+0x118>
-          putc(fd, *s);
- 95c:	e1a00005 	mov	r0, r5
- 960:	ebffff6d 	bl	71c <putc>
-      } else if(c == 's'){
-        s = (char*)*ap;
-        ap++;
-        if(s == 0)
-          s = "(null)";
-        while(*s != 0){
- 964:	e5f81001 	ldrb	r1, [r8, #1]!
- 968:	e3510000 	cmp	r1, #0
- 96c:	1afffffa 	bne	95c <printf+0x104>
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- 970:	e1a0a001 	mov	sl, r1
- 974:	eaffffc9 	b	8a0 <printf+0x48>
-      } else {
-        putc(fd, c);
-      }
-    } else if(state == '%'){
-      if(c == 'd'){
-        printint(fd, *ap, 10, 1);
- 978:	e1a00005 	mov	r0, r5
- 97c:	e4961004 	ldr	r1, [r6], #4
- 980:	e3a0200a 	mov	r2, #10
- 984:	e3a03001 	mov	r3, #1
- 988:	ebffff6d 	bl	744 <printint>
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- 98c:	e3a0a000 	mov	sl, #0
- 990:	eaffffc2 	b	8a0 <printf+0x48>
-        while(*s != 0){
-          putc(fd, *s);
-          s++;
-        }
-      } else if(c == 'c'){
-        putc(fd, *ap);
- 994:	e4961004 	ldr	r1, [r6], #4
- 998:	e1a00005 	mov	r0, r5
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- 99c:	e1a0a009 	mov	sl, r9
-        while(*s != 0){
-          putc(fd, *s);
-          s++;
-        }
-      } else if(c == 'c'){
-        putc(fd, *ap);
- 9a0:	e6ef1071 	uxtb	r1, r1
- 9a4:	ebffff5c 	bl	71c <putc>
- 9a8:	eaffffbc 	b	8a0 <printf+0x48>
- 9ac:	00000b64 	.word	0x00000b64
-
-000009b0 <free>:
-free(void *ap)
-{
-  Header *bp, *p;
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
- 9b0:	e59f3098 	ldr	r3, [pc, #152]	; a50 <free+0xa0>
-static Header base;
-static Header *freep;
-
-void
-free(void *ap)
-{
- 9b4:	e92d0830 	push	{r4, r5, fp}
-  Header *bp, *p;
-
-  bp = (Header*)ap - 1;
- 9b8:	e240c008 	sub	ip, r0, #8
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
- 9bc:	e5932000 	ldr	r2, [r3]
-static Header base;
-static Header *freep;
-
-void
-free(void *ap)
-{
- 9c0:	e28db008 	add	fp, sp, #8
-  Header *bp, *p;
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
- 9c4:	e152000c 	cmp	r2, ip
- 9c8:	e5921000 	ldr	r1, [r2]
- 9cc:	2a000001 	bcs	9d8 <free+0x28>
- 9d0:	e15c0001 	cmp	ip, r1
- 9d4:	3a000007 	bcc	9f8 <free+0x48>
-    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
- 9d8:	e1520001 	cmp	r2, r1
- 9dc:	3a000003 	bcc	9f0 <free+0x40>
- 9e0:	e152000c 	cmp	r2, ip
- 9e4:	3a000003 	bcc	9f8 <free+0x48>
- 9e8:	e15c0001 	cmp	ip, r1
- 9ec:	3a000001 	bcc	9f8 <free+0x48>
-static Header base;
-static Header *freep;
-
-void
-free(void *ap)
-{
- 9f0:	e1a02001 	mov	r2, r1
- 9f4:	eafffff2 	b	9c4 <free+0x14>
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
-    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
-      break;
-  if(bp + bp->s.size == p->s.ptr){
- 9f8:	e5104004 	ldr	r4, [r0, #-4]
-  if(p + p->s.size == bp){
-    p->s.size += bp->s.size;
-    p->s.ptr = bp->s.ptr;
-  } else
-    p->s.ptr = bp;
-  freep = p;
- 9fc:	e5832000 	str	r2, [r3]
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
-    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
-      break;
-  if(bp + bp->s.size == p->s.ptr){
- a00:	e08c5184 	add	r5, ip, r4, lsl #3
- a04:	e1550001 	cmp	r5, r1
-    bp->s.size += p->s.ptr->s.size;
- a08:	05911004 	ldreq	r1, [r1, #4]
- a0c:	00814004 	addeq	r4, r1, r4
- a10:	05004004 	streq	r4, [r0, #-4]
-    bp->s.ptr = p->s.ptr->s.ptr;
- a14:	05921000 	ldreq	r1, [r2]
- a18:	05911000 	ldreq	r1, [r1]
-  } else
-    bp->s.ptr = p->s.ptr;
- a1c:	e5001008 	str	r1, [r0, #-8]
-  if(p + p->s.size == bp){
- a20:	e5921004 	ldr	r1, [r2, #4]
- a24:	e0824181 	add	r4, r2, r1, lsl #3
- a28:	e15c0004 	cmp	ip, r4
-    p->s.size += bp->s.size;
-    p->s.ptr = bp->s.ptr;
-  } else
-    p->s.ptr = bp;
- a2c:	1582c000 	strne	ip, [r2]
-    bp->s.size += p->s.ptr->s.size;
-    bp->s.ptr = p->s.ptr->s.ptr;
-  } else
-    bp->s.ptr = p->s.ptr;
-  if(p + p->s.size == bp){
-    p->s.size += bp->s.size;
- a30:	0510c004 	ldreq	ip, [r0, #-4]
- a34:	008c1001 	addeq	r1, ip, r1
- a38:	05821004 	streq	r1, [r2, #4]
-    p->s.ptr = bp->s.ptr;
- a3c:	05101008 	ldreq	r1, [r0, #-8]
- a40:	05821000 	streq	r1, [r2]
-  } else
-    p->s.ptr = bp;
-  freep = p;
-}
- a44:	e24bd008 	sub	sp, fp, #8
- a48:	e8bd0830 	pop	{r4, r5, fp}
- a4c:	e12fff1e 	bx	lr
- a50:	00000b6c 	.word	0x00000b6c
-
-00000a54 <malloc>:
-  return freep;
-}
-
-void*
-malloc(uint nbytes)
-{
- a54:	e92d49f8 	push	{r3, r4, r5, r6, r7, r8, fp, lr}
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
- a58:	e2804007 	add	r4, r0, #7
-  if((prevp = freep) == 0){
- a5c:	e59f50d4 	ldr	r5, [pc, #212]	; b38 <malloc+0xe4>
-malloc(uint nbytes)
-{
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
- a60:	e1a041a4 	lsr	r4, r4, #3
-  return freep;
-}
-
-void*
-malloc(uint nbytes)
-{
- a64:	e28db01c 	add	fp, sp, #28
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
-  if((prevp = freep) == 0){
- a68:	e5953000 	ldr	r3, [r5]
-malloc(uint nbytes)
-{
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
- a6c:	e2844001 	add	r4, r4, #1
-  if((prevp = freep) == 0){
- a70:	e3530000 	cmp	r3, #0
- a74:	0a00002b 	beq	b28 <malloc+0xd4>
- a78:	e5930000 	ldr	r0, [r3]
- a7c:	e5902004 	ldr	r2, [r0, #4]
-    base.s.ptr = freep = prevp = &base;
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
- a80:	e1520004 	cmp	r2, r4
- a84:	2a00001b 	bcs	af8 <malloc+0xa4>
-morecore(uint nu)
-{
-  char *p;
-  Header *hp;
-
-  if(nu < 4096)
- a88:	e59f80ac 	ldr	r8, [pc, #172]	; b3c <malloc+0xe8>
-        p->s.size -= nunits;
-        p += p->s.size;
-        p->s.size = nunits;
-      }
-      freep = prevp;
-      return (void*)(p + 1);
- a8c:	e1a07184 	lsl	r7, r4, #3
- a90:	ea000003 	b	aa4 <malloc+0x50>
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
-  if((prevp = freep) == 0){
-    base.s.ptr = freep = prevp = &base;
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
- a94:	e5930000 	ldr	r0, [r3]
-    if(p->s.size >= nunits){
- a98:	e5902004 	ldr	r2, [r0, #4]
- a9c:	e1540002 	cmp	r4, r2
- aa0:	9a000014 	bls	af8 <malloc+0xa4>
-        p->s.size = nunits;
-      }
-      freep = prevp;
-      return (void*)(p + 1);
-    }
-    if(p == freep)
- aa4:	e5952000 	ldr	r2, [r5]
- aa8:	e1a03000 	mov	r3, r0
- aac:	e1500002 	cmp	r0, r2
- ab0:	1afffff7 	bne	a94 <malloc+0x40>
-morecore(uint nu)
-{
-  char *p;
-  Header *hp;
-
-  if(nu < 4096)
- ab4:	e1540008 	cmp	r4, r8
-    nu = 4096;
-  p = sbrk(nu * sizeof(Header));
- ab8:	81a00007 	movhi	r0, r7
- abc:	93a00902 	movls	r0, #32768	; 0x8000
-morecore(uint nu)
-{
-  char *p;
-  Header *hp;
-
-  if(nu < 4096)
- ac0:	81a06004 	movhi	r6, r4
- ac4:	93a06a01 	movls	r6, #4096	; 0x1000
-    nu = 4096;
-  p = sbrk(nu * sizeof(Header));
- ac8:	ebfffeec 	bl	680 <sbrk>
- acc:	e1a03000 	mov	r3, r0
-  if(p == (char*)-1)
- ad0:	e3730001 	cmn	r3, #1
-    return 0;
-  hp = (Header*)p;
-  hp->s.size = nu;
-  free((void*)(hp + 1));
- ad4:	e2800008 	add	r0, r0, #8
-  Header *hp;
-
-  if(nu < 4096)
-    nu = 4096;
-  p = sbrk(nu * sizeof(Header));
-  if(p == (char*)-1)
- ad8:	0a000010 	beq	b20 <malloc+0xcc>
-    return 0;
-  hp = (Header*)p;
-  hp->s.size = nu;
- adc:	e5836004 	str	r6, [r3, #4]
-  free((void*)(hp + 1));
- ae0:	ebffffb2 	bl	9b0 <free>
-  return freep;
- ae4:	e5953000 	ldr	r3, [r5]
-      }
-      freep = prevp;
-      return (void*)(p + 1);
-    }
-    if(p == freep)
-      if((p = morecore(nunits)) == 0)
- ae8:	e3530000 	cmp	r3, #0
- aec:	1affffe8 	bne	a94 <malloc+0x40>
-        return 0;
- af0:	e1a00003 	mov	r0, r3
-  }
-}
- af4:	e8bd89f8 	pop	{r3, r4, r5, r6, r7, r8, fp, pc}
-    base.s.ptr = freep = prevp = &base;
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
-      if(p->s.size == nunits)
- af8:	e1540002 	cmp	r4, r2
-        prevp->s.ptr = p->s.ptr;
-      else {
-        p->s.size -= nunits;
- afc:	10642002 	rsbne	r2, r4, r2
- b00:	15802004 	strne	r2, [r0, #4]
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
-      if(p->s.size == nunits)
-        prevp->s.ptr = p->s.ptr;
- b04:	05902000 	ldreq	r2, [r0]
-      else {
-        p->s.size -= nunits;
-        p += p->s.size;
- b08:	10800182 	addne	r0, r0, r2, lsl #3
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
-      if(p->s.size == nunits)
-        prevp->s.ptr = p->s.ptr;
- b0c:	05832000 	streq	r2, [r3]
-      else {
-        p->s.size -= nunits;
-        p += p->s.size;
-        p->s.size = nunits;
- b10:	15804004 	strne	r4, [r0, #4]
-      }
-      freep = prevp;
- b14:	e5853000 	str	r3, [r5]
-      return (void*)(p + 1);
- b18:	e2800008 	add	r0, r0, #8
- b1c:	e8bd89f8 	pop	{r3, r4, r5, r6, r7, r8, fp, pc}
-    }
-    if(p == freep)
-      if((p = morecore(nunits)) == 0)
-        return 0;
- b20:	e3a00000 	mov	r0, #0
- b24:	e8bd89f8 	pop	{r3, r4, r5, r6, r7, r8, fp, pc}
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
-  if((prevp = freep) == 0){
-    base.s.ptr = freep = prevp = &base;
- b28:	e2850004 	add	r0, r5, #4
- b2c:	e5850000 	str	r0, [r5]
-    base.s.size = 0;
- b30:	e9850009 	stmib	r5, {r0, r3}
- b34:	eaffffd3 	b	a88 <malloc+0x34>
- b38:	00000b6c 	.word	0x00000b6c
- b3c:	00000fff 	.word	0x00000fff
--- a/uprogs/echo.sym	Sun Oct 22 18:51:04 2017 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-00000000 .text
-00000b40 .rodata
-00000b6c .bss
-00000000 .comment
-00000000 .ARM.attributes
-00000000 .debug_aranges
-00000000 .debug_info
-00000000 .debug_abbrev
-00000000 .debug_line
-00000000 .debug_frame
-00000000 .debug_str
-00000000 .debug_loc
-00000000 .debug_ranges
-00000000 echo.c
-00000000 ulib.c
-00000000 printf.c
-0000071c putc
-00000744 printint
-00000b50 digits.993
-00000000 umalloc.c
-00000b6c freep
-00000b70 base
-0000006c strcpy
-00000858 printf
-000002a4 memmove
-000004e0 mknod
-00000b78 _bss_end__
-0000019c gets
-0000064c getpid
-00000a54 malloc
-000006b4 sleep
-00000b6c __bss_start__
-00000374 pipe
-000003dc write
-00000548 fstat
-00000444 kill
-000005e4 chdir
-00000478 exec
-00000b78 __bss_end__
-00000340 wait
-000003a8 read
-00000514 unlink
-000002d8 fork
-00000680 sbrk
-000006e8 uptime
-00000b6c __bss_start
-00000120 memset
-00000000 main
-00000b78 __end__
-00000094 strcmp
-00000618 dup
-00000214 stat
-00000b6c _edata
-00000b78 _end
-0000057c link
-0000030c exit
-00000250 atoi
-000000e0 strlen
-000004ac open
-00000810 div
-00000158 strchr
-000005b0 mkdir
-00000410 close
-000009b0 free
--- a/uprogs/forktest.asm	Sun Oct 22 18:51:04 2017 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,912 +0,0 @@
-
-_forktest:     file format elf32-littlearm
-
-
-Disassembly of section .text:
-
-00000000 <main>:
-  printf(1, "fork test OK\n");
-}
-
-int
-main(void)
-{
-   0:	e92d4800 	push	{fp, lr}
-   4:	e28db004 	add	fp, sp, #4
-  forktest();
-   8:	eb00000f 	bl	4c <forktest>
-  exit();
-   c:	eb0000e3 	bl	3a0 <exit>
-
-00000010 <printf>:
-
-#define N  1000
-
-void
-printf(int fd, char *s, ...)
-{
-  10:	e92d000e 	push	{r1, r2, r3}
-  14:	e92d4838 	push	{r3, r4, r5, fp, lr}
-  18:	e28db010 	add	fp, sp, #16
-  1c:	e1a05000 	mov	r5, r0
-  20:	e59b4004 	ldr	r4, [fp, #4]
-  write(fd, s, strlen(s));
-  24:	e1a00004 	mov	r0, r4
-  28:	eb000051 	bl	174 <strlen>
-  2c:	e1a01004 	mov	r1, r4
-  30:	e1a02000 	mov	r2, r0
-  34:	e1a00005 	mov	r0, r5
-  38:	eb00010c 	bl	470 <write>
-}
-  3c:	e24bd010 	sub	sp, fp, #16
-  40:	e8bd4838 	pop	{r3, r4, r5, fp, lr}
-  44:	e28dd00c 	add	sp, sp, #12
-  48:	e12fff1e 	bx	lr
-
-0000004c <forktest>:
-
-void
-forktest(void)
-{
-  4c:	e92d4818 	push	{r3, r4, fp, lr}
-  int n, pid;
-
-  printf(1, "fork test\n");
-  50:	e3a00001 	mov	r0, #1
-  write(fd, s, strlen(s));
-}
-
-void
-forktest(void)
-{
-  54:	e28db00c 	add	fp, sp, #12
-  int n, pid;
-
-  printf(1, "fork test\n");
-  58:	e59f108c 	ldr	r1, [pc, #140]	; ec <forktest+0xa0>
-  5c:	ebffffeb 	bl	10 <printf>
-
-  for(n=0; n<N; n++){
-  60:	e3a04000 	mov	r4, #0
-  64:	ea000003 	b	78 <forktest+0x2c>
-    pid = fork();
-    if(pid < 0)
-      break;
-    if(pid == 0)
-  68:	0a00001b 	beq	dc <forktest+0x90>
-{
-  int n, pid;
-
-  printf(1, "fork test\n");
-
-  for(n=0; n<N; n++){
-  6c:	e2844001 	add	r4, r4, #1
-  70:	e3540ffa 	cmp	r4, #1000	; 0x3e8
-  74:	0a000010 	beq	bc <forktest+0x70>
-    pid = fork();
-  78:	eb0000bb 	bl	36c <fork>
-    if(pid < 0)
-  7c:	e3500000 	cmp	r0, #0
-  80:	aafffff8 	bge	68 <forktest+0x1c>
-  if(n == N){
-    printf(1, "fork claimed to work N times!\n", N);
-    exit();
-  }
-  
-  for(; n > 0; n--){
-  84:	e3540000 	cmp	r4, #0
-  88:	0a000004 	beq	a0 <forktest+0x54>
-    if(wait() < 0){
-  8c:	eb0000d0 	bl	3d4 <wait>
-  90:	e3500000 	cmp	r0, #0
-  94:	ba00000d 	blt	d0 <forktest+0x84>
-  if(n == N){
-    printf(1, "fork claimed to work N times!\n", N);
-    exit();
-  }
-  
-  for(; n > 0; n--){
-  98:	e2544001 	subs	r4, r4, #1
-  9c:	1afffffa 	bne	8c <forktest+0x40>
-      printf(1, "wait stopped early\n");
-      exit();
-    }
-  }
-  
-  if(wait() != -1){
-  a0:	eb0000cb 	bl	3d4 <wait>
-  a4:	e3700001 	cmn	r0, #1
-    printf(1, "wait got too many\n");
-  a8:	e3a00001 	mov	r0, #1
-      printf(1, "wait stopped early\n");
-      exit();
-    }
-  }
-  
-  if(wait() != -1){
-  ac:	1a00000b 	bne	e0 <forktest+0x94>
-    printf(1, "wait got too many\n");
-    exit();
-  }
-  
-  printf(1, "fork test OK\n");
-  b0:	e59f1038 	ldr	r1, [pc, #56]	; f0 <forktest+0xa4>
-}
-  b4:	e8bd4818 	pop	{r3, r4, fp, lr}
-  if(wait() != -1){
-    printf(1, "wait got too many\n");
-    exit();
-  }
-  
-  printf(1, "fork test OK\n");
-  b8:	eaffffd4 	b	10 <printf>
-    if(pid == 0)
-      exit();
-  }
-  
-  if(n == N){
-    printf(1, "fork claimed to work N times!\n", N);
-  bc:	e3a00001 	mov	r0, #1
-  c0:	e59f102c 	ldr	r1, [pc, #44]	; f4 <forktest+0xa8>
-  c4:	e1a02004 	mov	r2, r4
-  c8:	ebffffd0 	bl	10 <printf>
-    exit();
-  cc:	eb0000b3 	bl	3a0 <exit>
-  }
-  
-  for(; n > 0; n--){
-    if(wait() < 0){
-      printf(1, "wait stopped early\n");
-  d0:	e3a00001 	mov	r0, #1
-  d4:	e59f101c 	ldr	r1, [pc, #28]	; f8 <forktest+0xac>
-  d8:	ebffffcc 	bl	10 <printf>
-      exit();
-  dc:	eb0000af 	bl	3a0 <exit>
-    }
-  }
-  
-  if(wait() != -1){
-    printf(1, "wait got too many\n");
-  e0:	e59f1014 	ldr	r1, [pc, #20]	; fc <forktest+0xb0>
-  e4:	ebffffc9 	bl	10 <printf>
-    exit();
-  e8:	eb0000ac 	bl	3a0 <exit>
-  ec:	000007b0 	.word	0x000007b0
-  f0:	000007e4 	.word	0x000007e4
-  f4:	000007f4 	.word	0x000007f4
-  f8:	000007bc 	.word	0x000007bc
-  fc:	000007d0 	.word	0x000007d0
-
-00000100 <strcpy>:
-#include "user.h"
-#include "arm.h"
-
-char*
-strcpy(char *s, char *t)
-{
- 100:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
-  char *os;
-
-  os = s;
-  while((*s++ = *t++) != 0)
- 104:	e1a02000 	mov	r2, r0
-#include "user.h"
-#include "arm.h"
-
-char*
-strcpy(char *s, char *t)
-{
- 108:	e28db000 	add	fp, sp, #0
-  char *os;
-
-  os = s;
-  while((*s++ = *t++) != 0)
- 10c:	e4d13001 	ldrb	r3, [r1], #1
- 110:	e3530000 	cmp	r3, #0
- 114:	e4c23001 	strb	r3, [r2], #1
- 118:	1afffffb 	bne	10c <strcpy+0xc>
-    ;
-  return os;
-}
- 11c:	e28bd000 	add	sp, fp, #0
- 120:	e8bd0800 	pop	{fp}
- 124:	e12fff1e 	bx	lr
-
-00000128 <strcmp>:
-
-int
-strcmp(const char *p, const char *q)
-{
- 128:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 12c:	e28db000 	add	fp, sp, #0
-  while(*p && *p == *q)
- 130:	e5d03000 	ldrb	r3, [r0]
- 134:	e5d12000 	ldrb	r2, [r1]
- 138:	e3530000 	cmp	r3, #0
- 13c:	1a000004 	bne	154 <strcmp+0x2c>
- 140:	ea000005 	b	15c <strcmp+0x34>
- 144:	e5f03001 	ldrb	r3, [r0, #1]!
- 148:	e3530000 	cmp	r3, #0
- 14c:	0a000006 	beq	16c <strcmp+0x44>
- 150:	e5f12001 	ldrb	r2, [r1, #1]!
- 154:	e1530002 	cmp	r3, r2
- 158:	0afffff9 	beq	144 <strcmp+0x1c>
-    p++, q++;
-  return (uchar)*p - (uchar)*q;
-}
- 15c:	e0620003 	rsb	r0, r2, r3
- 160:	e28bd000 	add	sp, fp, #0
- 164:	e8bd0800 	pop	{fp}
- 168:	e12fff1e 	bx	lr
-}
-
-int
-strcmp(const char *p, const char *q)
-{
-  while(*p && *p == *q)
- 16c:	e5d12001 	ldrb	r2, [r1, #1]
- 170:	eafffff9 	b	15c <strcmp+0x34>
-
-00000174 <strlen>:
-  return (uchar)*p - (uchar)*q;
-}
-
-uint
-strlen(char *s)
-{
- 174:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 178:	e28db000 	add	fp, sp, #0
-  int n;
-
-  for(n = 0; s[n]; n++)
- 17c:	e5d03000 	ldrb	r3, [r0]
- 180:	e3530000 	cmp	r3, #0
- 184:	01a00003 	moveq	r0, r3
- 188:	0a000006 	beq	1a8 <strlen+0x34>
- 18c:	e1a02000 	mov	r2, r0
- 190:	e3a03000 	mov	r3, #0
- 194:	e5f21001 	ldrb	r1, [r2, #1]!
- 198:	e2833001 	add	r3, r3, #1
- 19c:	e1a00003 	mov	r0, r3
- 1a0:	e3510000 	cmp	r1, #0
- 1a4:	1afffffa 	bne	194 <strlen+0x20>
-    ;
-  return n;
-}
- 1a8:	e28bd000 	add	sp, fp, #0
- 1ac:	e8bd0800 	pop	{fp}
- 1b0:	e12fff1e 	bx	lr
-
-000001b4 <memset>:
-memset(void *dst, int c, uint n)
-{
-  char *p=dst;
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 1b4:	e3520000 	cmp	r2, #0
-  return n;
-}
-
-void*
-memset(void *dst, int c, uint n)
-{
- 1b8:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 1bc:	e28db000 	add	fp, sp, #0
-  char *p=dst;
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 1c0:	0a000006 	beq	1e0 <memset+0x2c>
- 1c4:	e6ef1071 	uxtb	r1, r1
- 1c8:	e1a03002 	mov	r3, r2
-}
-
-void*
-memset(void *dst, int c, uint n)
-{
-  char *p=dst;
- 1cc:	e1a0c000 	mov	ip, r0
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 1d0:	e2533001 	subs	r3, r3, #1
- 1d4:	e4cc1001 	strb	r1, [ip], #1
- 1d8:	1afffffc 	bne	1d0 <memset+0x1c>
- 1dc:	e0800002 	add	r0, r0, r2
-  return (void *)p;
-}
- 1e0:	e28bd000 	add	sp, fp, #0
- 1e4:	e8bd0800 	pop	{fp}
- 1e8:	e12fff1e 	bx	lr
-
-000001ec <strchr>:
-
-char*
-strchr(const char *s, char c)
-{
- 1ec:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 1f0:	e28db000 	add	fp, sp, #0
-  for(; *s; s++)
- 1f4:	e5d03000 	ldrb	r3, [r0]
- 1f8:	e3530000 	cmp	r3, #0
- 1fc:	1a000004 	bne	214 <strchr+0x28>
- 200:	ea000008 	b	228 <strchr+0x3c>
- 204:	e5d03001 	ldrb	r3, [r0, #1]
- 208:	e2800001 	add	r0, r0, #1
- 20c:	e3530000 	cmp	r3, #0
- 210:	0a000004 	beq	228 <strchr+0x3c>
-    if(*s == c)
- 214:	e1530001 	cmp	r3, r1
- 218:	1afffff9 	bne	204 <strchr+0x18>
-      return (char*)s;
-  return 0;
-}
- 21c:	e28bd000 	add	sp, fp, #0
- 220:	e8bd0800 	pop	{fp}
- 224:	e12fff1e 	bx	lr
-strchr(const char *s, char c)
-{
-  for(; *s; s++)
-    if(*s == c)
-      return (char*)s;
-  return 0;
- 228:	e1a00003 	mov	r0, r3
- 22c:	eafffffa 	b	21c <strchr+0x30>
-
-00000230 <gets>:
-}
-
-char*
-gets(char *buf, int max)
-{
- 230:	e92d49f0 	push	{r4, r5, r6, r7, r8, fp, lr}
- 234:	e28db018 	add	fp, sp, #24
- 238:	e24dd00c 	sub	sp, sp, #12
- 23c:	e1a08000 	mov	r8, r0
- 240:	e1a07001 	mov	r7, r1
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 244:	e1a06000 	mov	r6, r0
- 248:	e3a05000 	mov	r5, #0
- 24c:	ea000008 	b	274 <gets+0x44>
-    cc = read(0, &c, 1);
- 250:	eb000079 	bl	43c <read>
-    if(cc < 1)
- 254:	e3500000 	cmp	r0, #0
- 258:	da00000b 	ble	28c <gets+0x5c>
-      break;
-    buf[i++] = c;
- 25c:	e55b301d 	ldrb	r3, [fp, #-29]
-    if(c == '\n' || c == '\r')
- 260:	e1a05004 	mov	r5, r4
- 264:	e353000a 	cmp	r3, #10
- 268:	1353000d 	cmpne	r3, #13
-
-  for(i=0; i+1 < max; ){
-    cc = read(0, &c, 1);
-    if(cc < 1)
-      break;
-    buf[i++] = c;
- 26c:	e4c63001 	strb	r3, [r6], #1
-    if(c == '\n' || c == '\r')
- 270:	0a00000a 	beq	2a0 <gets+0x70>
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
-    cc = read(0, &c, 1);
- 274:	e3a02001 	mov	r2, #1
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 278:	e0854002 	add	r4, r5, r2
- 27c:	e1540007 	cmp	r4, r7
-    cc = read(0, &c, 1);
- 280:	e3a00000 	mov	r0, #0
- 284:	e24b101d 	sub	r1, fp, #29
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 288:	bafffff0 	blt	250 <gets+0x20>
-      break;
-    buf[i++] = c;
-    if(c == '\n' || c == '\r')
-      break;
-  }
-  buf[i] = '\0';
- 28c:	e3a03000 	mov	r3, #0
- 290:	e7c83005 	strb	r3, [r8, r5]
-  return buf;
-}
- 294:	e1a00008 	mov	r0, r8
- 298:	e24bd018 	sub	sp, fp, #24
- 29c:	e8bd89f0 	pop	{r4, r5, r6, r7, r8, fp, pc}
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 2a0:	e1a05004 	mov	r5, r4
- 2a4:	eafffff8 	b	28c <gets+0x5c>
-
-000002a8 <stat>:
-  return buf;
-}
-
-int
-stat(char *n, struct stat *st)
-{
- 2a8:	e92d4830 	push	{r4, r5, fp, lr}
- 2ac:	e1a05001 	mov	r5, r1
- 2b0:	e28db00c 	add	fp, sp, #12
-  int fd;
-  int r;
-
-  fd = open(n, O_RDONLY);
- 2b4:	e3a01000 	mov	r1, #0
- 2b8:	eb0000a0 	bl	540 <open>
-  if(fd < 0)
- 2bc:	e2504000 	subs	r4, r0, #0
-    return -1;
- 2c0:	b3e05000 	mvnlt	r5, #0
-{
-  int fd;
-  int r;
-
-  fd = open(n, O_RDONLY);
-  if(fd < 0)
- 2c4:	ba000004 	blt	2dc <stat+0x34>
-    return -1;
-  r = fstat(fd, st);
- 2c8:	e1a01005 	mov	r1, r5
- 2cc:	eb0000c2 	bl	5dc <fstat>
- 2d0:	e1a05000 	mov	r5, r0
-  close(fd);
- 2d4:	e1a00004 	mov	r0, r4
- 2d8:	eb000071 	bl	4a4 <close>
-  return r;
-}
- 2dc:	e1a00005 	mov	r0, r5
- 2e0:	e8bd8830 	pop	{r4, r5, fp, pc}
-
-000002e4 <atoi>:
-
-int
-atoi(const char *s)
-{
- 2e4:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 2e8:	e28db000 	add	fp, sp, #0
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 2ec:	e5d03000 	ldrb	r3, [r0]
- 2f0:	e2432030 	sub	r2, r3, #48	; 0x30
- 2f4:	e6ef2072 	uxtb	r2, r2
- 2f8:	e3520009 	cmp	r2, #9
-int
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
- 2fc:	83a00000 	movhi	r0, #0
-  while('0' <= *s && *s <= '9')
- 300:	8a000009 	bhi	32c <atoi+0x48>
- 304:	e1a02000 	mov	r2, r0
-int
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
- 308:	e3a00000 	mov	r0, #0
-  while('0' <= *s && *s <= '9')
-    n = n*10 + *s++ - '0';
- 30c:	e0800100 	add	r0, r0, r0, lsl #2
- 310:	e0830080 	add	r0, r3, r0, lsl #1
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 314:	e5f23001 	ldrb	r3, [r2, #1]!
-    n = n*10 + *s++ - '0';
- 318:	e2400030 	sub	r0, r0, #48	; 0x30
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 31c:	e2431030 	sub	r1, r3, #48	; 0x30
- 320:	e6ef1071 	uxtb	r1, r1
- 324:	e3510009 	cmp	r1, #9
- 328:	9afffff7 	bls	30c <atoi+0x28>
-    n = n*10 + *s++ - '0';
-  return n;
-}
- 32c:	e28bd000 	add	sp, fp, #0
- 330:	e8bd0800 	pop	{fp}
- 334:	e12fff1e 	bx	lr
-
-00000338 <memmove>:
-{
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 338:	e3520000 	cmp	r2, #0
-  return n;
-}
-
-void*
-memmove(void *vdst, void *vsrc, int n)
-{
- 33c:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 340:	e28db000 	add	fp, sp, #0
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 344:	da000005 	ble	360 <memmove+0x28>
-    n = n*10 + *s++ - '0';
-  return n;
-}
-
-void*
-memmove(void *vdst, void *vsrc, int n)
- 348:	e0802002 	add	r2, r0, r2
-{
-  char *dst, *src;
-  
-  dst = vdst;
- 34c:	e1a03000 	mov	r3, r0
-  src = vsrc;
-  while(n-- > 0)
-    *dst++ = *src++;
- 350:	e4d1c001 	ldrb	ip, [r1], #1
- 354:	e4c3c001 	strb	ip, [r3], #1
-{
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 358:	e1530002 	cmp	r3, r2
- 35c:	1afffffb 	bne	350 <memmove+0x18>
-    *dst++ = *src++;
-  return vdst;
-}
- 360:	e28bd000 	add	sp, fp, #0
- 364:	e8bd0800 	pop	{fp}
- 368:	e12fff1e 	bx	lr
-
-0000036c <fork>:
- 36c:	e92d4000 	push	{lr}
- 370:	e92d0008 	push	{r3}
- 374:	e92d0004 	push	{r2}
- 378:	e92d0002 	push	{r1}
- 37c:	e92d0001 	push	{r0}
- 380:	e3a00001 	mov	r0, #1
- 384:	ef000040 	svc	0x00000040
- 388:	e8bd0002 	pop	{r1}
- 38c:	e8bd0002 	pop	{r1}
- 390:	e8bd0004 	pop	{r2}
- 394:	e8bd0008 	pop	{r3}
- 398:	e8bd4000 	pop	{lr}
- 39c:	e12fff1e 	bx	lr
-
-000003a0 <exit>:
- 3a0:	e92d4000 	push	{lr}
- 3a4:	e92d0008 	push	{r3}
- 3a8:	e92d0004 	push	{r2}
- 3ac:	e92d0002 	push	{r1}
- 3b0:	e92d0001 	push	{r0}
- 3b4:	e3a00002 	mov	r0, #2
- 3b8:	ef000040 	svc	0x00000040
- 3bc:	e8bd0002 	pop	{r1}
- 3c0:	e8bd0002 	pop	{r1}
- 3c4:	e8bd0004 	pop	{r2}
- 3c8:	e8bd0008 	pop	{r3}
- 3cc:	e8bd4000 	pop	{lr}
- 3d0:	e12fff1e 	bx	lr
-
-000003d4 <wait>:
- 3d4:	e92d4000 	push	{lr}
- 3d8:	e92d0008 	push	{r3}
- 3dc:	e92d0004 	push	{r2}
- 3e0:	e92d0002 	push	{r1}
- 3e4:	e92d0001 	push	{r0}
- 3e8:	e3a00003 	mov	r0, #3
- 3ec:	ef000040 	svc	0x00000040
- 3f0:	e8bd0002 	pop	{r1}
- 3f4:	e8bd0002 	pop	{r1}
- 3f8:	e8bd0004 	pop	{r2}
- 3fc:	e8bd0008 	pop	{r3}
- 400:	e8bd4000 	pop	{lr}
- 404:	e12fff1e 	bx	lr
-
-00000408 <pipe>:
- 408:	e92d4000 	push	{lr}
- 40c:	e92d0008 	push	{r3}
- 410:	e92d0004 	push	{r2}
- 414:	e92d0002 	push	{r1}
- 418:	e92d0001 	push	{r0}
- 41c:	e3a00004 	mov	r0, #4
- 420:	ef000040 	svc	0x00000040
- 424:	e8bd0002 	pop	{r1}
- 428:	e8bd0002 	pop	{r1}
- 42c:	e8bd0004 	pop	{r2}
- 430:	e8bd0008 	pop	{r3}
- 434:	e8bd4000 	pop	{lr}
- 438:	e12fff1e 	bx	lr
-
-0000043c <read>:
- 43c:	e92d4000 	push	{lr}
- 440:	e92d0008 	push	{r3}
- 444:	e92d0004 	push	{r2}
- 448:	e92d0002 	push	{r1}
- 44c:	e92d0001 	push	{r0}
- 450:	e3a00005 	mov	r0, #5
- 454:	ef000040 	svc	0x00000040
- 458:	e8bd0002 	pop	{r1}
- 45c:	e8bd0002 	pop	{r1}
- 460:	e8bd0004 	pop	{r2}
- 464:	e8bd0008 	pop	{r3}
- 468:	e8bd4000 	pop	{lr}
- 46c:	e12fff1e 	bx	lr
-
-00000470 <write>:
- 470:	e92d4000 	push	{lr}
- 474:	e92d0008 	push	{r3}
- 478:	e92d0004 	push	{r2}
- 47c:	e92d0002 	push	{r1}
- 480:	e92d0001 	push	{r0}
- 484:	e3a00010 	mov	r0, #16
- 488:	ef000040 	svc	0x00000040
- 48c:	e8bd0002 	pop	{r1}
- 490:	e8bd0002 	pop	{r1}
- 494:	e8bd0004 	pop	{r2}
- 498:	e8bd0008 	pop	{r3}
- 49c:	e8bd4000 	pop	{lr}
- 4a0:	e12fff1e 	bx	lr
-
-000004a4 <close>:
- 4a4:	e92d4000 	push	{lr}
- 4a8:	e92d0008 	push	{r3}
- 4ac:	e92d0004 	push	{r2}
- 4b0:	e92d0002 	push	{r1}
- 4b4:	e92d0001 	push	{r0}
- 4b8:	e3a00015 	mov	r0, #21
- 4bc:	ef000040 	svc	0x00000040
- 4c0:	e8bd0002 	pop	{r1}
- 4c4:	e8bd0002 	pop	{r1}
- 4c8:	e8bd0004 	pop	{r2}
- 4cc:	e8bd0008 	pop	{r3}
- 4d0:	e8bd4000 	pop	{lr}
- 4d4:	e12fff1e 	bx	lr
-
-000004d8 <kill>:
- 4d8:	e92d4000 	push	{lr}
- 4dc:	e92d0008 	push	{r3}
- 4e0:	e92d0004 	push	{r2}
- 4e4:	e92d0002 	push	{r1}
- 4e8:	e92d0001 	push	{r0}
- 4ec:	e3a00006 	mov	r0, #6
- 4f0:	ef000040 	svc	0x00000040
- 4f4:	e8bd0002 	pop	{r1}
- 4f8:	e8bd0002 	pop	{r1}
- 4fc:	e8bd0004 	pop	{r2}
- 500:	e8bd0008 	pop	{r3}
- 504:	e8bd4000 	pop	{lr}
- 508:	e12fff1e 	bx	lr
-
-0000050c <exec>:
- 50c:	e92d4000 	push	{lr}
- 510:	e92d0008 	push	{r3}
- 514:	e92d0004 	push	{r2}
- 518:	e92d0002 	push	{r1}
- 51c:	e92d0001 	push	{r0}
- 520:	e3a00007 	mov	r0, #7
- 524:	ef000040 	svc	0x00000040
- 528:	e8bd0002 	pop	{r1}
- 52c:	e8bd0002 	pop	{r1}
- 530:	e8bd0004 	pop	{r2}
- 534:	e8bd0008 	pop	{r3}
- 538:	e8bd4000 	pop	{lr}
- 53c:	e12fff1e 	bx	lr
-
-00000540 <open>:
- 540:	e92d4000 	push	{lr}
- 544:	e92d0008 	push	{r3}
- 548:	e92d0004 	push	{r2}
- 54c:	e92d0002 	push	{r1}
- 550:	e92d0001 	push	{r0}
- 554:	e3a0000f 	mov	r0, #15
- 558:	ef000040 	svc	0x00000040
- 55c:	e8bd0002 	pop	{r1}
- 560:	e8bd0002 	pop	{r1}
- 564:	e8bd0004 	pop	{r2}
- 568:	e8bd0008 	pop	{r3}
- 56c:	e8bd4000 	pop	{lr}
- 570:	e12fff1e 	bx	lr
-
-00000574 <mknod>:
- 574:	e92d4000 	push	{lr}
- 578:	e92d0008 	push	{r3}
- 57c:	e92d0004 	push	{r2}
- 580:	e92d0002 	push	{r1}
- 584:	e92d0001 	push	{r0}
- 588:	e3a00011 	mov	r0, #17
- 58c:	ef000040 	svc	0x00000040
- 590:	e8bd0002 	pop	{r1}
- 594:	e8bd0002 	pop	{r1}
- 598:	e8bd0004 	pop	{r2}
- 59c:	e8bd0008 	pop	{r3}
- 5a0:	e8bd4000 	pop	{lr}
- 5a4:	e12fff1e 	bx	lr
-
-000005a8 <unlink>:
- 5a8:	e92d4000 	push	{lr}
- 5ac:	e92d0008 	push	{r3}
- 5b0:	e92d0004 	push	{r2}
- 5b4:	e92d0002 	push	{r1}
- 5b8:	e92d0001 	push	{r0}
- 5bc:	e3a00012 	mov	r0, #18
- 5c0:	ef000040 	svc	0x00000040
- 5c4:	e8bd0002 	pop	{r1}
- 5c8:	e8bd0002 	pop	{r1}
- 5cc:	e8bd0004 	pop	{r2}
- 5d0:	e8bd0008 	pop	{r3}
- 5d4:	e8bd4000 	pop	{lr}
- 5d8:	e12fff1e 	bx	lr
-
-000005dc <fstat>:
- 5dc:	e92d4000 	push	{lr}
- 5e0:	e92d0008 	push	{r3}
- 5e4:	e92d0004 	push	{r2}
- 5e8:	e92d0002 	push	{r1}
- 5ec:	e92d0001 	push	{r0}
- 5f0:	e3a00008 	mov	r0, #8
- 5f4:	ef000040 	svc	0x00000040
- 5f8:	e8bd0002 	pop	{r1}
- 5fc:	e8bd0002 	pop	{r1}
- 600:	e8bd0004 	pop	{r2}
- 604:	e8bd0008 	pop	{r3}
- 608:	e8bd4000 	pop	{lr}
- 60c:	e12fff1e 	bx	lr
-
-00000610 <link>:
- 610:	e92d4000 	push	{lr}
- 614:	e92d0008 	push	{r3}
- 618:	e92d0004 	push	{r2}
- 61c:	e92d0002 	push	{r1}
- 620:	e92d0001 	push	{r0}
- 624:	e3a00013 	mov	r0, #19
- 628:	ef000040 	svc	0x00000040
- 62c:	e8bd0002 	pop	{r1}
- 630:	e8bd0002 	pop	{r1}
- 634:	e8bd0004 	pop	{r2}
- 638:	e8bd0008 	pop	{r3}
- 63c:	e8bd4000 	pop	{lr}
- 640:	e12fff1e 	bx	lr
-
-00000644 <mkdir>:
- 644:	e92d4000 	push	{lr}
- 648:	e92d0008 	push	{r3}
- 64c:	e92d0004 	push	{r2}
- 650:	e92d0002 	push	{r1}
- 654:	e92d0001 	push	{r0}
- 658:	e3a00014 	mov	r0, #20
- 65c:	ef000040 	svc	0x00000040
- 660:	e8bd0002 	pop	{r1}
- 664:	e8bd0002 	pop	{r1}
- 668:	e8bd0004 	pop	{r2}
- 66c:	e8bd0008 	pop	{r3}
- 670:	e8bd4000 	pop	{lr}
- 674:	e12fff1e 	bx	lr
-
-00000678 <chdir>:
- 678:	e92d4000 	push	{lr}
- 67c:	e92d0008 	push	{r3}
- 680:	e92d0004 	push	{r2}
- 684:	e92d0002 	push	{r1}
- 688:	e92d0001 	push	{r0}
- 68c:	e3a00009 	mov	r0, #9
- 690:	ef000040 	svc	0x00000040
- 694:	e8bd0002 	pop	{r1}
- 698:	e8bd0002 	pop	{r1}
- 69c:	e8bd0004 	pop	{r2}
- 6a0:	e8bd0008 	pop	{r3}
- 6a4:	e8bd4000 	pop	{lr}
- 6a8:	e12fff1e 	bx	lr
-
-000006ac <dup>:
- 6ac:	e92d4000 	push	{lr}
- 6b0:	e92d0008 	push	{r3}
- 6b4:	e92d0004 	push	{r2}
- 6b8:	e92d0002 	push	{r1}
- 6bc:	e92d0001 	push	{r0}
- 6c0:	e3a0000a 	mov	r0, #10
- 6c4:	ef000040 	svc	0x00000040
- 6c8:	e8bd0002 	pop	{r1}
- 6cc:	e8bd0002 	pop	{r1}
- 6d0:	e8bd0004 	pop	{r2}
- 6d4:	e8bd0008 	pop	{r3}
- 6d8:	e8bd4000 	pop	{lr}
- 6dc:	e12fff1e 	bx	lr
-
-000006e0 <getpid>:
- 6e0:	e92d4000 	push	{lr}
- 6e4:	e92d0008 	push	{r3}
- 6e8:	e92d0004 	push	{r2}
- 6ec:	e92d0002 	push	{r1}
- 6f0:	e92d0001 	push	{r0}
- 6f4:	e3a0000b 	mov	r0, #11
- 6f8:	ef000040 	svc	0x00000040
- 6fc:	e8bd0002 	pop	{r1}
- 700:	e8bd0002 	pop	{r1}
- 704:	e8bd0004 	pop	{r2}
- 708:	e8bd0008 	pop	{r3}
- 70c:	e8bd4000 	pop	{lr}
- 710:	e12fff1e 	bx	lr
-
-00000714 <sbrk>:
- 714:	e92d4000 	push	{lr}
- 718:	e92d0008 	push	{r3}
- 71c:	e92d0004 	push	{r2}
- 720:	e92d0002 	push	{r1}
- 724:	e92d0001 	push	{r0}
- 728:	e3a0000c 	mov	r0, #12
- 72c:	ef000040 	svc	0x00000040
- 730:	e8bd0002 	pop	{r1}
- 734:	e8bd0002 	pop	{r1}
- 738:	e8bd0004 	pop	{r2}
- 73c:	e8bd0008 	pop	{r3}
- 740:	e8bd4000 	pop	{lr}
- 744:	e12fff1e 	bx	lr
-
-00000748 <sleep>:
- 748:	e92d4000 	push	{lr}
- 74c:	e92d0008 	push	{r3}
- 750:	e92d0004 	push	{r2}
- 754:	e92d0002 	push	{r1}
- 758:	e92d0001 	push	{r0}
- 75c:	e3a0000d 	mov	r0, #13
- 760:	ef000040 	svc	0x00000040
- 764:	e8bd0002 	pop	{r1}
- 768:	e8bd0002 	pop	{r1}
- 76c:	e8bd0004 	pop	{r2}
- 770:	e8bd0008 	pop	{r3}
- 774:	e8bd4000 	pop	{lr}
- 778:	e12fff1e 	bx	lr
-
-0000077c <uptime>:
- 77c:	e92d4000 	push	{lr}
- 780:	e92d0008 	push	{r3}
- 784:	e92d0004 	push	{r2}
- 788:	e92d0002 	push	{r1}
- 78c:	e92d0001 	push	{r0}
- 790:	e3a0000e 	mov	r0, #14
- 794:	ef000040 	svc	0x00000040
- 798:	e8bd0002 	pop	{r1}
- 79c:	e8bd0002 	pop	{r1}
- 7a0:	e8bd0004 	pop	{r2}
- 7a4:	e8bd0008 	pop	{r3}
- 7a8:	e8bd4000 	pop	{lr}
- 7ac:	e12fff1e 	bx	lr
--- a/uprogs/grep.asm	Sun Oct 22 18:51:04 2017 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2205 +0,0 @@
-
-_grep:     file format elf32-littlearm
-
-
-Disassembly of section .text:
-
-00000000 <main>:
-main(int argc, char *argv[])
-{
-  int fd, i;
-  char *pattern;
-  
-  if(argc <= 1){
-   0:	e3500001 	cmp	r0, #1
-  }
-}
-
-int
-main(int argc, char *argv[])
-{
-   4:	e92d4df0 	push	{r4, r5, r6, r7, r8, sl, fp, lr}
-   8:	e1a08000 	mov	r8, r0
-   c:	e28db01c 	add	fp, sp, #28
-  int fd, i;
-  char *pattern;
-  
-  if(argc <= 1){
-  10:	da00001d 	ble	8c <main+0x8c>
-    printf(2, "usage: grep pattern [file ...]\n");
-    exit();
-  }
-  pattern = argv[1];
-  
-  if(argc <= 2){
-  14:	e3500002 	cmp	r0, #2
-  
-  if(argc <= 1){
-    printf(2, "usage: grep pattern [file ...]\n");
-    exit();
-  }
-  pattern = argv[1];
-  18:	e591a004 	ldr	sl, [r1, #4]
-    }
-  }
-}
-
-int
-main(int argc, char *argv[])
-  1c:	12814008 	addne	r4, r1, #8
-  20:	13a05002 	movne	r5, #2
-    printf(2, "usage: grep pattern [file ...]\n");
-    exit();
-  }
-  pattern = argv[1];
-  
-  if(argc <= 2){
-  24:	0a000014 	beq	7c <main+0x7c>
-    grep(pattern, 0);
-    exit();
-  }
-
-  for(i = 2; i < argc; i++){
-    if((fd = open(argv[i], 0)) < 0){
-  28:	e5940000 	ldr	r0, [r4]
-  2c:	e3a01000 	mov	r1, #0
-  30:	eb0001c7 	bl	754 <open>
-  34:	e1a07004 	mov	r7, r4
-  38:	e2844004 	add	r4, r4, #4
-  3c:	e2506000 	subs	r6, r0, #0
-  40:	ba000008 	blt	68 <main+0x68>
-      printf(1, "grep: cannot open %s\n", argv[i]);
-      exit();
-    }
-    grep(pattern, fd);
-  44:	e1a01006 	mov	r1, r6
-  48:	e1a0000a 	mov	r0, sl
-  4c:	eb00006f 	bl	210 <grep>
-  if(argc <= 2){
-    grep(pattern, 0);
-    exit();
-  }
-
-  for(i = 2; i < argc; i++){
-  50:	e2855001 	add	r5, r5, #1
-    if((fd = open(argv[i], 0)) < 0){
-      printf(1, "grep: cannot open %s\n", argv[i]);
-      exit();
-    }
-    grep(pattern, fd);
-    close(fd);
-  54:	e1a00006 	mov	r0, r6
-  58:	eb000196 	bl	6b8 <close>
-  if(argc <= 2){
-    grep(pattern, 0);
-    exit();
-  }
-
-  for(i = 2; i < argc; i++){
-  5c:	e1580005 	cmp	r8, r5
-  60:	cafffff0 	bgt	28 <main+0x28>
-      exit();
-    }
-    grep(pattern, fd);
-    close(fd);
-  }
-  exit();
-  64:	eb000152 	bl	5b4 <exit>
-    exit();
-  }
-
-  for(i = 2; i < argc; i++){
-    if((fd = open(argv[i], 0)) < 0){
-      printf(1, "grep: cannot open %s\n", argv[i]);
-  68:	e3a00001 	mov	r0, #1
-  6c:	e59f1028 	ldr	r1, [pc, #40]	; 9c <main+0x9c>
-  70:	e5972000 	ldr	r2, [r7]
-  74:	eb0002a1 	bl	b00 <printf>
-      exit();
-  78:	eb00014d 	bl	5b4 <exit>
-    exit();
-  }
-  pattern = argv[1];
-  
-  if(argc <= 2){
-    grep(pattern, 0);
-  7c:	e1a0000a 	mov	r0, sl
-  80:	e3a01000 	mov	r1, #0
-  84:	eb000061 	bl	210 <grep>
-    exit();
-  88:	eb000149 	bl	5b4 <exit>
-{
-  int fd, i;
-  char *pattern;
-  
-  if(argc <= 1){
-    printf(2, "usage: grep pattern [file ...]\n");
-  8c:	e3a00002 	mov	r0, #2
-  90:	e59f1008 	ldr	r1, [pc, #8]	; a0 <main+0xa0>
-  94:	eb000299 	bl	b00 <printf>
-    exit();
-  98:	eb000145 	bl	5b4 <exit>
-  9c:	00000e08 	.word	0x00000e08
-  a0:	00000de8 	.word	0x00000de8
-
-000000a4 <matchstar>:
-  return 0;
-}
-
-// matchstar: search for c*re at beginning of text
-int matchstar(int c, char *re, char *text)
-{
-  a4:	e92d4878 	push	{r3, r4, r5, r6, fp, lr}
-  a8:	e1a04000 	mov	r4, r0
-  ac:	e28db014 	add	fp, sp, #20
-  b0:	e1a05001 	mov	r5, r1
-  b4:	e1a06002 	mov	r6, r2
-  do{  // a * matches zero or more instances
-    if(matchhere(re, text))
-  b8:	e1a01006 	mov	r1, r6
-  bc:	e1a00005 	mov	r0, r5
-  c0:	eb00000d 	bl	fc <matchhere>
-  c4:	e3500000 	cmp	r0, #0
-  c8:	1a000007 	bne	ec <matchstar+0x48>
-      return 1;
-  }while(*text!='\0' && (*text++==c || c=='.'));
-  cc:	e4d63001 	ldrb	r3, [r6], #1
-  d0:	e3530000 	cmp	r3, #0
-  d4:	0a000006 	beq	f4 <matchstar+0x50>
-  d8:	e1530004 	cmp	r3, r4
-  dc:	0afffff5 	beq	b8 <matchstar+0x14>
-  e0:	e354002e 	cmp	r4, #46	; 0x2e
-  e4:	0afffff3 	beq	b8 <matchstar+0x14>
-  e8:	e8bd8878 	pop	{r3, r4, r5, r6, fp, pc}
-// matchstar: search for c*re at beginning of text
-int matchstar(int c, char *re, char *text)
-{
-  do{  // a * matches zero or more instances
-    if(matchhere(re, text))
-      return 1;
-  ec:	e3a00001 	mov	r0, #1
-  f0:	e8bd8878 	pop	{r3, r4, r5, r6, fp, pc}
-  }while(*text!='\0' && (*text++==c || c=='.'));
-  return 0;
-  f4:	e1a00003 	mov	r0, r3
-}
-  f8:	e8bd8878 	pop	{r3, r4, r5, r6, fp, pc}
-
-000000fc <matchhere>:
-  return 0;
-}
-
-// matchhere: search for re at beginning of text
-int matchhere(char *re, char *text)
-{
-  fc:	e92d0810 	push	{r4, fp}
- 100:	e1a03000 	mov	r3, r0
-  if(re[0] == '\0')
- 104:	e5d00000 	ldrb	r0, [r0]
-  return 0;
-}
-
-// matchhere: search for re at beginning of text
-int matchhere(char *re, char *text)
-{
- 108:	e28db004 	add	fp, sp, #4
- 10c:	e1a02001 	mov	r2, r1
-  if(re[0] == '\0')
- 110:	e3500000 	cmp	r0, #0
- 114:	0a00001c 	beq	18c <matchhere+0x90>
-    return 1;
-  if(re[1] == '*')
- 118:	e5d3c001 	ldrb	ip, [r3, #1]
- 11c:	e35c002a 	cmp	ip, #42	; 0x2a
-  }while(*text++ != '\0');
-  return 0;
-}
-
-// matchhere: search for re at beginning of text
-int matchhere(char *re, char *text)
- 120:	12834002 	addne	r4, r3, #2
-{
-  if(re[0] == '\0')
-    return 1;
-  if(re[1] == '*')
-    return matchstar(re[0], re+2, text);
- 124:	11a01001 	movne	r1, r1
-// matchhere: search for re at beginning of text
-int matchhere(char *re, char *text)
-{
-  if(re[0] == '\0')
-    return 1;
-  if(re[1] == '*')
- 128:	1a00000f 	bne	16c <matchhere+0x70>
- 12c:	ea00001a 	b	19c <matchhere+0xa0>
-    return matchstar(re[0], re+2, text);
-  if(re[0] == '$' && re[1] == '\0')
-    return *text == '\0';
-  if(*text!='\0' && (re[0]=='.' || re[0]==*text))
- 130:	e4d12001 	ldrb	r2, [r1], #1
- 134:	e3520000 	cmp	r2, #0
- 138:	0a00001b 	beq	1ac <matchhere+0xb0>
- 13c:	e350002e 	cmp	r0, #46	; 0x2e
- 140:	0a000001 	beq	14c <matchhere+0x50>
- 144:	e1500002 	cmp	r0, r2
- 148:	1a000019 	bne	1b4 <matchhere+0xb8>
-}
-
-// matchhere: search for re at beginning of text
-int matchhere(char *re, char *text)
-{
-  if(re[0] == '\0')
- 14c:	e5d30001 	ldrb	r0, [r3, #1]
-  if(re[1] == '*')
-    return matchstar(re[0], re+2, text);
-  if(re[0] == '$' && re[1] == '\0')
-    return *text == '\0';
-  if(*text!='\0' && (re[0]=='.' || re[0]==*text))
-    return matchhere(re+1, text+1);
- 150:	e1a02001 	mov	r2, r1
- 154:	e2833001 	add	r3, r3, #1
-}
-
-// matchhere: search for re at beginning of text
-int matchhere(char *re, char *text)
-{
-  if(re[0] == '\0')
- 158:	e3500000 	cmp	r0, #0
- 15c:	0a00000a 	beq	18c <matchhere+0x90>
-    return 1;
-  if(re[1] == '*')
- 160:	e4d4c001 	ldrb	ip, [r4], #1
- 164:	e35c002a 	cmp	ip, #42	; 0x2a
- 168:	0a00000b 	beq	19c <matchhere+0xa0>
-    return matchstar(re[0], re+2, text);
-  if(re[0] == '$' && re[1] == '\0')
- 16c:	e3500024 	cmp	r0, #36	; 0x24
- 170:	1affffee 	bne	130 <matchhere+0x34>
- 174:	e35c0000 	cmp	ip, #0
- 178:	1affffec 	bne	130 <matchhere+0x34>
-    return *text == '\0';
- 17c:	e5d10000 	ldrb	r0, [r1]
- 180:	e2700001 	rsbs	r0, r0, #1
- 184:	33a00000 	movcc	r0, #0
- 188:	ea000000 	b	190 <matchhere+0x94>
-
-// matchhere: search for re at beginning of text
-int matchhere(char *re, char *text)
-{
-  if(re[0] == '\0')
-    return 1;
- 18c:	e3a00001 	mov	r0, #1
-  if(re[0] == '$' && re[1] == '\0')
-    return *text == '\0';
-  if(*text!='\0' && (re[0]=='.' || re[0]==*text))
-    return matchhere(re+1, text+1);
-  return 0;
-}
- 190:	e24bd004 	sub	sp, fp, #4
- 194:	e8bd0810 	pop	{r4, fp}
- 198:	e12fff1e 	bx	lr
-int matchhere(char *re, char *text)
-{
-  if(re[0] == '\0')
-    return 1;
-  if(re[1] == '*')
-    return matchstar(re[0], re+2, text);
- 19c:	e2831002 	add	r1, r3, #2
-  if(re[0] == '$' && re[1] == '\0')
-    return *text == '\0';
-  if(*text!='\0' && (re[0]=='.' || re[0]==*text))
-    return matchhere(re+1, text+1);
-  return 0;
-}
- 1a0:	e24bd004 	sub	sp, fp, #4
- 1a4:	e8bd0810 	pop	{r4, fp}
-int matchhere(char *re, char *text)
-{
-  if(re[0] == '\0')
-    return 1;
-  if(re[1] == '*')
-    return matchstar(re[0], re+2, text);
- 1a8:	eaffffbd 	b	a4 <matchstar>
-  if(re[0] == '$' && re[1] == '\0')
-    return *text == '\0';
-  if(*text!='\0' && (re[0]=='.' || re[0]==*text))
-    return matchhere(re+1, text+1);
-  return 0;
- 1ac:	e1a00002 	mov	r0, r2
- 1b0:	eafffff6 	b	190 <matchhere+0x94>
- 1b4:	e3a00000 	mov	r0, #0
- 1b8:	eafffff4 	b	190 <matchhere+0x94>
-
-000001bc <match>:
-int matchhere(char*, char*);
-int matchstar(int, char*, char*);
-
-int
-match(char *re, char *text)
-{
- 1bc:	e92d4830 	push	{r4, r5, fp, lr}
- 1c0:	e1a05000 	mov	r5, r0
-  if(re[0] == '^')
- 1c4:	e5d03000 	ldrb	r3, [r0]
-int matchhere(char*, char*);
-int matchstar(int, char*, char*);
-
-int
-match(char *re, char *text)
-{
- 1c8:	e28db00c 	add	fp, sp, #12
- 1cc:	e1a04001 	mov	r4, r1
-  if(re[0] == '^')
- 1d0:	e353005e 	cmp	r3, #94	; 0x5e
- 1d4:	0a00000a 	beq	204 <match+0x48>
-    return matchhere(re+1, text);
-  do{  // must look at empty string
-    if(matchhere(re, text))
- 1d8:	e1a01004 	mov	r1, r4
- 1dc:	e1a00005 	mov	r0, r5
- 1e0:	ebffffc5 	bl	fc <matchhere>
- 1e4:	e3500000 	cmp	r0, #0
- 1e8:	1a000003 	bne	1fc <match+0x40>
-      return 1;
-  }while(*text++ != '\0');
- 1ec:	e4d40001 	ldrb	r0, [r4], #1
- 1f0:	e3500000 	cmp	r0, #0
- 1f4:	1afffff7 	bne	1d8 <match+0x1c>
- 1f8:	e8bd8830 	pop	{r4, r5, fp, pc}
-{
-  if(re[0] == '^')
-    return matchhere(re+1, text);
-  do{  // must look at empty string
-    if(matchhere(re, text))
-      return 1;
- 1fc:	e3a00001 	mov	r0, #1
-  }while(*text++ != '\0');
-  return 0;
-}
- 200:	e8bd8830 	pop	{r4, r5, fp, pc}
-
-int
-match(char *re, char *text)
-{
-  if(re[0] == '^')
-    return matchhere(re+1, text);
- 204:	e2800001 	add	r0, r0, #1
-  do{  // must look at empty string
-    if(matchhere(re, text))
-      return 1;
-  }while(*text++ != '\0');
-  return 0;
-}
- 208:	e8bd4830 	pop	{r4, r5, fp, lr}
-
-int
-match(char *re, char *text)
-{
-  if(re[0] == '^')
-    return matchhere(re+1, text);
- 20c:	eaffffba 	b	fc <matchhere>
-
-00000210 <grep>:
-char buf[1024];
-int match(char*, char*);
-
-void
-grep(char *pattern, int fd)
-{
- 210:	e92d4ff0 	push	{r4, r5, r6, r7, r8, r9, sl, fp, lr}
-  int n, m;
-  char *p, *q;
-  
-  m = 0;
- 214:	e3a07000 	mov	r7, #0
- 218:	e59fa0f0 	ldr	sl, [pc, #240]	; 310 <grep+0x100>
-char buf[1024];
-int match(char*, char*);
-
-void
-grep(char *pattern, int fd)
-{
- 21c:	e28db020 	add	fp, sp, #32
- 220:	e1a05000 	mov	r5, r0
-  m = 0;
-  while((n = read(fd, buf+m, sizeof(buf)-m)) > 0){
-    m += n;
-    p = buf;
-    while((q = strchr(p, '\n')) != 0){
-      *q = 0;
- 224:	e1a06007 	mov	r6, r7
-char buf[1024];
-int match(char*, char*);
-
-void
-grep(char *pattern, int fd)
-{
- 228:	e24dd00c 	sub	sp, sp, #12
- 22c:	e50b102c 	str	r1, [fp, #-44]	; 0x2c
-  int n, m;
-  char *p, *q;
-  
-  m = 0;
-  while((n = read(fd, buf+m, sizeof(buf)-m)) > 0){
- 230:	e51b002c 	ldr	r0, [fp, #-44]	; 0x2c
- 234:	e08a1007 	add	r1, sl, r7
- 238:	e2672b01 	rsb	r2, r7, #1024	; 0x400
- 23c:	eb000103 	bl	650 <read>
- 240:	e3500000 	cmp	r0, #0
- 244:	e50b0028 	str	r0, [fp, #-40]	; 0x28
- 248:	da00002e 	ble	308 <grep+0xf8>
- 24c:	e59f90bc 	ldr	r9, [pc, #188]	; 310 <grep+0x100>
-    m += n;
-    p = buf;
-    while((q = strchr(p, '\n')) != 0){
- 250:	e3a0800a 	mov	r8, #10
- 254:	e3a0100a 	mov	r1, #10
- 258:	e1a00009 	mov	r0, r9
- 25c:	eb000067 	bl	400 <strchr>
-      *q = 0;
-      if(match(pattern, p)){
- 260:	e1a01009 	mov	r1, r9
-  
-  m = 0;
-  while((n = read(fd, buf+m, sizeof(buf)-m)) > 0){
-    m += n;
-    p = buf;
-    while((q = strchr(p, '\n')) != 0){
- 264:	e2504000 	subs	r4, r0, #0
-      *q = 0;
-      if(match(pattern, p)){
- 268:	e1a00005 	mov	r0, r5
-  
-  m = 0;
-  while((n = read(fd, buf+m, sizeof(buf)-m)) > 0){
-    m += n;
-    p = buf;
-    while((q = strchr(p, '\n')) != 0){
- 26c:	0a000011 	beq	2b8 <grep+0xa8>
-      *q = 0;
- 270:	e5c46000 	strb	r6, [r4]
-      if(match(pattern, p)){
- 274:	ebffffd0 	bl	1bc <match>
- 278:	e3500000 	cmp	r0, #0
- 27c:	02849001 	addeq	r9, r4, #1
- 280:	0afffff3 	beq	254 <grep+0x44>
-        *q = '\n';
- 284:	e4c48001 	strb	r8, [r4], #1
-        write(1, p, q+1 - p);
- 288:	e1a01009 	mov	r1, r9
- 28c:	e0692004 	rsb	r2, r9, r4
- 290:	e3a00001 	mov	r0, #1
- 294:	e1a09004 	mov	r9, r4
- 298:	eb0000f9 	bl	684 <write>
-  
-  m = 0;
-  while((n = read(fd, buf+m, sizeof(buf)-m)) > 0){
-    m += n;
-    p = buf;
-    while((q = strchr(p, '\n')) != 0){
- 29c:	e3a0100a 	mov	r1, #10
- 2a0:	e1a00009 	mov	r0, r9
- 2a4:	eb000055 	bl	400 <strchr>
-      *q = 0;
-      if(match(pattern, p)){
- 2a8:	e1a01009 	mov	r1, r9
-  
-  m = 0;
-  while((n = read(fd, buf+m, sizeof(buf)-m)) > 0){
-    m += n;
-    p = buf;
-    while((q = strchr(p, '\n')) != 0){
- 2ac:	e2504000 	subs	r4, r0, #0
-      *q = 0;
-      if(match(pattern, p)){
- 2b0:	e1a00005 	mov	r0, r5
-  
-  m = 0;
-  while((n = read(fd, buf+m, sizeof(buf)-m)) > 0){
-    m += n;
-    p = buf;
-    while((q = strchr(p, '\n')) != 0){
- 2b4:	1affffed 	bne	270 <grep+0x60>
-        *q = '\n';
-        write(1, p, q+1 - p);
-      }
-      p = q+1;
-    }
-    if(p == buf)
- 2b8:	e159000a 	cmp	r9, sl
-      m = 0;
- 2bc:	01a07004 	moveq	r7, r4
-        *q = '\n';
-        write(1, p, q+1 - p);
-      }
-      p = q+1;
-    }
-    if(p == buf)
- 2c0:	0affffda 	beq	230 <grep+0x20>
-  int n, m;
-  char *p, *q;
-  
-  m = 0;
-  while((n = read(fd, buf+m, sizeof(buf)-m)) > 0){
-    m += n;
- 2c4:	e51b3028 	ldr	r3, [fp, #-40]	; 0x28
- 2c8:	e0877003 	add	r7, r7, r3
-      }
-      p = q+1;
-    }
-    if(p == buf)
-      m = 0;
-    if(m > 0){
- 2cc:	e3570000 	cmp	r7, #0
- 2d0:	daffffd6 	ble	230 <grep+0x20>
-      m -= p - buf;
- 2d4:	e59f2034 	ldr	r2, [pc, #52]	; 310 <grep+0x100>
-      memmove(buf, p, m);
- 2d8:	e59f0030 	ldr	r0, [pc, #48]	; 310 <grep+0x100>
-      p = q+1;
-    }
-    if(p == buf)
-      m = 0;
-    if(m > 0){
-      m -= p - buf;
- 2dc:	e0693002 	rsb	r3, r9, r2
- 2e0:	e0877003 	add	r7, r7, r3
-      memmove(buf, p, m);
- 2e4:	e1a02007 	mov	r2, r7
- 2e8:	eb000097 	bl	54c <memmove>
-{
-  int n, m;
-  char *p, *q;
-  
-  m = 0;
-  while((n = read(fd, buf+m, sizeof(buf)-m)) > 0){
- 2ec:	e51b002c 	ldr	r0, [fp, #-44]	; 0x2c
- 2f0:	e08a1007 	add	r1, sl, r7
- 2f4:	e2672b01 	rsb	r2, r7, #1024	; 0x400
- 2f8:	eb0000d4 	bl	650 <read>
- 2fc:	e3500000 	cmp	r0, #0
- 300:	e50b0028 	str	r0, [fp, #-40]	; 0x28
- 304:	caffffd0 	bgt	24c <grep+0x3c>
-    if(m > 0){
-      m -= p - buf;
-      memmove(buf, p, m);
-    }
-  }
-}
- 308:	e24bd020 	sub	sp, fp, #32
- 30c:	e8bd8ff0 	pop	{r4, r5, r6, r7, r8, r9, sl, fp, pc}
- 310:	00000e48 	.word	0x00000e48
-
-00000314 <strcpy>:
-#include "user.h"
-#include "arm.h"
-
-char*
-strcpy(char *s, char *t)
-{
- 314:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
-  char *os;
-
-  os = s;
-  while((*s++ = *t++) != 0)
- 318:	e1a02000 	mov	r2, r0
-#include "user.h"
-#include "arm.h"
-
-char*
-strcpy(char *s, char *t)
-{
- 31c:	e28db000 	add	fp, sp, #0
-  char *os;
-
-  os = s;
-  while((*s++ = *t++) != 0)
- 320:	e4d13001 	ldrb	r3, [r1], #1
- 324:	e3530000 	cmp	r3, #0
- 328:	e4c23001 	strb	r3, [r2], #1
- 32c:	1afffffb 	bne	320 <strcpy+0xc>
-    ;
-  return os;
-}
- 330:	e28bd000 	add	sp, fp, #0
- 334:	e8bd0800 	pop	{fp}
- 338:	e12fff1e 	bx	lr
-
-0000033c <strcmp>:
-
-int
-strcmp(const char *p, const char *q)
-{
- 33c:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 340:	e28db000 	add	fp, sp, #0
-  while(*p && *p == *q)
- 344:	e5d03000 	ldrb	r3, [r0]
- 348:	e5d12000 	ldrb	r2, [r1]
- 34c:	e3530000 	cmp	r3, #0
- 350:	1a000004 	bne	368 <strcmp+0x2c>
- 354:	ea000005 	b	370 <strcmp+0x34>
- 358:	e5f03001 	ldrb	r3, [r0, #1]!
- 35c:	e3530000 	cmp	r3, #0
- 360:	0a000006 	beq	380 <strcmp+0x44>
- 364:	e5f12001 	ldrb	r2, [r1, #1]!
- 368:	e1530002 	cmp	r3, r2
- 36c:	0afffff9 	beq	358 <strcmp+0x1c>
-    p++, q++;
-  return (uchar)*p - (uchar)*q;
-}
- 370:	e0620003 	rsb	r0, r2, r3
- 374:	e28bd000 	add	sp, fp, #0
- 378:	e8bd0800 	pop	{fp}
- 37c:	e12fff1e 	bx	lr
-}
-
-int
-strcmp(const char *p, const char *q)
-{
-  while(*p && *p == *q)
- 380:	e5d12001 	ldrb	r2, [r1, #1]
- 384:	eafffff9 	b	370 <strcmp+0x34>
-
-00000388 <strlen>:
-  return (uchar)*p - (uchar)*q;
-}
-
-uint
-strlen(char *s)
-{
- 388:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 38c:	e28db000 	add	fp, sp, #0
-  int n;
-
-  for(n = 0; s[n]; n++)
- 390:	e5d03000 	ldrb	r3, [r0]
- 394:	e3530000 	cmp	r3, #0
- 398:	01a00003 	moveq	r0, r3
- 39c:	0a000006 	beq	3bc <strlen+0x34>
- 3a0:	e1a02000 	mov	r2, r0
- 3a4:	e3a03000 	mov	r3, #0
- 3a8:	e5f21001 	ldrb	r1, [r2, #1]!
- 3ac:	e2833001 	add	r3, r3, #1
- 3b0:	e1a00003 	mov	r0, r3
- 3b4:	e3510000 	cmp	r1, #0
- 3b8:	1afffffa 	bne	3a8 <strlen+0x20>
-    ;
-  return n;
-}
- 3bc:	e28bd000 	add	sp, fp, #0
- 3c0:	e8bd0800 	pop	{fp}
- 3c4:	e12fff1e 	bx	lr
-
-000003c8 <memset>:
-memset(void *dst, int c, uint n)
-{
-  char *p=dst;
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 3c8:	e3520000 	cmp	r2, #0
-  return n;
-}
-
-void*
-memset(void *dst, int c, uint n)
-{
- 3cc:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 3d0:	e28db000 	add	fp, sp, #0
-  char *p=dst;
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 3d4:	0a000006 	beq	3f4 <memset+0x2c>
- 3d8:	e6ef1071 	uxtb	r1, r1
- 3dc:	e1a03002 	mov	r3, r2
-}
-
-void*
-memset(void *dst, int c, uint n)
-{
-  char *p=dst;
- 3e0:	e1a0c000 	mov	ip, r0
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 3e4:	e2533001 	subs	r3, r3, #1
- 3e8:	e4cc1001 	strb	r1, [ip], #1
- 3ec:	1afffffc 	bne	3e4 <memset+0x1c>
- 3f0:	e0800002 	add	r0, r0, r2
-  return (void *)p;
-}
- 3f4:	e28bd000 	add	sp, fp, #0
- 3f8:	e8bd0800 	pop	{fp}
- 3fc:	e12fff1e 	bx	lr
-
-00000400 <strchr>:
-
-char*
-strchr(const char *s, char c)
-{
- 400:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 404:	e28db000 	add	fp, sp, #0
-  for(; *s; s++)
- 408:	e5d03000 	ldrb	r3, [r0]
- 40c:	e3530000 	cmp	r3, #0
- 410:	1a000004 	bne	428 <strchr+0x28>
- 414:	ea000008 	b	43c <strchr+0x3c>
- 418:	e5d03001 	ldrb	r3, [r0, #1]
- 41c:	e2800001 	add	r0, r0, #1
- 420:	e3530000 	cmp	r3, #0
- 424:	0a000004 	beq	43c <strchr+0x3c>
-    if(*s == c)
- 428:	e1530001 	cmp	r3, r1
- 42c:	1afffff9 	bne	418 <strchr+0x18>
-      return (char*)s;
-  return 0;
-}
- 430:	e28bd000 	add	sp, fp, #0
- 434:	e8bd0800 	pop	{fp}
- 438:	e12fff1e 	bx	lr
-strchr(const char *s, char c)
-{
-  for(; *s; s++)
-    if(*s == c)
-      return (char*)s;
-  return 0;
- 43c:	e1a00003 	mov	r0, r3
- 440:	eafffffa 	b	430 <strchr+0x30>
-
-00000444 <gets>:
-}
-
-char*
-gets(char *buf, int max)
-{
- 444:	e92d49f0 	push	{r4, r5, r6, r7, r8, fp, lr}
- 448:	e28db018 	add	fp, sp, #24
- 44c:	e24dd00c 	sub	sp, sp, #12
- 450:	e1a08000 	mov	r8, r0
- 454:	e1a07001 	mov	r7, r1
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 458:	e1a06000 	mov	r6, r0
- 45c:	e3a05000 	mov	r5, #0
- 460:	ea000008 	b	488 <gets+0x44>
-    cc = read(0, &c, 1);
- 464:	eb000079 	bl	650 <read>
-    if(cc < 1)
- 468:	e3500000 	cmp	r0, #0
- 46c:	da00000b 	ble	4a0 <gets+0x5c>
-      break;
-    buf[i++] = c;
- 470:	e55b301d 	ldrb	r3, [fp, #-29]
-    if(c == '\n' || c == '\r')
- 474:	e1a05004 	mov	r5, r4
- 478:	e353000a 	cmp	r3, #10
- 47c:	1353000d 	cmpne	r3, #13
-
-  for(i=0; i+1 < max; ){
-    cc = read(0, &c, 1);
-    if(cc < 1)
-      break;
-    buf[i++] = c;
- 480:	e4c63001 	strb	r3, [r6], #1
-    if(c == '\n' || c == '\r')
- 484:	0a00000a 	beq	4b4 <gets+0x70>
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
-    cc = read(0, &c, 1);
- 488:	e3a02001 	mov	r2, #1
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 48c:	e0854002 	add	r4, r5, r2
- 490:	e1540007 	cmp	r4, r7
-    cc = read(0, &c, 1);
- 494:	e3a00000 	mov	r0, #0
- 498:	e24b101d 	sub	r1, fp, #29
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 49c:	bafffff0 	blt	464 <gets+0x20>
-      break;
-    buf[i++] = c;
-    if(c == '\n' || c == '\r')
-      break;
-  }
-  buf[i] = '\0';
- 4a0:	e3a03000 	mov	r3, #0
- 4a4:	e7c83005 	strb	r3, [r8, r5]
-  return buf;
-}
- 4a8:	e1a00008 	mov	r0, r8
- 4ac:	e24bd018 	sub	sp, fp, #24
- 4b0:	e8bd89f0 	pop	{r4, r5, r6, r7, r8, fp, pc}
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 4b4:	e1a05004 	mov	r5, r4
- 4b8:	eafffff8 	b	4a0 <gets+0x5c>
-
-000004bc <stat>:
-  return buf;
-}
-
-int
-stat(char *n, struct stat *st)
-{
- 4bc:	e92d4830 	push	{r4, r5, fp, lr}
- 4c0:	e1a05001 	mov	r5, r1
- 4c4:	e28db00c 	add	fp, sp, #12
-  int fd;
-  int r;
-
-  fd = open(n, O_RDONLY);
- 4c8:	e3a01000 	mov	r1, #0
- 4cc:	eb0000a0 	bl	754 <open>
-  if(fd < 0)
- 4d0:	e2504000 	subs	r4, r0, #0
-    return -1;
- 4d4:	b3e05000 	mvnlt	r5, #0
-{
-  int fd;
-  int r;
-
-  fd = open(n, O_RDONLY);
-  if(fd < 0)
- 4d8:	ba000004 	blt	4f0 <stat+0x34>
-    return -1;
-  r = fstat(fd, st);
- 4dc:	e1a01005 	mov	r1, r5
- 4e0:	eb0000c2 	bl	7f0 <fstat>
- 4e4:	e1a05000 	mov	r5, r0
-  close(fd);
- 4e8:	e1a00004 	mov	r0, r4
- 4ec:	eb000071 	bl	6b8 <close>
-  return r;
-}
- 4f0:	e1a00005 	mov	r0, r5
- 4f4:	e8bd8830 	pop	{r4, r5, fp, pc}
-
-000004f8 <atoi>:
-
-int
-atoi(const char *s)
-{
- 4f8:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 4fc:	e28db000 	add	fp, sp, #0
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 500:	e5d03000 	ldrb	r3, [r0]
- 504:	e2432030 	sub	r2, r3, #48	; 0x30
- 508:	e6ef2072 	uxtb	r2, r2
- 50c:	e3520009 	cmp	r2, #9
-int
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
- 510:	83a00000 	movhi	r0, #0
-  while('0' <= *s && *s <= '9')
- 514:	8a000009 	bhi	540 <atoi+0x48>
- 518:	e1a02000 	mov	r2, r0
-int
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
- 51c:	e3a00000 	mov	r0, #0
-  while('0' <= *s && *s <= '9')
-    n = n*10 + *s++ - '0';
- 520:	e0800100 	add	r0, r0, r0, lsl #2
- 524:	e0830080 	add	r0, r3, r0, lsl #1
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 528:	e5f23001 	ldrb	r3, [r2, #1]!
-    n = n*10 + *s++ - '0';
- 52c:	e2400030 	sub	r0, r0, #48	; 0x30
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 530:	e2431030 	sub	r1, r3, #48	; 0x30
- 534:	e6ef1071 	uxtb	r1, r1
- 538:	e3510009 	cmp	r1, #9
- 53c:	9afffff7 	bls	520 <atoi+0x28>
-    n = n*10 + *s++ - '0';
-  return n;
-}
- 540:	e28bd000 	add	sp, fp, #0
- 544:	e8bd0800 	pop	{fp}
- 548:	e12fff1e 	bx	lr
-
-0000054c <memmove>:
-{
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 54c:	e3520000 	cmp	r2, #0
-  return n;
-}
-
-void*
-memmove(void *vdst, void *vsrc, int n)
-{
- 550:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 554:	e28db000 	add	fp, sp, #0
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 558:	da000005 	ble	574 <memmove+0x28>
-    n = n*10 + *s++ - '0';
-  return n;
-}
-
-void*
-memmove(void *vdst, void *vsrc, int n)
- 55c:	e0802002 	add	r2, r0, r2
-{
-  char *dst, *src;
-  
-  dst = vdst;
- 560:	e1a03000 	mov	r3, r0
-  src = vsrc;
-  while(n-- > 0)
-    *dst++ = *src++;
- 564:	e4d1c001 	ldrb	ip, [r1], #1
- 568:	e4c3c001 	strb	ip, [r3], #1
-{
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 56c:	e1530002 	cmp	r3, r2
- 570:	1afffffb 	bne	564 <memmove+0x18>
-    *dst++ = *src++;
-  return vdst;
-}
- 574:	e28bd000 	add	sp, fp, #0
- 578:	e8bd0800 	pop	{fp}
- 57c:	e12fff1e 	bx	lr
-
-00000580 <fork>:
- 580:	e92d4000 	push	{lr}
- 584:	e92d0008 	push	{r3}
- 588:	e92d0004 	push	{r2}
- 58c:	e92d0002 	push	{r1}
- 590:	e92d0001 	push	{r0}
- 594:	e3a00001 	mov	r0, #1
- 598:	ef000040 	svc	0x00000040
- 59c:	e8bd0002 	pop	{r1}
- 5a0:	e8bd0002 	pop	{r1}
- 5a4:	e8bd0004 	pop	{r2}
- 5a8:	e8bd0008 	pop	{r3}
- 5ac:	e8bd4000 	pop	{lr}
- 5b0:	e12fff1e 	bx	lr
-
-000005b4 <exit>:
- 5b4:	e92d4000 	push	{lr}
- 5b8:	e92d0008 	push	{r3}
- 5bc:	e92d0004 	push	{r2}
- 5c0:	e92d0002 	push	{r1}
- 5c4:	e92d0001 	push	{r0}
- 5c8:	e3a00002 	mov	r0, #2
- 5cc:	ef000040 	svc	0x00000040
- 5d0:	e8bd0002 	pop	{r1}
- 5d4:	e8bd0002 	pop	{r1}
- 5d8:	e8bd0004 	pop	{r2}
- 5dc:	e8bd0008 	pop	{r3}
- 5e0:	e8bd4000 	pop	{lr}
- 5e4:	e12fff1e 	bx	lr
-
-000005e8 <wait>:
- 5e8:	e92d4000 	push	{lr}
- 5ec:	e92d0008 	push	{r3}
- 5f0:	e92d0004 	push	{r2}
- 5f4:	e92d0002 	push	{r1}
- 5f8:	e92d0001 	push	{r0}
- 5fc:	e3a00003 	mov	r0, #3
- 600:	ef000040 	svc	0x00000040
- 604:	e8bd0002 	pop	{r1}
- 608:	e8bd0002 	pop	{r1}
- 60c:	e8bd0004 	pop	{r2}
- 610:	e8bd0008 	pop	{r3}
- 614:	e8bd4000 	pop	{lr}
- 618:	e12fff1e 	bx	lr
-
-0000061c <pipe>:
- 61c:	e92d4000 	push	{lr}
- 620:	e92d0008 	push	{r3}
- 624:	e92d0004 	push	{r2}
- 628:	e92d0002 	push	{r1}
- 62c:	e92d0001 	push	{r0}
- 630:	e3a00004 	mov	r0, #4
- 634:	ef000040 	svc	0x00000040
- 638:	e8bd0002 	pop	{r1}
- 63c:	e8bd0002 	pop	{r1}
- 640:	e8bd0004 	pop	{r2}
- 644:	e8bd0008 	pop	{r3}
- 648:	e8bd4000 	pop	{lr}
- 64c:	e12fff1e 	bx	lr
-
-00000650 <read>:
- 650:	e92d4000 	push	{lr}
- 654:	e92d0008 	push	{r3}
- 658:	e92d0004 	push	{r2}
- 65c:	e92d0002 	push	{r1}
- 660:	e92d0001 	push	{r0}
- 664:	e3a00005 	mov	r0, #5
- 668:	ef000040 	svc	0x00000040
- 66c:	e8bd0002 	pop	{r1}
- 670:	e8bd0002 	pop	{r1}
- 674:	e8bd0004 	pop	{r2}
- 678:	e8bd0008 	pop	{r3}
- 67c:	e8bd4000 	pop	{lr}
- 680:	e12fff1e 	bx	lr
-
-00000684 <write>:
- 684:	e92d4000 	push	{lr}
- 688:	e92d0008 	push	{r3}
- 68c:	e92d0004 	push	{r2}
- 690:	e92d0002 	push	{r1}
- 694:	e92d0001 	push	{r0}
- 698:	e3a00010 	mov	r0, #16
- 69c:	ef000040 	svc	0x00000040
- 6a0:	e8bd0002 	pop	{r1}
- 6a4:	e8bd0002 	pop	{r1}
- 6a8:	e8bd0004 	pop	{r2}
- 6ac:	e8bd0008 	pop	{r3}
- 6b0:	e8bd4000 	pop	{lr}
- 6b4:	e12fff1e 	bx	lr
-
-000006b8 <close>:
- 6b8:	e92d4000 	push	{lr}
- 6bc:	e92d0008 	push	{r3}
- 6c0:	e92d0004 	push	{r2}
- 6c4:	e92d0002 	push	{r1}
- 6c8:	e92d0001 	push	{r0}
- 6cc:	e3a00015 	mov	r0, #21
- 6d0:	ef000040 	svc	0x00000040
- 6d4:	e8bd0002 	pop	{r1}
- 6d8:	e8bd0002 	pop	{r1}
- 6dc:	e8bd0004 	pop	{r2}
- 6e0:	e8bd0008 	pop	{r3}
- 6e4:	e8bd4000 	pop	{lr}
- 6e8:	e12fff1e 	bx	lr
-
-000006ec <kill>:
- 6ec:	e92d4000 	push	{lr}
- 6f0:	e92d0008 	push	{r3}
- 6f4:	e92d0004 	push	{r2}
- 6f8:	e92d0002 	push	{r1}
- 6fc:	e92d0001 	push	{r0}
- 700:	e3a00006 	mov	r0, #6
- 704:	ef000040 	svc	0x00000040
- 708:	e8bd0002 	pop	{r1}
- 70c:	e8bd0002 	pop	{r1}
- 710:	e8bd0004 	pop	{r2}
- 714:	e8bd0008 	pop	{r3}
- 718:	e8bd4000 	pop	{lr}
- 71c:	e12fff1e 	bx	lr
-
-00000720 <exec>:
- 720:	e92d4000 	push	{lr}
- 724:	e92d0008 	push	{r3}
- 728:	e92d0004 	push	{r2}
- 72c:	e92d0002 	push	{r1}
- 730:	e92d0001 	push	{r0}
- 734:	e3a00007 	mov	r0, #7
- 738:	ef000040 	svc	0x00000040
- 73c:	e8bd0002 	pop	{r1}
- 740:	e8bd0002 	pop	{r1}
- 744:	e8bd0004 	pop	{r2}
- 748:	e8bd0008 	pop	{r3}
- 74c:	e8bd4000 	pop	{lr}
- 750:	e12fff1e 	bx	lr
-
-00000754 <open>:
- 754:	e92d4000 	push	{lr}
- 758:	e92d0008 	push	{r3}
- 75c:	e92d0004 	push	{r2}
- 760:	e92d0002 	push	{r1}
- 764:	e92d0001 	push	{r0}
- 768:	e3a0000f 	mov	r0, #15
- 76c:	ef000040 	svc	0x00000040
- 770:	e8bd0002 	pop	{r1}
- 774:	e8bd0002 	pop	{r1}
- 778:	e8bd0004 	pop	{r2}
- 77c:	e8bd0008 	pop	{r3}
- 780:	e8bd4000 	pop	{lr}
- 784:	e12fff1e 	bx	lr
-
-00000788 <mknod>:
- 788:	e92d4000 	push	{lr}
- 78c:	e92d0008 	push	{r3}
- 790:	e92d0004 	push	{r2}
- 794:	e92d0002 	push	{r1}
- 798:	e92d0001 	push	{r0}
- 79c:	e3a00011 	mov	r0, #17
- 7a0:	ef000040 	svc	0x00000040
- 7a4:	e8bd0002 	pop	{r1}
- 7a8:	e8bd0002 	pop	{r1}
- 7ac:	e8bd0004 	pop	{r2}
- 7b0:	e8bd0008 	pop	{r3}
- 7b4:	e8bd4000 	pop	{lr}
- 7b8:	e12fff1e 	bx	lr
-
-000007bc <unlink>:
- 7bc:	e92d4000 	push	{lr}
- 7c0:	e92d0008 	push	{r3}
- 7c4:	e92d0004 	push	{r2}
- 7c8:	e92d0002 	push	{r1}
- 7cc:	e92d0001 	push	{r0}
- 7d0:	e3a00012 	mov	r0, #18
- 7d4:	ef000040 	svc	0x00000040
- 7d8:	e8bd0002 	pop	{r1}
- 7dc:	e8bd0002 	pop	{r1}
- 7e0:	e8bd0004 	pop	{r2}
- 7e4:	e8bd0008 	pop	{r3}
- 7e8:	e8bd4000 	pop	{lr}
- 7ec:	e12fff1e 	bx	lr
-
-000007f0 <fstat>:
- 7f0:	e92d4000 	push	{lr}
- 7f4:	e92d0008 	push	{r3}
- 7f8:	e92d0004 	push	{r2}
- 7fc:	e92d0002 	push	{r1}
- 800:	e92d0001 	push	{r0}
- 804:	e3a00008 	mov	r0, #8
- 808:	ef000040 	svc	0x00000040
- 80c:	e8bd0002 	pop	{r1}
- 810:	e8bd0002 	pop	{r1}
- 814:	e8bd0004 	pop	{r2}
- 818:	e8bd0008 	pop	{r3}
- 81c:	e8bd4000 	pop	{lr}
- 820:	e12fff1e 	bx	lr
-
-00000824 <link>:
- 824:	e92d4000 	push	{lr}
- 828:	e92d0008 	push	{r3}
- 82c:	e92d0004 	push	{r2}
- 830:	e92d0002 	push	{r1}
- 834:	e92d0001 	push	{r0}
- 838:	e3a00013 	mov	r0, #19
- 83c:	ef000040 	svc	0x00000040
- 840:	e8bd0002 	pop	{r1}
- 844:	e8bd0002 	pop	{r1}
- 848:	e8bd0004 	pop	{r2}
- 84c:	e8bd0008 	pop	{r3}
- 850:	e8bd4000 	pop	{lr}
- 854:	e12fff1e 	bx	lr
-
-00000858 <mkdir>:
- 858:	e92d4000 	push	{lr}
- 85c:	e92d0008 	push	{r3}
- 860:	e92d0004 	push	{r2}
- 864:	e92d0002 	push	{r1}
- 868:	e92d0001 	push	{r0}
- 86c:	e3a00014 	mov	r0, #20
- 870:	ef000040 	svc	0x00000040
- 874:	e8bd0002 	pop	{r1}
- 878:	e8bd0002 	pop	{r1}
- 87c:	e8bd0004 	pop	{r2}
- 880:	e8bd0008 	pop	{r3}
- 884:	e8bd4000 	pop	{lr}
- 888:	e12fff1e 	bx	lr
-
-0000088c <chdir>:
- 88c:	e92d4000 	push	{lr}
- 890:	e92d0008 	push	{r3}
- 894:	e92d0004 	push	{r2}
- 898:	e92d0002 	push	{r1}
- 89c:	e92d0001 	push	{r0}
- 8a0:	e3a00009 	mov	r0, #9
- 8a4:	ef000040 	svc	0x00000040
- 8a8:	e8bd0002 	pop	{r1}
- 8ac:	e8bd0002 	pop	{r1}
- 8b0:	e8bd0004 	pop	{r2}
- 8b4:	e8bd0008 	pop	{r3}
- 8b8:	e8bd4000 	pop	{lr}
- 8bc:	e12fff1e 	bx	lr
-
-000008c0 <dup>:
- 8c0:	e92d4000 	push	{lr}
- 8c4:	e92d0008 	push	{r3}
- 8c8:	e92d0004 	push	{r2}
- 8cc:	e92d0002 	push	{r1}
- 8d0:	e92d0001 	push	{r0}
- 8d4:	e3a0000a 	mov	r0, #10
- 8d8:	ef000040 	svc	0x00000040
- 8dc:	e8bd0002 	pop	{r1}
- 8e0:	e8bd0002 	pop	{r1}
- 8e4:	e8bd0004 	pop	{r2}
- 8e8:	e8bd0008 	pop	{r3}
- 8ec:	e8bd4000 	pop	{lr}
- 8f0:	e12fff1e 	bx	lr
-
-000008f4 <getpid>:
- 8f4:	e92d4000 	push	{lr}
- 8f8:	e92d0008 	push	{r3}
- 8fc:	e92d0004 	push	{r2}
- 900:	e92d0002 	push	{r1}
- 904:	e92d0001 	push	{r0}
- 908:	e3a0000b 	mov	r0, #11
- 90c:	ef000040 	svc	0x00000040
- 910:	e8bd0002 	pop	{r1}
- 914:	e8bd0002 	pop	{r1}
- 918:	e8bd0004 	pop	{r2}
- 91c:	e8bd0008 	pop	{r3}
- 920:	e8bd4000 	pop	{lr}
- 924:	e12fff1e 	bx	lr
-
-00000928 <sbrk>:
- 928:	e92d4000 	push	{lr}
- 92c:	e92d0008 	push	{r3}
- 930:	e92d0004 	push	{r2}
- 934:	e92d0002 	push	{r1}
- 938:	e92d0001 	push	{r0}
- 93c:	e3a0000c 	mov	r0, #12
- 940:	ef000040 	svc	0x00000040
- 944:	e8bd0002 	pop	{r1}
- 948:	e8bd0002 	pop	{r1}
- 94c:	e8bd0004 	pop	{r2}
- 950:	e8bd0008 	pop	{r3}
- 954:	e8bd4000 	pop	{lr}
- 958:	e12fff1e 	bx	lr
-
-0000095c <sleep>:
- 95c:	e92d4000 	push	{lr}
- 960:	e92d0008 	push	{r3}
- 964:	e92d0004 	push	{r2}
- 968:	e92d0002 	push	{r1}
- 96c:	e92d0001 	push	{r0}
- 970:	e3a0000d 	mov	r0, #13
- 974:	ef000040 	svc	0x00000040
- 978:	e8bd0002 	pop	{r1}
- 97c:	e8bd0002 	pop	{r1}
- 980:	e8bd0004 	pop	{r2}
- 984:	e8bd0008 	pop	{r3}
- 988:	e8bd4000 	pop	{lr}
- 98c:	e12fff1e 	bx	lr
-
-00000990 <uptime>:
- 990:	e92d4000 	push	{lr}
- 994:	e92d0008 	push	{r3}
- 998:	e92d0004 	push	{r2}
- 99c:	e92d0002 	push	{r1}
- 9a0:	e92d0001 	push	{r0}
- 9a4:	e3a0000e 	mov	r0, #14
- 9a8:	ef000040 	svc	0x00000040
- 9ac:	e8bd0002 	pop	{r1}
- 9b0:	e8bd0002 	pop	{r1}
- 9b4:	e8bd0004 	pop	{r2}
- 9b8:	e8bd0008 	pop	{r3}
- 9bc:	e8bd4000 	pop	{lr}
- 9c0:	e12fff1e 	bx	lr
-
-000009c4 <putc>:
-#include "stat.h"
-#include "user.h"
-
-static void
-putc(int fd, char c)
-{
- 9c4:	e92d4800 	push	{fp, lr}
- 9c8:	e28db004 	add	fp, sp, #4
- 9cc:	e24b3004 	sub	r3, fp, #4
- 9d0:	e24dd008 	sub	sp, sp, #8
-  write(fd, &c, 1);
- 9d4:	e3a02001 	mov	r2, #1
-#include "stat.h"
-#include "user.h"
-
-static void
-putc(int fd, char c)
-{
- 9d8:	e5631001 	strb	r1, [r3, #-1]!
-  write(fd, &c, 1);
- 9dc:	e1a01003 	mov	r1, r3
- 9e0:	ebffff27 	bl	684 <write>
-}
- 9e4:	e24bd004 	sub	sp, fp, #4
- 9e8:	e8bd8800 	pop	{fp, pc}
-
-000009ec <printint>:
-    return q;
-}
-
-static void
-printint(int fd, int xx, int base, int sgn)
-{
- 9ec:	e92d4ff0 	push	{r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 9f0:	e1a04000 	mov	r4, r0
-  char buf[16];
-  int i, neg;
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
- 9f4:	e1a00fa1 	lsr	r0, r1, #31
- 9f8:	e3530000 	cmp	r3, #0
- 9fc:	03a03000 	moveq	r3, #0
- a00:	12003001 	andne	r3, r0, #1
-    return q;
-}
-
-static void
-printint(int fd, int xx, int base, int sgn)
-{
- a04:	e28db020 	add	fp, sp, #32
-  char buf[16];
-  int i, neg;
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
- a08:	e3530000 	cmp	r3, #0
-    return q;
-}
-
-static void
-printint(int fd, int xx, int base, int sgn)
-{
- a0c:	e24dd014 	sub	sp, sp, #20
- a10:	e59f909c 	ldr	r9, [pc, #156]	; ab4 <printint+0xc8>
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
-    neg = 1;
-    x = -xx;
- a14:	12611000 	rsbne	r1, r1, #0
-  int i, neg;
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
-    neg = 1;
- a18:	13a03001 	movne	r3, #1
-  } else {
-    x = xx;
-  }
-
-  b = base;
-  i = 0;
- a1c:	e3a0a000 	mov	sl, #0
- a20:	e24b6034 	sub	r6, fp, #52	; 0x34
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
-            q = q | (1 << i);
- a24:	e3a08001 	mov	r8, #1
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- a28:	e3a07000 	mov	r7, #0
-    int i;
-
-    for(i=31;i>=0;i--){
- a2c:	e3a0001f 	mov	r0, #31
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- a30:	e1a0c007 	mov	ip, r7
-    int i;
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
- a34:	e1a0e031 	lsr	lr, r1, r0
- a38:	e20ee001 	and	lr, lr, #1
- a3c:	e18ec08c 	orr	ip, lr, ip, lsl #1
-        if(r >= d) {
- a40:	e152000c 	cmp	r2, ip
-            r = r - d;
-            q = q | (1 << i);
- a44:	91877018 	orrls	r7, r7, r8, lsl r0
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
- a48:	9062c00c 	rsbls	ip, r2, ip
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
- a4c:	e2500001 	subs	r0, r0, #1
- a50:	2afffff7 	bcs	a34 <printint+0x48>
-
-  b = base;
-  i = 0;
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
- a54:	e0000792 	mul	r0, r2, r7
-  }while((x = y) != 0);
- a58:	e3570000 	cmp	r7, #0
-
-  b = base;
-  i = 0;
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
- a5c:	e0601001 	rsb	r1, r0, r1
- a60:	e28a5001 	add	r5, sl, #1
- a64:	e7d91001 	ldrb	r1, [r9, r1]
- a68:	e7c6100a 	strb	r1, [r6, sl]
-  }while((x = y) != 0);
- a6c:	11a01007 	movne	r1, r7
-
-  b = base;
-  i = 0;
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
- a70:	11a0a005 	movne	sl, r5
- a74:	1affffeb 	bne	a28 <printint+0x3c>
-  }while((x = y) != 0);
-  if(neg)
- a78:	e3530000 	cmp	r3, #0
-    buf[i++] = '-';
- a7c:	124b2024 	subne	r2, fp, #36	; 0x24
- a80:	10823005 	addne	r3, r2, r5
- a84:	128a5002 	addne	r5, sl, #2
-
-  while(--i >= 0)
- a88:	e2455001 	sub	r5, r5, #1
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
-  }while((x = y) != 0);
-  if(neg)
-    buf[i++] = '-';
- a8c:	13a0202d 	movne	r2, #45	; 0x2d
- a90:	15432010 	strbne	r2, [r3, #-16]
-
-  while(--i >= 0)
-    putc(fd, buf[i]);
- a94:	e7d61005 	ldrb	r1, [r6, r5]
- a98:	e1a00004 	mov	r0, r4
-    buf[i++] = digits[x - y * b];
-  }while((x = y) != 0);
-  if(neg)
-    buf[i++] = '-';
-
-  while(--i >= 0)
- a9c:	e2455001 	sub	r5, r5, #1
-    putc(fd, buf[i]);
- aa0:	ebffffc7 	bl	9c4 <putc>
-    buf[i++] = digits[x - y * b];
-  }while((x = y) != 0);
-  if(neg)
-    buf[i++] = '-';
-
-  while(--i >= 0)
- aa4:	e3750001 	cmn	r5, #1
- aa8:	1afffff9 	bne	a94 <printint+0xa8>
-    putc(fd, buf[i]);
-}
- aac:	e24bd020 	sub	sp, fp, #32
- ab0:	e8bd8ff0 	pop	{r4, r5, r6, r7, r8, r9, sl, fp, pc}
- ab4:	00000e20 	.word	0x00000e20
-
-00000ab8 <div>:
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- ab8:	e3a03000 	mov	r3, #0
-{
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
- abc:	e92d0830 	push	{r4, r5, fp}
- ac0:	e1a02000 	mov	r2, r0
- ac4:	e28db008 	add	fp, sp, #8
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
- ac8:	e3a0c01f 	mov	ip, #31
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- acc:	e1a00003 	mov	r0, r3
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
-            q = q | (1 << i);
- ad0:	e3a05001 	mov	r5, #1
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
- ad4:	e1a04c32 	lsr	r4, r2, ip
- ad8:	e2044001 	and	r4, r4, #1
- adc:	e1843083 	orr	r3, r4, r3, lsl #1
-        if(r >= d) {
- ae0:	e1530001 	cmp	r3, r1
-            r = r - d;
-            q = q | (1 << i);
- ae4:	21800c15 	orrcs	r0, r0, r5, lsl ip
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
- ae8:	20613003 	rsbcs	r3, r1, r3
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
- aec:	e25cc001 	subs	ip, ip, #1
- af0:	2afffff7 	bcs	ad4 <div+0x1c>
-            r = r - d;
-            q = q | (1 << i);
-        }
-    }
-    return q;
-}
- af4:	e24bd008 	sub	sp, fp, #8
- af8:	e8bd0830 	pop	{r4, r5, fp}
- afc:	e12fff1e 	bx	lr
-
-00000b00 <printf>:
-}
-
-// Print to the given fd. Only understands %d, %x, %p, %s.
-void
-printf(int fd, char *fmt, ...)
-{
- b00:	e92d000e 	push	{r1, r2, r3}
- b04:	e92d4ff0 	push	{r4, r5, r6, r7, r8, r9, sl, fp, lr}
- b08:	e28db020 	add	fp, sp, #32
- b0c:	e1a05000 	mov	r5, r0
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- b10:	e59b4004 	ldr	r4, [fp, #4]
- b14:	e5d48000 	ldrb	r8, [r4]
- b18:	e3580000 	cmp	r8, #0
- b1c:	0a000027 	beq	bc0 <printf+0xc0>
-        ap++;
-      } else if(c == 's'){
-        s = (char*)*ap;
-        ap++;
-        if(s == 0)
-          s = "(null)";
- b20:	e59f712c 	ldr	r7, [pc, #300]	; c54 <printf+0x154>
-  char *s;
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
- b24:	e28b6008 	add	r6, fp, #8
-{
-  char *s;
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
- b28:	e3a0a000 	mov	sl, #0
- b2c:	ea000008 	b	b54 <printf+0x54>
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
-    c = fmt[i] & 0xff;
-    if(state == 0){
-      if(c == '%'){
- b30:	e3580025 	cmp	r8, #37	; 0x25
-        state = '%';
- b34:	01a0a008 	moveq	sl, r8
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
-    c = fmt[i] & 0xff;
-    if(state == 0){
-      if(c == '%'){
- b38:	0a000002 	beq	b48 <printf+0x48>
-        state = '%';
-      } else {
-        putc(fd, c);
- b3c:	e1a00005 	mov	r0, r5
- b40:	e1a01008 	mov	r1, r8
- b44:	ebffff9e 	bl	9c4 <putc>
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- b48:	e5f48001 	ldrb	r8, [r4, #1]!
- b4c:	e3580000 	cmp	r8, #0
- b50:	0a00001a 	beq	bc0 <printf+0xc0>
-    c = fmt[i] & 0xff;
-    if(state == 0){
- b54:	e35a0000 	cmp	sl, #0
- b58:	0afffff4 	beq	b30 <printf+0x30>
-      if(c == '%'){
-        state = '%';
-      } else {
-        putc(fd, c);
-      }
-    } else if(state == '%'){
- b5c:	e35a0025 	cmp	sl, #37	; 0x25
- b60:	1afffff8 	bne	b48 <printf+0x48>
-      if(c == 'd'){
- b64:	e3580064 	cmp	r8, #100	; 0x64
- b68:	0a00002c 	beq	c20 <printf+0x120>
-        printint(fd, *ap, 10, 1);
-        ap++;
-      } else if(c == 'x' || c == 'p'){
- b6c:	e3580078 	cmp	r8, #120	; 0x78
- b70:	13580070 	cmpne	r8, #112	; 0x70
- b74:	13a09000 	movne	r9, #0
- b78:	03a09001 	moveq	r9, #1
- b7c:	0a000013 	beq	bd0 <printf+0xd0>
-        printint(fd, *ap, 16, 0);
-        ap++;
-      } else if(c == 's'){
- b80:	e3580073 	cmp	r8, #115	; 0x73
- b84:	0a000018 	beq	bec <printf+0xec>
-          s = "(null)";
-        while(*s != 0){
-          putc(fd, *s);
-          s++;
-        }
-      } else if(c == 'c'){
- b88:	e3580063 	cmp	r8, #99	; 0x63
- b8c:	0a00002a 	beq	c3c <printf+0x13c>
-        putc(fd, *ap);
-        ap++;
-      } else if(c == '%'){
- b90:	e3580025 	cmp	r8, #37	; 0x25
-        putc(fd, c);
- b94:	e1a0100a 	mov	r1, sl
- b98:	e1a00005 	mov	r0, r5
-          s++;
-        }
-      } else if(c == 'c'){
-        putc(fd, *ap);
-        ap++;
-      } else if(c == '%'){
- b9c:	0a000002 	beq	bac <printf+0xac>
-        putc(fd, c);
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
- ba0:	ebffff87 	bl	9c4 <putc>
-        putc(fd, c);
- ba4:	e1a00005 	mov	r0, r5
- ba8:	e1a01008 	mov	r1, r8
- bac:	ebffff84 	bl	9c4 <putc>
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- bb0:	e5f48001 	ldrb	r8, [r4, #1]!
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- bb4:	e1a0a009 	mov	sl, r9
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- bb8:	e3580000 	cmp	r8, #0
- bbc:	1affffe4 	bne	b54 <printf+0x54>
-        putc(fd, c);
-      }
-      state = 0;
-    }
-  }
-}
- bc0:	e24bd020 	sub	sp, fp, #32
- bc4:	e8bd4ff0 	pop	{r4, r5, r6, r7, r8, r9, sl, fp, lr}
- bc8:	e28dd00c 	add	sp, sp, #12
- bcc:	e12fff1e 	bx	lr
-    } else if(state == '%'){
-      if(c == 'd'){
-        printint(fd, *ap, 10, 1);
-        ap++;
-      } else if(c == 'x' || c == 'p'){
-        printint(fd, *ap, 16, 0);
- bd0:	e1a00005 	mov	r0, r5
- bd4:	e4961004 	ldr	r1, [r6], #4
- bd8:	e3a02010 	mov	r2, #16
- bdc:	e3a03000 	mov	r3, #0
- be0:	ebffff81 	bl	9ec <printint>
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- be4:	e3a0a000 	mov	sl, #0
- be8:	eaffffd6 	b	b48 <printf+0x48>
-        ap++;
-      } else if(c == 'x' || c == 'p'){
-        printint(fd, *ap, 16, 0);
-        ap++;
-      } else if(c == 's'){
-        s = (char*)*ap;
- bec:	e4968004 	ldr	r8, [r6], #4
-        ap++;
-        if(s == 0)
-          s = "(null)";
- bf0:	e3580000 	cmp	r8, #0
- bf4:	01a08007 	moveq	r8, r7
-        while(*s != 0){
- bf8:	e5d81000 	ldrb	r1, [r8]
- bfc:	e3510000 	cmp	r1, #0
- c00:	0a000004 	beq	c18 <printf+0x118>
-          putc(fd, *s);
- c04:	e1a00005 	mov	r0, r5
- c08:	ebffff6d 	bl	9c4 <putc>
-      } else if(c == 's'){
-        s = (char*)*ap;
-        ap++;
-        if(s == 0)
-          s = "(null)";
-        while(*s != 0){
- c0c:	e5f81001 	ldrb	r1, [r8, #1]!
- c10:	e3510000 	cmp	r1, #0
- c14:	1afffffa 	bne	c04 <printf+0x104>
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- c18:	e1a0a001 	mov	sl, r1
- c1c:	eaffffc9 	b	b48 <printf+0x48>
-      } else {
-        putc(fd, c);
-      }
-    } else if(state == '%'){
-      if(c == 'd'){
-        printint(fd, *ap, 10, 1);
- c20:	e1a00005 	mov	r0, r5
- c24:	e4961004 	ldr	r1, [r6], #4
- c28:	e3a0200a 	mov	r2, #10
- c2c:	e3a03001 	mov	r3, #1
- c30:	ebffff6d 	bl	9ec <printint>
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- c34:	e3a0a000 	mov	sl, #0
- c38:	eaffffc2 	b	b48 <printf+0x48>
-        while(*s != 0){
-          putc(fd, *s);
-          s++;
-        }
-      } else if(c == 'c'){
-        putc(fd, *ap);
- c3c:	e4961004 	ldr	r1, [r6], #4
- c40:	e1a00005 	mov	r0, r5
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- c44:	e1a0a009 	mov	sl, r9
-        while(*s != 0){
-          putc(fd, *s);
-          s++;
-        }
-      } else if(c == 'c'){
-        putc(fd, *ap);
- c48:	e6ef1071 	uxtb	r1, r1
- c4c:	ebffff5c 	bl	9c4 <putc>
- c50:	eaffffbc 	b	b48 <printf+0x48>
- c54:	00000e34 	.word	0x00000e34
-
-00000c58 <free>:
-free(void *ap)
-{
-  Header *bp, *p;
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
- c58:	e59f3098 	ldr	r3, [pc, #152]	; cf8 <free+0xa0>
-static Header base;
-static Header *freep;
-
-void
-free(void *ap)
-{
- c5c:	e92d0830 	push	{r4, r5, fp}
-  Header *bp, *p;
-
-  bp = (Header*)ap - 1;
- c60:	e240c008 	sub	ip, r0, #8
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
- c64:	e5932000 	ldr	r2, [r3]
-static Header base;
-static Header *freep;
-
-void
-free(void *ap)
-{
- c68:	e28db008 	add	fp, sp, #8
-  Header *bp, *p;
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
- c6c:	e152000c 	cmp	r2, ip
- c70:	e5921000 	ldr	r1, [r2]
- c74:	2a000001 	bcs	c80 <free+0x28>
- c78:	e15c0001 	cmp	ip, r1
- c7c:	3a000007 	bcc	ca0 <free+0x48>
-    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
- c80:	e1520001 	cmp	r2, r1
- c84:	3a000003 	bcc	c98 <free+0x40>
- c88:	e152000c 	cmp	r2, ip
- c8c:	3a000003 	bcc	ca0 <free+0x48>
- c90:	e15c0001 	cmp	ip, r1
- c94:	3a000001 	bcc	ca0 <free+0x48>
-static Header base;
-static Header *freep;
-
-void
-free(void *ap)
-{
- c98:	e1a02001 	mov	r2, r1
- c9c:	eafffff2 	b	c6c <free+0x14>
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
-    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
-      break;
-  if(bp + bp->s.size == p->s.ptr){
- ca0:	e5104004 	ldr	r4, [r0, #-4]
-  if(p + p->s.size == bp){
-    p->s.size += bp->s.size;
-    p->s.ptr = bp->s.ptr;
-  } else
-    p->s.ptr = bp;
-  freep = p;
- ca4:	e5832000 	str	r2, [r3]
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
-    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
-      break;
-  if(bp + bp->s.size == p->s.ptr){
- ca8:	e08c5184 	add	r5, ip, r4, lsl #3
- cac:	e1550001 	cmp	r5, r1
-    bp->s.size += p->s.ptr->s.size;
- cb0:	05911004 	ldreq	r1, [r1, #4]
- cb4:	00814004 	addeq	r4, r1, r4
- cb8:	05004004 	streq	r4, [r0, #-4]
-    bp->s.ptr = p->s.ptr->s.ptr;
- cbc:	05921000 	ldreq	r1, [r2]
- cc0:	05911000 	ldreq	r1, [r1]
-  } else
-    bp->s.ptr = p->s.ptr;
- cc4:	e5001008 	str	r1, [r0, #-8]
-  if(p + p->s.size == bp){
- cc8:	e5921004 	ldr	r1, [r2, #4]
- ccc:	e0824181 	add	r4, r2, r1, lsl #3
- cd0:	e15c0004 	cmp	ip, r4
-    p->s.size += bp->s.size;
-    p->s.ptr = bp->s.ptr;
-  } else
-    p->s.ptr = bp;
- cd4:	1582c000 	strne	ip, [r2]
-    bp->s.size += p->s.ptr->s.size;
-    bp->s.ptr = p->s.ptr->s.ptr;
-  } else
-    bp->s.ptr = p->s.ptr;
-  if(p + p->s.size == bp){
-    p->s.size += bp->s.size;
- cd8:	0510c004 	ldreq	ip, [r0, #-4]
- cdc:	008c1001 	addeq	r1, ip, r1
- ce0:	05821004 	streq	r1, [r2, #4]
-    p->s.ptr = bp->s.ptr;
- ce4:	05101008 	ldreq	r1, [r0, #-8]
- ce8:	05821000 	streq	r1, [r2]
-  } else
-    p->s.ptr = bp;
-  freep = p;
-}
- cec:	e24bd008 	sub	sp, fp, #8
- cf0:	e8bd0830 	pop	{r4, r5, fp}
- cf4:	e12fff1e 	bx	lr
- cf8:	00000e3c 	.word	0x00000e3c
-
-00000cfc <malloc>:
-  return freep;
-}
-
-void*
-malloc(uint nbytes)
-{
- cfc:	e92d49f8 	push	{r3, r4, r5, r6, r7, r8, fp, lr}
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
- d00:	e2804007 	add	r4, r0, #7
-  if((prevp = freep) == 0){
- d04:	e59f50d4 	ldr	r5, [pc, #212]	; de0 <malloc+0xe4>
-malloc(uint nbytes)
-{
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
- d08:	e1a041a4 	lsr	r4, r4, #3
-  return freep;
-}
-
-void*
-malloc(uint nbytes)
-{
- d0c:	e28db01c 	add	fp, sp, #28
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
-  if((prevp = freep) == 0){
- d10:	e5953000 	ldr	r3, [r5]
-malloc(uint nbytes)
-{
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
- d14:	e2844001 	add	r4, r4, #1
-  if((prevp = freep) == 0){
- d18:	e3530000 	cmp	r3, #0
- d1c:	0a00002b 	beq	dd0 <malloc+0xd4>
- d20:	e5930000 	ldr	r0, [r3]
- d24:	e5902004 	ldr	r2, [r0, #4]
-    base.s.ptr = freep = prevp = &base;
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
- d28:	e1520004 	cmp	r2, r4
- d2c:	2a00001b 	bcs	da0 <malloc+0xa4>
-morecore(uint nu)
-{
-  char *p;
-  Header *hp;
-
-  if(nu < 4096)
- d30:	e59f80ac 	ldr	r8, [pc, #172]	; de4 <malloc+0xe8>
-        p->s.size -= nunits;
-        p += p->s.size;
-        p->s.size = nunits;
-      }
-      freep = prevp;
-      return (void*)(p + 1);
- d34:	e1a07184 	lsl	r7, r4, #3
- d38:	ea000003 	b	d4c <malloc+0x50>
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
-  if((prevp = freep) == 0){
-    base.s.ptr = freep = prevp = &base;
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
- d3c:	e5930000 	ldr	r0, [r3]
-    if(p->s.size >= nunits){
- d40:	e5902004 	ldr	r2, [r0, #4]
- d44:	e1540002 	cmp	r4, r2
- d48:	9a000014 	bls	da0 <malloc+0xa4>
-        p->s.size = nunits;
-      }
-      freep = prevp;
-      return (void*)(p + 1);
-    }
-    if(p == freep)
- d4c:	e5952000 	ldr	r2, [r5]
- d50:	e1a03000 	mov	r3, r0
- d54:	e1500002 	cmp	r0, r2
- d58:	1afffff7 	bne	d3c <malloc+0x40>
-morecore(uint nu)
-{
-  char *p;
-  Header *hp;
-
-  if(nu < 4096)
- d5c:	e1540008 	cmp	r4, r8
-    nu = 4096;
-  p = sbrk(nu * sizeof(Header));
- d60:	81a00007 	movhi	r0, r7
- d64:	93a00902 	movls	r0, #32768	; 0x8000
-morecore(uint nu)
-{
-  char *p;
-  Header *hp;
-
-  if(nu < 4096)
- d68:	81a06004 	movhi	r6, r4
- d6c:	93a06a01 	movls	r6, #4096	; 0x1000
-    nu = 4096;
-  p = sbrk(nu * sizeof(Header));
- d70:	ebfffeec 	bl	928 <sbrk>
- d74:	e1a03000 	mov	r3, r0
-  if(p == (char*)-1)
- d78:	e3730001 	cmn	r3, #1
-    return 0;
-  hp = (Header*)p;
-  hp->s.size = nu;
-  free((void*)(hp + 1));
- d7c:	e2800008 	add	r0, r0, #8
-  Header *hp;
-
-  if(nu < 4096)
-    nu = 4096;
-  p = sbrk(nu * sizeof(Header));
-  if(p == (char*)-1)
- d80:	0a000010 	beq	dc8 <malloc+0xcc>
-    return 0;
-  hp = (Header*)p;
-  hp->s.size = nu;
- d84:	e5836004 	str	r6, [r3, #4]
-  free((void*)(hp + 1));
- d88:	ebffffb2 	bl	c58 <free>
-  return freep;
- d8c:	e5953000 	ldr	r3, [r5]
-      }
-      freep = prevp;
-      return (void*)(p + 1);
-    }
-    if(p == freep)
-      if((p = morecore(nunits)) == 0)
- d90:	e3530000 	cmp	r3, #0
- d94:	1affffe8 	bne	d3c <malloc+0x40>
-        return 0;
- d98:	e1a00003 	mov	r0, r3
-  }
-}
- d9c:	e8bd89f8 	pop	{r3, r4, r5, r6, r7, r8, fp, pc}
-    base.s.ptr = freep = prevp = &base;
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
-      if(p->s.size == nunits)
- da0:	e1540002 	cmp	r4, r2
-        prevp->s.ptr = p->s.ptr;
-      else {
-        p->s.size -= nunits;
- da4:	10642002 	rsbne	r2, r4, r2
- da8:	15802004 	strne	r2, [r0, #4]
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
-      if(p->s.size == nunits)
-        prevp->s.ptr = p->s.ptr;
- dac:	05902000 	ldreq	r2, [r0]
-      else {
-        p->s.size -= nunits;
-        p += p->s.size;
- db0:	10800182 	addne	r0, r0, r2, lsl #3
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
-      if(p->s.size == nunits)
-        prevp->s.ptr = p->s.ptr;
- db4:	05832000 	streq	r2, [r3]
-      else {
-        p->s.size -= nunits;
-        p += p->s.size;
-        p->s.size = nunits;
- db8:	15804004 	strne	r4, [r0, #4]
-      }
-      freep = prevp;
- dbc:	e5853000 	str	r3, [r5]
-      return (void*)(p + 1);
- dc0:	e2800008 	add	r0, r0, #8
- dc4:	e8bd89f8 	pop	{r3, r4, r5, r6, r7, r8, fp, pc}
-    }
-    if(p == freep)
-      if((p = morecore(nunits)) == 0)
-        return 0;
- dc8:	e3a00000 	mov	r0, #0
- dcc:	e8bd89f8 	pop	{r3, r4, r5, r6, r7, r8, fp, pc}
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
-  if((prevp = freep) == 0){
-    base.s.ptr = freep = prevp = &base;
- dd0:	e2850004 	add	r0, r5, #4
- dd4:	e5850000 	str	r0, [r5]
-    base.s.size = 0;
- dd8:	e9850009 	stmib	r5, {r0, r3}
- ddc:	eaffffd3 	b	d30 <malloc+0x34>
- de0:	00000e3c 	.word	0x00000e3c
- de4:	00000fff 	.word	0x00000fff
--- a/uprogs/grep.sym	Sun Oct 22 18:51:04 2017 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-00000000 .text
-00000de8 .rodata
-00000e3c .bss
-00000000 .comment
-00000000 .ARM.attributes
-00000000 .debug_aranges
-00000000 .debug_info
-00000000 .debug_abbrev
-00000000 .debug_line
-00000000 .debug_frame
-00000000 .debug_str
-00000000 .debug_loc
-00000000 .debug_ranges
-00000000 grep.c
-00000000 ulib.c
-00000000 printf.c
-000009c4 putc
-000009ec printint
-00000e20 digits.993
-00000000 umalloc.c
-00000e3c freep
-00000e40 base
-00000314 strcpy
-00000b00 printf
-0000054c memmove
-000000fc matchhere
-00000788 mknod
-00001248 _bss_end__
-00000444 gets
-000008f4 getpid
-00000210 grep
-00000cfc malloc
-0000095c sleep
-00000e3c __bss_start__
-0000061c pipe
-00000684 write
-000007f0 fstat
-000006ec kill
-0000088c chdir
-00000720 exec
-00001248 __bss_end__
-000005e8 wait
-00000650 read
-000007bc unlink
-00000580 fork
-00000928 sbrk
-00000990 uptime
-00000e3c __bss_start
-000003c8 memset
-00000000 main
-00001248 __end__
-000000a4 matchstar
-0000033c strcmp
-000008c0 dup
-00000e48 buf
-000004bc stat
-00000e3c _edata
-00001248 _end
-000001bc match
-00000824 link
-000005b4 exit
-000004f8 atoi
-00000388 strlen
-00000754 open
-00000ab8 div
-00000400 strchr
-00000858 mkdir
-000006b8 close
-00000c58 free
--- a/uprogs/init.asm	Sun Oct 22 18:51:04 2017 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1731 +0,0 @@
-
-_init:     file format elf32-littlearm
-
-
-Disassembly of section .text:
-
-00000000 <main>:
-
-char *argv[] = { "sh", 0 };
-
-int
-main(void)
-{
-   0:	e92d4818 	push	{r3, r4, fp, lr}
-  int pid, wpid;
-
-  if(open("console", O_RDWR) < 0){
-   4:	e3a01002 	mov	r1, #2
-
-char *argv[] = { "sh", 0 };
-
-int
-main(void)
-{
-   8:	e28db00c 	add	fp, sp, #12
-  int pid, wpid;
-
-  if(open("console", O_RDWR) < 0){
-   c:	e59f00a4 	ldr	r0, [pc, #164]	; b8 <main+0xb8>
-  10:	eb00013f 	bl	514 <open>
-  14:	e3500000 	cmp	r0, #0
-  18:	ba00001e 	blt	98 <main+0x98>
-    mknod("console", 1, 1);
-    open("console", O_RDWR);
-  }
-  dup(0);  // stdout
-  1c:	e3a00000 	mov	r0, #0
-  20:	eb000196 	bl	680 <dup>
-  dup(0);  // stderr
-  24:	e3a00000 	mov	r0, #0
-  28:	eb000194 	bl	680 <dup>
-
-  for(;;){
-    printf(1, "init: starting sh\n");
-  2c:	e3a00001 	mov	r0, #1
-  30:	e59f1084 	ldr	r1, [pc, #132]	; bc <main+0xbc>
-  34:	eb000221 	bl	8c0 <printf>
-    pid = fork();
-  38:	eb0000c0 	bl	340 <fork>
-    if(pid < 0){
-  3c:	e2504000 	subs	r4, r0, #0
-  40:	ba000009 	blt	6c <main+0x6c>
-      printf(1, "init: fork failed\n");
-      exit();
-    }
-    if(pid == 0){
-  44:	0a00000c 	beq	7c <main+0x7c>
-      exec("sh", argv);
-      printf(1, "init: exec sh failed\n");
-      exit();
-    }
-    while((wpid=wait()) >= 0 && wpid != pid)
-  48:	eb0000d6 	bl	3a8 <wait>
-  4c:	e3500000 	cmp	r0, #0
-  50:	bafffff5 	blt	2c <main+0x2c>
-  54:	e1500004 	cmp	r0, r4
-  58:	0afffff3 	beq	2c <main+0x2c>
-      printf(1, "zombie!\n");
-  5c:	e3a00001 	mov	r0, #1
-  60:	e59f1058 	ldr	r1, [pc, #88]	; c0 <main+0xc0>
-  64:	eb000215 	bl	8c0 <printf>
-  68:	eafffff6 	b	48 <main+0x48>
-
-  for(;;){
-    printf(1, "init: starting sh\n");
-    pid = fork();
-    if(pid < 0){
-      printf(1, "init: fork failed\n");
-  6c:	e3a00001 	mov	r0, #1
-  70:	e59f104c 	ldr	r1, [pc, #76]	; c4 <main+0xc4>
-  74:	eb000211 	bl	8c0 <printf>
-      exit();
-  78:	eb0000bd 	bl	374 <exit>
-    }
-    if(pid == 0){
-      exec("sh", argv);
-  7c:	e59f1044 	ldr	r1, [pc, #68]	; c8 <main+0xc8>
-  80:	e59f0044 	ldr	r0, [pc, #68]	; cc <main+0xcc>
-  84:	eb000115 	bl	4e0 <exec>
-      printf(1, "init: exec sh failed\n");
-  88:	e3a00001 	mov	r0, #1
-  8c:	e59f103c 	ldr	r1, [pc, #60]	; d0 <main+0xd0>
-  90:	eb00020a 	bl	8c0 <printf>
-      exit();
-  94:	eb0000b6 	bl	374 <exit>
-main(void)
-{
-  int pid, wpid;
-
-  if(open("console", O_RDWR) < 0){
-    mknod("console", 1, 1);
-  98:	e3a01001 	mov	r1, #1
-  9c:	e1a02001 	mov	r2, r1
-  a0:	e59f0010 	ldr	r0, [pc, #16]	; b8 <main+0xb8>
-  a4:	eb000127 	bl	548 <mknod>
-    open("console", O_RDWR);
-  a8:	e3a01002 	mov	r1, #2
-  ac:	e59f0004 	ldr	r0, [pc, #4]	; b8 <main+0xb8>
-  b0:	eb000117 	bl	514 <open>
-  b4:	eaffffd8 	b	1c <main+0x1c>
-  b8:	00000ba8 	.word	0x00000ba8
-  bc:	00000bb0 	.word	0x00000bb0
-  c0:	00000bf4 	.word	0x00000bf4
-  c4:	00000bc4 	.word	0x00000bc4
-  c8:	00000c1c 	.word	0x00000c1c
-  cc:	00000bd8 	.word	0x00000bd8
-  d0:	00000bdc 	.word	0x00000bdc
-
-000000d4 <strcpy>:
-#include "user.h"
-#include "arm.h"
-
-char*
-strcpy(char *s, char *t)
-{
-  d4:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
-  char *os;
-
-  os = s;
-  while((*s++ = *t++) != 0)
-  d8:	e1a02000 	mov	r2, r0
-#include "user.h"
-#include "arm.h"
-
-char*
-strcpy(char *s, char *t)
-{
-  dc:	e28db000 	add	fp, sp, #0
-  char *os;
-
-  os = s;
-  while((*s++ = *t++) != 0)
-  e0:	e4d13001 	ldrb	r3, [r1], #1
-  e4:	e3530000 	cmp	r3, #0
-  e8:	e4c23001 	strb	r3, [r2], #1
-  ec:	1afffffb 	bne	e0 <strcpy+0xc>
-    ;
-  return os;
-}
-  f0:	e28bd000 	add	sp, fp, #0
-  f4:	e8bd0800 	pop	{fp}
-  f8:	e12fff1e 	bx	lr
-
-000000fc <strcmp>:
-
-int
-strcmp(const char *p, const char *q)
-{
-  fc:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 100:	e28db000 	add	fp, sp, #0
-  while(*p && *p == *q)
- 104:	e5d03000 	ldrb	r3, [r0]
- 108:	e5d12000 	ldrb	r2, [r1]
- 10c:	e3530000 	cmp	r3, #0
- 110:	1a000004 	bne	128 <strcmp+0x2c>
- 114:	ea000005 	b	130 <strcmp+0x34>
- 118:	e5f03001 	ldrb	r3, [r0, #1]!
- 11c:	e3530000 	cmp	r3, #0
- 120:	0a000006 	beq	140 <strcmp+0x44>
- 124:	e5f12001 	ldrb	r2, [r1, #1]!
- 128:	e1530002 	cmp	r3, r2
- 12c:	0afffff9 	beq	118 <strcmp+0x1c>
-    p++, q++;
-  return (uchar)*p - (uchar)*q;
-}
- 130:	e0620003 	rsb	r0, r2, r3
- 134:	e28bd000 	add	sp, fp, #0
- 138:	e8bd0800 	pop	{fp}
- 13c:	e12fff1e 	bx	lr
-}
-
-int
-strcmp(const char *p, const char *q)
-{
-  while(*p && *p == *q)
- 140:	e5d12001 	ldrb	r2, [r1, #1]
- 144:	eafffff9 	b	130 <strcmp+0x34>
-
-00000148 <strlen>:
-  return (uchar)*p - (uchar)*q;
-}
-
-uint
-strlen(char *s)
-{
- 148:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 14c:	e28db000 	add	fp, sp, #0
-  int n;
-
-  for(n = 0; s[n]; n++)
- 150:	e5d03000 	ldrb	r3, [r0]
- 154:	e3530000 	cmp	r3, #0
- 158:	01a00003 	moveq	r0, r3
- 15c:	0a000006 	beq	17c <strlen+0x34>
- 160:	e1a02000 	mov	r2, r0
- 164:	e3a03000 	mov	r3, #0
- 168:	e5f21001 	ldrb	r1, [r2, #1]!
- 16c:	e2833001 	add	r3, r3, #1
- 170:	e1a00003 	mov	r0, r3
- 174:	e3510000 	cmp	r1, #0
- 178:	1afffffa 	bne	168 <strlen+0x20>
-    ;
-  return n;
-}
- 17c:	e28bd000 	add	sp, fp, #0
- 180:	e8bd0800 	pop	{fp}
- 184:	e12fff1e 	bx	lr
-
-00000188 <memset>:
-memset(void *dst, int c, uint n)
-{
-  char *p=dst;
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 188:	e3520000 	cmp	r2, #0
-  return n;
-}
-
-void*
-memset(void *dst, int c, uint n)
-{
- 18c:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 190:	e28db000 	add	fp, sp, #0
-  char *p=dst;
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 194:	0a000006 	beq	1b4 <memset+0x2c>
- 198:	e6ef1071 	uxtb	r1, r1
- 19c:	e1a03002 	mov	r3, r2
-}
-
-void*
-memset(void *dst, int c, uint n)
-{
-  char *p=dst;
- 1a0:	e1a0c000 	mov	ip, r0
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 1a4:	e2533001 	subs	r3, r3, #1
- 1a8:	e4cc1001 	strb	r1, [ip], #1
- 1ac:	1afffffc 	bne	1a4 <memset+0x1c>
- 1b0:	e0800002 	add	r0, r0, r2
-  return (void *)p;
-}
- 1b4:	e28bd000 	add	sp, fp, #0
- 1b8:	e8bd0800 	pop	{fp}
- 1bc:	e12fff1e 	bx	lr
-
-000001c0 <strchr>:
-
-char*
-strchr(const char *s, char c)
-{
- 1c0:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 1c4:	e28db000 	add	fp, sp, #0
-  for(; *s; s++)
- 1c8:	e5d03000 	ldrb	r3, [r0]
- 1cc:	e3530000 	cmp	r3, #0
- 1d0:	1a000004 	bne	1e8 <strchr+0x28>
- 1d4:	ea000008 	b	1fc <strchr+0x3c>
- 1d8:	e5d03001 	ldrb	r3, [r0, #1]
- 1dc:	e2800001 	add	r0, r0, #1
- 1e0:	e3530000 	cmp	r3, #0
- 1e4:	0a000004 	beq	1fc <strchr+0x3c>
-    if(*s == c)
- 1e8:	e1530001 	cmp	r3, r1
- 1ec:	1afffff9 	bne	1d8 <strchr+0x18>
-      return (char*)s;
-  return 0;
-}
- 1f0:	e28bd000 	add	sp, fp, #0
- 1f4:	e8bd0800 	pop	{fp}
- 1f8:	e12fff1e 	bx	lr
-strchr(const char *s, char c)
-{
-  for(; *s; s++)
-    if(*s == c)
-      return (char*)s;
-  return 0;
- 1fc:	e1a00003 	mov	r0, r3
- 200:	eafffffa 	b	1f0 <strchr+0x30>
-
-00000204 <gets>:
-}
-
-char*
-gets(char *buf, int max)
-{
- 204:	e92d49f0 	push	{r4, r5, r6, r7, r8, fp, lr}
- 208:	e28db018 	add	fp, sp, #24
- 20c:	e24dd00c 	sub	sp, sp, #12
- 210:	e1a08000 	mov	r8, r0
- 214:	e1a07001 	mov	r7, r1
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 218:	e1a06000 	mov	r6, r0
- 21c:	e3a05000 	mov	r5, #0
- 220:	ea000008 	b	248 <gets+0x44>
-    cc = read(0, &c, 1);
- 224:	eb000079 	bl	410 <read>
-    if(cc < 1)
- 228:	e3500000 	cmp	r0, #0
- 22c:	da00000b 	ble	260 <gets+0x5c>
-      break;
-    buf[i++] = c;
- 230:	e55b301d 	ldrb	r3, [fp, #-29]
-    if(c == '\n' || c == '\r')
- 234:	e1a05004 	mov	r5, r4
- 238:	e353000a 	cmp	r3, #10
- 23c:	1353000d 	cmpne	r3, #13
-
-  for(i=0; i+1 < max; ){
-    cc = read(0, &c, 1);
-    if(cc < 1)
-      break;
-    buf[i++] = c;
- 240:	e4c63001 	strb	r3, [r6], #1
-    if(c == '\n' || c == '\r')
- 244:	0a00000a 	beq	274 <gets+0x70>
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
-    cc = read(0, &c, 1);
- 248:	e3a02001 	mov	r2, #1
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 24c:	e0854002 	add	r4, r5, r2
- 250:	e1540007 	cmp	r4, r7
-    cc = read(0, &c, 1);
- 254:	e3a00000 	mov	r0, #0
- 258:	e24b101d 	sub	r1, fp, #29
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 25c:	bafffff0 	blt	224 <gets+0x20>
-      break;
-    buf[i++] = c;
-    if(c == '\n' || c == '\r')
-      break;
-  }
-  buf[i] = '\0';
- 260:	e3a03000 	mov	r3, #0
- 264:	e7c83005 	strb	r3, [r8, r5]
-  return buf;
-}
- 268:	e1a00008 	mov	r0, r8
- 26c:	e24bd018 	sub	sp, fp, #24
- 270:	e8bd89f0 	pop	{r4, r5, r6, r7, r8, fp, pc}
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 274:	e1a05004 	mov	r5, r4
- 278:	eafffff8 	b	260 <gets+0x5c>
-
-0000027c <stat>:
-  return buf;
-}
-
-int
-stat(char *n, struct stat *st)
-{
- 27c:	e92d4830 	push	{r4, r5, fp, lr}
- 280:	e1a05001 	mov	r5, r1
- 284:	e28db00c 	add	fp, sp, #12
-  int fd;
-  int r;
-
-  fd = open(n, O_RDONLY);
- 288:	e3a01000 	mov	r1, #0
- 28c:	eb0000a0 	bl	514 <open>
-  if(fd < 0)
- 290:	e2504000 	subs	r4, r0, #0
-    return -1;
- 294:	b3e05000 	mvnlt	r5, #0
-{
-  int fd;
-  int r;
-
-  fd = open(n, O_RDONLY);
-  if(fd < 0)
- 298:	ba000004 	blt	2b0 <stat+0x34>
-    return -1;
-  r = fstat(fd, st);
- 29c:	e1a01005 	mov	r1, r5
- 2a0:	eb0000c2 	bl	5b0 <fstat>
- 2a4:	e1a05000 	mov	r5, r0
-  close(fd);
- 2a8:	e1a00004 	mov	r0, r4
- 2ac:	eb000071 	bl	478 <close>
-  return r;
-}
- 2b0:	e1a00005 	mov	r0, r5
- 2b4:	e8bd8830 	pop	{r4, r5, fp, pc}
-
-000002b8 <atoi>:
-
-int
-atoi(const char *s)
-{
- 2b8:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 2bc:	e28db000 	add	fp, sp, #0
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 2c0:	e5d03000 	ldrb	r3, [r0]
- 2c4:	e2432030 	sub	r2, r3, #48	; 0x30
- 2c8:	e6ef2072 	uxtb	r2, r2
- 2cc:	e3520009 	cmp	r2, #9
-int
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
- 2d0:	83a00000 	movhi	r0, #0
-  while('0' <= *s && *s <= '9')
- 2d4:	8a000009 	bhi	300 <atoi+0x48>
- 2d8:	e1a02000 	mov	r2, r0
-int
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
- 2dc:	e3a00000 	mov	r0, #0
-  while('0' <= *s && *s <= '9')
-    n = n*10 + *s++ - '0';
- 2e0:	e0800100 	add	r0, r0, r0, lsl #2
- 2e4:	e0830080 	add	r0, r3, r0, lsl #1
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 2e8:	e5f23001 	ldrb	r3, [r2, #1]!
-    n = n*10 + *s++ - '0';
- 2ec:	e2400030 	sub	r0, r0, #48	; 0x30
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 2f0:	e2431030 	sub	r1, r3, #48	; 0x30
- 2f4:	e6ef1071 	uxtb	r1, r1
- 2f8:	e3510009 	cmp	r1, #9
- 2fc:	9afffff7 	bls	2e0 <atoi+0x28>
-    n = n*10 + *s++ - '0';
-  return n;
-}
- 300:	e28bd000 	add	sp, fp, #0
- 304:	e8bd0800 	pop	{fp}
- 308:	e12fff1e 	bx	lr
-
-0000030c <memmove>:
-{
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 30c:	e3520000 	cmp	r2, #0
-  return n;
-}
-
-void*
-memmove(void *vdst, void *vsrc, int n)
-{
- 310:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 314:	e28db000 	add	fp, sp, #0
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 318:	da000005 	ble	334 <memmove+0x28>
-    n = n*10 + *s++ - '0';
-  return n;
-}
-
-void*
-memmove(void *vdst, void *vsrc, int n)
- 31c:	e0802002 	add	r2, r0, r2
-{
-  char *dst, *src;
-  
-  dst = vdst;
- 320:	e1a03000 	mov	r3, r0
-  src = vsrc;
-  while(n-- > 0)
-    *dst++ = *src++;
- 324:	e4d1c001 	ldrb	ip, [r1], #1
- 328:	e4c3c001 	strb	ip, [r3], #1
-{
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 32c:	e1530002 	cmp	r3, r2
- 330:	1afffffb 	bne	324 <memmove+0x18>
-    *dst++ = *src++;
-  return vdst;
-}
- 334:	e28bd000 	add	sp, fp, #0
- 338:	e8bd0800 	pop	{fp}
- 33c:	e12fff1e 	bx	lr
-
-00000340 <fork>:
- 340:	e92d4000 	push	{lr}
- 344:	e92d0008 	push	{r3}
- 348:	e92d0004 	push	{r2}
- 34c:	e92d0002 	push	{r1}
- 350:	e92d0001 	push	{r0}
- 354:	e3a00001 	mov	r0, #1
- 358:	ef000040 	svc	0x00000040
- 35c:	e8bd0002 	pop	{r1}
- 360:	e8bd0002 	pop	{r1}
- 364:	e8bd0004 	pop	{r2}
- 368:	e8bd0008 	pop	{r3}
- 36c:	e8bd4000 	pop	{lr}
- 370:	e12fff1e 	bx	lr
-
-00000374 <exit>:
- 374:	e92d4000 	push	{lr}
- 378:	e92d0008 	push	{r3}
- 37c:	e92d0004 	push	{r2}
- 380:	e92d0002 	push	{r1}
- 384:	e92d0001 	push	{r0}
- 388:	e3a00002 	mov	r0, #2
- 38c:	ef000040 	svc	0x00000040
- 390:	e8bd0002 	pop	{r1}
- 394:	e8bd0002 	pop	{r1}
- 398:	e8bd0004 	pop	{r2}
- 39c:	e8bd0008 	pop	{r3}
- 3a0:	e8bd4000 	pop	{lr}
- 3a4:	e12fff1e 	bx	lr
-
-000003a8 <wait>:
- 3a8:	e92d4000 	push	{lr}
- 3ac:	e92d0008 	push	{r3}
- 3b0:	e92d0004 	push	{r2}
- 3b4:	e92d0002 	push	{r1}
- 3b8:	e92d0001 	push	{r0}
- 3bc:	e3a00003 	mov	r0, #3
- 3c0:	ef000040 	svc	0x00000040
- 3c4:	e8bd0002 	pop	{r1}
- 3c8:	e8bd0002 	pop	{r1}
- 3cc:	e8bd0004 	pop	{r2}
- 3d0:	e8bd0008 	pop	{r3}
- 3d4:	e8bd4000 	pop	{lr}
- 3d8:	e12fff1e 	bx	lr
-
-000003dc <pipe>:
- 3dc:	e92d4000 	push	{lr}
- 3e0:	e92d0008 	push	{r3}
- 3e4:	e92d0004 	push	{r2}
- 3e8:	e92d0002 	push	{r1}
- 3ec:	e92d0001 	push	{r0}
- 3f0:	e3a00004 	mov	r0, #4
- 3f4:	ef000040 	svc	0x00000040
- 3f8:	e8bd0002 	pop	{r1}
- 3fc:	e8bd0002 	pop	{r1}
- 400:	e8bd0004 	pop	{r2}
- 404:	e8bd0008 	pop	{r3}
- 408:	e8bd4000 	pop	{lr}
- 40c:	e12fff1e 	bx	lr
-
-00000410 <read>:
- 410:	e92d4000 	push	{lr}
- 414:	e92d0008 	push	{r3}
- 418:	e92d0004 	push	{r2}
- 41c:	e92d0002 	push	{r1}
- 420:	e92d0001 	push	{r0}
- 424:	e3a00005 	mov	r0, #5
- 428:	ef000040 	svc	0x00000040
- 42c:	e8bd0002 	pop	{r1}
- 430:	e8bd0002 	pop	{r1}
- 434:	e8bd0004 	pop	{r2}
- 438:	e8bd0008 	pop	{r3}
- 43c:	e8bd4000 	pop	{lr}
- 440:	e12fff1e 	bx	lr
-
-00000444 <write>:
- 444:	e92d4000 	push	{lr}
- 448:	e92d0008 	push	{r3}
- 44c:	e92d0004 	push	{r2}
- 450:	e92d0002 	push	{r1}
- 454:	e92d0001 	push	{r0}
- 458:	e3a00010 	mov	r0, #16
- 45c:	ef000040 	svc	0x00000040
- 460:	e8bd0002 	pop	{r1}
- 464:	e8bd0002 	pop	{r1}
- 468:	e8bd0004 	pop	{r2}
- 46c:	e8bd0008 	pop	{r3}
- 470:	e8bd4000 	pop	{lr}
- 474:	e12fff1e 	bx	lr
-
-00000478 <close>:
- 478:	e92d4000 	push	{lr}
- 47c:	e92d0008 	push	{r3}
- 480:	e92d0004 	push	{r2}
- 484:	e92d0002 	push	{r1}
- 488:	e92d0001 	push	{r0}
- 48c:	e3a00015 	mov	r0, #21
- 490:	ef000040 	svc	0x00000040
- 494:	e8bd0002 	pop	{r1}
- 498:	e8bd0002 	pop	{r1}
- 49c:	e8bd0004 	pop	{r2}
- 4a0:	e8bd0008 	pop	{r3}
- 4a4:	e8bd4000 	pop	{lr}
- 4a8:	e12fff1e 	bx	lr
-
-000004ac <kill>:
- 4ac:	e92d4000 	push	{lr}
- 4b0:	e92d0008 	push	{r3}
- 4b4:	e92d0004 	push	{r2}
- 4b8:	e92d0002 	push	{r1}
- 4bc:	e92d0001 	push	{r0}
- 4c0:	e3a00006 	mov	r0, #6
- 4c4:	ef000040 	svc	0x00000040
- 4c8:	e8bd0002 	pop	{r1}
- 4cc:	e8bd0002 	pop	{r1}
- 4d0:	e8bd0004 	pop	{r2}
- 4d4:	e8bd0008 	pop	{r3}
- 4d8:	e8bd4000 	pop	{lr}
- 4dc:	e12fff1e 	bx	lr
-
-000004e0 <exec>:
- 4e0:	e92d4000 	push	{lr}
- 4e4:	e92d0008 	push	{r3}
- 4e8:	e92d0004 	push	{r2}
- 4ec:	e92d0002 	push	{r1}
- 4f0:	e92d0001 	push	{r0}
- 4f4:	e3a00007 	mov	r0, #7
- 4f8:	ef000040 	svc	0x00000040
- 4fc:	e8bd0002 	pop	{r1}
- 500:	e8bd0002 	pop	{r1}
- 504:	e8bd0004 	pop	{r2}
- 508:	e8bd0008 	pop	{r3}
- 50c:	e8bd4000 	pop	{lr}
- 510:	e12fff1e 	bx	lr
-
-00000514 <open>:
- 514:	e92d4000 	push	{lr}
- 518:	e92d0008 	push	{r3}
- 51c:	e92d0004 	push	{r2}
- 520:	e92d0002 	push	{r1}
- 524:	e92d0001 	push	{r0}
- 528:	e3a0000f 	mov	r0, #15
- 52c:	ef000040 	svc	0x00000040
- 530:	e8bd0002 	pop	{r1}
- 534:	e8bd0002 	pop	{r1}
- 538:	e8bd0004 	pop	{r2}
- 53c:	e8bd0008 	pop	{r3}
- 540:	e8bd4000 	pop	{lr}
- 544:	e12fff1e 	bx	lr
-
-00000548 <mknod>:
- 548:	e92d4000 	push	{lr}
- 54c:	e92d0008 	push	{r3}
- 550:	e92d0004 	push	{r2}
- 554:	e92d0002 	push	{r1}
- 558:	e92d0001 	push	{r0}
- 55c:	e3a00011 	mov	r0, #17
- 560:	ef000040 	svc	0x00000040
- 564:	e8bd0002 	pop	{r1}
- 568:	e8bd0002 	pop	{r1}
- 56c:	e8bd0004 	pop	{r2}
- 570:	e8bd0008 	pop	{r3}
- 574:	e8bd4000 	pop	{lr}
- 578:	e12fff1e 	bx	lr
-
-0000057c <unlink>:
- 57c:	e92d4000 	push	{lr}
- 580:	e92d0008 	push	{r3}
- 584:	e92d0004 	push	{r2}
- 588:	e92d0002 	push	{r1}
- 58c:	e92d0001 	push	{r0}
- 590:	e3a00012 	mov	r0, #18
- 594:	ef000040 	svc	0x00000040
- 598:	e8bd0002 	pop	{r1}
- 59c:	e8bd0002 	pop	{r1}
- 5a0:	e8bd0004 	pop	{r2}
- 5a4:	e8bd0008 	pop	{r3}
- 5a8:	e8bd4000 	pop	{lr}
- 5ac:	e12fff1e 	bx	lr
-
-000005b0 <fstat>:
- 5b0:	e92d4000 	push	{lr}
- 5b4:	e92d0008 	push	{r3}
- 5b8:	e92d0004 	push	{r2}
- 5bc:	e92d0002 	push	{r1}
- 5c0:	e92d0001 	push	{r0}
- 5c4:	e3a00008 	mov	r0, #8
- 5c8:	ef000040 	svc	0x00000040
- 5cc:	e8bd0002 	pop	{r1}
- 5d0:	e8bd0002 	pop	{r1}
- 5d4:	e8bd0004 	pop	{r2}
- 5d8:	e8bd0008 	pop	{r3}
- 5dc:	e8bd4000 	pop	{lr}
- 5e0:	e12fff1e 	bx	lr
-
-000005e4 <link>:
- 5e4:	e92d4000 	push	{lr}
- 5e8:	e92d0008 	push	{r3}
- 5ec:	e92d0004 	push	{r2}
- 5f0:	e92d0002 	push	{r1}
- 5f4:	e92d0001 	push	{r0}
- 5f8:	e3a00013 	mov	r0, #19
- 5fc:	ef000040 	svc	0x00000040
- 600:	e8bd0002 	pop	{r1}
- 604:	e8bd0002 	pop	{r1}
- 608:	e8bd0004 	pop	{r2}
- 60c:	e8bd0008 	pop	{r3}
- 610:	e8bd4000 	pop	{lr}
- 614:	e12fff1e 	bx	lr
-
-00000618 <mkdir>:
- 618:	e92d4000 	push	{lr}
- 61c:	e92d0008 	push	{r3}
- 620:	e92d0004 	push	{r2}
- 624:	e92d0002 	push	{r1}
- 628:	e92d0001 	push	{r0}
- 62c:	e3a00014 	mov	r0, #20
- 630:	ef000040 	svc	0x00000040
- 634:	e8bd0002 	pop	{r1}
- 638:	e8bd0002 	pop	{r1}
- 63c:	e8bd0004 	pop	{r2}
- 640:	e8bd0008 	pop	{r3}
- 644:	e8bd4000 	pop	{lr}
- 648:	e12fff1e 	bx	lr
-
-0000064c <chdir>:
- 64c:	e92d4000 	push	{lr}
- 650:	e92d0008 	push	{r3}
- 654:	e92d0004 	push	{r2}
- 658:	e92d0002 	push	{r1}
- 65c:	e92d0001 	push	{r0}
- 660:	e3a00009 	mov	r0, #9
- 664:	ef000040 	svc	0x00000040
- 668:	e8bd0002 	pop	{r1}
- 66c:	e8bd0002 	pop	{r1}
- 670:	e8bd0004 	pop	{r2}
- 674:	e8bd0008 	pop	{r3}
- 678:	e8bd4000 	pop	{lr}
- 67c:	e12fff1e 	bx	lr
-
-00000680 <dup>:
- 680:	e92d4000 	push	{lr}
- 684:	e92d0008 	push	{r3}
- 688:	e92d0004 	push	{r2}
- 68c:	e92d0002 	push	{r1}
- 690:	e92d0001 	push	{r0}
- 694:	e3a0000a 	mov	r0, #10
- 698:	ef000040 	svc	0x00000040
- 69c:	e8bd0002 	pop	{r1}
- 6a0:	e8bd0002 	pop	{r1}
- 6a4:	e8bd0004 	pop	{r2}
- 6a8:	e8bd0008 	pop	{r3}
- 6ac:	e8bd4000 	pop	{lr}
- 6b0:	e12fff1e 	bx	lr
-
-000006b4 <getpid>:
- 6b4:	e92d4000 	push	{lr}
- 6b8:	e92d0008 	push	{r3}
- 6bc:	e92d0004 	push	{r2}
- 6c0:	e92d0002 	push	{r1}
- 6c4:	e92d0001 	push	{r0}
- 6c8:	e3a0000b 	mov	r0, #11
- 6cc:	ef000040 	svc	0x00000040
- 6d0:	e8bd0002 	pop	{r1}
- 6d4:	e8bd0002 	pop	{r1}
- 6d8:	e8bd0004 	pop	{r2}
- 6dc:	e8bd0008 	pop	{r3}
- 6e0:	e8bd4000 	pop	{lr}
- 6e4:	e12fff1e 	bx	lr
-
-000006e8 <sbrk>:
- 6e8:	e92d4000 	push	{lr}
- 6ec:	e92d0008 	push	{r3}
- 6f0:	e92d0004 	push	{r2}
- 6f4:	e92d0002 	push	{r1}
- 6f8:	e92d0001 	push	{r0}
- 6fc:	e3a0000c 	mov	r0, #12
- 700:	ef000040 	svc	0x00000040
- 704:	e8bd0002 	pop	{r1}
- 708:	e8bd0002 	pop	{r1}
- 70c:	e8bd0004 	pop	{r2}
- 710:	e8bd0008 	pop	{r3}
- 714:	e8bd4000 	pop	{lr}
- 718:	e12fff1e 	bx	lr
-
-0000071c <sleep>:
- 71c:	e92d4000 	push	{lr}
- 720:	e92d0008 	push	{r3}
- 724:	e92d0004 	push	{r2}
- 728:	e92d0002 	push	{r1}
- 72c:	e92d0001 	push	{r0}
- 730:	e3a0000d 	mov	r0, #13
- 734:	ef000040 	svc	0x00000040
- 738:	e8bd0002 	pop	{r1}
- 73c:	e8bd0002 	pop	{r1}
- 740:	e8bd0004 	pop	{r2}
- 744:	e8bd0008 	pop	{r3}
- 748:	e8bd4000 	pop	{lr}
- 74c:	e12fff1e 	bx	lr
-
-00000750 <uptime>:
- 750:	e92d4000 	push	{lr}
- 754:	e92d0008 	push	{r3}
- 758:	e92d0004 	push	{r2}
- 75c:	e92d0002 	push	{r1}
- 760:	e92d0001 	push	{r0}
- 764:	e3a0000e 	mov	r0, #14
- 768:	ef000040 	svc	0x00000040
- 76c:	e8bd0002 	pop	{r1}
- 770:	e8bd0002 	pop	{r1}
- 774:	e8bd0004 	pop	{r2}
- 778:	e8bd0008 	pop	{r3}
- 77c:	e8bd4000 	pop	{lr}
- 780:	e12fff1e 	bx	lr
-
-00000784 <putc>:
-#include "stat.h"
-#include "user.h"
-
-static void
-putc(int fd, char c)
-{
- 784:	e92d4800 	push	{fp, lr}
- 788:	e28db004 	add	fp, sp, #4
- 78c:	e24b3004 	sub	r3, fp, #4
- 790:	e24dd008 	sub	sp, sp, #8
-  write(fd, &c, 1);
- 794:	e3a02001 	mov	r2, #1
-#include "stat.h"
-#include "user.h"
-
-static void
-putc(int fd, char c)
-{
- 798:	e5631001 	strb	r1, [r3, #-1]!
-  write(fd, &c, 1);
- 79c:	e1a01003 	mov	r1, r3
- 7a0:	ebffff27 	bl	444 <write>
-}
- 7a4:	e24bd004 	sub	sp, fp, #4
- 7a8:	e8bd8800 	pop	{fp, pc}
-
-000007ac <printint>:
-    return q;
-}
-
-static void
-printint(int fd, int xx, int base, int sgn)
-{
- 7ac:	e92d4ff0 	push	{r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 7b0:	e1a04000 	mov	r4, r0
-  char buf[16];
-  int i, neg;
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
- 7b4:	e1a00fa1 	lsr	r0, r1, #31
- 7b8:	e3530000 	cmp	r3, #0
- 7bc:	03a03000 	moveq	r3, #0
- 7c0:	12003001 	andne	r3, r0, #1
-    return q;
-}
-
-static void
-printint(int fd, int xx, int base, int sgn)
-{
- 7c4:	e28db020 	add	fp, sp, #32
-  char buf[16];
-  int i, neg;
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
- 7c8:	e3530000 	cmp	r3, #0
-    return q;
-}
-
-static void
-printint(int fd, int xx, int base, int sgn)
-{
- 7cc:	e24dd014 	sub	sp, sp, #20
- 7d0:	e59f909c 	ldr	r9, [pc, #156]	; 874 <printint+0xc8>
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
-    neg = 1;
-    x = -xx;
- 7d4:	12611000 	rsbne	r1, r1, #0
-  int i, neg;
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
-    neg = 1;
- 7d8:	13a03001 	movne	r3, #1
-  } else {
-    x = xx;
-  }
-
-  b = base;
-  i = 0;
- 7dc:	e3a0a000 	mov	sl, #0
- 7e0:	e24b6034 	sub	r6, fp, #52	; 0x34
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
-            q = q | (1 << i);
- 7e4:	e3a08001 	mov	r8, #1
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- 7e8:	e3a07000 	mov	r7, #0
-    int i;
-
-    for(i=31;i>=0;i--){
- 7ec:	e3a0001f 	mov	r0, #31
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- 7f0:	e1a0c007 	mov	ip, r7
-    int i;
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
- 7f4:	e1a0e031 	lsr	lr, r1, r0
- 7f8:	e20ee001 	and	lr, lr, #1
- 7fc:	e18ec08c 	orr	ip, lr, ip, lsl #1
-        if(r >= d) {
- 800:	e152000c 	cmp	r2, ip
-            r = r - d;
-            q = q | (1 << i);
- 804:	91877018 	orrls	r7, r7, r8, lsl r0
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
- 808:	9062c00c 	rsbls	ip, r2, ip
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
- 80c:	e2500001 	subs	r0, r0, #1
- 810:	2afffff7 	bcs	7f4 <printint+0x48>
-
-  b = base;
-  i = 0;
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
- 814:	e0000792 	mul	r0, r2, r7
-  }while((x = y) != 0);
- 818:	e3570000 	cmp	r7, #0
-
-  b = base;
-  i = 0;
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
- 81c:	e0601001 	rsb	r1, r0, r1
- 820:	e28a5001 	add	r5, sl, #1
- 824:	e7d91001 	ldrb	r1, [r9, r1]
- 828:	e7c6100a 	strb	r1, [r6, sl]
-  }while((x = y) != 0);
- 82c:	11a01007 	movne	r1, r7
-
-  b = base;
-  i = 0;
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
- 830:	11a0a005 	movne	sl, r5
- 834:	1affffeb 	bne	7e8 <printint+0x3c>
-  }while((x = y) != 0);
-  if(neg)
- 838:	e3530000 	cmp	r3, #0
-    buf[i++] = '-';
- 83c:	124b2024 	subne	r2, fp, #36	; 0x24
- 840:	10823005 	addne	r3, r2, r5
- 844:	128a5002 	addne	r5, sl, #2
-
-  while(--i >= 0)
- 848:	e2455001 	sub	r5, r5, #1
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
-  }while((x = y) != 0);
-  if(neg)
-    buf[i++] = '-';
- 84c:	13a0202d 	movne	r2, #45	; 0x2d
- 850:	15432010 	strbne	r2, [r3, #-16]
-
-  while(--i >= 0)
-    putc(fd, buf[i]);
- 854:	e7d61005 	ldrb	r1, [r6, r5]
- 858:	e1a00004 	mov	r0, r4
-    buf[i++] = digits[x - y * b];
-  }while((x = y) != 0);
-  if(neg)
-    buf[i++] = '-';
-
-  while(--i >= 0)
- 85c:	e2455001 	sub	r5, r5, #1
-    putc(fd, buf[i]);
- 860:	ebffffc7 	bl	784 <putc>
-    buf[i++] = digits[x - y * b];
-  }while((x = y) != 0);
-  if(neg)
-    buf[i++] = '-';
-
-  while(--i >= 0)
- 864:	e3750001 	cmn	r5, #1
- 868:	1afffff9 	bne	854 <printint+0xa8>
-    putc(fd, buf[i]);
-}
- 86c:	e24bd020 	sub	sp, fp, #32
- 870:	e8bd8ff0 	pop	{r4, r5, r6, r7, r8, r9, sl, fp, pc}
- 874:	00000c00 	.word	0x00000c00
-
-00000878 <div>:
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- 878:	e3a03000 	mov	r3, #0
-{
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
- 87c:	e92d0830 	push	{r4, r5, fp}
- 880:	e1a02000 	mov	r2, r0
- 884:	e28db008 	add	fp, sp, #8
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
- 888:	e3a0c01f 	mov	ip, #31
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- 88c:	e1a00003 	mov	r0, r3
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
-            q = q | (1 << i);
- 890:	e3a05001 	mov	r5, #1
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
- 894:	e1a04c32 	lsr	r4, r2, ip
- 898:	e2044001 	and	r4, r4, #1
- 89c:	e1843083 	orr	r3, r4, r3, lsl #1
-        if(r >= d) {
- 8a0:	e1530001 	cmp	r3, r1
-            r = r - d;
-            q = q | (1 << i);
- 8a4:	21800c15 	orrcs	r0, r0, r5, lsl ip
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
- 8a8:	20613003 	rsbcs	r3, r1, r3
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
- 8ac:	e25cc001 	subs	ip, ip, #1
- 8b0:	2afffff7 	bcs	894 <div+0x1c>
-            r = r - d;
-            q = q | (1 << i);
-        }
-    }
-    return q;
-}
- 8b4:	e24bd008 	sub	sp, fp, #8
- 8b8:	e8bd0830 	pop	{r4, r5, fp}
- 8bc:	e12fff1e 	bx	lr
-
-000008c0 <printf>:
-}
-
-// Print to the given fd. Only understands %d, %x, %p, %s.
-void
-printf(int fd, char *fmt, ...)
-{
- 8c0:	e92d000e 	push	{r1, r2, r3}
- 8c4:	e92d4ff0 	push	{r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 8c8:	e28db020 	add	fp, sp, #32
- 8cc:	e1a05000 	mov	r5, r0
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- 8d0:	e59b4004 	ldr	r4, [fp, #4]
- 8d4:	e5d48000 	ldrb	r8, [r4]
- 8d8:	e3580000 	cmp	r8, #0
- 8dc:	0a000027 	beq	980 <printf+0xc0>
-        ap++;
-      } else if(c == 's'){
-        s = (char*)*ap;
-        ap++;
-        if(s == 0)
-          s = "(null)";
- 8e0:	e59f712c 	ldr	r7, [pc, #300]	; a14 <printf+0x154>
-  char *s;
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
- 8e4:	e28b6008 	add	r6, fp, #8
-{
-  char *s;
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
- 8e8:	e3a0a000 	mov	sl, #0
- 8ec:	ea000008 	b	914 <printf+0x54>
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
-    c = fmt[i] & 0xff;
-    if(state == 0){
-      if(c == '%'){
- 8f0:	e3580025 	cmp	r8, #37	; 0x25
-        state = '%';
- 8f4:	01a0a008 	moveq	sl, r8
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
-    c = fmt[i] & 0xff;
-    if(state == 0){
-      if(c == '%'){
- 8f8:	0a000002 	beq	908 <printf+0x48>
-        state = '%';
-      } else {
-        putc(fd, c);
- 8fc:	e1a00005 	mov	r0, r5
- 900:	e1a01008 	mov	r1, r8
- 904:	ebffff9e 	bl	784 <putc>
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- 908:	e5f48001 	ldrb	r8, [r4, #1]!
- 90c:	e3580000 	cmp	r8, #0
- 910:	0a00001a 	beq	980 <printf+0xc0>
-    c = fmt[i] & 0xff;
-    if(state == 0){
- 914:	e35a0000 	cmp	sl, #0
- 918:	0afffff4 	beq	8f0 <printf+0x30>
-      if(c == '%'){
-        state = '%';
-      } else {
-        putc(fd, c);
-      }
-    } else if(state == '%'){
- 91c:	e35a0025 	cmp	sl, #37	; 0x25
- 920:	1afffff8 	bne	908 <printf+0x48>
-      if(c == 'd'){
- 924:	e3580064 	cmp	r8, #100	; 0x64
- 928:	0a00002c 	beq	9e0 <printf+0x120>
-        printint(fd, *ap, 10, 1);
-        ap++;
-      } else if(c == 'x' || c == 'p'){
- 92c:	e3580078 	cmp	r8, #120	; 0x78
- 930:	13580070 	cmpne	r8, #112	; 0x70
- 934:	13a09000 	movne	r9, #0
- 938:	03a09001 	moveq	r9, #1
- 93c:	0a000013 	beq	990 <printf+0xd0>
-        printint(fd, *ap, 16, 0);
-        ap++;
-      } else if(c == 's'){
- 940:	e3580073 	cmp	r8, #115	; 0x73
- 944:	0a000018 	beq	9ac <printf+0xec>
-          s = "(null)";
-        while(*s != 0){
-          putc(fd, *s);
-          s++;
-        }
-      } else if(c == 'c'){
- 948:	e3580063 	cmp	r8, #99	; 0x63
- 94c:	0a00002a 	beq	9fc <printf+0x13c>
-        putc(fd, *ap);
-        ap++;
-      } else if(c == '%'){
- 950:	e3580025 	cmp	r8, #37	; 0x25
-        putc(fd, c);
- 954:	e1a0100a 	mov	r1, sl
- 958:	e1a00005 	mov	r0, r5
-          s++;
-        }
-      } else if(c == 'c'){
-        putc(fd, *ap);
-        ap++;
-      } else if(c == '%'){
- 95c:	0a000002 	beq	96c <printf+0xac>
-        putc(fd, c);
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
- 960:	ebffff87 	bl	784 <putc>
-        putc(fd, c);
- 964:	e1a00005 	mov	r0, r5
- 968:	e1a01008 	mov	r1, r8
- 96c:	ebffff84 	bl	784 <putc>
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- 970:	e5f48001 	ldrb	r8, [r4, #1]!
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- 974:	e1a0a009 	mov	sl, r9
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- 978:	e3580000 	cmp	r8, #0
- 97c:	1affffe4 	bne	914 <printf+0x54>
-        putc(fd, c);
-      }
-      state = 0;
-    }
-  }
-}
- 980:	e24bd020 	sub	sp, fp, #32
- 984:	e8bd4ff0 	pop	{r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 988:	e28dd00c 	add	sp, sp, #12
- 98c:	e12fff1e 	bx	lr
-    } else if(state == '%'){
-      if(c == 'd'){
-        printint(fd, *ap, 10, 1);
-        ap++;
-      } else if(c == 'x' || c == 'p'){
-        printint(fd, *ap, 16, 0);
- 990:	e1a00005 	mov	r0, r5
- 994:	e4961004 	ldr	r1, [r6], #4
- 998:	e3a02010 	mov	r2, #16
- 99c:	e3a03000 	mov	r3, #0
- 9a0:	ebffff81 	bl	7ac <printint>
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- 9a4:	e3a0a000 	mov	sl, #0
- 9a8:	eaffffd6 	b	908 <printf+0x48>
-        ap++;
-      } else if(c == 'x' || c == 'p'){
-        printint(fd, *ap, 16, 0);
-        ap++;
-      } else if(c == 's'){
-        s = (char*)*ap;
- 9ac:	e4968004 	ldr	r8, [r6], #4
-        ap++;
-        if(s == 0)
-          s = "(null)";
- 9b0:	e3580000 	cmp	r8, #0
- 9b4:	01a08007 	moveq	r8, r7
-        while(*s != 0){
- 9b8:	e5d81000 	ldrb	r1, [r8]
- 9bc:	e3510000 	cmp	r1, #0
- 9c0:	0a000004 	beq	9d8 <printf+0x118>
-          putc(fd, *s);
- 9c4:	e1a00005 	mov	r0, r5
- 9c8:	ebffff6d 	bl	784 <putc>
-      } else if(c == 's'){
-        s = (char*)*ap;
-        ap++;
-        if(s == 0)
-          s = "(null)";
-        while(*s != 0){
- 9cc:	e5f81001 	ldrb	r1, [r8, #1]!
- 9d0:	e3510000 	cmp	r1, #0
- 9d4:	1afffffa 	bne	9c4 <printf+0x104>
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- 9d8:	e1a0a001 	mov	sl, r1
- 9dc:	eaffffc9 	b	908 <printf+0x48>
-      } else {
-        putc(fd, c);
-      }
-    } else if(state == '%'){
-      if(c == 'd'){
-        printint(fd, *ap, 10, 1);
- 9e0:	e1a00005 	mov	r0, r5
- 9e4:	e4961004 	ldr	r1, [r6], #4
- 9e8:	e3a0200a 	mov	r2, #10
- 9ec:	e3a03001 	mov	r3, #1
- 9f0:	ebffff6d 	bl	7ac <printint>
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- 9f4:	e3a0a000 	mov	sl, #0
- 9f8:	eaffffc2 	b	908 <printf+0x48>
-        while(*s != 0){
-          putc(fd, *s);
-          s++;
-        }
-      } else if(c == 'c'){
-        putc(fd, *ap);
- 9fc:	e4961004 	ldr	r1, [r6], #4
- a00:	e1a00005 	mov	r0, r5
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- a04:	e1a0a009 	mov	sl, r9
-        while(*s != 0){
-          putc(fd, *s);
-          s++;
-        }
-      } else if(c == 'c'){
-        putc(fd, *ap);
- a08:	e6ef1071 	uxtb	r1, r1
- a0c:	ebffff5c 	bl	784 <putc>
- a10:	eaffffbc 	b	908 <printf+0x48>
- a14:	00000c14 	.word	0x00000c14
-
-00000a18 <free>:
-free(void *ap)
-{
-  Header *bp, *p;
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
- a18:	e59f3098 	ldr	r3, [pc, #152]	; ab8 <free+0xa0>
-static Header base;
-static Header *freep;
-
-void
-free(void *ap)
-{
- a1c:	e92d0830 	push	{r4, r5, fp}
-  Header *bp, *p;
-
-  bp = (Header*)ap - 1;
- a20:	e240c008 	sub	ip, r0, #8
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
- a24:	e5932000 	ldr	r2, [r3]
-static Header base;
-static Header *freep;
-
-void
-free(void *ap)
-{
- a28:	e28db008 	add	fp, sp, #8
-  Header *bp, *p;
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
- a2c:	e152000c 	cmp	r2, ip
- a30:	e5921000 	ldr	r1, [r2]
- a34:	2a000001 	bcs	a40 <free+0x28>
- a38:	e15c0001 	cmp	ip, r1
- a3c:	3a000007 	bcc	a60 <free+0x48>
-    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
- a40:	e1520001 	cmp	r2, r1
- a44:	3a000003 	bcc	a58 <free+0x40>
- a48:	e152000c 	cmp	r2, ip
- a4c:	3a000003 	bcc	a60 <free+0x48>
- a50:	e15c0001 	cmp	ip, r1
- a54:	3a000001 	bcc	a60 <free+0x48>
-static Header base;
-static Header *freep;
-
-void
-free(void *ap)
-{
- a58:	e1a02001 	mov	r2, r1
- a5c:	eafffff2 	b	a2c <free+0x14>
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
-    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
-      break;
-  if(bp + bp->s.size == p->s.ptr){
- a60:	e5104004 	ldr	r4, [r0, #-4]
-  if(p + p->s.size == bp){
-    p->s.size += bp->s.size;
-    p->s.ptr = bp->s.ptr;
-  } else
-    p->s.ptr = bp;
-  freep = p;
- a64:	e5832000 	str	r2, [r3]
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
-    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
-      break;
-  if(bp + bp->s.size == p->s.ptr){
- a68:	e08c5184 	add	r5, ip, r4, lsl #3
- a6c:	e1550001 	cmp	r5, r1
-    bp->s.size += p->s.ptr->s.size;
- a70:	05911004 	ldreq	r1, [r1, #4]
- a74:	00814004 	addeq	r4, r1, r4
- a78:	05004004 	streq	r4, [r0, #-4]
-    bp->s.ptr = p->s.ptr->s.ptr;
- a7c:	05921000 	ldreq	r1, [r2]
- a80:	05911000 	ldreq	r1, [r1]
-  } else
-    bp->s.ptr = p->s.ptr;
- a84:	e5001008 	str	r1, [r0, #-8]
-  if(p + p->s.size == bp){
- a88:	e5921004 	ldr	r1, [r2, #4]
- a8c:	e0824181 	add	r4, r2, r1, lsl #3
- a90:	e15c0004 	cmp	ip, r4
-    p->s.size += bp->s.size;
-    p->s.ptr = bp->s.ptr;
-  } else
-    p->s.ptr = bp;
- a94:	1582c000 	strne	ip, [r2]
-    bp->s.size += p->s.ptr->s.size;
-    bp->s.ptr = p->s.ptr->s.ptr;
-  } else
-    bp->s.ptr = p->s.ptr;
-  if(p + p->s.size == bp){
-    p->s.size += bp->s.size;
- a98:	0510c004 	ldreq	ip, [r0, #-4]
- a9c:	008c1001 	addeq	r1, ip, r1
- aa0:	05821004 	streq	r1, [r2, #4]
-    p->s.ptr = bp->s.ptr;
- aa4:	05101008 	ldreq	r1, [r0, #-8]
- aa8:	05821000 	streq	r1, [r2]
-  } else
-    p->s.ptr = bp;
-  freep = p;
-}
- aac:	e24bd008 	sub	sp, fp, #8
- ab0:	e8bd0830 	pop	{r4, r5, fp}
- ab4:	e12fff1e 	bx	lr
- ab8:	00000c24 	.word	0x00000c24
-
-00000abc <malloc>:
-  return freep;
-}
-
-void*
-malloc(uint nbytes)
-{
- abc:	e92d49f8 	push	{r3, r4, r5, r6, r7, r8, fp, lr}
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
- ac0:	e2804007 	add	r4, r0, #7
-  if((prevp = freep) == 0){
- ac4:	e59f50d4 	ldr	r5, [pc, #212]	; ba0 <malloc+0xe4>
-malloc(uint nbytes)
-{
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
- ac8:	e1a041a4 	lsr	r4, r4, #3
-  return freep;
-}
-
-void*
-malloc(uint nbytes)
-{
- acc:	e28db01c 	add	fp, sp, #28
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
-  if((prevp = freep) == 0){
- ad0:	e5953000 	ldr	r3, [r5]
-malloc(uint nbytes)
-{
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
- ad4:	e2844001 	add	r4, r4, #1
-  if((prevp = freep) == 0){
- ad8:	e3530000 	cmp	r3, #0
- adc:	0a00002b 	beq	b90 <malloc+0xd4>
- ae0:	e5930000 	ldr	r0, [r3]
- ae4:	e5902004 	ldr	r2, [r0, #4]
-    base.s.ptr = freep = prevp = &base;
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
- ae8:	e1520004 	cmp	r2, r4
- aec:	2a00001b 	bcs	b60 <malloc+0xa4>
-morecore(uint nu)
-{
-  char *p;
-  Header *hp;
-
-  if(nu < 4096)
- af0:	e59f80ac 	ldr	r8, [pc, #172]	; ba4 <malloc+0xe8>
-        p->s.size -= nunits;
-        p += p->s.size;
-        p->s.size = nunits;
-      }
-      freep = prevp;
-      return (void*)(p + 1);
- af4:	e1a07184 	lsl	r7, r4, #3
- af8:	ea000003 	b	b0c <malloc+0x50>
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
-  if((prevp = freep) == 0){
-    base.s.ptr = freep = prevp = &base;
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
- afc:	e5930000 	ldr	r0, [r3]
-    if(p->s.size >= nunits){
- b00:	e5902004 	ldr	r2, [r0, #4]
- b04:	e1540002 	cmp	r4, r2
- b08:	9a000014 	bls	b60 <malloc+0xa4>
-        p->s.size = nunits;
-      }
-      freep = prevp;
-      return (void*)(p + 1);
-    }
-    if(p == freep)
- b0c:	e5952000 	ldr	r2, [r5]
- b10:	e1a03000 	mov	r3, r0
- b14:	e1500002 	cmp	r0, r2
- b18:	1afffff7 	bne	afc <malloc+0x40>
-morecore(uint nu)
-{
-  char *p;
-  Header *hp;
-
-  if(nu < 4096)
- b1c:	e1540008 	cmp	r4, r8
-    nu = 4096;
-  p = sbrk(nu * sizeof(Header));
- b20:	81a00007 	movhi	r0, r7
- b24:	93a00902 	movls	r0, #32768	; 0x8000
-morecore(uint nu)
-{
-  char *p;
-  Header *hp;
-
-  if(nu < 4096)
- b28:	81a06004 	movhi	r6, r4
- b2c:	93a06a01 	movls	r6, #4096	; 0x1000
-    nu = 4096;
-  p = sbrk(nu * sizeof(Header));
- b30:	ebfffeec 	bl	6e8 <sbrk>
- b34:	e1a03000 	mov	r3, r0
-  if(p == (char*)-1)
- b38:	e3730001 	cmn	r3, #1
-    return 0;
-  hp = (Header*)p;
-  hp->s.size = nu;
-  free((void*)(hp + 1));
- b3c:	e2800008 	add	r0, r0, #8
-  Header *hp;
-
-  if(nu < 4096)
-    nu = 4096;
-  p = sbrk(nu * sizeof(Header));
-  if(p == (char*)-1)
- b40:	0a000010 	beq	b88 <malloc+0xcc>
-    return 0;
-  hp = (Header*)p;
-  hp->s.size = nu;
- b44:	e5836004 	str	r6, [r3, #4]
-  free((void*)(hp + 1));
- b48:	ebffffb2 	bl	a18 <free>
-  return freep;
- b4c:	e5953000 	ldr	r3, [r5]
-      }
-      freep = prevp;
-      return (void*)(p + 1);
-    }
-    if(p == freep)
-      if((p = morecore(nunits)) == 0)
- b50:	e3530000 	cmp	r3, #0
- b54:	1affffe8 	bne	afc <malloc+0x40>
-        return 0;
- b58:	e1a00003 	mov	r0, r3
-  }
-}
- b5c:	e8bd89f8 	pop	{r3, r4, r5, r6, r7, r8, fp, pc}
-    base.s.ptr = freep = prevp = &base;
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
-      if(p->s.size == nunits)
- b60:	e1540002 	cmp	r4, r2
-        prevp->s.ptr = p->s.ptr;
-      else {
-        p->s.size -= nunits;
- b64:	10642002 	rsbne	r2, r4, r2
- b68:	15802004 	strne	r2, [r0, #4]
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
-      if(p->s.size == nunits)
-        prevp->s.ptr = p->s.ptr;
- b6c:	05902000 	ldreq	r2, [r0]
-      else {
-        p->s.size -= nunits;
-        p += p->s.size;
- b70:	10800182 	addne	r0, r0, r2, lsl #3
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
-      if(p->s.size == nunits)
-        prevp->s.ptr = p->s.ptr;
- b74:	05832000 	streq	r2, [r3]
-      else {
-        p->s.size -= nunits;
-        p += p->s.size;
-        p->s.size = nunits;
- b78:	15804004 	strne	r4, [r0, #4]
-      }
-      freep = prevp;
- b7c:	e5853000 	str	r3, [r5]
-      return (void*)(p + 1);
- b80:	e2800008 	add	r0, r0, #8
- b84:	e8bd89f8 	pop	{r3, r4, r5, r6, r7, r8, fp, pc}
-    }
-    if(p == freep)
-      if((p = morecore(nunits)) == 0)
-        return 0;
- b88:	e3a00000 	mov	r0, #0
- b8c:	e8bd89f8 	pop	{r3, r4, r5, r6, r7, r8, fp, pc}
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
-  if((prevp = freep) == 0){
-    base.s.ptr = freep = prevp = &base;
- b90:	e2850004 	add	r0, r5, #4
- b94:	e5850000 	str	r0, [r5]
-    base.s.size = 0;
- b98:	e9850009 	stmib	r5, {r0, r3}
- b9c:	eaffffd3 	b	af0 <malloc+0x34>
- ba0:	00000c24 	.word	0x00000c24
- ba4:	00000fff 	.word	0x00000fff
--- a/uprogs/init.sym	Sun Oct 22 18:51:04 2017 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-00000000 .text
-00000ba8 .rodata
-00000c1c .data
-00000c24 .bss
-00000000 .comment
-00000000 .ARM.attributes
-00000000 .debug_aranges
-00000000 .debug_info
-00000000 .debug_abbrev
-00000000 .debug_line
-00000000 .debug_frame
-00000000 .debug_str
-00000000 .debug_loc
-00000000 .debug_ranges
-00000000 init.c
-00000000 ulib.c
-00000000 printf.c
-00000784 putc
-000007ac printint
-00000c00 digits.993
-00000000 umalloc.c
-00000c24 freep
-00000c28 base
-000000d4 strcpy
-000008c0 printf
-00000c1c argv
-0000030c memmove
-00000548 mknod
-00000c30 _bss_end__
-00000204 gets
-000006b4 getpid
-00000abc malloc
-0000071c sleep
-00000c24 __bss_start__
-000003dc pipe
-00000444 write
-000005b0 fstat
-000004ac kill
-0000064c chdir
-000004e0 exec
-00000c30 __bss_end__
-000003a8 wait
-00000410 read
-0000057c unlink
-00000340 fork
-000006e8 sbrk
-00000750 uptime
-00000c24 __bss_start
-00000188 memset
-00000000 main
-00000c30 __end__
-000000fc strcmp
-00000680 dup
-0000027c stat
-00000c24 _edata
-00000c30 _end
-000005e4 link
-00000374 exit
-000002b8 atoi
-00000148 strlen
-00000514 open
-00000878 div
-000001c0 strchr
-00000618 mkdir
-00000478 close
-00000a18 free
Binary file uprogs/initcode has changed
--- a/uprogs/initcode.S	Sun Oct 22 18:51:04 2017 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-# Initial process execs /init.
-
-#include "syscall.h"
-#include "traps.h"
-
-
-# exec(init, argv)
-.globl start
-start:
-  push {lr}
-  ldr r0, =argv
-  push {r0}
-  ldr r0, =init
-  push {r0}
-  mov r0, #SYS_exec
-  swi #T_SYSCALL
-  pop {lr}
-  pop {lr}
-  pop {lr}
-  bx lr
-
-# for(;;) exit();
-exit:
-  mov r11, #SYS_exit
-  swi #T_SYSCALL
-  bl exit
-
-# char init[] = "/init\0";
-init:
-  .string "/init\0"
-
-# char *argv[] = { init, 0 };
-.p2align 2
-argv:
-  .long init
-  .long 0
-
--- a/uprogs/initcode.asm	Sun Oct 22 18:51:04 2017 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-
-initcode.o:     file format elf32-littlearm
-
-
-Disassembly of section .text:
-
-00000000 <start>:
-
-
-# exec(init, argv)
-.globl start
-start:
-  push {lr}
-   0:	e92d4000 	push	{lr}
-  ldr r0, =argv
-   4:	e59f003c 	ldr	r0, [pc, #60]	; 48 <argv+0x8>
-  push {r0}
-   8:	e92d0001 	push	{r0}
-  ldr r0, =init
-   c:	e59f0038 	ldr	r0, [pc, #56]	; 4c <argv+0xc>
-  push {r0}
-  10:	e92d0001 	push	{r0}
-  mov r0, #SYS_exec
-  14:	e3a00007 	mov	r0, #7
-  swi #T_SYSCALL
-  18:	ef000040 	svc	0x00000040
-  pop {lr}
-  1c:	e8bd4000 	pop	{lr}
-  pop {lr}
-  20:	e8bd4000 	pop	{lr}
-  pop {lr}
-  24:	e8bd4000 	pop	{lr}
-  bx lr
-  28:	e12fff1e 	bx	lr
-
-0000002c <exit>:
-
-# for(;;) exit();
-exit:
-  mov r11, #SYS_exit
-  2c:	e3a0b002 	mov	fp, #2
-  swi #T_SYSCALL
-  30:	ef000040 	svc	0x00000040
-  bl exit
-  34:	ebfffffc 	bl	2c <exit>
-
-00000038 <init>:
-  38:	696e692f 	.word	0x696e692f
-  3c:	0074      	.short	0x0074
-	...
-
-00000040 <argv>:
-  40:	00000038 	andeq	r0, r0, r8, lsr r0
-  44:	00000000 	andeq	r0, r0, r0
-
-# exec(init, argv)
-.globl start
-start:
-  push {lr}
-  ldr r0, =argv
-  48:	00000040 	andeq	r0, r0, r0, asr #32
-  push {r0}
-  ldr r0, =init
-  4c:	00000038 	andeq	r0, r0, r8, lsr r0
Binary file uprogs/initcode.out has changed
--- a/uprogs/kill.asm	Sun Oct 22 18:51:04 2017 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1694 +0,0 @@
-
-_kill:     file format elf32-littlearm
-
-
-Disassembly of section .text:
-
-00000000 <main>:
-#include "stat.h"
-#include "user.h"
-
-int
-main(int argc, char **argv)
-{
-   0:	e92d4878 	push	{r3, r4, r5, r6, fp, lr}
-  int i;
-
-  if(argc < 1){
-   4:	e2504000 	subs	r4, r0, #0
-#include "stat.h"
-#include "user.h"
-
-int
-main(int argc, char **argv)
-{
-   8:	e28db014 	add	fp, sp, #20
-  int i;
-
-  if(argc < 1){
-   c:	da00000a 	ble	3c <main+0x3c>
-    printf(2, "usage: kill pid...\n");
-    exit();
-  }
-  for(i=1; i<argc; i++)
-  10:	e3540001 	cmp	r4, #1
-{
-  int i;
-
-  if(argc < 1){
-    printf(2, "usage: kill pid...\n");
-    exit();
-  14:	11a06001 	movne	r6, r1
-  }
-  for(i=1; i<argc; i++)
-  18:	13a05001 	movne	r5, #1
-  1c:	0a000005 	beq	38 <main+0x38>
-    kill(atoi(argv[i]));
-  20:	e5b60004 	ldr	r0, [r6, #4]!
-  24:	eb000082 	bl	234 <atoi>
-
-  if(argc < 1){
-    printf(2, "usage: kill pid...\n");
-    exit();
-  }
-  for(i=1; i<argc; i++)
-  28:	e2855001 	add	r5, r5, #1
-    kill(atoi(argv[i]));
-  2c:	eb0000fd 	bl	428 <kill>
-
-  if(argc < 1){
-    printf(2, "usage: kill pid...\n");
-    exit();
-  }
-  for(i=1; i<argc; i++)
-  30:	e1550004 	cmp	r5, r4
-  34:	1afffff9 	bne	20 <main+0x20>
-    kill(atoi(argv[i]));
-  exit();
-  38:	eb0000ac 	bl	2f0 <exit>
-main(int argc, char **argv)
-{
-  int i;
-
-  if(argc < 1){
-    printf(2, "usage: kill pid...\n");
-  3c:	e3a00002 	mov	r0, #2
-  40:	e59f1004 	ldr	r1, [pc, #4]	; 4c <main+0x4c>
-  44:	eb0001fc 	bl	83c <printf>
-    exit();
-  48:	eb0000a8 	bl	2f0 <exit>
-  4c:	00000b24 	.word	0x00000b24
-
-00000050 <strcpy>:
-#include "user.h"
-#include "arm.h"
-
-char*
-strcpy(char *s, char *t)
-{
-  50:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
-  char *os;
-
-  os = s;
-  while((*s++ = *t++) != 0)
-  54:	e1a02000 	mov	r2, r0
-#include "user.h"
-#include "arm.h"
-
-char*
-strcpy(char *s, char *t)
-{
-  58:	e28db000 	add	fp, sp, #0
-  char *os;
-
-  os = s;
-  while((*s++ = *t++) != 0)
-  5c:	e4d13001 	ldrb	r3, [r1], #1
-  60:	e3530000 	cmp	r3, #0
-  64:	e4c23001 	strb	r3, [r2], #1
-  68:	1afffffb 	bne	5c <strcpy+0xc>
-    ;
-  return os;
-}
-  6c:	e28bd000 	add	sp, fp, #0
-  70:	e8bd0800 	pop	{fp}
-  74:	e12fff1e 	bx	lr
-
-00000078 <strcmp>:
-
-int
-strcmp(const char *p, const char *q)
-{
-  78:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
-  7c:	e28db000 	add	fp, sp, #0
-  while(*p && *p == *q)
-  80:	e5d03000 	ldrb	r3, [r0]
-  84:	e5d12000 	ldrb	r2, [r1]
-  88:	e3530000 	cmp	r3, #0
-  8c:	1a000004 	bne	a4 <strcmp+0x2c>
-  90:	ea000005 	b	ac <strcmp+0x34>
-  94:	e5f03001 	ldrb	r3, [r0, #1]!
-  98:	e3530000 	cmp	r3, #0
-  9c:	0a000006 	beq	bc <strcmp+0x44>
-  a0:	e5f12001 	ldrb	r2, [r1, #1]!
-  a4:	e1530002 	cmp	r3, r2
-  a8:	0afffff9 	beq	94 <strcmp+0x1c>
-    p++, q++;
-  return (uchar)*p - (uchar)*q;
-}
-  ac:	e0620003 	rsb	r0, r2, r3
-  b0:	e28bd000 	add	sp, fp, #0
-  b4:	e8bd0800 	pop	{fp}
-  b8:	e12fff1e 	bx	lr
-}
-
-int
-strcmp(const char *p, const char *q)
-{
-  while(*p && *p == *q)
-  bc:	e5d12001 	ldrb	r2, [r1, #1]
-  c0:	eafffff9 	b	ac <strcmp+0x34>
-
-000000c4 <strlen>:
-  return (uchar)*p - (uchar)*q;
-}
-
-uint
-strlen(char *s)
-{
-  c4:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
-  c8:	e28db000 	add	fp, sp, #0
-  int n;
-
-  for(n = 0; s[n]; n++)
-  cc:	e5d03000 	ldrb	r3, [r0]
-  d0:	e3530000 	cmp	r3, #0
-  d4:	01a00003 	moveq	r0, r3
-  d8:	0a000006 	beq	f8 <strlen+0x34>
-  dc:	e1a02000 	mov	r2, r0
-  e0:	e3a03000 	mov	r3, #0
-  e4:	e5f21001 	ldrb	r1, [r2, #1]!
-  e8:	e2833001 	add	r3, r3, #1
-  ec:	e1a00003 	mov	r0, r3
-  f0:	e3510000 	cmp	r1, #0
-  f4:	1afffffa 	bne	e4 <strlen+0x20>
-    ;
-  return n;
-}
-  f8:	e28bd000 	add	sp, fp, #0
-  fc:	e8bd0800 	pop	{fp}
- 100:	e12fff1e 	bx	lr
-
-00000104 <memset>:
-memset(void *dst, int c, uint n)
-{
-  char *p=dst;
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 104:	e3520000 	cmp	r2, #0
-  return n;
-}
-
-void*
-memset(void *dst, int c, uint n)
-{
- 108:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 10c:	e28db000 	add	fp, sp, #0
-  char *p=dst;
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 110:	0a000006 	beq	130 <memset+0x2c>
- 114:	e6ef1071 	uxtb	r1, r1
- 118:	e1a03002 	mov	r3, r2
-}
-
-void*
-memset(void *dst, int c, uint n)
-{
-  char *p=dst;
- 11c:	e1a0c000 	mov	ip, r0
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 120:	e2533001 	subs	r3, r3, #1
- 124:	e4cc1001 	strb	r1, [ip], #1
- 128:	1afffffc 	bne	120 <memset+0x1c>
- 12c:	e0800002 	add	r0, r0, r2
-  return (void *)p;
-}
- 130:	e28bd000 	add	sp, fp, #0
- 134:	e8bd0800 	pop	{fp}
- 138:	e12fff1e 	bx	lr
-
-0000013c <strchr>:
-
-char*
-strchr(const char *s, char c)
-{
- 13c:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 140:	e28db000 	add	fp, sp, #0
-  for(; *s; s++)
- 144:	e5d03000 	ldrb	r3, [r0]
- 148:	e3530000 	cmp	r3, #0
- 14c:	1a000004 	bne	164 <strchr+0x28>
- 150:	ea000008 	b	178 <strchr+0x3c>
- 154:	e5d03001 	ldrb	r3, [r0, #1]
- 158:	e2800001 	add	r0, r0, #1
- 15c:	e3530000 	cmp	r3, #0
- 160:	0a000004 	beq	178 <strchr+0x3c>
-    if(*s == c)
- 164:	e1530001 	cmp	r3, r1
- 168:	1afffff9 	bne	154 <strchr+0x18>
-      return (char*)s;
-  return 0;
-}
- 16c:	e28bd000 	add	sp, fp, #0
- 170:	e8bd0800 	pop	{fp}
- 174:	e12fff1e 	bx	lr
-strchr(const char *s, char c)
-{
-  for(; *s; s++)
-    if(*s == c)
-      return (char*)s;
-  return 0;
- 178:	e1a00003 	mov	r0, r3
- 17c:	eafffffa 	b	16c <strchr+0x30>
-
-00000180 <gets>:
-}
-
-char*
-gets(char *buf, int max)
-{
- 180:	e92d49f0 	push	{r4, r5, r6, r7, r8, fp, lr}
- 184:	e28db018 	add	fp, sp, #24
- 188:	e24dd00c 	sub	sp, sp, #12
- 18c:	e1a08000 	mov	r8, r0
- 190:	e1a07001 	mov	r7, r1
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 194:	e1a06000 	mov	r6, r0
- 198:	e3a05000 	mov	r5, #0
- 19c:	ea000008 	b	1c4 <gets+0x44>
-    cc = read(0, &c, 1);
- 1a0:	eb000079 	bl	38c <read>
-    if(cc < 1)
- 1a4:	e3500000 	cmp	r0, #0
- 1a8:	da00000b 	ble	1dc <gets+0x5c>
-      break;
-    buf[i++] = c;
- 1ac:	e55b301d 	ldrb	r3, [fp, #-29]
-    if(c == '\n' || c == '\r')
- 1b0:	e1a05004 	mov	r5, r4
- 1b4:	e353000a 	cmp	r3, #10
- 1b8:	1353000d 	cmpne	r3, #13
-
-  for(i=0; i+1 < max; ){
-    cc = read(0, &c, 1);
-    if(cc < 1)
-      break;
-    buf[i++] = c;
- 1bc:	e4c63001 	strb	r3, [r6], #1
-    if(c == '\n' || c == '\r')
- 1c0:	0a00000a 	beq	1f0 <gets+0x70>
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
-    cc = read(0, &c, 1);
- 1c4:	e3a02001 	mov	r2, #1
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 1c8:	e0854002 	add	r4, r5, r2
- 1cc:	e1540007 	cmp	r4, r7
-    cc = read(0, &c, 1);
- 1d0:	e3a00000 	mov	r0, #0
- 1d4:	e24b101d 	sub	r1, fp, #29
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 1d8:	bafffff0 	blt	1a0 <gets+0x20>
-      break;
-    buf[i++] = c;
-    if(c == '\n' || c == '\r')
-      break;
-  }
-  buf[i] = '\0';
- 1dc:	e3a03000 	mov	r3, #0
- 1e0:	e7c83005 	strb	r3, [r8, r5]
-  return buf;
-}
- 1e4:	e1a00008 	mov	r0, r8
- 1e8:	e24bd018 	sub	sp, fp, #24
- 1ec:	e8bd89f0 	pop	{r4, r5, r6, r7, r8, fp, pc}
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 1f0:	e1a05004 	mov	r5, r4
- 1f4:	eafffff8 	b	1dc <gets+0x5c>
-
-000001f8 <stat>:
-  return buf;
-}
-
-int
-stat(char *n, struct stat *st)
-{
- 1f8:	e92d4830 	push	{r4, r5, fp, lr}
- 1fc:	e1a05001 	mov	r5, r1
- 200:	e28db00c 	add	fp, sp, #12
-  int fd;
-  int r;
-
-  fd = open(n, O_RDONLY);
- 204:	e3a01000 	mov	r1, #0
- 208:	eb0000a0 	bl	490 <open>
-  if(fd < 0)
- 20c:	e2504000 	subs	r4, r0, #0
-    return -1;
- 210:	b3e05000 	mvnlt	r5, #0
-{
-  int fd;
-  int r;
-
-  fd = open(n, O_RDONLY);
-  if(fd < 0)
- 214:	ba000004 	blt	22c <stat+0x34>
-    return -1;
-  r = fstat(fd, st);
- 218:	e1a01005 	mov	r1, r5
- 21c:	eb0000c2 	bl	52c <fstat>
- 220:	e1a05000 	mov	r5, r0
-  close(fd);
- 224:	e1a00004 	mov	r0, r4
- 228:	eb000071 	bl	3f4 <close>
-  return r;
-}
- 22c:	e1a00005 	mov	r0, r5
- 230:	e8bd8830 	pop	{r4, r5, fp, pc}
-
-00000234 <atoi>:
-
-int
-atoi(const char *s)
-{
- 234:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 238:	e28db000 	add	fp, sp, #0
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 23c:	e5d03000 	ldrb	r3, [r0]
- 240:	e2432030 	sub	r2, r3, #48	; 0x30
- 244:	e6ef2072 	uxtb	r2, r2
- 248:	e3520009 	cmp	r2, #9
-int
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
- 24c:	83a00000 	movhi	r0, #0
-  while('0' <= *s && *s <= '9')
- 250:	8a000009 	bhi	27c <atoi+0x48>
- 254:	e1a02000 	mov	r2, r0
-int
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
- 258:	e3a00000 	mov	r0, #0
-  while('0' <= *s && *s <= '9')
-    n = n*10 + *s++ - '0';
- 25c:	e0800100 	add	r0, r0, r0, lsl #2
- 260:	e0830080 	add	r0, r3, r0, lsl #1
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 264:	e5f23001 	ldrb	r3, [r2, #1]!
-    n = n*10 + *s++ - '0';
- 268:	e2400030 	sub	r0, r0, #48	; 0x30
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 26c:	e2431030 	sub	r1, r3, #48	; 0x30
- 270:	e6ef1071 	uxtb	r1, r1
- 274:	e3510009 	cmp	r1, #9
- 278:	9afffff7 	bls	25c <atoi+0x28>
-    n = n*10 + *s++ - '0';
-  return n;
-}
- 27c:	e28bd000 	add	sp, fp, #0
- 280:	e8bd0800 	pop	{fp}
- 284:	e12fff1e 	bx	lr
-
-00000288 <memmove>:
-{
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 288:	e3520000 	cmp	r2, #0
-  return n;
-}
-
-void*
-memmove(void *vdst, void *vsrc, int n)
-{
- 28c:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 290:	e28db000 	add	fp, sp, #0
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 294:	da000005 	ble	2b0 <memmove+0x28>
-    n = n*10 + *s++ - '0';
-  return n;
-}
-
-void*
-memmove(void *vdst, void *vsrc, int n)
- 298:	e0802002 	add	r2, r0, r2
-{
-  char *dst, *src;
-  
-  dst = vdst;
- 29c:	e1a03000 	mov	r3, r0
-  src = vsrc;
-  while(n-- > 0)
-    *dst++ = *src++;
- 2a0:	e4d1c001 	ldrb	ip, [r1], #1
- 2a4:	e4c3c001 	strb	ip, [r3], #1
-{
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 2a8:	e1530002 	cmp	r3, r2
- 2ac:	1afffffb 	bne	2a0 <memmove+0x18>
-    *dst++ = *src++;
-  return vdst;
-}
- 2b0:	e28bd000 	add	sp, fp, #0
- 2b4:	e8bd0800 	pop	{fp}
- 2b8:	e12fff1e 	bx	lr
-
-000002bc <fork>:
- 2bc:	e92d4000 	push	{lr}
- 2c0:	e92d0008 	push	{r3}
- 2c4:	e92d0004 	push	{r2}
- 2c8:	e92d0002 	push	{r1}
- 2cc:	e92d0001 	push	{r0}
- 2d0:	e3a00001 	mov	r0, #1
- 2d4:	ef000040 	svc	0x00000040
- 2d8:	e8bd0002 	pop	{r1}
- 2dc:	e8bd0002 	pop	{r1}
- 2e0:	e8bd0004 	pop	{r2}
- 2e4:	e8bd0008 	pop	{r3}
- 2e8:	e8bd4000 	pop	{lr}
- 2ec:	e12fff1e 	bx	lr
-
-000002f0 <exit>:
- 2f0:	e92d4000 	push	{lr}
- 2f4:	e92d0008 	push	{r3}
- 2f8:	e92d0004 	push	{r2}
- 2fc:	e92d0002 	push	{r1}
- 300:	e92d0001 	push	{r0}
- 304:	e3a00002 	mov	r0, #2
- 308:	ef000040 	svc	0x00000040
- 30c:	e8bd0002 	pop	{r1}
- 310:	e8bd0002 	pop	{r1}
- 314:	e8bd0004 	pop	{r2}
- 318:	e8bd0008 	pop	{r3}
- 31c:	e8bd4000 	pop	{lr}
- 320:	e12fff1e 	bx	lr
-
-00000324 <wait>:
- 324:	e92d4000 	push	{lr}
- 328:	e92d0008 	push	{r3}
- 32c:	e92d0004 	push	{r2}
- 330:	e92d0002 	push	{r1}
- 334:	e92d0001 	push	{r0}
- 338:	e3a00003 	mov	r0, #3
- 33c:	ef000040 	svc	0x00000040
- 340:	e8bd0002 	pop	{r1}
- 344:	e8bd0002 	pop	{r1}
- 348:	e8bd0004 	pop	{r2}
- 34c:	e8bd0008 	pop	{r3}
- 350:	e8bd4000 	pop	{lr}
- 354:	e12fff1e 	bx	lr
-
-00000358 <pipe>:
- 358:	e92d4000 	push	{lr}
- 35c:	e92d0008 	push	{r3}
- 360:	e92d0004 	push	{r2}
- 364:	e92d0002 	push	{r1}
- 368:	e92d0001 	push	{r0}
- 36c:	e3a00004 	mov	r0, #4
- 370:	ef000040 	svc	0x00000040
- 374:	e8bd0002 	pop	{r1}
- 378:	e8bd0002 	pop	{r1}
- 37c:	e8bd0004 	pop	{r2}
- 380:	e8bd0008 	pop	{r3}
- 384:	e8bd4000 	pop	{lr}
- 388:	e12fff1e 	bx	lr
-
-0000038c <read>:
- 38c:	e92d4000 	push	{lr}
- 390:	e92d0008 	push	{r3}
- 394:	e92d0004 	push	{r2}
- 398:	e92d0002 	push	{r1}
- 39c:	e92d0001 	push	{r0}
- 3a0:	e3a00005 	mov	r0, #5
- 3a4:	ef000040 	svc	0x00000040
- 3a8:	e8bd0002 	pop	{r1}
- 3ac:	e8bd0002 	pop	{r1}
- 3b0:	e8bd0004 	pop	{r2}
- 3b4:	e8bd0008 	pop	{r3}
- 3b8:	e8bd4000 	pop	{lr}
- 3bc:	e12fff1e 	bx	lr
-
-000003c0 <write>:
- 3c0:	e92d4000 	push	{lr}
- 3c4:	e92d0008 	push	{r3}
- 3c8:	e92d0004 	push	{r2}
- 3cc:	e92d0002 	push	{r1}
- 3d0:	e92d0001 	push	{r0}
- 3d4:	e3a00010 	mov	r0, #16
- 3d8:	ef000040 	svc	0x00000040
- 3dc:	e8bd0002 	pop	{r1}
- 3e0:	e8bd0002 	pop	{r1}
- 3e4:	e8bd0004 	pop	{r2}
- 3e8:	e8bd0008 	pop	{r3}
- 3ec:	e8bd4000 	pop	{lr}
- 3f0:	e12fff1e 	bx	lr
-
-000003f4 <close>:
- 3f4:	e92d4000 	push	{lr}
- 3f8:	e92d0008 	push	{r3}
- 3fc:	e92d0004 	push	{r2}
- 400:	e92d0002 	push	{r1}
- 404:	e92d0001 	push	{r0}
- 408:	e3a00015 	mov	r0, #21
- 40c:	ef000040 	svc	0x00000040
- 410:	e8bd0002 	pop	{r1}
- 414:	e8bd0002 	pop	{r1}
- 418:	e8bd0004 	pop	{r2}
- 41c:	e8bd0008 	pop	{r3}
- 420:	e8bd4000 	pop	{lr}
- 424:	e12fff1e 	bx	lr
-
-00000428 <kill>:
- 428:	e92d4000 	push	{lr}
- 42c:	e92d0008 	push	{r3}
- 430:	e92d0004 	push	{r2}
- 434:	e92d0002 	push	{r1}
- 438:	e92d0001 	push	{r0}
- 43c:	e3a00006 	mov	r0, #6
- 440:	ef000040 	svc	0x00000040
- 444:	e8bd0002 	pop	{r1}
- 448:	e8bd0002 	pop	{r1}
- 44c:	e8bd0004 	pop	{r2}
- 450:	e8bd0008 	pop	{r3}
- 454:	e8bd4000 	pop	{lr}
- 458:	e12fff1e 	bx	lr
-
-0000045c <exec>:
- 45c:	e92d4000 	push	{lr}
- 460:	e92d0008 	push	{r3}
- 464:	e92d0004 	push	{r2}
- 468:	e92d0002 	push	{r1}
- 46c:	e92d0001 	push	{r0}
- 470:	e3a00007 	mov	r0, #7
- 474:	ef000040 	svc	0x00000040
- 478:	e8bd0002 	pop	{r1}
- 47c:	e8bd0002 	pop	{r1}
- 480:	e8bd0004 	pop	{r2}
- 484:	e8bd0008 	pop	{r3}
- 488:	e8bd4000 	pop	{lr}
- 48c:	e12fff1e 	bx	lr
-
-00000490 <open>:
- 490:	e92d4000 	push	{lr}
- 494:	e92d0008 	push	{r3}
- 498:	e92d0004 	push	{r2}
- 49c:	e92d0002 	push	{r1}
- 4a0:	e92d0001 	push	{r0}
- 4a4:	e3a0000f 	mov	r0, #15
- 4a8:	ef000040 	svc	0x00000040
- 4ac:	e8bd0002 	pop	{r1}
- 4b0:	e8bd0002 	pop	{r1}
- 4b4:	e8bd0004 	pop	{r2}
- 4b8:	e8bd0008 	pop	{r3}
- 4bc:	e8bd4000 	pop	{lr}
- 4c0:	e12fff1e 	bx	lr
-
-000004c4 <mknod>:
- 4c4:	e92d4000 	push	{lr}
- 4c8:	e92d0008 	push	{r3}
- 4cc:	e92d0004 	push	{r2}
- 4d0:	e92d0002 	push	{r1}
- 4d4:	e92d0001 	push	{r0}
- 4d8:	e3a00011 	mov	r0, #17
- 4dc:	ef000040 	svc	0x00000040
- 4e0:	e8bd0002 	pop	{r1}
- 4e4:	e8bd0002 	pop	{r1}
- 4e8:	e8bd0004 	pop	{r2}
- 4ec:	e8bd0008 	pop	{r3}
- 4f0:	e8bd4000 	pop	{lr}
- 4f4:	e12fff1e 	bx	lr
-
-000004f8 <unlink>:
- 4f8:	e92d4000 	push	{lr}
- 4fc:	e92d0008 	push	{r3}
- 500:	e92d0004 	push	{r2}
- 504:	e92d0002 	push	{r1}
- 508:	e92d0001 	push	{r0}
- 50c:	e3a00012 	mov	r0, #18
- 510:	ef000040 	svc	0x00000040
- 514:	e8bd0002 	pop	{r1}
- 518:	e8bd0002 	pop	{r1}
- 51c:	e8bd0004 	pop	{r2}
- 520:	e8bd0008 	pop	{r3}
- 524:	e8bd4000 	pop	{lr}
- 528:	e12fff1e 	bx	lr
-
-0000052c <fstat>:
- 52c:	e92d4000 	push	{lr}
- 530:	e92d0008 	push	{r3}
- 534:	e92d0004 	push	{r2}
- 538:	e92d0002 	push	{r1}
- 53c:	e92d0001 	push	{r0}
- 540:	e3a00008 	mov	r0, #8
- 544:	ef000040 	svc	0x00000040
- 548:	e8bd0002 	pop	{r1}
- 54c:	e8bd0002 	pop	{r1}
- 550:	e8bd0004 	pop	{r2}
- 554:	e8bd0008 	pop	{r3}
- 558:	e8bd4000 	pop	{lr}
- 55c:	e12fff1e 	bx	lr
-
-00000560 <link>:
- 560:	e92d4000 	push	{lr}
- 564:	e92d0008 	push	{r3}
- 568:	e92d0004 	push	{r2}
- 56c:	e92d0002 	push	{r1}
- 570:	e92d0001 	push	{r0}
- 574:	e3a00013 	mov	r0, #19
- 578:	ef000040 	svc	0x00000040
- 57c:	e8bd0002 	pop	{r1}
- 580:	e8bd0002 	pop	{r1}
- 584:	e8bd0004 	pop	{r2}
- 588:	e8bd0008 	pop	{r3}
- 58c:	e8bd4000 	pop	{lr}
- 590:	e12fff1e 	bx	lr
-
-00000594 <mkdir>:
- 594:	e92d4000 	push	{lr}
- 598:	e92d0008 	push	{r3}
- 59c:	e92d0004 	push	{r2}
- 5a0:	e92d0002 	push	{r1}
- 5a4:	e92d0001 	push	{r0}
- 5a8:	e3a00014 	mov	r0, #20
- 5ac:	ef000040 	svc	0x00000040
- 5b0:	e8bd0002 	pop	{r1}
- 5b4:	e8bd0002 	pop	{r1}
- 5b8:	e8bd0004 	pop	{r2}
- 5bc:	e8bd0008 	pop	{r3}
- 5c0:	e8bd4000 	pop	{lr}
- 5c4:	e12fff1e 	bx	lr
-
-000005c8 <chdir>:
- 5c8:	e92d4000 	push	{lr}
- 5cc:	e92d0008 	push	{r3}
- 5d0:	e92d0004 	push	{r2}
- 5d4:	e92d0002 	push	{r1}
- 5d8:	e92d0001 	push	{r0}
- 5dc:	e3a00009 	mov	r0, #9
- 5e0:	ef000040 	svc	0x00000040
- 5e4:	e8bd0002 	pop	{r1}
- 5e8:	e8bd0002 	pop	{r1}
- 5ec:	e8bd0004 	pop	{r2}
- 5f0:	e8bd0008 	pop	{r3}
- 5f4:	e8bd4000 	pop	{lr}
- 5f8:	e12fff1e 	bx	lr
-
-000005fc <dup>:
- 5fc:	e92d4000 	push	{lr}
- 600:	e92d0008 	push	{r3}
- 604:	e92d0004 	push	{r2}
- 608:	e92d0002 	push	{r1}
- 60c:	e92d0001 	push	{r0}
- 610:	e3a0000a 	mov	r0, #10
- 614:	ef000040 	svc	0x00000040
- 618:	e8bd0002 	pop	{r1}
- 61c:	e8bd0002 	pop	{r1}
- 620:	e8bd0004 	pop	{r2}
- 624:	e8bd0008 	pop	{r3}
- 628:	e8bd4000 	pop	{lr}
- 62c:	e12fff1e 	bx	lr
-
-00000630 <getpid>:
- 630:	e92d4000 	push	{lr}
- 634:	e92d0008 	push	{r3}
- 638:	e92d0004 	push	{r2}
- 63c:	e92d0002 	push	{r1}
- 640:	e92d0001 	push	{r0}
- 644:	e3a0000b 	mov	r0, #11
- 648:	ef000040 	svc	0x00000040
- 64c:	e8bd0002 	pop	{r1}
- 650:	e8bd0002 	pop	{r1}
- 654:	e8bd0004 	pop	{r2}
- 658:	e8bd0008 	pop	{r3}
- 65c:	e8bd4000 	pop	{lr}
- 660:	e12fff1e 	bx	lr
-
-00000664 <sbrk>:
- 664:	e92d4000 	push	{lr}
- 668:	e92d0008 	push	{r3}
- 66c:	e92d0004 	push	{r2}
- 670:	e92d0002 	push	{r1}
- 674:	e92d0001 	push	{r0}
- 678:	e3a0000c 	mov	r0, #12
- 67c:	ef000040 	svc	0x00000040
- 680:	e8bd0002 	pop	{r1}
- 684:	e8bd0002 	pop	{r1}
- 688:	e8bd0004 	pop	{r2}
- 68c:	e8bd0008 	pop	{r3}
- 690:	e8bd4000 	pop	{lr}
- 694:	e12fff1e 	bx	lr
-
-00000698 <sleep>:
- 698:	e92d4000 	push	{lr}
- 69c:	e92d0008 	push	{r3}
- 6a0:	e92d0004 	push	{r2}
- 6a4:	e92d0002 	push	{r1}
- 6a8:	e92d0001 	push	{r0}
- 6ac:	e3a0000d 	mov	r0, #13
- 6b0:	ef000040 	svc	0x00000040
- 6b4:	e8bd0002 	pop	{r1}
- 6b8:	e8bd0002 	pop	{r1}
- 6bc:	e8bd0004 	pop	{r2}
- 6c0:	e8bd0008 	pop	{r3}
- 6c4:	e8bd4000 	pop	{lr}
- 6c8:	e12fff1e 	bx	lr
-
-000006cc <uptime>:
- 6cc:	e92d4000 	push	{lr}
- 6d0:	e92d0008 	push	{r3}
- 6d4:	e92d0004 	push	{r2}
- 6d8:	e92d0002 	push	{r1}
- 6dc:	e92d0001 	push	{r0}
- 6e0:	e3a0000e 	mov	r0, #14
- 6e4:	ef000040 	svc	0x00000040
- 6e8:	e8bd0002 	pop	{r1}
- 6ec:	e8bd0002 	pop	{r1}
- 6f0:	e8bd0004 	pop	{r2}
- 6f4:	e8bd0008 	pop	{r3}
- 6f8:	e8bd4000 	pop	{lr}
- 6fc:	e12fff1e 	bx	lr
-
-00000700 <putc>:
-#include "stat.h"
-#include "user.h"
-
-static void
-putc(int fd, char c)
-{
- 700:	e92d4800 	push	{fp, lr}
- 704:	e28db004 	add	fp, sp, #4
- 708:	e24b3004 	sub	r3, fp, #4
- 70c:	e24dd008 	sub	sp, sp, #8
-  write(fd, &c, 1);
- 710:	e3a02001 	mov	r2, #1
-#include "stat.h"
-#include "user.h"
-
-static void
-putc(int fd, char c)
-{
- 714:	e5631001 	strb	r1, [r3, #-1]!
-  write(fd, &c, 1);
- 718:	e1a01003 	mov	r1, r3
- 71c:	ebffff27 	bl	3c0 <write>
-}
- 720:	e24bd004 	sub	sp, fp, #4
- 724:	e8bd8800 	pop	{fp, pc}
-
-00000728 <printint>:
-    return q;
-}
-
-static void
-printint(int fd, int xx, int base, int sgn)
-{
- 728:	e92d4ff0 	push	{r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 72c:	e1a04000 	mov	r4, r0
-  char buf[16];
-  int i, neg;
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
- 730:	e1a00fa1 	lsr	r0, r1, #31
- 734:	e3530000 	cmp	r3, #0
- 738:	03a03000 	moveq	r3, #0
- 73c:	12003001 	andne	r3, r0, #1
-    return q;
-}
-
-static void
-printint(int fd, int xx, int base, int sgn)
-{
- 740:	e28db020 	add	fp, sp, #32
-  char buf[16];
-  int i, neg;
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
- 744:	e3530000 	cmp	r3, #0
-    return q;
-}
-
-static void
-printint(int fd, int xx, int base, int sgn)
-{
- 748:	e24dd014 	sub	sp, sp, #20
- 74c:	e59f909c 	ldr	r9, [pc, #156]	; 7f0 <printint+0xc8>
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
-    neg = 1;
-    x = -xx;
- 750:	12611000 	rsbne	r1, r1, #0
-  int i, neg;
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
-    neg = 1;
- 754:	13a03001 	movne	r3, #1
-  } else {
-    x = xx;
-  }
-
-  b = base;
-  i = 0;
- 758:	e3a0a000 	mov	sl, #0
- 75c:	e24b6034 	sub	r6, fp, #52	; 0x34
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
-            q = q | (1 << i);
- 760:	e3a08001 	mov	r8, #1
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- 764:	e3a07000 	mov	r7, #0
-    int i;
-
-    for(i=31;i>=0;i--){
- 768:	e3a0001f 	mov	r0, #31
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- 76c:	e1a0c007 	mov	ip, r7
-    int i;
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
- 770:	e1a0e031 	lsr	lr, r1, r0
- 774:	e20ee001 	and	lr, lr, #1
- 778:	e18ec08c 	orr	ip, lr, ip, lsl #1
-        if(r >= d) {
- 77c:	e152000c 	cmp	r2, ip
-            r = r - d;
-            q = q | (1 << i);
- 780:	91877018 	orrls	r7, r7, r8, lsl r0
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
- 784:	9062c00c 	rsbls	ip, r2, ip
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
- 788:	e2500001 	subs	r0, r0, #1
- 78c:	2afffff7 	bcs	770 <printint+0x48>
-
-  b = base;
-  i = 0;
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
- 790:	e0000792 	mul	r0, r2, r7
-  }while((x = y) != 0);
- 794:	e3570000 	cmp	r7, #0
-
-  b = base;
-  i = 0;
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
- 798:	e0601001 	rsb	r1, r0, r1
- 79c:	e28a5001 	add	r5, sl, #1
- 7a0:	e7d91001 	ldrb	r1, [r9, r1]
- 7a4:	e7c6100a 	strb	r1, [r6, sl]
-  }while((x = y) != 0);
- 7a8:	11a01007 	movne	r1, r7
-
-  b = base;
-  i = 0;
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
- 7ac:	11a0a005 	movne	sl, r5
- 7b0:	1affffeb 	bne	764 <printint+0x3c>
-  }while((x = y) != 0);
-  if(neg)
- 7b4:	e3530000 	cmp	r3, #0
-    buf[i++] = '-';
- 7b8:	124b2024 	subne	r2, fp, #36	; 0x24
- 7bc:	10823005 	addne	r3, r2, r5
- 7c0:	128a5002 	addne	r5, sl, #2
-
-  while(--i >= 0)
- 7c4:	e2455001 	sub	r5, r5, #1
-  do{
-    y = div(x, b);
-    buf[i++] = digits[x - y * b];
-  }while((x = y) != 0);
-  if(neg)
-    buf[i++] = '-';
- 7c8:	13a0202d 	movne	r2, #45	; 0x2d
- 7cc:	15432010 	strbne	r2, [r3, #-16]
-
-  while(--i >= 0)
-    putc(fd, buf[i]);
- 7d0:	e7d61005 	ldrb	r1, [r6, r5]
- 7d4:	e1a00004 	mov	r0, r4
-    buf[i++] = digits[x - y * b];
-  }while((x = y) != 0);
-  if(neg)
-    buf[i++] = '-';
-
-  while(--i >= 0)
- 7d8:	e2455001 	sub	r5, r5, #1
-    putc(fd, buf[i]);
- 7dc:	ebffffc7 	bl	700 <putc>
-    buf[i++] = digits[x - y * b];
-  }while((x = y) != 0);
-  if(neg)
-    buf[i++] = '-';
-
-  while(--i >= 0)
- 7e0:	e3750001 	cmn	r5, #1
- 7e4:	1afffff9 	bne	7d0 <printint+0xa8>
-    putc(fd, buf[i]);
-}
- 7e8:	e24bd020 	sub	sp, fp, #32
- 7ec:	e8bd8ff0 	pop	{r4, r5, r6, r7, r8, r9, sl, fp, pc}
- 7f0:	00000b38 	.word	0x00000b38
-
-000007f4 <div>:
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- 7f4:	e3a03000 	mov	r3, #0
-{
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
- 7f8:	e92d0830 	push	{r4, r5, fp}
- 7fc:	e1a02000 	mov	r2, r0
- 800:	e28db008 	add	fp, sp, #8
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
- 804:	e3a0c01f 	mov	ip, #31
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- 808:	e1a00003 	mov	r0, r3
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
-            q = q | (1 << i);
- 80c:	e3a05001 	mov	r5, #1
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
- 810:	e1a04c32 	lsr	r4, r2, ip
- 814:	e2044001 	and	r4, r4, #1
- 818:	e1843083 	orr	r3, r4, r3, lsl #1
-        if(r >= d) {
- 81c:	e1530001 	cmp	r3, r1
-            r = r - d;
-            q = q | (1 << i);
- 820:	21800c15 	orrcs	r0, r0, r5, lsl ip
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
- 824:	20613003 	rsbcs	r3, r1, r3
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
- 828:	e25cc001 	subs	ip, ip, #1
- 82c:	2afffff7 	bcs	810 <div+0x1c>
-            r = r - d;
-            q = q | (1 << i);
-        }
-    }
-    return q;
-}
- 830:	e24bd008 	sub	sp, fp, #8
- 834:	e8bd0830 	pop	{r4, r5, fp}
- 838:	e12fff1e 	bx	lr
-
-0000083c <printf>:
-}
-
-// Print to the given fd. Only understands %d, %x, %p, %s.
-void
-printf(int fd, char *fmt, ...)
-{
- 83c:	e92d000e 	push	{r1, r2, r3}
- 840:	e92d4ff0 	push	{r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 844:	e28db020 	add	fp, sp, #32
- 848:	e1a05000 	mov	r5, r0
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- 84c:	e59b4004 	ldr	r4, [fp, #4]
- 850:	e5d48000 	ldrb	r8, [r4]
- 854:	e3580000 	cmp	r8, #0
- 858:	0a000027 	beq	8fc <printf+0xc0>
-        ap++;
-      } else if(c == 's'){
-        s = (char*)*ap;
-        ap++;
-        if(s == 0)
-          s = "(null)";
- 85c:	e59f712c 	ldr	r7, [pc, #300]	; 990 <printf+0x154>
-  char *s;
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
- 860:	e28b6008 	add	r6, fp, #8
-{
-  char *s;
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
- 864:	e3a0a000 	mov	sl, #0
- 868:	ea000008 	b	890 <printf+0x54>
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
-    c = fmt[i] & 0xff;
-    if(state == 0){
-      if(c == '%'){
- 86c:	e3580025 	cmp	r8, #37	; 0x25
-        state = '%';
- 870:	01a0a008 	moveq	sl, r8
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
-    c = fmt[i] & 0xff;
-    if(state == 0){
-      if(c == '%'){
- 874:	0a000002 	beq	884 <printf+0x48>
-        state = '%';
-      } else {
-        putc(fd, c);
- 878:	e1a00005 	mov	r0, r5
- 87c:	e1a01008 	mov	r1, r8
- 880:	ebffff9e 	bl	700 <putc>
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- 884:	e5f48001 	ldrb	r8, [r4, #1]!
- 888:	e3580000 	cmp	r8, #0
- 88c:	0a00001a 	beq	8fc <printf+0xc0>
-    c = fmt[i] & 0xff;
-    if(state == 0){
- 890:	e35a0000 	cmp	sl, #0
- 894:	0afffff4 	beq	86c <printf+0x30>
-      if(c == '%'){
-        state = '%';
-      } else {
-        putc(fd, c);
-      }
-    } else if(state == '%'){
- 898:	e35a0025 	cmp	sl, #37	; 0x25
- 89c:	1afffff8 	bne	884 <printf+0x48>
-      if(c == 'd'){
- 8a0:	e3580064 	cmp	r8, #100	; 0x64
- 8a4:	0a00002c 	beq	95c <printf+0x120>
-        printint(fd, *ap, 10, 1);
-        ap++;
-      } else if(c == 'x' || c == 'p'){
- 8a8:	e3580078 	cmp	r8, #120	; 0x78
- 8ac:	13580070 	cmpne	r8, #112	; 0x70
- 8b0:	13a09000 	movne	r9, #0
- 8b4:	03a09001 	moveq	r9, #1
- 8b8:	0a000013 	beq	90c <printf+0xd0>
-        printint(fd, *ap, 16, 0);
-        ap++;
-      } else if(c == 's'){
- 8bc:	e3580073 	cmp	r8, #115	; 0x73
- 8c0:	0a000018 	beq	928 <printf+0xec>
-          s = "(null)";
-        while(*s != 0){
-          putc(fd, *s);
-          s++;
-        }
-      } else if(c == 'c'){
- 8c4:	e3580063 	cmp	r8, #99	; 0x63
- 8c8:	0a00002a 	beq	978 <printf+0x13c>
-        putc(fd, *ap);
-        ap++;
-      } else if(c == '%'){
- 8cc:	e3580025 	cmp	r8, #37	; 0x25
-        putc(fd, c);
- 8d0:	e1a0100a 	mov	r1, sl
- 8d4:	e1a00005 	mov	r0, r5
-          s++;
-        }
-      } else if(c == 'c'){
-        putc(fd, *ap);
-        ap++;
-      } else if(c == '%'){
- 8d8:	0a000002 	beq	8e8 <printf+0xac>
-        putc(fd, c);
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
- 8dc:	ebffff87 	bl	700 <putc>
-        putc(fd, c);
- 8e0:	e1a00005 	mov	r0, r5
- 8e4:	e1a01008 	mov	r1, r8
- 8e8:	ebffff84 	bl	700 <putc>
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- 8ec:	e5f48001 	ldrb	r8, [r4, #1]!
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- 8f0:	e1a0a009 	mov	sl, r9
-  int c, i, state;
-  uint *ap;
-
-  state = 0;
-  ap = (uint*)(void*)&fmt + 1;
-  for(i = 0; fmt[i]; i++){
- 8f4:	e3580000 	cmp	r8, #0
- 8f8:	1affffe4 	bne	890 <printf+0x54>
-        putc(fd, c);
-      }
-      state = 0;
-    }
-  }
-}
- 8fc:	e24bd020 	sub	sp, fp, #32
- 900:	e8bd4ff0 	pop	{r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 904:	e28dd00c 	add	sp, sp, #12
- 908:	e12fff1e 	bx	lr
-    } else if(state == '%'){
-      if(c == 'd'){
-        printint(fd, *ap, 10, 1);
-        ap++;
-      } else if(c == 'x' || c == 'p'){
-        printint(fd, *ap, 16, 0);
- 90c:	e1a00005 	mov	r0, r5
- 910:	e4961004 	ldr	r1, [r6], #4
- 914:	e3a02010 	mov	r2, #16
- 918:	e3a03000 	mov	r3, #0
- 91c:	ebffff81 	bl	728 <printint>
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- 920:	e3a0a000 	mov	sl, #0
- 924:	eaffffd6 	b	884 <printf+0x48>
-        ap++;
-      } else if(c == 'x' || c == 'p'){
-        printint(fd, *ap, 16, 0);
-        ap++;
-      } else if(c == 's'){
-        s = (char*)*ap;
- 928:	e4968004 	ldr	r8, [r6], #4
-        ap++;
-        if(s == 0)
-          s = "(null)";
- 92c:	e3580000 	cmp	r8, #0
- 930:	01a08007 	moveq	r8, r7
-        while(*s != 0){
- 934:	e5d81000 	ldrb	r1, [r8]
- 938:	e3510000 	cmp	r1, #0
- 93c:	0a000004 	beq	954 <printf+0x118>
-          putc(fd, *s);
- 940:	e1a00005 	mov	r0, r5
- 944:	ebffff6d 	bl	700 <putc>
-      } else if(c == 's'){
-        s = (char*)*ap;
-        ap++;
-        if(s == 0)
-          s = "(null)";
-        while(*s != 0){
- 948:	e5f81001 	ldrb	r1, [r8, #1]!
- 94c:	e3510000 	cmp	r1, #0
- 950:	1afffffa 	bne	940 <printf+0x104>
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- 954:	e1a0a001 	mov	sl, r1
- 958:	eaffffc9 	b	884 <printf+0x48>
-      } else {
-        putc(fd, c);
-      }
-    } else if(state == '%'){
-      if(c == 'd'){
-        printint(fd, *ap, 10, 1);
- 95c:	e1a00005 	mov	r0, r5
- 960:	e4961004 	ldr	r1, [r6], #4
- 964:	e3a0200a 	mov	r2, #10
- 968:	e3a03001 	mov	r3, #1
- 96c:	ebffff6d 	bl	728 <printint>
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- 970:	e3a0a000 	mov	sl, #0
- 974:	eaffffc2 	b	884 <printf+0x48>
-        while(*s != 0){
-          putc(fd, *s);
-          s++;
-        }
-      } else if(c == 'c'){
-        putc(fd, *ap);
- 978:	e4961004 	ldr	r1, [r6], #4
- 97c:	e1a00005 	mov	r0, r5
-      } else {
-        // Unknown % sequence.  Print it to draw attention.
-        putc(fd, '%');
-        putc(fd, c);
-      }
-      state = 0;
- 980:	e1a0a009 	mov	sl, r9
-        while(*s != 0){
-          putc(fd, *s);
-          s++;
-        }
-      } else if(c == 'c'){
-        putc(fd, *ap);
- 984:	e6ef1071 	uxtb	r1, r1
- 988:	ebffff5c 	bl	700 <putc>
- 98c:	eaffffbc 	b	884 <printf+0x48>
- 990:	00000b4c 	.word	0x00000b4c
-
-00000994 <free>:
-free(void *ap)
-{
-  Header *bp, *p;
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
- 994:	e59f3098 	ldr	r3, [pc, #152]	; a34 <free+0xa0>
-static Header base;
-static Header *freep;
-
-void
-free(void *ap)
-{
- 998:	e92d0830 	push	{r4, r5, fp}
-  Header *bp, *p;
-
-  bp = (Header*)ap - 1;
- 99c:	e240c008 	sub	ip, r0, #8
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
- 9a0:	e5932000 	ldr	r2, [r3]
-static Header base;
-static Header *freep;
-
-void
-free(void *ap)
-{
- 9a4:	e28db008 	add	fp, sp, #8
-  Header *bp, *p;
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
- 9a8:	e152000c 	cmp	r2, ip
- 9ac:	e5921000 	ldr	r1, [r2]
- 9b0:	2a000001 	bcs	9bc <free+0x28>
- 9b4:	e15c0001 	cmp	ip, r1
- 9b8:	3a000007 	bcc	9dc <free+0x48>
-    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
- 9bc:	e1520001 	cmp	r2, r1
- 9c0:	3a000003 	bcc	9d4 <free+0x40>
- 9c4:	e152000c 	cmp	r2, ip
- 9c8:	3a000003 	bcc	9dc <free+0x48>
- 9cc:	e15c0001 	cmp	ip, r1
- 9d0:	3a000001 	bcc	9dc <free+0x48>
-static Header base;
-static Header *freep;
-
-void
-free(void *ap)
-{
- 9d4:	e1a02001 	mov	r2, r1
- 9d8:	eafffff2 	b	9a8 <free+0x14>
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
-    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
-      break;
-  if(bp + bp->s.size == p->s.ptr){
- 9dc:	e5104004 	ldr	r4, [r0, #-4]
-  if(p + p->s.size == bp){
-    p->s.size += bp->s.size;
-    p->s.ptr = bp->s.ptr;
-  } else
-    p->s.ptr = bp;
-  freep = p;
- 9e0:	e5832000 	str	r2, [r3]
-
-  bp = (Header*)ap - 1;
-  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
-    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
-      break;
-  if(bp + bp->s.size == p->s.ptr){
- 9e4:	e08c5184 	add	r5, ip, r4, lsl #3
- 9e8:	e1550001 	cmp	r5, r1
-    bp->s.size += p->s.ptr->s.size;
- 9ec:	05911004 	ldreq	r1, [r1, #4]
- 9f0:	00814004 	addeq	r4, r1, r4
- 9f4:	05004004 	streq	r4, [r0, #-4]
-    bp->s.ptr = p->s.ptr->s.ptr;
- 9f8:	05921000 	ldreq	r1, [r2]
- 9fc:	05911000 	ldreq	r1, [r1]
-  } else
-    bp->s.ptr = p->s.ptr;
- a00:	e5001008 	str	r1, [r0, #-8]
-  if(p + p->s.size == bp){
- a04:	e5921004 	ldr	r1, [r2, #4]
- a08:	e0824181 	add	r4, r2, r1, lsl #3
- a0c:	e15c0004 	cmp	ip, r4
-    p->s.size += bp->s.size;
-    p->s.ptr = bp->s.ptr;
-  } else
-    p->s.ptr = bp;
- a10:	1582c000 	strne	ip, [r2]
-    bp->s.size += p->s.ptr->s.size;
-    bp->s.ptr = p->s.ptr->s.ptr;
-  } else
-    bp->s.ptr = p->s.ptr;
-  if(p + p->s.size == bp){
-    p->s.size += bp->s.size;
- a14:	0510c004 	ldreq	ip, [r0, #-4]
- a18:	008c1001 	addeq	r1, ip, r1
- a1c:	05821004 	streq	r1, [r2, #4]
-    p->s.ptr = bp->s.ptr;
- a20:	05101008 	ldreq	r1, [r0, #-8]
- a24:	05821000 	streq	r1, [r2]
-  } else
-    p->s.ptr = bp;
-  freep = p;
-}
- a28:	e24bd008 	sub	sp, fp, #8
- a2c:	e8bd0830 	pop	{r4, r5, fp}
- a30:	e12fff1e 	bx	lr
- a34:	00000b54 	.word	0x00000b54
-
-00000a38 <malloc>:
-  return freep;
-}
-
-void*
-malloc(uint nbytes)
-{
- a38:	e92d49f8 	push	{r3, r4, r5, r6, r7, r8, fp, lr}
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
- a3c:	e2804007 	add	r4, r0, #7
-  if((prevp = freep) == 0){
- a40:	e59f50d4 	ldr	r5, [pc, #212]	; b1c <malloc+0xe4>
-malloc(uint nbytes)
-{
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
- a44:	e1a041a4 	lsr	r4, r4, #3
-  return freep;
-}
-
-void*
-malloc(uint nbytes)
-{
- a48:	e28db01c 	add	fp, sp, #28
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
-  if((prevp = freep) == 0){
- a4c:	e5953000 	ldr	r3, [r5]
-malloc(uint nbytes)
-{
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
- a50:	e2844001 	add	r4, r4, #1
-  if((prevp = freep) == 0){
- a54:	e3530000 	cmp	r3, #0
- a58:	0a00002b 	beq	b0c <malloc+0xd4>
- a5c:	e5930000 	ldr	r0, [r3]
- a60:	e5902004 	ldr	r2, [r0, #4]
-    base.s.ptr = freep = prevp = &base;
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
- a64:	e1520004 	cmp	r2, r4
- a68:	2a00001b 	bcs	adc <malloc+0xa4>
-morecore(uint nu)
-{
-  char *p;
-  Header *hp;
-
-  if(nu < 4096)
- a6c:	e59f80ac 	ldr	r8, [pc, #172]	; b20 <malloc+0xe8>
-        p->s.size -= nunits;
-        p += p->s.size;
-        p->s.size = nunits;
-      }
-      freep = prevp;
-      return (void*)(p + 1);
- a70:	e1a07184 	lsl	r7, r4, #3
- a74:	ea000003 	b	a88 <malloc+0x50>
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
-  if((prevp = freep) == 0){
-    base.s.ptr = freep = prevp = &base;
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
- a78:	e5930000 	ldr	r0, [r3]
-    if(p->s.size >= nunits){
- a7c:	e5902004 	ldr	r2, [r0, #4]
- a80:	e1540002 	cmp	r4, r2
- a84:	9a000014 	bls	adc <malloc+0xa4>
-        p->s.size = nunits;
-      }
-      freep = prevp;
-      return (void*)(p + 1);
-    }
-    if(p == freep)
- a88:	e5952000 	ldr	r2, [r5]
- a8c:	e1a03000 	mov	r3, r0
- a90:	e1500002 	cmp	r0, r2
- a94:	1afffff7 	bne	a78 <malloc+0x40>
-morecore(uint nu)
-{
-  char *p;
-  Header *hp;
-
-  if(nu < 4096)
- a98:	e1540008 	cmp	r4, r8
-    nu = 4096;
-  p = sbrk(nu * sizeof(Header));
- a9c:	81a00007 	movhi	r0, r7
- aa0:	93a00902 	movls	r0, #32768	; 0x8000
-morecore(uint nu)
-{
-  char *p;
-  Header *hp;
-
-  if(nu < 4096)
- aa4:	81a06004 	movhi	r6, r4
- aa8:	93a06a01 	movls	r6, #4096	; 0x1000
-    nu = 4096;
-  p = sbrk(nu * sizeof(Header));
- aac:	ebfffeec 	bl	664 <sbrk>
- ab0:	e1a03000 	mov	r3, r0
-  if(p == (char*)-1)
- ab4:	e3730001 	cmn	r3, #1
-    return 0;
-  hp = (Header*)p;
-  hp->s.size = nu;
-  free((void*)(hp + 1));
- ab8:	e2800008 	add	r0, r0, #8
-  Header *hp;
-
-  if(nu < 4096)
-    nu = 4096;
-  p = sbrk(nu * sizeof(Header));
-  if(p == (char*)-1)
- abc:	0a000010 	beq	b04 <malloc+0xcc>
-    return 0;
-  hp = (Header*)p;
-  hp->s.size = nu;
- ac0:	e5836004 	str	r6, [r3, #4]
-  free((void*)(hp + 1));
- ac4:	ebffffb2 	bl	994 <free>
-  return freep;
- ac8:	e5953000 	ldr	r3, [r5]
-      }
-      freep = prevp;
-      return (void*)(p + 1);
-    }
-    if(p == freep)
-      if((p = morecore(nunits)) == 0)
- acc:	e3530000 	cmp	r3, #0
- ad0:	1affffe8 	bne	a78 <malloc+0x40>
-        return 0;
- ad4:	e1a00003 	mov	r0, r3
-  }
-}
- ad8:	e8bd89f8 	pop	{r3, r4, r5, r6, r7, r8, fp, pc}
-    base.s.ptr = freep = prevp = &base;
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
-      if(p->s.size == nunits)
- adc:	e1540002 	cmp	r4, r2
-        prevp->s.ptr = p->s.ptr;
-      else {
-        p->s.size -= nunits;
- ae0:	10642002 	rsbne	r2, r4, r2
- ae4:	15802004 	strne	r2, [r0, #4]
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
-      if(p->s.size == nunits)
-        prevp->s.ptr = p->s.ptr;
- ae8:	05902000 	ldreq	r2, [r0]
-      else {
-        p->s.size -= nunits;
-        p += p->s.size;
- aec:	10800182 	addne	r0, r0, r2, lsl #3
-    base.s.size = 0;
-  }
-  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
-    if(p->s.size >= nunits){
-      if(p->s.size == nunits)
-        prevp->s.ptr = p->s.ptr;
- af0:	05832000 	streq	r2, [r3]
-      else {
-        p->s.size -= nunits;
-        p += p->s.size;
-        p->s.size = nunits;
- af4:	15804004 	strne	r4, [r0, #4]
-      }
-      freep = prevp;
- af8:	e5853000 	str	r3, [r5]
-      return (void*)(p + 1);
- afc:	e2800008 	add	r0, r0, #8
- b00:	e8bd89f8 	pop	{r3, r4, r5, r6, r7, r8, fp, pc}
-    }
-    if(p == freep)
-      if((p = morecore(nunits)) == 0)
-        return 0;
- b04:	e3a00000 	mov	r0, #0
- b08:	e8bd89f8 	pop	{r3, r4, r5, r6, r7, r8, fp, pc}
-  Header *p, *prevp;
-  uint nunits;
-
-  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
-  if((prevp = freep) == 0){
-    base.s.ptr = freep = prevp = &base;
- b0c:	e2850004 	add	r0, r5, #4
- b10:	e5850000 	str	r0, [r5]
-    base.s.size = 0;
- b14:	e9850009 	stmib	r5, {r0, r3}
- b18:	eaffffd3 	b	a6c <malloc+0x34>
- b1c:	00000b54 	.word	0x00000b54
- b20:	00000fff 	.word	0x00000fff
--- a/uprogs/kill.sym	Sun Oct 22 18:51:04 2017 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-00000000 .text
-00000b24 .rodata
-00000b54 .bss
-00000000 .comment
-00000000 .ARM.attributes
-00000000 .debug_aranges
-00000000 .debug_info
-00000000 .debug_abbrev
-00000000 .debug_line
-00000000 .debug_frame
-00000000 .debug_str
-00000000 .debug_loc
-00000000 .debug_ranges
-00000000 kill.c
-00000000 ulib.c
-00000000 printf.c
-00000700 putc
-00000728 printint
-00000b38 digits.993
-00000000 umalloc.c
-00000b54 freep
-00000b58 base
-00000050 strcpy
-0000083c printf
-00000288 memmove
-000004c4 mknod
-00000b60 _bss_end__
-00000180 gets
-00000630 getpid
-00000a38 malloc
-00000698 sleep
-00000b54 __bss_start__
-00000358 pipe
-000003c0 write
-0000052c fstat
-00000428 kill
-000005c8 chdir
-0000045c exec
-00000b60 __bss_end__
-00000324 wait
-0000038c read
-000004f8 unlink
-000002bc fork
-00000664 sbrk
-000006cc uptime
-00000b54 __bss_start
-00000104 memset
-00000000 main
-00000b60 __end__
-00000078 strcmp
-000005fc dup
-000001f8 stat
-00000b54 _edata
-00000b60 _end
-00000560 link
-000002f0 exit
-00000234 atoi
-000000c4 strlen
-00000490 open
-000007f4 div
-0000013c strchr
-00000594 mkdir
-000003f4 close
-00000994 free
--- a/uprogs/ln.asm	Sun Oct 22 18:51:04 2017 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1668 +0,0 @@
-
-_ln:     file format elf32-littlearm
-
-
-Disassembly of section .text:
-
-00000000 <main>:
-#include "user.h"
-
-int
-main(int argc, char *argv[])
-{
-  if(argc != 3){
-   0:	e3500003 	cmp	r0, #3
-#include "stat.h"
-#include "user.h"
-
-int
-main(int argc, char *argv[])
-{
-   4:	e92d4818 	push	{r3, r4, fp, lr}
-   8:	e1a04001 	mov	r4, r1
-   c:	e28db00c 	add	fp, sp, #12
-  if(argc != 3){
-  10:	0a000003 	beq	24 <main+0x24>
-    printf(2, "Usage: ln old new\n");
-  14:	e3a00002 	mov	r0, #2
-  18:	e59f102c 	ldr	r1, [pc, #44]	; 4c <main+0x4c>
-  1c:	eb000207 	bl	840 <printf>
-    exit();
-  20:	eb0000b3 	bl	2f4 <exit>
-  }
-  if(link(argv[1], argv[2]) < 0)
-  24:	e9910003 	ldmib	r1, {r0, r1}
-  28:	eb00014d 	bl	564 <link>
-  2c:	e3500000 	cmp	r0, #0
-  30:	ba000000 	blt	38 <main+0x38>
-    printf(2, "link %s %s: failed\n", argv[1], argv[2]);
-  exit();
-  34:	eb0000ae 	bl	2f4 <exit>
-  if(argc != 3){
-    printf(2, "Usage: ln old new\n");
-    exit();
-  }
-  if(link(argv[1], argv[2]) < 0)
-    printf(2, "link %s %s: failed\n", argv[1], argv[2]);
-  38:	e3a00002 	mov	r0, #2
-  3c:	e59f100c 	ldr	r1, [pc, #12]	; 50 <main+0x50>
-  40:	e994000c 	ldmib	r4, {r2, r3}
-  44:	eb0001fd 	bl	840 <printf>
-  exit();
-  48:	eb0000a9 	bl	2f4 <exit>
-  4c:	00000b28 	.word	0x00000b28
-  50:	00000b3c 	.word	0x00000b3c
-
-00000054 <strcpy>:
-#include "user.h"
-#include "arm.h"
-
-char*
-strcpy(char *s, char *t)
-{
-  54:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
-  char *os;
-
-  os = s;
-  while((*s++ = *t++) != 0)
-  58:	e1a02000 	mov	r2, r0
-#include "user.h"
-#include "arm.h"
-
-char*
-strcpy(char *s, char *t)
-{
-  5c:	e28db000 	add	fp, sp, #0
-  char *os;
-
-  os = s;
-  while((*s++ = *t++) != 0)
-  60:	e4d13001 	ldrb	r3, [r1], #1
-  64:	e3530000 	cmp	r3, #0
-  68:	e4c23001 	strb	r3, [r2], #1
-  6c:	1afffffb 	bne	60 <strcpy+0xc>
-    ;
-  return os;
-}
-  70:	e28bd000 	add	sp, fp, #0
-  74:	e8bd0800 	pop	{fp}
-  78:	e12fff1e 	bx	lr
-
-0000007c <strcmp>:
-
-int
-strcmp(const char *p, const char *q)
-{
-  7c:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
-  80:	e28db000 	add	fp, sp, #0
-  while(*p && *p == *q)
-  84:	e5d03000 	ldrb	r3, [r0]
-  88:	e5d12000 	ldrb	r2, [r1]
-  8c:	e3530000 	cmp	r3, #0
-  90:	1a000004 	bne	a8 <strcmp+0x2c>
-  94:	ea000005 	b	b0 <strcmp+0x34>
-  98:	e5f03001 	ldrb	r3, [r0, #1]!
-  9c:	e3530000 	cmp	r3, #0
-  a0:	0a000006 	beq	c0 <strcmp+0x44>
-  a4:	e5f12001 	ldrb	r2, [r1, #1]!
-  a8:	e1530002 	cmp	r3, r2
-  ac:	0afffff9 	beq	98 <strcmp+0x1c>
-    p++, q++;
-  return (uchar)*p - (uchar)*q;
-}
-  b0:	e0620003 	rsb	r0, r2, r3
-  b4:	e28bd000 	add	sp, fp, #0
-  b8:	e8bd0800 	pop	{fp}
-  bc:	e12fff1e 	bx	lr
-}
-
-int
-strcmp(const char *p, const char *q)
-{
-  while(*p && *p == *q)
-  c0:	e5d12001 	ldrb	r2, [r1, #1]
-  c4:	eafffff9 	b	b0 <strcmp+0x34>
-
-000000c8 <strlen>:
-  return (uchar)*p - (uchar)*q;
-}
-
-uint
-strlen(char *s)
-{
-  c8:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
-  cc:	e28db000 	add	fp, sp, #0
-  int n;
-
-  for(n = 0; s[n]; n++)
-  d0:	e5d03000 	ldrb	r3, [r0]
-  d4:	e3530000 	cmp	r3, #0
-  d8:	01a00003 	moveq	r0, r3
-  dc:	0a000006 	beq	fc <strlen+0x34>
-  e0:	e1a02000 	mov	r2, r0
-  e4:	e3a03000 	mov	r3, #0
-  e8:	e5f21001 	ldrb	r1, [r2, #1]!
-  ec:	e2833001 	add	r3, r3, #1
-  f0:	e1a00003 	mov	r0, r3
-  f4:	e3510000 	cmp	r1, #0
-  f8:	1afffffa 	bne	e8 <strlen+0x20>
-    ;
-  return n;
-}
-  fc:	e28bd000 	add	sp, fp, #0
- 100:	e8bd0800 	pop	{fp}
- 104:	e12fff1e 	bx	lr
-
-00000108 <memset>:
-memset(void *dst, int c, uint n)
-{
-  char *p=dst;
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 108:	e3520000 	cmp	r2, #0
-  return n;
-}
-
-void*
-memset(void *dst, int c, uint n)
-{
- 10c:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 110:	e28db000 	add	fp, sp, #0
-  char *p=dst;
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 114:	0a000006 	beq	134 <memset+0x2c>
- 118:	e6ef1071 	uxtb	r1, r1
- 11c:	e1a03002 	mov	r3, r2
-}
-
-void*
-memset(void *dst, int c, uint n)
-{
-  char *p=dst;
- 120:	e1a0c000 	mov	ip, r0
-  u32 rc=n;
-
-  while (rc-- > 0) *p++ = c;
- 124:	e2533001 	subs	r3, r3, #1
- 128:	e4cc1001 	strb	r1, [ip], #1
- 12c:	1afffffc 	bne	124 <memset+0x1c>
- 130:	e0800002 	add	r0, r0, r2
-  return (void *)p;
-}
- 134:	e28bd000 	add	sp, fp, #0
- 138:	e8bd0800 	pop	{fp}
- 13c:	e12fff1e 	bx	lr
-
-00000140 <strchr>:
-
-char*
-strchr(const char *s, char c)
-{
- 140:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 144:	e28db000 	add	fp, sp, #0
-  for(; *s; s++)
- 148:	e5d03000 	ldrb	r3, [r0]
- 14c:	e3530000 	cmp	r3, #0
- 150:	1a000004 	bne	168 <strchr+0x28>
- 154:	ea000008 	b	17c <strchr+0x3c>
- 158:	e5d03001 	ldrb	r3, [r0, #1]
- 15c:	e2800001 	add	r0, r0, #1
- 160:	e3530000 	cmp	r3, #0
- 164:	0a000004 	beq	17c <strchr+0x3c>
-    if(*s == c)
- 168:	e1530001 	cmp	r3, r1
- 16c:	1afffff9 	bne	158 <strchr+0x18>
-      return (char*)s;
-  return 0;
-}
- 170:	e28bd000 	add	sp, fp, #0
- 174:	e8bd0800 	pop	{fp}
- 178:	e12fff1e 	bx	lr
-strchr(const char *s, char c)
-{
-  for(; *s; s++)
-    if(*s == c)
-      return (char*)s;
-  return 0;
- 17c:	e1a00003 	mov	r0, r3
- 180:	eafffffa 	b	170 <strchr+0x30>
-
-00000184 <gets>:
-}
-
-char*
-gets(char *buf, int max)
-{
- 184:	e92d49f0 	push	{r4, r5, r6, r7, r8, fp, lr}
- 188:	e28db018 	add	fp, sp, #24
- 18c:	e24dd00c 	sub	sp, sp, #12
- 190:	e1a08000 	mov	r8, r0
- 194:	e1a07001 	mov	r7, r1
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 198:	e1a06000 	mov	r6, r0
- 19c:	e3a05000 	mov	r5, #0
- 1a0:	ea000008 	b	1c8 <gets+0x44>
-    cc = read(0, &c, 1);
- 1a4:	eb000079 	bl	390 <read>
-    if(cc < 1)
- 1a8:	e3500000 	cmp	r0, #0
- 1ac:	da00000b 	ble	1e0 <gets+0x5c>
-      break;
-    buf[i++] = c;
- 1b0:	e55b301d 	ldrb	r3, [fp, #-29]
-    if(c == '\n' || c == '\r')
- 1b4:	e1a05004 	mov	r5, r4
- 1b8:	e353000a 	cmp	r3, #10
- 1bc:	1353000d 	cmpne	r3, #13
-
-  for(i=0; i+1 < max; ){
-    cc = read(0, &c, 1);
-    if(cc < 1)
-      break;
-    buf[i++] = c;
- 1c0:	e4c63001 	strb	r3, [r6], #1
-    if(c == '\n' || c == '\r')
- 1c4:	0a00000a 	beq	1f4 <gets+0x70>
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
-    cc = read(0, &c, 1);
- 1c8:	e3a02001 	mov	r2, #1
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 1cc:	e0854002 	add	r4, r5, r2
- 1d0:	e1540007 	cmp	r4, r7
-    cc = read(0, &c, 1);
- 1d4:	e3a00000 	mov	r0, #0
- 1d8:	e24b101d 	sub	r1, fp, #29
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 1dc:	bafffff0 	blt	1a4 <gets+0x20>
-      break;
-    buf[i++] = c;
-    if(c == '\n' || c == '\r')
-      break;
-  }
-  buf[i] = '\0';
- 1e0:	e3a03000 	mov	r3, #0
- 1e4:	e7c83005 	strb	r3, [r8, r5]
-  return buf;
-}
- 1e8:	e1a00008 	mov	r0, r8
- 1ec:	e24bd018 	sub	sp, fp, #24
- 1f0:	e8bd89f0 	pop	{r4, r5, r6, r7, r8, fp, pc}
-gets(char *buf, int max)
-{
-  int i, cc;
-  char c;
-
-  for(i=0; i+1 < max; ){
- 1f4:	e1a05004 	mov	r5, r4
- 1f8:	eafffff8 	b	1e0 <gets+0x5c>
-
-000001fc <stat>:
-  return buf;
-}
-
-int
-stat(char *n, struct stat *st)
-{
- 1fc:	e92d4830 	push	{r4, r5, fp, lr}
- 200:	e1a05001 	mov	r5, r1
- 204:	e28db00c 	add	fp, sp, #12
-  int fd;
-  int r;
-
-  fd = open(n, O_RDONLY);
- 208:	e3a01000 	mov	r1, #0
- 20c:	eb0000a0 	bl	494 <open>
-  if(fd < 0)
- 210:	e2504000 	subs	r4, r0, #0
-    return -1;
- 214:	b3e05000 	mvnlt	r5, #0
-{
-  int fd;
-  int r;
-
-  fd = open(n, O_RDONLY);
-  if(fd < 0)
- 218:	ba000004 	blt	230 <stat+0x34>
-    return -1;
-  r = fstat(fd, st);
- 21c:	e1a01005 	mov	r1, r5
- 220:	eb0000c2 	bl	530 <fstat>
- 224:	e1a05000 	mov	r5, r0
-  close(fd);
- 228:	e1a00004 	mov	r0, r4
- 22c:	eb000071 	bl	3f8 <close>
-  return r;
-}
- 230:	e1a00005 	mov	r0, r5
- 234:	e8bd8830 	pop	{r4, r5, fp, pc}
-
-00000238 <atoi>:
-
-int
-atoi(const char *s)
-{
- 238:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 23c:	e28db000 	add	fp, sp, #0
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 240:	e5d03000 	ldrb	r3, [r0]
- 244:	e2432030 	sub	r2, r3, #48	; 0x30
- 248:	e6ef2072 	uxtb	r2, r2
- 24c:	e3520009 	cmp	r2, #9
-int
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
- 250:	83a00000 	movhi	r0, #0
-  while('0' <= *s && *s <= '9')
- 254:	8a000009 	bhi	280 <atoi+0x48>
- 258:	e1a02000 	mov	r2, r0
-int
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
- 25c:	e3a00000 	mov	r0, #0
-  while('0' <= *s && *s <= '9')
-    n = n*10 + *s++ - '0';
- 260:	e0800100 	add	r0, r0, r0, lsl #2
- 264:	e0830080 	add	r0, r3, r0, lsl #1
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 268:	e5f23001 	ldrb	r3, [r2, #1]!
-    n = n*10 + *s++ - '0';
- 26c:	e2400030 	sub	r0, r0, #48	; 0x30
-atoi(const char *s)
-{
-  int n;
-
-  n = 0;
-  while('0' <= *s && *s <= '9')
- 270:	e2431030 	sub	r1, r3, #48	; 0x30
- 274:	e6ef1071 	uxtb	r1, r1
- 278:	e3510009 	cmp	r1, #9
- 27c:	9afffff7 	bls	260 <atoi+0x28>
-    n = n*10 + *s++ - '0';
-  return n;
-}
- 280:	e28bd000 	add	sp, fp, #0
- 284:	e8bd0800 	pop	{fp}
- 288:	e12fff1e 	bx	lr
-
-0000028c <memmove>:
-{
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 28c:	e3520000 	cmp	r2, #0
-  return n;
-}
-
-void*
-memmove(void *vdst, void *vsrc, int n)
-{
- 290:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
- 294:	e28db000 	add	fp, sp, #0
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 298:	da000005 	ble	2b4 <memmove+0x28>
-    n = n*10 + *s++ - '0';
-  return n;
-}
-
-void*
-memmove(void *vdst, void *vsrc, int n)
- 29c:	e0802002 	add	r2, r0, r2
-{
-  char *dst, *src;
-  
-  dst = vdst;
- 2a0:	e1a03000 	mov	r3, r0
-  src = vsrc;
-  while(n-- > 0)
-    *dst++ = *src++;
- 2a4:	e4d1c001 	ldrb	ip, [r1], #1
- 2a8:	e4c3c001 	strb	ip, [r3], #1
-{
-  char *dst, *src;
-  
-  dst = vdst;
-  src = vsrc;
-  while(n-- > 0)
- 2ac:	e1530002 	cmp	r3, r2
- 2b0:	1afffffb 	bne	2a4 <memmove+0x18>
-    *dst++ = *src++;
-  return vdst;
-}
- 2b4:	e28bd000 	add	sp, fp, #0
- 2b8:	e8bd0800 	pop	{fp}
- 2bc:	e12fff1e 	bx	lr
-
-000002c0 <fork>:
- 2c0:	e92d4000 	push	{lr}
- 2c4:	e92d0008 	push	{r3}
- 2c8:	e92d0004 	push	{r2}
- 2cc:	e92d0002 	push	{r1}
- 2d0:	e92d0001 	push	{r0}
- 2d4:	e3a00001 	mov	r0, #1
- 2d8:	ef000040 	svc	0x00000040
- 2dc:	e8bd0002 	pop	{r1}
- 2e0:	e8bd0002 	pop	{r1}
- 2e4:	e8bd0004 	pop	{r2}
- 2e8:	e8bd0008 	pop	{r3}
- 2ec:	e8bd4000 	pop	{lr}
- 2f0:	e12fff1e 	bx	lr
-
-000002f4 <exit>:
- 2f4:	e92d4000 	push	{lr}
- 2f8:	e92d0008 	push	{r3}
- 2fc:	e92d0004 	push	{r2}
- 300:	e92d0002 	push	{r1}
- 304:	e92d0001 	push	{r0}
- 308:	e3a00002 	mov	r0, #2
- 30c:	ef000040 	svc	0x00000040
- 310:	e8bd0002 	pop	{r1}
- 314:	e8bd0002 	pop	{r1}
- 318:	e8bd0004 	pop	{r2}
- 31c:	e8bd0008 	pop	{r3}
- 320:	e8bd4000 	pop	{lr}
- 324:	e12fff1e 	bx	lr
-
-00000328 <wait>:
- 328:	e92d4000 	push	{lr}
- 32c:	e92d0008 	push	{r3}
- 330:	e92d0004 	push	{r2}
- 334:	e92d0002 	push	{r1}
- 338:	e92d0001 	push	{r0}
- 33c:	e3a00003 	mov	r0, #3
- 340:	ef000040 	svc	0x00000040
- 344:	e8bd0002 	pop	{r1}
- 348:	e8bd0002 	pop	{r1}
- 34c:	e8bd0004 	pop	{r2}
- 350:	e8bd0008 	pop	{r3}
- 354:	e8bd4000 	pop	{lr}
- 358:	e12fff1e 	bx	lr
-
-0000035c <pipe>:
- 35c:	e92d4000 	push	{lr}
- 360:	e92d0008 	push	{r3}
- 364:	e92d0004 	push	{r2}
- 368:	e92d0002 	push	{r1}
- 36c:	e92d0001 	push	{r0}
- 370:	e3a00004 	mov	r0, #4
- 374:	ef000040 	svc	0x00000040
- 378:	e8bd0002 	pop	{r1}
- 37c:	e8bd0002 	pop	{r1}
- 380:	e8bd0004 	pop	{r2}
- 384:	e8bd0008 	pop	{r3}
- 388:	e8bd4000 	pop	{lr}
- 38c:	e12fff1e 	bx	lr
-
-00000390 <read>:
- 390:	e92d4000 	push	{lr}
- 394:	e92d0008 	push	{r3}
- 398:	e92d0004 	push	{r2}
- 39c:	e92d0002 	push	{r1}
- 3a0:	e92d0001 	push	{r0}
- 3a4:	e3a00005 	mov	r0, #5
- 3a8:	ef000040 	svc	0x00000040
- 3ac:	e8bd0002 	pop	{r1}
- 3b0:	e8bd0002 	pop	{r1}
- 3b4:	e8bd0004 	pop	{r2}
- 3b8:	e8bd0008 	pop	{r3}
- 3bc:	e8bd4000 	pop	{lr}
- 3c0:	e12fff1e 	bx	lr
-
-000003c4 <write>:
- 3c4:	e92d4000 	push	{lr}
- 3c8:	e92d0008 	push	{r3}
- 3cc:	e92d0004 	push	{r2}
- 3d0:	e92d0002 	push	{r1}
- 3d4:	e92d0001 	push	{r0}
- 3d8:	e3a00010 	mov	r0, #16
- 3dc:	ef000040 	svc	0x00000040
- 3e0:	e8bd0002 	pop	{r1}
- 3e4:	e8bd0002 	pop	{r1}
- 3e8:	e8bd0004 	pop	{r2}
- 3ec:	e8bd0008 	pop	{r3}
- 3f0:	e8bd4000 	pop	{lr}
- 3f4:	e12fff1e 	bx	lr
-
-000003f8 <close>:
- 3f8:	e92d4000 	push	{lr}
- 3fc:	e92d0008 	push	{r3}
- 400:	e92d0004 	push	{r2}
- 404:	e92d0002 	push	{r1}
- 408:	e92d0001 	push	{r0}
- 40c:	e3a00015 	mov	r0, #21
- 410:	ef000040 	svc	0x00000040
- 414:	e8bd0002 	pop	{r1}
- 418:	e8bd0002 	pop	{r1}
- 41c:	e8bd0004 	pop	{r2}
- 420:	e8bd0008 	pop	{r3}
- 424:	e8bd4000 	pop	{lr}
- 428:	e12fff1e 	bx	lr
-
-0000042c <kill>:
- 42c:	e92d4000 	push	{lr}
- 430:	e92d0008 	push	{r3}
- 434:	e92d0004 	push	{r2}
- 438:	e92d0002 	push	{r1}
- 43c:	e92d0001 	push	{r0}
- 440:	e3a00006 	mov	r0, #6
- 444:	ef000040 	svc	0x00000040
- 448:	e8bd0002 	pop	{r1}
- 44c:	e8bd0002 	pop	{r1}
- 450:	e8bd0004 	pop	{r2}
- 454:	e8bd0008 	pop	{r3}
- 458:	e8bd4000 	pop	{lr}
- 45c:	e12fff1e 	bx	lr
-
-00000460 <exec>:
- 460:	e92d4000 	push	{lr}
- 464:	e92d0008 	push	{r3}
- 468:	e92d0004 	push	{r2}
- 46c:	e92d0002 	push	{r1}
- 470:	e92d0001 	push	{r0}
- 474:	e3a00007 	mov	r0, #7
- 478:	ef000040 	svc	0x00000040
- 47c:	e8bd0002 	pop	{r1}
- 480:	e8bd0002 	pop	{r1}
- 484:	e8bd0004 	pop	{r2}
- 488:	e8bd0008 	pop	{r3}
- 48c:	e8bd4000 	pop	{lr}
- 490:	e12fff1e 	bx	lr
-
-00000494 <open>:
- 494:	e92d4000 	push	{lr}
- 498:	e92d0008 	push	{r3}
- 49c:	e92d0004 	push	{r2}
- 4a0:	e92d0002 	push	{r1}
- 4a4:	e92d0001 	push	{r0}
- 4a8:	e3a0000f 	mov	r0, #15
- 4ac:	ef000040 	svc	0x00000040
- 4b0:	e8bd0002 	pop	{r1}
- 4b4:	e8bd0002 	pop	{r1}
- 4b8:	e8bd0004 	pop	{r2}
- 4bc:	e8bd0008 	pop	{r3}
- 4c0:	e8bd4000 	pop	{lr}
- 4c4:	e12fff1e 	bx	lr
-
-000004c8 <mknod>:
- 4c8:	e92d4000 	push	{lr}
- 4cc:	e92d0008 	push	{r3}
- 4d0:	e92d0004 	push	{r2}
- 4d4:	e92d0002 	push	{r1}
- 4d8:	e92d0001 	push	{r0}
- 4dc:	e3a00011 	mov	r0, #17
- 4e0:	ef000040 	svc	0x00000040
- 4e4:	e8bd0002 	pop	{r1}
- 4e8:	e8bd0002 	pop	{r1}
- 4ec:	e8bd0004 	pop	{r2}
- 4f0:	e8bd0008 	pop	{r3}
- 4f4:	e8bd4000 	pop	{lr}
- 4f8:	e12fff1e 	bx	lr
-
-000004fc <unlink>:
- 4fc:	e92d4000 	push	{lr}
- 500:	e92d0008 	push	{r3}
- 504:	e92d0004 	push	{r2}
- 508:	e92d0002 	push	{r1}
- 50c:	e92d0001 	push	{r0}
- 510:	e3a00012 	mov	r0, #18
- 514:	ef000040 	svc	0x00000040
- 518:	e8bd0002 	pop	{r1}
- 51c:	e8bd0002 	pop	{r1}
- 520:	e8bd0004 	pop	{r2}
- 524:	e8bd0008 	pop	{r3}
- 528:	e8bd4000 	pop	{lr}
- 52c:	e12fff1e 	bx	lr
-
-00000530 <fstat>:
- 530:	e92d4000 	push	{lr}
- 534:	e92d0008 	push	{r3}
- 538:	e92d0004 	push	{r2}
- 53c:	e92d0002 	push	{r1}
- 540:	e92d0001 	push	{r0}
- 544:	e3a00008 	mov	r0, #8
- 548:	ef000040 	svc	0x00000040
- 54c:	e8bd0002 	pop	{r1}
- 550:	e8bd0002 	pop	{r1}
- 554:	e8bd0004 	pop	{r2}
- 558:	e8bd0008 	pop	{r3}
- 55c:	e8bd4000 	pop	{lr}
- 560:	e12fff1e 	bx	lr
-
-00000564 <link>:
- 564:	e92d4000 	push	{lr}
- 568:	e92d0008 	push	{r3}
- 56c:	e92d0004 	push	{r2}
- 570:	e92d0002 	push	{r1}
- 574:	e92d0001 	push	{r0}
- 578:	e3a00013 	mov	r0, #19
- 57c:	ef000040 	svc	0x00000040
- 580:	e8bd0002 	pop	{r1}
- 584:	e8bd0002 	pop	{r1}
- 588:	e8bd0004 	pop	{r2}
- 58c:	e8bd0008 	pop	{r3}
- 590:	e8bd4000 	pop	{lr}
- 594:	e12fff1e 	bx	lr
-
-00000598 <mkdir>:
- 598:	e92d4000 	push	{lr}
- 59c:	e92d0008 	push	{r3}
- 5a0:	e92d0004 	push	{r2}
- 5a4:	e92d0002 	push	{r1}
- 5a8:	e92d0001 	push	{r0}
- 5ac:	e3a00014 	mov	r0, #20
- 5b0:	ef000040 	svc	0x00000040
- 5b4:	e8bd0002 	pop	{r1}
- 5b8:	e8bd0002 	pop	{r1}
- 5bc:	e8bd0004 	pop	{r2}
- 5c0:	e8bd0008 	pop	{r3}
- 5c4:	e8bd4000 	pop	{lr}
- 5c8:	e12fff1e 	bx	lr
-
-000005cc <chdir>:
- 5cc:	e92d4000 	push	{lr}
- 5d0:	e92d0008 	push	{r3}
- 5d4:	e92d0004 	push	{r2}
- 5d8:	e92d0002 	push	{r1}
- 5dc:	e92d0001 	push	{r0}
- 5e0:	e3a00009 	mov	r0, #9
- 5e4:	ef000040 	svc	0x00000040
- 5e8:	e8bd0002 	pop	{r1}
- 5ec:	e8bd0002 	pop	{r1}
- 5f0:	e8bd0004 	pop	{r2}
- 5f4:	e8bd0008 	pop	{r3}
- 5f8:	e8bd4000 	pop	{lr}
- 5fc:	e12fff1e 	bx	lr
-
-00000600 <dup>:
- 600:	e92d4000 	push	{lr}
- 604:	e92d0008 	push	{r3}
- 608:	e92d0004 	push	{r2}
- 60c:	e92d0002 	push	{r1}
- 610:	e92d0001 	push	{r0}
- 614:	e3a0000a 	mov	r0, #10
- 618:	ef000040 	svc	0x00000040
- 61c:	e8bd0002 	pop	{r1}
- 620:	e8bd0002 	pop	{r1}
- 624:	e8bd0004 	pop	{r2}
- 628:	e8bd0008 	pop	{r3}
- 62c:	e8bd4000 	pop	{lr}
- 630:	e12fff1e 	bx	lr
-
-00000634 <getpid>:
- 634:	e92d4000 	push	{lr}
- 638:	e92d0008 	push	{r3}
- 63c:	e92d0004 	push	{r2}
- 640:	e92d0002 	push	{r1}
- 644:	e92d0001 	push	{r0}
- 648:	e3a0000b 	mov	r0, #11
- 64c:	ef000040 	svc	0x00000040
- 650:	e8bd0002 	pop	{r1}
- 654:	e8bd0002 	pop	{r1}
- 658:	e8bd0004 	pop	{r2}
- 65c:	e8bd0008 	pop	{r3}
- 660:	e8bd4000 	pop	{lr}
- 664:	e12fff1e 	bx	lr
-
-00000668 <sbrk>:
- 668:	e92d4000 	push	{lr}
- 66c:	e92d0008 	push	{r3}
- 670:	e92d0004 	push	{r2}
- 674:	e92d0002 	push	{r1}
- 678:	e92d0001 	push	{r0}
- 67c:	e3a0000c 	mov	r0, #12
- 680:	ef000040 	svc	0x00000040
- 684:	e8bd0002 	pop	{r1}
- 688:	e8bd0002 	pop	{r1}
- 68c:	e8bd0004 	pop	{r2}
- 690:	e8bd0008 	pop	{r3}
- 694:	e8bd4000 	pop	{lr}
- 698:	e12fff1e 	bx	lr
-
-0000069c <sleep>:
- 69c:	e92d4000 	push	{lr}
- 6a0:	e92d0008 	push	{r3}
- 6a4:	e92d0004 	push	{r2}
- 6a8:	e92d0002 	push	{r1}
- 6ac:	e92d0001 	push	{r0}
- 6b0:	e3a0000d 	mov	r0, #13
- 6b4:	ef000040 	svc	0x00000040
- 6b8:	e8bd0002 	pop	{r1}
- 6bc:	e8bd0002 	pop	{r1}
- 6c0:	e8bd0004 	pop	{r2}
- 6c4:	e8bd0008 	pop	{r3}
- 6c8:	e8bd4000 	pop	{lr}
- 6cc:	e12fff1e 	bx	lr
-
-000006d0 <uptime>:
- 6d0:	e92d4000 	push	{lr}
- 6d4:	e92d0008 	push	{r3}
- 6d8:	e92d0004 	push	{r2}
- 6dc:	e92d0002 	push	{r1}
- 6e0:	e92d0001 	push	{r0}
- 6e4:	e3a0000e 	mov	r0, #14
- 6e8:	ef000040 	svc	0x00000040
- 6ec:	e8bd0002 	pop	{r1}
- 6f0:	e8bd0002 	pop	{r1}
- 6f4:	e8bd0004 	pop	{r2}
- 6f8:	e8bd0008 	pop	{r3}
- 6fc:	e8bd4000 	pop	{lr}
- 700:	e12fff1e 	bx	lr
-
-00000704 <putc>:
-#include "stat.h"
-#include "user.h"
-
-static void
-putc(int fd, char c)
-{
- 704:	e92d4800 	push	{fp, lr}
- 708:	e28db004 	add	fp, sp, #4
- 70c:	e24b3004 	sub	r3, fp, #4
- 710:	e24dd008 	sub	sp, sp, #8
-  write(fd, &c, 1);
- 714:	e3a02001 	mov	r2, #1
-#include "stat.h"
-#include "user.h"
-
-static void
-putc(int fd, char c)
-{
- 718:	e5631001 	strb	r1, [r3, #-1]!
-  write(fd, &c, 1);
- 71c:	e1a01003 	mov	r1, r3
- 720:	ebffff27 	bl	3c4 <write>
-}
- 724:	e24bd004 	sub	sp, fp, #4
- 728:	e8bd8800 	pop	{fp, pc}
-
-0000072c <printint>:
-    return q;
-}
-
-static void
-printint(int fd, int xx, int base, int sgn)
-{
- 72c:	e92d4ff0 	push	{r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 730:	e1a04000 	mov	r4, r0
-  char buf[16];
-  int i, neg;
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
- 734:	e1a00fa1 	lsr	r0, r1, #31
- 738:	e3530000 	cmp	r3, #0
- 73c:	03a03000 	moveq	r3, #0
- 740:	12003001 	andne	r3, r0, #1
-    return q;
-}
-
-static void
-printint(int fd, int xx, int base, int sgn)
-{
- 744:	e28db020 	add	fp, sp, #32
-  char buf[16];
-  int i, neg;
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
- 748:	e3530000 	cmp	r3, #0
-    return q;
-}
-
-static void
-printint(int fd, int xx, int base, int sgn)
-{
- 74c:	e24dd014 	sub	sp, sp, #20
- 750:	e59f909c 	ldr	r9, [pc, #156]	; 7f4 <printint+0xc8>
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
-    neg = 1;
-    x = -xx;
- 754:	12611000 	rsbne	r1, r1, #0
-  int i, neg;
-  uint x, y, b;
-
-  neg = 0;
-  if(sgn && xx < 0){
-    neg = 1;
- 758:	13a03001 	movne	r3, #1
-  } else {
-    x = xx;
-  }
-
-  b = base;
-  i = 0;
- 75c:	e3a0a000 	mov	sl, #0
- 760:	e24b6034 	sub	r6, fp, #52	; 0x34
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
-            q = q | (1 << i);
- 764:	e3a08001 	mov	r8, #1
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- 768:	e3a07000 	mov	r7, #0
-    int i;
-
-    for(i=31;i>=0;i--){
- 76c:	e3a0001f 	mov	r0, #31
-  write(fd, &c, 1);
-}
-
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
- 770:	e1a0c007 	mov	ip, r7
-    int i;
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
- 774:	e1a0e031 	lsr	lr, r1, r0
- 778:	e20ee001 	and	lr, lr, #1
- 77c:	e18ec08c 	orr	ip, lr, ip, lsl #1
-        if(r >= d) {
- 780:	e152000c 	cmp	r2, ip
-            r = r - d;
-            q = q | (1 << i);
- 784:	91877018 	orrls	r7, r7, r8, lsl r0
-
-    for(i=31;i>=0;i--){
-        r = r << 1;
-        r = r | ((n >> i) & 1);
-        if(r >= d) {
-            r = r - d;
- 788:	9062c00c 	rsbls	ip, r2, ip
-u32 div(u32 n, u32 d)  // long division
-{
-    u32 q=0, r=0;
-    int i;
-
-    for(i=31;i>=0;i--){
- 78c:	e2500001 	subs	r0, r0, #1
- 790:	2afffff7 	bcs	774 <printint+0x48>
-
-  b = base;
-  i = 0;
-  do{