diff Idea @ 23:e605560e6146

Fix breaking edx,ecx on function call
author kono
date Tue, 04 Feb 2003 12:17:26 +0900
parents df7fa8cee67b
children 1df0bf7eb5da
line wrap: on
line diff
--- a/Idea	Mon Feb 03 23:43:12 2003 +0900
+++ b/Idea	Tue Feb 04 12:17:26 2003 +0900
@@ -1234,3 +1234,34 @@
 Fri Jan 31 20:30:36 JST 2003
 
 なんか #ifdef / #if がないとだめだな。実装する?
+
+Tue Feb  4 01:04:12 JST 2003
+
+##      while ((*chptr++ = c = getc(filep->fcb)) != '\n') { 
+_1120:
+        movl $10,%eax
+        movl $8,%ecx
+        movl filep,%edx
+        addl %ecx,%edx
+        movl (%edx),%edx
+        pushl %edx
+        xchg %edx,%eax     .... edx に$10が入る (なんでxchg?)
+        call    getc
+        addl $4,%esp
+        movl %eax,-20(%ebp)  c に代入
+        movl $chptr,%ecx
+        pushl %ecx
+        popl %ebx
+        movl (%ebx),%ecx      ecx にchptrの中身
+        addl $1,(%ebx)
+        movb %al,(%ecx)
+        subl %edx,%eax         eax-edx ($10)
+        je      _1119
+
+が壊れる理由なんだけど...
+
+edx,ecx が破壊されちゃうみたいね。
+
+Tue Feb  4 12:17:07 JST 2003
+
+ようやっと直したよ...