text
stringlengths
1
1.05M
; 07:CB9B:8D 07 20 STA $2007 ; 01CBAB .org $CB9B JSR $FB40
; A103570: Sum of the (primes > 5 modulo 13). ; 7,18,18,22,28,38,41,46,57,59,63,71,72,79,88,90,96,104,105,110,121,127,137,149,152,157,166,176,177,184,193,199,207,208,215,226,230,240,252,261,272,274,278,281,283,289,297,309,314,321,325,335,338,347,358,362 mov $2,$0 mov $3,$0 add $3,1 lpb $3 mov $0,$2 sub $3,1 sub $0,$3 add $0,3 seq $0,40 ; The prime numbers. mod $0,13 add $1,$0 lpe mov $0,$1
db BLISSEY ; 242 db 255, 10, 10, 55, 75, 135 ; hp atk def spd sat sdf db NORMAL, NORMAL ; type db 30 ; catch rate db 255 ; base exp db NO_ITEM, LUCKY_EGG ; items db GENDER_F100 ; gender ratio db 100 ; unknown 1 db 40 ; step cycles to hatch db 5 ; unknown 2 INCBIN "gfx/pokemon/blissey/front.dimensions" db 0, 0, 0, 0 ; padding db GROWTH_FAST ; growth rate dn EGG_FAIRY, EGG_FAIRY ; egg groups ; tm/hm learnset tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, DREAM_EATER, REST, ATTRACT, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM ; end
_cat: 文件格式 elf32-i386 Disassembly of section .text: 00000000 <cat>: char buf[512]; void cat(int fd) { 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 83 ec 18 sub $0x18,%esp int n; while((n = read(fd, buf, sizeof(buf))) > 0) 6: eb 15 jmp 1d <cat+0x1d> write(1, buf, n); 8: 83 ec 04 sub $0x4,%esp b: ff 75 f4 pushl -0xc(%ebp) e: 68 80 0b 00 00 push $0xb80 13: 6a 01 push $0x1 15: e8 6c 03 00 00 call 386 <write> 1a: 83 c4 10 add $0x10,%esp void cat(int fd) { int n; while((n = read(fd, buf, sizeof(buf))) > 0) 1d: 83 ec 04 sub $0x4,%esp 20: 68 00 02 00 00 push $0x200 25: 68 80 0b 00 00 push $0xb80 2a: ff 75 08 pushl 0x8(%ebp) 2d: e8 4c 03 00 00 call 37e <read> 32: 83 c4 10 add $0x10,%esp 35: 89 45 f4 mov %eax,-0xc(%ebp) 38: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 3c: 7f ca jg 8 <cat+0x8> write(1, buf, n); if(n < 0){ 3e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 42: 79 17 jns 5b <cat+0x5b> printf(1, "cat: read error\n"); 44: 83 ec 08 sub $0x8,%esp 47: 68 b3 08 00 00 push $0x8b3 4c: 6a 01 push $0x1 4e: e8 aa 04 00 00 call 4fd <printf> 53: 83 c4 10 add $0x10,%esp exit(); 56: e8 0b 03 00 00 call 366 <exit> } } 5b: 90 nop 5c: c9 leave 5d: c3 ret 0000005e <main>: int main(int argc, char *argv[]) { 5e: 8d 4c 24 04 lea 0x4(%esp),%ecx 62: 83 e4 f0 and $0xfffffff0,%esp 65: ff 71 fc pushl -0x4(%ecx) 68: 55 push %ebp 69: 89 e5 mov %esp,%ebp 6b: 53 push %ebx 6c: 51 push %ecx 6d: 83 ec 10 sub $0x10,%esp 70: 89 cb mov %ecx,%ebx int fd, i; if(argc <= 1){ 72: 83 3b 01 cmpl $0x1,(%ebx) 75: 7f 12 jg 89 <main+0x2b> cat(0); 77: 83 ec 0c sub $0xc,%esp 7a: 6a 00 push $0x0 7c: e8 7f ff ff ff call 0 <cat> 81: 83 c4 10 add $0x10,%esp exit(); 84: e8 dd 02 00 00 call 366 <exit> } for(i = 1; i < argc; i++){ 89: c7 45 f4 01 00 00 00 movl $0x1,-0xc(%ebp) 90: eb 71 jmp 103 <main+0xa5> if((fd = open(argv[i], 0)) < 0){ 92: 8b 45 f4 mov -0xc(%ebp),%eax 95: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 9c: 8b 43 04 mov 0x4(%ebx),%eax 9f: 01 d0 add %edx,%eax a1: 8b 00 mov (%eax),%eax a3: 83 ec 08 sub $0x8,%esp a6: 6a 00 push $0x0 a8: 50 push %eax a9: e8 f8 02 00 00 call 3a6 <open> ae: 83 c4 10 add $0x10,%esp b1: 89 45 f0 mov %eax,-0x10(%ebp) b4: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) b8: 79 29 jns e3 <main+0x85> printf(1, "cat: cannot open %s\n", argv[i]); ba: 8b 45 f4 mov -0xc(%ebp),%eax bd: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx c4: 8b 43 04 mov 0x4(%ebx),%eax c7: 01 d0 add %edx,%eax c9: 8b 00 mov (%eax),%eax cb: 83 ec 04 sub $0x4,%esp ce: 50 push %eax cf: 68 c4 08 00 00 push $0x8c4 d4: 6a 01 push $0x1 d6: e8 22 04 00 00 call 4fd <printf> db: 83 c4 10 add $0x10,%esp exit(); de: e8 83 02 00 00 call 366 <exit> } cat(fd); e3: 83 ec 0c sub $0xc,%esp e6: ff 75 f0 pushl -0x10(%ebp) e9: e8 12 ff ff ff call 0 <cat> ee: 83 c4 10 add $0x10,%esp close(fd); f1: 83 ec 0c sub $0xc,%esp f4: ff 75 f0 pushl -0x10(%ebp) f7: e8 92 02 00 00 call 38e <close> fc: 83 c4 10 add $0x10,%esp if(argc <= 1){ cat(0); exit(); } for(i = 1; i < argc; i++){ ff: 83 45 f4 01 addl $0x1,-0xc(%ebp) 103: 8b 45 f4 mov -0xc(%ebp),%eax 106: 3b 03 cmp (%ebx),%eax 108: 7c 88 jl 92 <main+0x34> exit(); } cat(fd); close(fd); } exit(); 10a: e8 57 02 00 00 call 366 <exit> 0000010f <stosb>: "cc"); } static inline void stosb(void *addr, int data, int cnt) { 10f: 55 push %ebp 110: 89 e5 mov %esp,%ebp 112: 57 push %edi 113: 53 push %ebx asm volatile("cld; rep stosb" : 114: 8b 4d 08 mov 0x8(%ebp),%ecx 117: 8b 55 10 mov 0x10(%ebp),%edx 11a: 8b 45 0c mov 0xc(%ebp),%eax 11d: 89 cb mov %ecx,%ebx 11f: 89 df mov %ebx,%edi 121: 89 d1 mov %edx,%ecx 123: fc cld 124: f3 aa rep stos %al,%es:(%edi) 126: 89 ca mov %ecx,%edx 128: 89 fb mov %edi,%ebx 12a: 89 5d 08 mov %ebx,0x8(%ebp) 12d: 89 55 10 mov %edx,0x10(%ebp) "=D" (addr), "=c" (cnt) : "0" (addr), "1" (cnt), "a" (data) : "memory", "cc"); } 130: 90 nop 131: 5b pop %ebx 132: 5f pop %edi 133: 5d pop %ebp 134: c3 ret 00000135 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { 135: 55 push %ebp 136: 89 e5 mov %esp,%ebp 138: 83 ec 10 sub $0x10,%esp char *os; os = s; 13b: 8b 45 08 mov 0x8(%ebp),%eax 13e: 89 45 fc mov %eax,-0x4(%ebp) while((*s++ = *t++) != 0) 141: 90 nop 142: 8b 45 08 mov 0x8(%ebp),%eax 145: 8d 50 01 lea 0x1(%eax),%edx 148: 89 55 08 mov %edx,0x8(%ebp) 14b: 8b 55 0c mov 0xc(%ebp),%edx 14e: 8d 4a 01 lea 0x1(%edx),%ecx 151: 89 4d 0c mov %ecx,0xc(%ebp) 154: 0f b6 12 movzbl (%edx),%edx 157: 88 10 mov %dl,(%eax) 159: 0f b6 00 movzbl (%eax),%eax 15c: 84 c0 test %al,%al 15e: 75 e2 jne 142 <strcpy+0xd> ; return os; 160: 8b 45 fc mov -0x4(%ebp),%eax } 163: c9 leave 164: c3 ret 00000165 <strcmp>: int strcmp(const char *p, const char *q) { 165: 55 push %ebp 166: 89 e5 mov %esp,%ebp while(*p && *p == *q) 168: eb 08 jmp 172 <strcmp+0xd> p++, q++; 16a: 83 45 08 01 addl $0x1,0x8(%ebp) 16e: 83 45 0c 01 addl $0x1,0xc(%ebp) } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 172: 8b 45 08 mov 0x8(%ebp),%eax 175: 0f b6 00 movzbl (%eax),%eax 178: 84 c0 test %al,%al 17a: 74 10 je 18c <strcmp+0x27> 17c: 8b 45 08 mov 0x8(%ebp),%eax 17f: 0f b6 10 movzbl (%eax),%edx 182: 8b 45 0c mov 0xc(%ebp),%eax 185: 0f b6 00 movzbl (%eax),%eax 188: 38 c2 cmp %al,%dl 18a: 74 de je 16a <strcmp+0x5> p++, q++; return (uchar)*p - (uchar)*q; 18c: 8b 45 08 mov 0x8(%ebp),%eax 18f: 0f b6 00 movzbl (%eax),%eax 192: 0f b6 d0 movzbl %al,%edx 195: 8b 45 0c mov 0xc(%ebp),%eax 198: 0f b6 00 movzbl (%eax),%eax 19b: 0f b6 c0 movzbl %al,%eax 19e: 29 c2 sub %eax,%edx 1a0: 89 d0 mov %edx,%eax } 1a2: 5d pop %ebp 1a3: c3 ret 000001a4 <strlen>: uint strlen(char *s) { 1a4: 55 push %ebp 1a5: 89 e5 mov %esp,%ebp 1a7: 83 ec 10 sub $0x10,%esp int n; for(n = 0; s[n]; n++) 1aa: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) 1b1: eb 04 jmp 1b7 <strlen+0x13> 1b3: 83 45 fc 01 addl $0x1,-0x4(%ebp) 1b7: 8b 55 fc mov -0x4(%ebp),%edx 1ba: 8b 45 08 mov 0x8(%ebp),%eax 1bd: 01 d0 add %edx,%eax 1bf: 0f b6 00 movzbl (%eax),%eax 1c2: 84 c0 test %al,%al 1c4: 75 ed jne 1b3 <strlen+0xf> ; return n; 1c6: 8b 45 fc mov -0x4(%ebp),%eax } 1c9: c9 leave 1ca: c3 ret 000001cb <memset>: void* memset(void *dst, int c, uint n) { 1cb: 55 push %ebp 1cc: 89 e5 mov %esp,%ebp stosb(dst, c, n); 1ce: 8b 45 10 mov 0x10(%ebp),%eax 1d1: 50 push %eax 1d2: ff 75 0c pushl 0xc(%ebp) 1d5: ff 75 08 pushl 0x8(%ebp) 1d8: e8 32 ff ff ff call 10f <stosb> 1dd: 83 c4 0c add $0xc,%esp return dst; 1e0: 8b 45 08 mov 0x8(%ebp),%eax } 1e3: c9 leave 1e4: c3 ret 000001e5 <strchr>: char* strchr(const char *s, char c) { 1e5: 55 push %ebp 1e6: 89 e5 mov %esp,%ebp 1e8: 83 ec 04 sub $0x4,%esp 1eb: 8b 45 0c mov 0xc(%ebp),%eax 1ee: 88 45 fc mov %al,-0x4(%ebp) for(; *s; s++) 1f1: eb 14 jmp 207 <strchr+0x22> if(*s == c) 1f3: 8b 45 08 mov 0x8(%ebp),%eax 1f6: 0f b6 00 movzbl (%eax),%eax 1f9: 3a 45 fc cmp -0x4(%ebp),%al 1fc: 75 05 jne 203 <strchr+0x1e> return (char*)s; 1fe: 8b 45 08 mov 0x8(%ebp),%eax 201: eb 13 jmp 216 <strchr+0x31> } char* strchr(const char *s, char c) { for(; *s; s++) 203: 83 45 08 01 addl $0x1,0x8(%ebp) 207: 8b 45 08 mov 0x8(%ebp),%eax 20a: 0f b6 00 movzbl (%eax),%eax 20d: 84 c0 test %al,%al 20f: 75 e2 jne 1f3 <strchr+0xe> if(*s == c) return (char*)s; return 0; 211: b8 00 00 00 00 mov $0x0,%eax } 216: c9 leave 217: c3 ret 00000218 <gets>: char* gets(char *buf, int max) { 218: 55 push %ebp 219: 89 e5 mov %esp,%ebp 21b: 83 ec 18 sub $0x18,%esp int i, cc; char c; for(i=0; i+1 < max; ){ 21e: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 225: eb 42 jmp 269 <gets+0x51> cc = read(0, &c, 1); 227: 83 ec 04 sub $0x4,%esp 22a: 6a 01 push $0x1 22c: 8d 45 ef lea -0x11(%ebp),%eax 22f: 50 push %eax 230: 6a 00 push $0x0 232: e8 47 01 00 00 call 37e <read> 237: 83 c4 10 add $0x10,%esp 23a: 89 45 f0 mov %eax,-0x10(%ebp) if(cc < 1) 23d: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 241: 7e 33 jle 276 <gets+0x5e> break; buf[i++] = c; 243: 8b 45 f4 mov -0xc(%ebp),%eax 246: 8d 50 01 lea 0x1(%eax),%edx 249: 89 55 f4 mov %edx,-0xc(%ebp) 24c: 89 c2 mov %eax,%edx 24e: 8b 45 08 mov 0x8(%ebp),%eax 251: 01 c2 add %eax,%edx 253: 0f b6 45 ef movzbl -0x11(%ebp),%eax 257: 88 02 mov %al,(%edx) if(c == '\n' || c == '\r') 259: 0f b6 45 ef movzbl -0x11(%ebp),%eax 25d: 3c 0a cmp $0xa,%al 25f: 74 16 je 277 <gets+0x5f> 261: 0f b6 45 ef movzbl -0x11(%ebp),%eax 265: 3c 0d cmp $0xd,%al 267: 74 0e je 277 <gets+0x5f> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 269: 8b 45 f4 mov -0xc(%ebp),%eax 26c: 83 c0 01 add $0x1,%eax 26f: 3b 45 0c cmp 0xc(%ebp),%eax 272: 7c b3 jl 227 <gets+0xf> 274: eb 01 jmp 277 <gets+0x5f> cc = read(0, &c, 1); if(cc < 1) break; 276: 90 nop buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 277: 8b 55 f4 mov -0xc(%ebp),%edx 27a: 8b 45 08 mov 0x8(%ebp),%eax 27d: 01 d0 add %edx,%eax 27f: c6 00 00 movb $0x0,(%eax) return buf; 282: 8b 45 08 mov 0x8(%ebp),%eax } 285: c9 leave 286: c3 ret 00000287 <stat>: int stat(char *n, struct stat *st) { 287: 55 push %ebp 288: 89 e5 mov %esp,%ebp 28a: 83 ec 18 sub $0x18,%esp int fd; int r; fd = open(n, O_RDONLY); 28d: 83 ec 08 sub $0x8,%esp 290: 6a 00 push $0x0 292: ff 75 08 pushl 0x8(%ebp) 295: e8 0c 01 00 00 call 3a6 <open> 29a: 83 c4 10 add $0x10,%esp 29d: 89 45 f4 mov %eax,-0xc(%ebp) if(fd < 0) 2a0: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 2a4: 79 07 jns 2ad <stat+0x26> return -1; 2a6: b8 ff ff ff ff mov $0xffffffff,%eax 2ab: eb 25 jmp 2d2 <stat+0x4b> r = fstat(fd, st); 2ad: 83 ec 08 sub $0x8,%esp 2b0: ff 75 0c pushl 0xc(%ebp) 2b3: ff 75 f4 pushl -0xc(%ebp) 2b6: e8 03 01 00 00 call 3be <fstat> 2bb: 83 c4 10 add $0x10,%esp 2be: 89 45 f0 mov %eax,-0x10(%ebp) close(fd); 2c1: 83 ec 0c sub $0xc,%esp 2c4: ff 75 f4 pushl -0xc(%ebp) 2c7: e8 c2 00 00 00 call 38e <close> 2cc: 83 c4 10 add $0x10,%esp return r; 2cf: 8b 45 f0 mov -0x10(%ebp),%eax } 2d2: c9 leave 2d3: c3 ret 000002d4 <atoi>: int atoi(const char *s) { 2d4: 55 push %ebp 2d5: 89 e5 mov %esp,%ebp 2d7: 83 ec 10 sub $0x10,%esp int n; n = 0; 2da: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) while('0' <= *s && *s <= '9') 2e1: eb 25 jmp 308 <atoi+0x34> n = n*10 + *s++ - '0'; 2e3: 8b 55 fc mov -0x4(%ebp),%edx 2e6: 89 d0 mov %edx,%eax 2e8: c1 e0 02 shl $0x2,%eax 2eb: 01 d0 add %edx,%eax 2ed: 01 c0 add %eax,%eax 2ef: 89 c1 mov %eax,%ecx 2f1: 8b 45 08 mov 0x8(%ebp),%eax 2f4: 8d 50 01 lea 0x1(%eax),%edx 2f7: 89 55 08 mov %edx,0x8(%ebp) 2fa: 0f b6 00 movzbl (%eax),%eax 2fd: 0f be c0 movsbl %al,%eax 300: 01 c8 add %ecx,%eax 302: 83 e8 30 sub $0x30,%eax 305: 89 45 fc mov %eax,-0x4(%ebp) atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') 308: 8b 45 08 mov 0x8(%ebp),%eax 30b: 0f b6 00 movzbl (%eax),%eax 30e: 3c 2f cmp $0x2f,%al 310: 7e 0a jle 31c <atoi+0x48> 312: 8b 45 08 mov 0x8(%ebp),%eax 315: 0f b6 00 movzbl (%eax),%eax 318: 3c 39 cmp $0x39,%al 31a: 7e c7 jle 2e3 <atoi+0xf> n = n*10 + *s++ - '0'; return n; 31c: 8b 45 fc mov -0x4(%ebp),%eax } 31f: c9 leave 320: c3 ret 00000321 <memmove>: void* memmove(void *vdst, void *vsrc, int n) { 321: 55 push %ebp 322: 89 e5 mov %esp,%ebp 324: 83 ec 10 sub $0x10,%esp char *dst, *src; dst = vdst; 327: 8b 45 08 mov 0x8(%ebp),%eax 32a: 89 45 fc mov %eax,-0x4(%ebp) src = vsrc; 32d: 8b 45 0c mov 0xc(%ebp),%eax 330: 89 45 f8 mov %eax,-0x8(%ebp) while(n-- > 0) 333: eb 17 jmp 34c <memmove+0x2b> *dst++ = *src++; 335: 8b 45 fc mov -0x4(%ebp),%eax 338: 8d 50 01 lea 0x1(%eax),%edx 33b: 89 55 fc mov %edx,-0x4(%ebp) 33e: 8b 55 f8 mov -0x8(%ebp),%edx 341: 8d 4a 01 lea 0x1(%edx),%ecx 344: 89 4d f8 mov %ecx,-0x8(%ebp) 347: 0f b6 12 movzbl (%edx),%edx 34a: 88 10 mov %dl,(%eax) { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 34c: 8b 45 10 mov 0x10(%ebp),%eax 34f: 8d 50 ff lea -0x1(%eax),%edx 352: 89 55 10 mov %edx,0x10(%ebp) 355: 85 c0 test %eax,%eax 357: 7f dc jg 335 <memmove+0x14> *dst++ = *src++; return vdst; 359: 8b 45 08 mov 0x8(%ebp),%eax } 35c: c9 leave 35d: c3 ret 0000035e <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 35e: b8 01 00 00 00 mov $0x1,%eax 363: cd 40 int $0x40 365: c3 ret 00000366 <exit>: SYSCALL(exit) 366: b8 02 00 00 00 mov $0x2,%eax 36b: cd 40 int $0x40 36d: c3 ret 0000036e <wait>: SYSCALL(wait) 36e: b8 03 00 00 00 mov $0x3,%eax 373: cd 40 int $0x40 375: c3 ret 00000376 <pipe>: SYSCALL(pipe) 376: b8 04 00 00 00 mov $0x4,%eax 37b: cd 40 int $0x40 37d: c3 ret 0000037e <read>: SYSCALL(read) 37e: b8 05 00 00 00 mov $0x5,%eax 383: cd 40 int $0x40 385: c3 ret 00000386 <write>: SYSCALL(write) 386: b8 10 00 00 00 mov $0x10,%eax 38b: cd 40 int $0x40 38d: c3 ret 0000038e <close>: SYSCALL(close) 38e: b8 15 00 00 00 mov $0x15,%eax 393: cd 40 int $0x40 395: c3 ret 00000396 <kill>: SYSCALL(kill) 396: b8 06 00 00 00 mov $0x6,%eax 39b: cd 40 int $0x40 39d: c3 ret 0000039e <exec>: SYSCALL(exec) 39e: b8 07 00 00 00 mov $0x7,%eax 3a3: cd 40 int $0x40 3a5: c3 ret 000003a6 <open>: SYSCALL(open) 3a6: b8 0f 00 00 00 mov $0xf,%eax 3ab: cd 40 int $0x40 3ad: c3 ret 000003ae <mknod>: SYSCALL(mknod) 3ae: b8 11 00 00 00 mov $0x11,%eax 3b3: cd 40 int $0x40 3b5: c3 ret 000003b6 <unlink>: SYSCALL(unlink) 3b6: b8 12 00 00 00 mov $0x12,%eax 3bb: cd 40 int $0x40 3bd: c3 ret 000003be <fstat>: SYSCALL(fstat) 3be: b8 08 00 00 00 mov $0x8,%eax 3c3: cd 40 int $0x40 3c5: c3 ret 000003c6 <link>: SYSCALL(link) 3c6: b8 13 00 00 00 mov $0x13,%eax 3cb: cd 40 int $0x40 3cd: c3 ret 000003ce <mkdir>: SYSCALL(mkdir) 3ce: b8 14 00 00 00 mov $0x14,%eax 3d3: cd 40 int $0x40 3d5: c3 ret 000003d6 <chdir>: SYSCALL(chdir) 3d6: b8 09 00 00 00 mov $0x9,%eax 3db: cd 40 int $0x40 3dd: c3 ret 000003de <dup>: SYSCALL(dup) 3de: b8 0a 00 00 00 mov $0xa,%eax 3e3: cd 40 int $0x40 3e5: c3 ret 000003e6 <getpid>: SYSCALL(getpid) 3e6: b8 0b 00 00 00 mov $0xb,%eax 3eb: cd 40 int $0x40 3ed: c3 ret 000003ee <sbrk>: SYSCALL(sbrk) 3ee: b8 0c 00 00 00 mov $0xc,%eax 3f3: cd 40 int $0x40 3f5: c3 ret 000003f6 <sleep>: SYSCALL(sleep) 3f6: b8 0d 00 00 00 mov $0xd,%eax 3fb: cd 40 int $0x40 3fd: c3 ret 000003fe <uptime>: SYSCALL(uptime) 3fe: b8 0e 00 00 00 mov $0xe,%eax 403: cd 40 int $0x40 405: c3 ret 00000406 <getCuPos>: SYSCALL(getCuPos) 406: b8 16 00 00 00 mov $0x16,%eax 40b: cd 40 int $0x40 40d: c3 ret 0000040e <setCuPos>: SYSCALL(setCuPos) 40e: b8 17 00 00 00 mov $0x17,%eax 413: cd 40 int $0x40 415: c3 ret 00000416 <getSnapshot>: SYSCALL(getSnapshot) 416: b8 18 00 00 00 mov $0x18,%eax 41b: cd 40 int $0x40 41d: c3 ret 0000041e <clearScreen>: 41e: b8 19 00 00 00 mov $0x19,%eax 423: cd 40 int $0x40 425: c3 ret 00000426 <putc>: #include "stat.h" #include "user.h" static void putc(int fd, char c) { 426: 55 push %ebp 427: 89 e5 mov %esp,%ebp 429: 83 ec 18 sub $0x18,%esp 42c: 8b 45 0c mov 0xc(%ebp),%eax 42f: 88 45 f4 mov %al,-0xc(%ebp) write(fd, &c, 1); 432: 83 ec 04 sub $0x4,%esp 435: 6a 01 push $0x1 437: 8d 45 f4 lea -0xc(%ebp),%eax 43a: 50 push %eax 43b: ff 75 08 pushl 0x8(%ebp) 43e: e8 43 ff ff ff call 386 <write> 443: 83 c4 10 add $0x10,%esp } 446: 90 nop 447: c9 leave 448: c3 ret 00000449 <printint>: static void printint(int fd, int xx, int base, int sgn) { 449: 55 push %ebp 44a: 89 e5 mov %esp,%ebp 44c: 53 push %ebx 44d: 83 ec 24 sub $0x24,%esp static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 450: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) if(sgn && xx < 0){ 457: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 45b: 74 17 je 474 <printint+0x2b> 45d: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 461: 79 11 jns 474 <printint+0x2b> neg = 1; 463: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp) x = -xx; 46a: 8b 45 0c mov 0xc(%ebp),%eax 46d: f7 d8 neg %eax 46f: 89 45 ec mov %eax,-0x14(%ebp) 472: eb 06 jmp 47a <printint+0x31> } else { x = xx; 474: 8b 45 0c mov 0xc(%ebp),%eax 477: 89 45 ec mov %eax,-0x14(%ebp) } i = 0; 47a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) do{ buf[i++] = digits[x % base]; 481: 8b 4d f4 mov -0xc(%ebp),%ecx 484: 8d 41 01 lea 0x1(%ecx),%eax 487: 89 45 f4 mov %eax,-0xc(%ebp) 48a: 8b 5d 10 mov 0x10(%ebp),%ebx 48d: 8b 45 ec mov -0x14(%ebp),%eax 490: ba 00 00 00 00 mov $0x0,%edx 495: f7 f3 div %ebx 497: 89 d0 mov %edx,%eax 499: 0f b6 80 4c 0b 00 00 movzbl 0xb4c(%eax),%eax 4a0: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1) }while((x /= base) != 0); 4a4: 8b 5d 10 mov 0x10(%ebp),%ebx 4a7: 8b 45 ec mov -0x14(%ebp),%eax 4aa: ba 00 00 00 00 mov $0x0,%edx 4af: f7 f3 div %ebx 4b1: 89 45 ec mov %eax,-0x14(%ebp) 4b4: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 4b8: 75 c7 jne 481 <printint+0x38> if(neg) 4ba: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 4be: 74 2d je 4ed <printint+0xa4> buf[i++] = '-'; 4c0: 8b 45 f4 mov -0xc(%ebp),%eax 4c3: 8d 50 01 lea 0x1(%eax),%edx 4c6: 89 55 f4 mov %edx,-0xc(%ebp) 4c9: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1) while(--i >= 0) 4ce: eb 1d jmp 4ed <printint+0xa4> putc(fd, buf[i]); 4d0: 8d 55 dc lea -0x24(%ebp),%edx 4d3: 8b 45 f4 mov -0xc(%ebp),%eax 4d6: 01 d0 add %edx,%eax 4d8: 0f b6 00 movzbl (%eax),%eax 4db: 0f be c0 movsbl %al,%eax 4de: 83 ec 08 sub $0x8,%esp 4e1: 50 push %eax 4e2: ff 75 08 pushl 0x8(%ebp) 4e5: e8 3c ff ff ff call 426 <putc> 4ea: 83 c4 10 add $0x10,%esp buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 4ed: 83 6d f4 01 subl $0x1,-0xc(%ebp) 4f1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 4f5: 79 d9 jns 4d0 <printint+0x87> putc(fd, buf[i]); } 4f7: 90 nop 4f8: 8b 5d fc mov -0x4(%ebp),%ebx 4fb: c9 leave 4fc: c3 ret 000004fd <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 4fd: 55 push %ebp 4fe: 89 e5 mov %esp,%ebp 500: 83 ec 28 sub $0x28,%esp char *s; int c, i, state; uint *ap; state = 0; 503: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) ap = (uint*)(void*)&fmt + 1; 50a: 8d 45 0c lea 0xc(%ebp),%eax 50d: 83 c0 04 add $0x4,%eax 510: 89 45 e8 mov %eax,-0x18(%ebp) for(i = 0; fmt[i]; i++){ 513: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 51a: e9 59 01 00 00 jmp 678 <printf+0x17b> c = fmt[i] & 0xff; 51f: 8b 55 0c mov 0xc(%ebp),%edx 522: 8b 45 f0 mov -0x10(%ebp),%eax 525: 01 d0 add %edx,%eax 527: 0f b6 00 movzbl (%eax),%eax 52a: 0f be c0 movsbl %al,%eax 52d: 25 ff 00 00 00 and $0xff,%eax 532: 89 45 e4 mov %eax,-0x1c(%ebp) if(state == 0){ 535: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 539: 75 2c jne 567 <printf+0x6a> if(c == '%'){ 53b: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 53f: 75 0c jne 54d <printf+0x50> state = '%'; 541: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp) 548: e9 27 01 00 00 jmp 674 <printf+0x177> } else { putc(fd, c); 54d: 8b 45 e4 mov -0x1c(%ebp),%eax 550: 0f be c0 movsbl %al,%eax 553: 83 ec 08 sub $0x8,%esp 556: 50 push %eax 557: ff 75 08 pushl 0x8(%ebp) 55a: e8 c7 fe ff ff call 426 <putc> 55f: 83 c4 10 add $0x10,%esp 562: e9 0d 01 00 00 jmp 674 <printf+0x177> } } else if(state == '%'){ 567: 83 7d ec 25 cmpl $0x25,-0x14(%ebp) 56b: 0f 85 03 01 00 00 jne 674 <printf+0x177> if(c == 'd'){ 571: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp) 575: 75 1e jne 595 <printf+0x98> printint(fd, *ap, 10, 1); 577: 8b 45 e8 mov -0x18(%ebp),%eax 57a: 8b 00 mov (%eax),%eax 57c: 6a 01 push $0x1 57e: 6a 0a push $0xa 580: 50 push %eax 581: ff 75 08 pushl 0x8(%ebp) 584: e8 c0 fe ff ff call 449 <printint> 589: 83 c4 10 add $0x10,%esp ap++; 58c: 83 45 e8 04 addl $0x4,-0x18(%ebp) 590: e9 d8 00 00 00 jmp 66d <printf+0x170> } else if(c == 'x' || c == 'p'){ 595: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp) 599: 74 06 je 5a1 <printf+0xa4> 59b: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp) 59f: 75 1e jne 5bf <printf+0xc2> printint(fd, *ap, 16, 0); 5a1: 8b 45 e8 mov -0x18(%ebp),%eax 5a4: 8b 00 mov (%eax),%eax 5a6: 6a 00 push $0x0 5a8: 6a 10 push $0x10 5aa: 50 push %eax 5ab: ff 75 08 pushl 0x8(%ebp) 5ae: e8 96 fe ff ff call 449 <printint> 5b3: 83 c4 10 add $0x10,%esp ap++; 5b6: 83 45 e8 04 addl $0x4,-0x18(%ebp) 5ba: e9 ae 00 00 00 jmp 66d <printf+0x170> } else if(c == 's'){ 5bf: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp) 5c3: 75 43 jne 608 <printf+0x10b> s = (char*)*ap; 5c5: 8b 45 e8 mov -0x18(%ebp),%eax 5c8: 8b 00 mov (%eax),%eax 5ca: 89 45 f4 mov %eax,-0xc(%ebp) ap++; 5cd: 83 45 e8 04 addl $0x4,-0x18(%ebp) if(s == 0) 5d1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 5d5: 75 25 jne 5fc <printf+0xff> s = "(null)"; 5d7: c7 45 f4 d9 08 00 00 movl $0x8d9,-0xc(%ebp) while(*s != 0){ 5de: eb 1c jmp 5fc <printf+0xff> putc(fd, *s); 5e0: 8b 45 f4 mov -0xc(%ebp),%eax 5e3: 0f b6 00 movzbl (%eax),%eax 5e6: 0f be c0 movsbl %al,%eax 5e9: 83 ec 08 sub $0x8,%esp 5ec: 50 push %eax 5ed: ff 75 08 pushl 0x8(%ebp) 5f0: e8 31 fe ff ff call 426 <putc> 5f5: 83 c4 10 add $0x10,%esp s++; 5f8: 83 45 f4 01 addl $0x1,-0xc(%ebp) } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 5fc: 8b 45 f4 mov -0xc(%ebp),%eax 5ff: 0f b6 00 movzbl (%eax),%eax 602: 84 c0 test %al,%al 604: 75 da jne 5e0 <printf+0xe3> 606: eb 65 jmp 66d <printf+0x170> putc(fd, *s); s++; } } else if(c == 'c'){ 608: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp) 60c: 75 1d jne 62b <printf+0x12e> putc(fd, *ap); 60e: 8b 45 e8 mov -0x18(%ebp),%eax 611: 8b 00 mov (%eax),%eax 613: 0f be c0 movsbl %al,%eax 616: 83 ec 08 sub $0x8,%esp 619: 50 push %eax 61a: ff 75 08 pushl 0x8(%ebp) 61d: e8 04 fe ff ff call 426 <putc> 622: 83 c4 10 add $0x10,%esp ap++; 625: 83 45 e8 04 addl $0x4,-0x18(%ebp) 629: eb 42 jmp 66d <printf+0x170> } else if(c == '%'){ 62b: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 62f: 75 17 jne 648 <printf+0x14b> putc(fd, c); 631: 8b 45 e4 mov -0x1c(%ebp),%eax 634: 0f be c0 movsbl %al,%eax 637: 83 ec 08 sub $0x8,%esp 63a: 50 push %eax 63b: ff 75 08 pushl 0x8(%ebp) 63e: e8 e3 fd ff ff call 426 <putc> 643: 83 c4 10 add $0x10,%esp 646: eb 25 jmp 66d <printf+0x170> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); 648: 83 ec 08 sub $0x8,%esp 64b: 6a 25 push $0x25 64d: ff 75 08 pushl 0x8(%ebp) 650: e8 d1 fd ff ff call 426 <putc> 655: 83 c4 10 add $0x10,%esp putc(fd, c); 658: 8b 45 e4 mov -0x1c(%ebp),%eax 65b: 0f be c0 movsbl %al,%eax 65e: 83 ec 08 sub $0x8,%esp 661: 50 push %eax 662: ff 75 08 pushl 0x8(%ebp) 665: e8 bc fd ff ff call 426 <putc> 66a: 83 c4 10 add $0x10,%esp } state = 0; 66d: 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++){ 674: 83 45 f0 01 addl $0x1,-0x10(%ebp) 678: 8b 55 0c mov 0xc(%ebp),%edx 67b: 8b 45 f0 mov -0x10(%ebp),%eax 67e: 01 d0 add %edx,%eax 680: 0f b6 00 movzbl (%eax),%eax 683: 84 c0 test %al,%al 685: 0f 85 94 fe ff ff jne 51f <printf+0x22> putc(fd, c); } state = 0; } } } 68b: 90 nop 68c: c9 leave 68d: c3 ret 0000068e <free>: static Header base; static Header *freep; void free(void *ap) { 68e: 55 push %ebp 68f: 89 e5 mov %esp,%ebp 691: 83 ec 10 sub $0x10,%esp Header *bp, *p; bp = (Header*)ap - 1; 694: 8b 45 08 mov 0x8(%ebp),%eax 697: 83 e8 08 sub $0x8,%eax 69a: 89 45 f8 mov %eax,-0x8(%ebp) for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 69d: a1 68 0b 00 00 mov 0xb68,%eax 6a2: 89 45 fc mov %eax,-0x4(%ebp) 6a5: eb 24 jmp 6cb <free+0x3d> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 6a7: 8b 45 fc mov -0x4(%ebp),%eax 6aa: 8b 00 mov (%eax),%eax 6ac: 3b 45 fc cmp -0x4(%ebp),%eax 6af: 77 12 ja 6c3 <free+0x35> 6b1: 8b 45 f8 mov -0x8(%ebp),%eax 6b4: 3b 45 fc cmp -0x4(%ebp),%eax 6b7: 77 24 ja 6dd <free+0x4f> 6b9: 8b 45 fc mov -0x4(%ebp),%eax 6bc: 8b 00 mov (%eax),%eax 6be: 3b 45 f8 cmp -0x8(%ebp),%eax 6c1: 77 1a ja 6dd <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) 6c3: 8b 45 fc mov -0x4(%ebp),%eax 6c6: 8b 00 mov (%eax),%eax 6c8: 89 45 fc mov %eax,-0x4(%ebp) 6cb: 8b 45 f8 mov -0x8(%ebp),%eax 6ce: 3b 45 fc cmp -0x4(%ebp),%eax 6d1: 76 d4 jbe 6a7 <free+0x19> 6d3: 8b 45 fc mov -0x4(%ebp),%eax 6d6: 8b 00 mov (%eax),%eax 6d8: 3b 45 f8 cmp -0x8(%ebp),%eax 6db: 76 ca jbe 6a7 <free+0x19> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ 6dd: 8b 45 f8 mov -0x8(%ebp),%eax 6e0: 8b 40 04 mov 0x4(%eax),%eax 6e3: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 6ea: 8b 45 f8 mov -0x8(%ebp),%eax 6ed: 01 c2 add %eax,%edx 6ef: 8b 45 fc mov -0x4(%ebp),%eax 6f2: 8b 00 mov (%eax),%eax 6f4: 39 c2 cmp %eax,%edx 6f6: 75 24 jne 71c <free+0x8e> bp->s.size += p->s.ptr->s.size; 6f8: 8b 45 f8 mov -0x8(%ebp),%eax 6fb: 8b 50 04 mov 0x4(%eax),%edx 6fe: 8b 45 fc mov -0x4(%ebp),%eax 701: 8b 00 mov (%eax),%eax 703: 8b 40 04 mov 0x4(%eax),%eax 706: 01 c2 add %eax,%edx 708: 8b 45 f8 mov -0x8(%ebp),%eax 70b: 89 50 04 mov %edx,0x4(%eax) bp->s.ptr = p->s.ptr->s.ptr; 70e: 8b 45 fc mov -0x4(%ebp),%eax 711: 8b 00 mov (%eax),%eax 713: 8b 10 mov (%eax),%edx 715: 8b 45 f8 mov -0x8(%ebp),%eax 718: 89 10 mov %edx,(%eax) 71a: eb 0a jmp 726 <free+0x98> } else bp->s.ptr = p->s.ptr; 71c: 8b 45 fc mov -0x4(%ebp),%eax 71f: 8b 10 mov (%eax),%edx 721: 8b 45 f8 mov -0x8(%ebp),%eax 724: 89 10 mov %edx,(%eax) if(p + p->s.size == bp){ 726: 8b 45 fc mov -0x4(%ebp),%eax 729: 8b 40 04 mov 0x4(%eax),%eax 72c: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 733: 8b 45 fc mov -0x4(%ebp),%eax 736: 01 d0 add %edx,%eax 738: 3b 45 f8 cmp -0x8(%ebp),%eax 73b: 75 20 jne 75d <free+0xcf> p->s.size += bp->s.size; 73d: 8b 45 fc mov -0x4(%ebp),%eax 740: 8b 50 04 mov 0x4(%eax),%edx 743: 8b 45 f8 mov -0x8(%ebp),%eax 746: 8b 40 04 mov 0x4(%eax),%eax 749: 01 c2 add %eax,%edx 74b: 8b 45 fc mov -0x4(%ebp),%eax 74e: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 751: 8b 45 f8 mov -0x8(%ebp),%eax 754: 8b 10 mov (%eax),%edx 756: 8b 45 fc mov -0x4(%ebp),%eax 759: 89 10 mov %edx,(%eax) 75b: eb 08 jmp 765 <free+0xd7> } else p->s.ptr = bp; 75d: 8b 45 fc mov -0x4(%ebp),%eax 760: 8b 55 f8 mov -0x8(%ebp),%edx 763: 89 10 mov %edx,(%eax) freep = p; 765: 8b 45 fc mov -0x4(%ebp),%eax 768: a3 68 0b 00 00 mov %eax,0xb68 } 76d: 90 nop 76e: c9 leave 76f: c3 ret 00000770 <morecore>: static Header* morecore(uint nu) { 770: 55 push %ebp 771: 89 e5 mov %esp,%ebp 773: 83 ec 18 sub $0x18,%esp char *p; Header *hp; if(nu < 4096) 776: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp) 77d: 77 07 ja 786 <morecore+0x16> nu = 4096; 77f: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp) p = sbrk(nu * sizeof(Header)); 786: 8b 45 08 mov 0x8(%ebp),%eax 789: c1 e0 03 shl $0x3,%eax 78c: 83 ec 0c sub $0xc,%esp 78f: 50 push %eax 790: e8 59 fc ff ff call 3ee <sbrk> 795: 83 c4 10 add $0x10,%esp 798: 89 45 f4 mov %eax,-0xc(%ebp) if(p == (char*)-1) 79b: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp) 79f: 75 07 jne 7a8 <morecore+0x38> return 0; 7a1: b8 00 00 00 00 mov $0x0,%eax 7a6: eb 26 jmp 7ce <morecore+0x5e> hp = (Header*)p; 7a8: 8b 45 f4 mov -0xc(%ebp),%eax 7ab: 89 45 f0 mov %eax,-0x10(%ebp) hp->s.size = nu; 7ae: 8b 45 f0 mov -0x10(%ebp),%eax 7b1: 8b 55 08 mov 0x8(%ebp),%edx 7b4: 89 50 04 mov %edx,0x4(%eax) free((void*)(hp + 1)); 7b7: 8b 45 f0 mov -0x10(%ebp),%eax 7ba: 83 c0 08 add $0x8,%eax 7bd: 83 ec 0c sub $0xc,%esp 7c0: 50 push %eax 7c1: e8 c8 fe ff ff call 68e <free> 7c6: 83 c4 10 add $0x10,%esp return freep; 7c9: a1 68 0b 00 00 mov 0xb68,%eax } 7ce: c9 leave 7cf: c3 ret 000007d0 <malloc>: void* malloc(uint nbytes) { 7d0: 55 push %ebp 7d1: 89 e5 mov %esp,%ebp 7d3: 83 ec 18 sub $0x18,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 7d6: 8b 45 08 mov 0x8(%ebp),%eax 7d9: 83 c0 07 add $0x7,%eax 7dc: c1 e8 03 shr $0x3,%eax 7df: 83 c0 01 add $0x1,%eax 7e2: 89 45 ec mov %eax,-0x14(%ebp) if((prevp = freep) == 0){ 7e5: a1 68 0b 00 00 mov 0xb68,%eax 7ea: 89 45 f0 mov %eax,-0x10(%ebp) 7ed: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 7f1: 75 23 jne 816 <malloc+0x46> base.s.ptr = freep = prevp = &base; 7f3: c7 45 f0 60 0b 00 00 movl $0xb60,-0x10(%ebp) 7fa: 8b 45 f0 mov -0x10(%ebp),%eax 7fd: a3 68 0b 00 00 mov %eax,0xb68 802: a1 68 0b 00 00 mov 0xb68,%eax 807: a3 60 0b 00 00 mov %eax,0xb60 base.s.size = 0; 80c: c7 05 64 0b 00 00 00 movl $0x0,0xb64 813: 00 00 00 } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 816: 8b 45 f0 mov -0x10(%ebp),%eax 819: 8b 00 mov (%eax),%eax 81b: 89 45 f4 mov %eax,-0xc(%ebp) if(p->s.size >= nunits){ 81e: 8b 45 f4 mov -0xc(%ebp),%eax 821: 8b 40 04 mov 0x4(%eax),%eax 824: 3b 45 ec cmp -0x14(%ebp),%eax 827: 72 4d jb 876 <malloc+0xa6> if(p->s.size == nunits) 829: 8b 45 f4 mov -0xc(%ebp),%eax 82c: 8b 40 04 mov 0x4(%eax),%eax 82f: 3b 45 ec cmp -0x14(%ebp),%eax 832: 75 0c jne 840 <malloc+0x70> prevp->s.ptr = p->s.ptr; 834: 8b 45 f4 mov -0xc(%ebp),%eax 837: 8b 10 mov (%eax),%edx 839: 8b 45 f0 mov -0x10(%ebp),%eax 83c: 89 10 mov %edx,(%eax) 83e: eb 26 jmp 866 <malloc+0x96> else { p->s.size -= nunits; 840: 8b 45 f4 mov -0xc(%ebp),%eax 843: 8b 40 04 mov 0x4(%eax),%eax 846: 2b 45 ec sub -0x14(%ebp),%eax 849: 89 c2 mov %eax,%edx 84b: 8b 45 f4 mov -0xc(%ebp),%eax 84e: 89 50 04 mov %edx,0x4(%eax) p += p->s.size; 851: 8b 45 f4 mov -0xc(%ebp),%eax 854: 8b 40 04 mov 0x4(%eax),%eax 857: c1 e0 03 shl $0x3,%eax 85a: 01 45 f4 add %eax,-0xc(%ebp) p->s.size = nunits; 85d: 8b 45 f4 mov -0xc(%ebp),%eax 860: 8b 55 ec mov -0x14(%ebp),%edx 863: 89 50 04 mov %edx,0x4(%eax) } freep = prevp; 866: 8b 45 f0 mov -0x10(%ebp),%eax 869: a3 68 0b 00 00 mov %eax,0xb68 return (void*)(p + 1); 86e: 8b 45 f4 mov -0xc(%ebp),%eax 871: 83 c0 08 add $0x8,%eax 874: eb 3b jmp 8b1 <malloc+0xe1> } if(p == freep) 876: a1 68 0b 00 00 mov 0xb68,%eax 87b: 39 45 f4 cmp %eax,-0xc(%ebp) 87e: 75 1e jne 89e <malloc+0xce> if((p = morecore(nunits)) == 0) 880: 83 ec 0c sub $0xc,%esp 883: ff 75 ec pushl -0x14(%ebp) 886: e8 e5 fe ff ff call 770 <morecore> 88b: 83 c4 10 add $0x10,%esp 88e: 89 45 f4 mov %eax,-0xc(%ebp) 891: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 895: 75 07 jne 89e <malloc+0xce> return 0; 897: b8 00 00 00 00 mov $0x0,%eax 89c: eb 13 jmp 8b1 <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){ 89e: 8b 45 f4 mov -0xc(%ebp),%eax 8a1: 89 45 f0 mov %eax,-0x10(%ebp) 8a4: 8b 45 f4 mov -0xc(%ebp),%eax 8a7: 8b 00 mov (%eax),%eax 8a9: 89 45 f4 mov %eax,-0xc(%ebp) return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } 8ac: e9 6d ff ff ff jmp 81e <malloc+0x4e> } 8b1: c9 leave 8b2: c3 ret
; A236348: Expansion of (1 - x + 2*x^2 + x^3) / ((1 - x) * (1 - x^3)) in powers of x. ; 1,0,2,4,3,5,7,6,8,10,9,11,13,12,14,16,15,17,19,18,20,22,21,23,25,24,26,28,27,29,31,30,32,34,33,35,37,36,38,40,39,41,43,42,44,46,45,47,49,48,50,52,51,53,55,54,56,58,57,59,61,60,62,64,63,65,67,66,68,70,69,71,73,72,74,76,75,77,79,78,80,82,81,83,85,84,86,88,87,89,91,90,92,94,93,95,97,96,98,100 add $0,2 mov $1,$0 mod $1,3 add $0,$1 sub $0,3
; A142284: Primes congruent to 35 mod 43. ; Submitted by Christian Krause ; 293,379,809,1153,1583,1669,2099,2357,3217,3389,3733,4421,4507,4679,4937,5023,5281,5711,6571,6829,7001,7517,7603,8291,8377,8807,8893,9151,9323,9839,10613,10957,11731,11903,12161,12763,13451,13537,13709,13967,14741,14827,15601,15773,15859,16547,16633,17321,17579,17837,17923,18181,18353,18439,18869,19213,19471,21019,21191,21277,22051,22481,22567,22739,23599,23857,24029,24373,24631,24889,25147,25577,26437,26953,27211,28759,29017,30307,31081,31253,31511,31769,32027,32371,32801,32887,33317,33403 mov $1,1 mov $2,$0 add $2,2 pow $2,2 lpb $2 add $1,33 mov $3,$1 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,53 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 sub $2,1 lpe mov $0,$1 add $0,34
//Alternative Way Using If-Else Logic #include<iostream> using namespace std; int main() { int n; cout<<"Enter Number Of Rows:"<<endl; cin>>n; for(int i=n;i>=1;i--) { for(int j=n;j>=1;j--) { if(i>=j) { cout<<"*"; } else { cout<<" "; } } cout<<endl; } }
// Copyright (c) 2011-2013 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "signverifymessagedialog.h" #include "ui_signverifymessagedialog.h" #include "addressbookpage.h" #include "base58.h" #include "guiutil.h" #include "init.h" #include "main.h" #include "optionsmodel.h" #include "walletmodel.h" #include "wallet.h" #include <QClipboard> #include <string> #include <vector> SignVerifyMessageDialog::SignVerifyMessageDialog(QWidget *parent) : QDialog(parent), ui(new Ui::SignVerifyMessageDialog), model(0) { ui->setupUi(this); #if (QT_VERSION >= 0x040700) /* Do not move this to the XML file, Qt before 4.7 will choke on it */ ui->addressIn_SM->setPlaceholderText(tr("Enter a Zepcoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)")); ui->signatureOut_SM->setPlaceholderText(tr("Click \"Sign Message\" to generate signature")); ui->addressIn_VM->setPlaceholderText(tr("Enter a Zepcoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)")); ui->signatureIn_VM->setPlaceholderText(tr("Enter Zepcoin signature")); #endif GUIUtil::setupAddressWidget(ui->addressIn_SM, this); GUIUtil::setupAddressWidget(ui->addressIn_VM, this); ui->addressIn_SM->installEventFilter(this); ui->messageIn_SM->installEventFilter(this); ui->signatureOut_SM->installEventFilter(this); ui->addressIn_VM->installEventFilter(this); ui->messageIn_VM->installEventFilter(this); ui->signatureIn_VM->installEventFilter(this); ui->signatureOut_SM->setFont(GUIUtil::bitcoinAddressFont()); ui->signatureIn_VM->setFont(GUIUtil::bitcoinAddressFont()); } SignVerifyMessageDialog::~SignVerifyMessageDialog() { delete ui; } void SignVerifyMessageDialog::setModel(WalletModel *model) { this->model = model; } void SignVerifyMessageDialog::setAddress_SM(const QString &address) { ui->addressIn_SM->setText(address); ui->messageIn_SM->setFocus(); } void SignVerifyMessageDialog::setAddress_VM(const QString &address) { ui->addressIn_VM->setText(address); ui->messageIn_VM->setFocus(); } void SignVerifyMessageDialog::showTab_SM(bool fShow) { ui->tabWidget->setCurrentIndex(0); if (fShow) this->show(); } void SignVerifyMessageDialog::showTab_VM(bool fShow) { ui->tabWidget->setCurrentIndex(1); if (fShow) this->show(); } void SignVerifyMessageDialog::on_addressBookButton_SM_clicked() { if (model && model->getAddressTableModel()) { AddressBookPage dlg(AddressBookPage::ForSending, AddressBookPage::ReceivingTab, this); dlg.setModel(model->getAddressTableModel()); if (dlg.exec()) { setAddress_SM(dlg.getReturnValue()); } } } void SignVerifyMessageDialog::on_pasteButton_SM_clicked() { setAddress_SM(QApplication::clipboard()->text()); } void SignVerifyMessageDialog::on_signMessageButton_SM_clicked() { /* Clear old signature to ensure users don't get confused on error with an old signature displayed */ ui->signatureOut_SM->clear(); CBitcoinAddress addr(ui->addressIn_SM->text().toStdString()); if (!addr.IsValid()) { ui->addressIn_SM->setValid(false); ui->statusLabel_SM->setStyleSheet("QLabel { color: red; }"); ui->statusLabel_SM->setText(tr("The entered address is invalid.") + QString(" ") + tr("Please check the address and try again.")); return; } CKeyID keyID; if (!addr.GetKeyID(keyID)) { ui->addressIn_SM->setValid(false); ui->statusLabel_SM->setStyleSheet("QLabel { color: red; }"); ui->statusLabel_SM->setText(tr("The entered address does not refer to a key.") + QString(" ") + tr("Please check the address and try again.")); return; } WalletModel::UnlockContext ctx(model->requestUnlock()); if (!ctx.isValid()) { ui->statusLabel_SM->setStyleSheet("QLabel { color: red; }"); ui->statusLabel_SM->setText(tr("Wallet unlock was cancelled.")); return; } CKey key; if (!pwalletMain->GetKey(keyID, key)) { ui->statusLabel_SM->setStyleSheet("QLabel { color: red; }"); ui->statusLabel_SM->setText(tr("Private key for the entered address is not available.")); return; } CDataStream ss(SER_GETHASH, 0); ss << strMessageMagic; ss << ui->messageIn_SM->document()->toPlainText().toStdString(); std::vector<unsigned char> vchSig; if (!key.SignCompact(Hash(ss.begin(), ss.end()), vchSig)) { ui->statusLabel_SM->setStyleSheet("QLabel { color: red; }"); ui->statusLabel_SM->setText(QString("<nobr>") + tr("Message signing failed.") + QString("</nobr>")); return; } ui->statusLabel_SM->setStyleSheet("QLabel { color: green; }"); ui->statusLabel_SM->setText(QString("<nobr>") + tr("Message signed.") + QString("</nobr>")); ui->signatureOut_SM->setText(QString::fromStdString(EncodeBase64(&vchSig[0], vchSig.size()))); } void SignVerifyMessageDialog::on_copySignatureButton_SM_clicked() { QApplication::clipboard()->setText(ui->signatureOut_SM->text()); } void SignVerifyMessageDialog::on_clearButton_SM_clicked() { ui->addressIn_SM->clear(); ui->messageIn_SM->clear(); ui->signatureOut_SM->clear(); ui->statusLabel_SM->clear(); ui->addressIn_SM->setFocus(); } void SignVerifyMessageDialog::on_addressBookButton_VM_clicked() { if (model && model->getAddressTableModel()) { AddressBookPage dlg(AddressBookPage::ForSending, AddressBookPage::SendingTab, this); dlg.setModel(model->getAddressTableModel()); if (dlg.exec()) { setAddress_VM(dlg.getReturnValue()); } } } void SignVerifyMessageDialog::on_verifyMessageButton_VM_clicked() { CBitcoinAddress addr(ui->addressIn_VM->text().toStdString()); if (!addr.IsValid()) { ui->addressIn_VM->setValid(false); ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }"); ui->statusLabel_VM->setText(tr("The entered address is invalid.") + QString(" ") + tr("Please check the address and try again.")); return; } CKeyID keyID; if (!addr.GetKeyID(keyID)) { ui->addressIn_VM->setValid(false); ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }"); ui->statusLabel_VM->setText(tr("The entered address does not refer to a key.") + QString(" ") + tr("Please check the address and try again.")); return; } bool fInvalid = false; std::vector<unsigned char> vchSig = DecodeBase64(ui->signatureIn_VM->text().toStdString().c_str(), &fInvalid); if (fInvalid) { ui->signatureIn_VM->setValid(false); ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }"); ui->statusLabel_VM->setText(tr("The signature could not be decoded.") + QString(" ") + tr("Please check the signature and try again.")); return; } CDataStream ss(SER_GETHASH, 0); ss << strMessageMagic; ss << ui->messageIn_VM->document()->toPlainText().toStdString(); CPubKey pubkey; if (!pubkey.RecoverCompact(Hash(ss.begin(), ss.end()), vchSig)) { ui->signatureIn_VM->setValid(false); ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }"); ui->statusLabel_VM->setText(tr("The signature did not match the message digest.") + QString(" ") + tr("Please check the signature and try again.")); return; } if (!(CBitcoinAddress(pubkey.GetID()) == addr)) { ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }"); ui->statusLabel_VM->setText(QString("<nobr>") + tr("Message verification failed.") + QString("</nobr>")); return; } ui->statusLabel_VM->setStyleSheet("QLabel { color: green; }"); ui->statusLabel_VM->setText(QString("<nobr>") + tr("Message verified.") + QString("</nobr>")); } void SignVerifyMessageDialog::on_clearButton_VM_clicked() { ui->addressIn_VM->clear(); ui->signatureIn_VM->clear(); ui->messageIn_VM->clear(); ui->statusLabel_VM->clear(); ui->addressIn_VM->setFocus(); } bool SignVerifyMessageDialog::eventFilter(QObject *object, QEvent *event) { if (event->type() == QEvent::MouseButtonPress || event->type() == QEvent::FocusIn) { if (ui->tabWidget->currentIndex() == 0) { /* Clear status message on focus change */ ui->statusLabel_SM->clear(); /* Select generated signature */ if (object == ui->signatureOut_SM) { ui->signatureOut_SM->selectAll(); return true; } } else if (ui->tabWidget->currentIndex() == 1) { /* Clear status message on focus change */ ui->statusLabel_VM->clear(); } } return QDialog::eventFilter(object, event); }
main: mov 8, %g1 mov -7, %g2 add %g1,%g2,%o0 xor %g1,%g2,%o1 andn %g1,%g2,%o2 xnor %g1,%g2,%o3 sub %g1,%g2,%o4
.ASSUME ADL=0 ;=============================================================================== ;OS 2.43 basecall table is 4917 bytes long (1639 entries) starting at $4000 #DEFINE OS_NUMCALLS 1639 bcall_sbase_os: ;.ds (bcall_sbase_os+(3*OS_NUMCALLS))-$ .dl errnosupport ;$4000 _JErrorNo .dl errnosupport ;$4003 _FontHook .dl errnosupport ;$4006 _call_character_hook .dl LdHLind ;$4009 _ldHLind .dl CpHLDE ;$400C _CpHLDE .dl errnosupport ;$400F _DivHLBy10 .dl errnosupport ;$4012 _DivHLByA .dl KbdScan ;$4015 _kdbScan .dl GetCSC ;$4018 _GetCSC .dl errnosupport ;$401B _coorMon .dl errnosupport ;$401E _Mon .dl errnosupport ;$4021 _monForceKey .dl errnosupport ;$4024 _sendKPress .dl errnosupport ;$4027 _JForceCmdNoChar .dl errnosupport ;$402A _JForceCmd .dl errnosupport ;$402D _sysErrHandler .dl errnosupport ;$4030 _newContext .dl errnosupport ;$4033 _newContext0 .dl errnosupport ;$4036 _cxPutAway .dl errnosupport ;$4039 _cxPutAway2 .dl errnosupport ;$403C _cxPPutAway .dl errnosupport ;$403F _cxSizeWind .dl errnosupport ;$4042 _cxErrEP .dl errnosupport ;$4045 _cxMain .dl errnosupport ;$4048 _monErrHand .dl errnosupport ;$404B _AppInit .dl errnosupport ;$404E _resetRam .dl errnosupport ;$4051 _lcd_busy .dl errnosupport ;$4054 _Min .dl errnosupport ;$4057 _Max .dl errnosupport ;$405A .dl errnosupport ;$405D .dl errnosupport ;$4060 _Trunc .dl errnosupport ;$4063 _InvSub .dl errnosupport ;$4066 _Times2 .dl errnosupport ;$4069 _Plus1 .dl errnosupport ;$406C _Minus1 .dl errnosupport ;$406F _FPSub .dl errnosupport ;$4072 _FPAdd .dl errnosupport ;$4075 _DToR .dl errnosupport ;$4078 _RToD .dl errnosupport ;$407B _Cube .dl errnosupport ;$407E _TimesPt5 .dl errnosupport ;$4081 _FPSquare .dl errnosupport ;$4084 _FPMult .dl errnosupport ;$4087 _LJRND .dl errnosupport ;$408A _InvOP1SC .dl errnosupport ;$408D _InvOP1S .dl errnosupport ;$4090 _InvOP2S .dl errnosupport ;$4093 _frac .dl errnosupport ;$4096 _fprecip .dl errnosupport ;$4099 _fpdiv .dl errnosupport ;$409C _SqRoot .dl errnosupport ;$409F _RndGuard .dl errnosupport ;$40A2 _RnFx .dl errnosupport ;$40A5 _int .dl errnosupport ;$40A8 _Round .dl errnosupport ;$40AB _LnX .dl errnosupport ;$40AE _LogX .dl errnosupport ;$40B1 _LJNORND .dl errnosupport ;$40B4 _EToX .dl errnosupport ;$40B7 _TenX .dl errnosupport ;$40BA _SinCosRad .dl errnosupport ;$40BD _Sin .dl errnosupport ;$40C0 _cos .dl errnosupport ;$40C3 _Tan .dl errnosupport ;$40C6 _SinHCosH .dl errnosupport ;$40C9 _TanH .dl errnosupport ;$40CC _cosh .dl errnosupport ;$40CF _SinH .dl errnosupport ;$40D2 _ACosRad .dl errnosupport ;$40D5 _ATanRad .dl errnosupport ;$40D8 _ATan2Rad .dl errnosupport ;$40DB _ASinRad .dl errnosupport ;$40DE _ACos .dl errnosupport ;$40E1 _ATan .dl errnosupport ;$40E4 _ASin .dl errnosupport ;$40E7 _ATan2 .dl errnosupport ;$40EA _ATanH .dl errnosupport ;$40ED _ASinH .dl errnosupport ;$40F0 _ACosH .dl errnosupport ;$40F3 _PtoR .dl errnosupport ;$40F6 _RToP .dl HLTimes9 ;$40F9 _HLTimes9 .dl errnosupport ;$40FC _CkOP1Cplx .dl errnosupport ;$40FF _CkOP1Real .dl errnosupport ;$4102 _Angle .dl errnosupport ;$4105 _COP1Set0 .dl errnosupport ;$4108 _CpOP4OP3 .dl errnosupport ;$410B _Mov9OP2Cp .dl errnosupport ;$410E _AbsO1O2Cp .dl errnosupport ;$4111 _cpop1op2 .dl OP3ToOP4 ;$4114 _OP3ToOP4 .dl OP1ToOP4 ;$4117 _OP1ToOP4 .dl OP2ToOP4 ;$411A _OP2ToOP4 .dl OP4ToOP2 ;$411D _OP4ToOP2 .dl OP3ToOP2 ;$4120 _OP3ToOP2 .dl OP1ToOP3 ;$4123 _OP1ToOP3 .dl OP5ToOP2 ;$4126 _OP5ToOP2 .dl OP5ToOP6 ;$4129 _OP5ToOP6 .dl OP5ToOP4 ;$412C _OP5ToOP4 .dl OP1ToOP2 ;$412F _OP1ToOP2 .dl OP6ToOP2 ;$4132 _OP6ToOP2 .dl OP6ToOP1 ;$4135 _OP6ToOP1 .dl OP4ToOP1 ;$4138 _OP4ToOP1 .dl OP5ToOP1 ;$413B _OP5ToOP1 .dl OP3ToOP1 ;$413E _OP3ToOP1 .dl OP6ToOP5 ;$4141 _OP6ToOP5 .dl OP4ToOP5 ;$4144 _OP4ToOP5 .dl OP3ToOP5 ;$4147 _OP3ToOP5 .dl OP2ToOP5 ;$414A _OP2ToOP5 .dl OP2ToOP6 ;$414D _OP2ToOP6 .dl OP1ToOP6 ;$4150 _OP1ToOP6 .dl OP1ToOP5 ;$4153 _OP1ToOP5 .dl OP2ToOP1 ;$4156 _OP2ToOP1 .dl Mov11B ;$4159 _Mov11B .dl Mov10B ;$415C _Mov10B .dl Mov9B ;$415F _Mov9B .dl errnosupport ;$4162 _mov9B2 .dl Mov8B ;$4165 _Mov8B .dl Mov7B ;$4168 _Mov7B .dl errnosupport ;$416B _Mov7B2 .dl OP2ToOP3 ;$416E _OP2ToOP3 .dl OP4ToOP3 ;$4171 _OP4ToOP3 .dl OP5ToOP3 ;$4174 _OP5ToOP3 .dl OP4ToOP6 ;$4177 _OP4ToOP6 .dl Mov9ToOp1 ;$417A _Mov9ToOP1 .dl Mov9Op1Op2 ;$417D _Mov9OP1OP2 .dl Mov9ToOp2 ;$4180 _Mov9ToOP2 .dl MovFrOp1 ;$4183 _MovFrOP1 .dl OP4Set1 ;$4186 _OP4Set1 .dl OP3Set1 ;$4189 _OP3Set1 .dl OP2Set8 ;$418C _OP2Set8 .dl OP2Set5 ;$418F _OP2Set5 .dl OP2SetA ;$4192 _OP2SetA .dl OP2Set4 ;$4195 _OP2Set4 .dl OP2Set3 ;$4198 _OP2Set3 .dl OP1Set1 ;$419B _OP1Set1 .dl OP1Set4 ;$419E _OP1Set4 .dl OP1Set3 ;$41A1 _OP1Set3 .dl OP3Set2 ;$41A4 _OP3Set2 .dl OP1Set2 ;$41A7 _OP1Set2 .dl OP2Set2 ;$41AA _OP2Set2 .dl OP2Set1 ;$41AD _OP2Set1 .dl Zero16D ;$41B0 _Zero16D .dl OP5Set0 ;$41B3 _OP5Set0 .dl OP4Set0 ;$41B6 _OP4Set0 .dl OP3Set0 ;$41B9 _OP3Set0 .dl OP2Set0 ;$41BC _OP2Set0 .dl OP1Set0 ;$41BF _OP1Set0 .dl errnosupport ;$41C2 _OPSet0 .dl ZeroOp1 ;$41C5 _ZeroOP1 .dl ZeroOp2 ;$41C8 _ZeroOP2 .dl ZeroOp3 ;$41CB _ZeroOP3 .dl ZeroOp ;$41CE _ZeroOP .dl ClrLp ;$41D1 _ClrLp .dl errnosupport ;$41D4 _ShRAcc .dl errnosupport ;$41D7 _ShLAcc .dl errnosupport ;$41DA _ShR18 .dl errnosupport ;$41DD _SHR18A .dl errnosupport ;$41E0 _SHR16 .dl errnosupport ;$41E3 _SHR14 .dl errnosupport ;$41E6 _SHL16 .dl errnosupport ;$41E9 _SHL14 .dl errnosupport ;$41EC _SRDO1 .dl errnosupport ;$41EF _SHRDRND .dl errnosupport ;$41F2 _MANTPA .dl errnosupport ;$41F5 _ADDPROP .dl errnosupport ;$41F8 _ADDPROPLP .dl errnosupport ;$41FB _ADD16D .dl errnosupport ;$41FE _ADD14D .dl errnosupport ;$4201 _SUB16D .dl errnosupport ;$4204 _SUB14D .dl OP2ExOP6 ;$4207 _OP2ExOP6 .dl OP5ExOP6 ;$420A _OP5ExOP6 .dl OP1ExOP5 ;$420D _OP1ExOP5 .dl OP1ExOP6 ;$4210 _OP1ExOP6 .dl OP2ExOP4 ;$4213 _OP2ExOP4 .dl OP2ExOP5 ;$4216 _OP2ExOP5 .dl OP1ExOP3 ;$4219 _OP1ExOP3 .dl OP1ExOP4 ;$421C _OP1ExOP4 .dl OP1ExOP2 ;$421F _OP1ExOP2 .dl ExLp ;$4222 _ExLp .dl errnosupport ;$4225 _CkOP1C0 .dl errnosupport ;$4228 _CkOP1FP0 .dl errnosupport ;$422B _CkOP2FP0 .dl errnosupport ;$422E _PosNo0Int .dl errnosupport ;$4231 _CKPosInt .dl errnosupport ;$4234 _CKInt .dl errnosupport ;$4237 _CKOdd .dl errnosupport ;$423A _CKOP1M .dl errnosupport ;$423D _GETCONOP1 .dl errnosupport ;$4240 _GETCONOP2 .dl errnosupport ;$4243 _PIDIV2 .dl errnosupport ;$4246 _PIDIV4 .dl errnosupport ;$4249 _PItimes2 .dl errnosupport ;$424C _PI .dl errnosupport ;$424F _ExpToHex .dl errnosupport ;$4252 _OP1ExpToDec .dl errnosupport ;$4255 _ckop2pos .dl errnosupport ;$4258 _CkOP1Pos .dl ClrOp2S ;$425B _ClrOP2S .dl ClrOp1S ;$425E _ClrOP1S .dl errnosupport ;$4261 _FDIV100 .dl errnosupport ;$4264 _FDIV10 .dl errnosupport ;$4267 _DecO1Exp .dl errnosupport ;$426A _INCO1EXP .dl errnosupport ;$426D _INCEXP .dl errnosupport ;$4270 _CkValidNum .dl errnosupport ;$4273 _GETEXP .dl HtimesL ;$4276 _HTimesL .dl errnosupport ;$4279 _EOP1NotReal .dl errnosupport ;$427C _ThetaName .dl errnosupport ;$427F _RName .dl errnosupport ;$4282 _REGEQNAME .dl errnosupport ;$4285 _RECURNNAME .dl errnosupport ;$4288 _XName .dl errnosupport ;$428B _YName .dl errnosupport ;$428E _TName .dl errnosupport ;$4291 _REALNAME .dl errnosupport ;$4294 _SETesTOfps .dl errnosupport ;$4297 _markTableDirty .dl errnosupport ;$429A _OP1MOP2EXP .dl errnosupport ;$429D _OP1EXPMinusE .dl errnosupport ;$42A0 _CHKERRBREAK .dl errnosupport ;$42A3 _isA2ByteTok .dl errnosupport ;$42A6 _GETLASTENTRY .dl errnosupport ;$42A9 _GETLASTENTRYPTR .dl errnosupport ;$42AC _REGCLRCHNG .dl errnosupport ;$42AF _RESETWINTOP .dl errnosupport ;$42B2 _SetYUp .dl errnosupport ;$42B5 _SetXUp .dl errnosupport ;$42B8 _ISO1NONTLSTorPROG .dl errnosupport ;$42BB _ISO1NONTEMPLST .dl IS_A_LSTorCLST ;$42BE _IS_A_LSTorCLST .dl errnosupport ;$42C1 _CHK_HL_999 .dl errnosupport ;$42C4 _equ_or_newequ .dl errnosupport ;$42C7 _errd_op1notpos .dl errnosupport ;$42CA _ErrD_OP1Not_R .dl errnosupport ;$42CD _ErrD_OP1NotPosInt .dl errnosupport ;$42D0 _ErrD_OP1_LE_0 .dl errnosupport ;$42D3 _ErrD_OP1_0 .dl errnosupport ;$42D6 _FINDSYM_GET_SIZE .dl errnosupport ;$42D9 _STO_STATVAR .dl errnosupport ;$42DC _Rcl_StatVar .dl errnosupport ;$42DF _CkOP2Real .dl errnosupport ;$42E2 _GET_X_INDIRECT .dl MemChk ;$42E5 _MemChk .dl errnosupport ;$42E8 _CMPPRGNAMLEN1 .dl errnosupport ;$42EB _CMPPRGNAMLEN .dl errnosupport ;$42EE _FINDPROGSYM .dl errnosupport ;$42F1 _ChkFindSym .dl errnosupport ;$42F4 _FindSym .dl InsertMem ;$42F7 _InsertMem .dl INSERTMEMA ;$42FA _INSERTMEMA .dl EnoughMem ;$42FD _EnoughMem .dl errnosupport ;$4300 _CMPMEMNEED .dl errnosupport ;$4303 _CREATEPVAR4 .dl errnosupport ;$4306 _CREATEPVAR3 .dl errnosupport ;$4309 _CREATEVAR3 .dl errnosupport ;$430C _CreateCplx .dl errnosupport ;$430F _CreateReal .dl errnosupport ;$4312 _CreateTempRList .dl errnosupport ;$4315 _CreateRList .dl errnosupport ;$4318 _CREATETCLIST .dl errnosupport ;$431B _CreateCList .dl errnosupport ;$431E _CreateTempRMat .dl errnosupport ;$4321 _CreateRMat .dl errnosupport ;$4324 _CreateTempString .dl errnosupport ;$4327 _CreateStrng .dl errnosupport ;$432A _Create0Equ .dl errnosupport ;$432D _CreateTempEqu .dl errnosupport ;$4330 _CreateEqu .dl errnosupport ;$4333 _CreatePict .dl errnosupport ;$4336 _CreateGDB .dl errnosupport ;$4339 _CreateProg .dl errnosupport ;$433C _CHKDEL .dl errnosupport ;$433F _CHKDELA .dl ADJPARSER ;$4342 _ADJPARSER .dl AdjMath ;$4345 _ADJMATH .dl ADJM7 ;$4348 _ADJM7 .dl DELMEMA ;$434B _DELMEMA .dl errnosupport ;$434E _GET_FORM_NUM .dl errnosupport ;$4351 _DelVar .dl errnosupport ;$4354 _DELVARIO .dl DelMem ;$4357 _DelMem .dl DELVAR3D ;$435A _DELVAR3D .dl DELVAR3C ;$435D _DELVAR3C .dl DelVar3DC ;$4360 _DELVAR3DC .dl IsFixedName ;$4363 _IsFixedName .dl errnosupport ;$4366 _DelVarEntry .dl DataSizeA ;$4369 _DataSizeA .dl DataSize ;$436C _DataSize .dl errnosupport ;$436F _POPMCPLXO1 .dl errnosupport ;$4372 _POPMCPLX .dl errnosupport ;$4375 _MOVCPLX .dl errnosupport ;$4378 _popOP5 .dl errnosupport ;$437B _popOP3 .dl errnosupport ;$437E _popOP1 .dl errnosupport ;$4381 _PopRealO6 .dl errnosupport ;$4384 _PopRealO5 .dl errnosupport ;$4387 _PopRealO4 .dl errnosupport ;$438A _PopRealO3 .dl errnosupport ;$438D _PopRealO2 .dl errnosupport ;$4390 _PopRealO1 .dl errnosupport ;$4393 _PopReal .dl errnosupport ;$4396 _FPOPCPLX .dl errnosupport ;$4399 _FPOPREAL .dl errnosupport ;$439C _FPOPFPS .dl errnosupport ;$439F _DeallocFPS .dl errnosupport ;$43A2 _DeallocFPS1 .dl errnosupport ;$43A5 _AllocFPS .dl errnosupport ;$43A8 _AllocFPS1 .dl errnosupport ;$43AB _PushRealO6 .dl errnosupport ;$43AE _PushRealO5 .dl errnosupport ;$43B1 _PushRealO4 .dl errnosupport ;$43B4 _PushRealO3 .dl errnosupport ;$43B7 _PushRealO2 .dl errnosupport ;$43BA _PushRealO1 .dl errnosupport ;$43BD _PushReal .dl errnosupport ;$43C0 _PushOP5 .dl errnosupport ;$43C3 _PushOP3 .dl errnosupport ;$43C6 _PUSHMCPLXO3 .dl errnosupport ;$43C9 _PushOP1 .dl errnosupport ;$43CC _PUSHMCPLXO1 .dl errnosupport ;$43CF _PUSHMCPLX .dl errnosupport ;$43D2 _ExMCplxO1 .dl Exch9 ;$43D5 _Exch9 .dl errnosupport ;$43D8 _CpyTo1FPS11 .dl errnosupport ;$43DB _CpyTo2FPS5 .dl errnosupport ;$43DE _CpyTo1FPS5 .dl errnosupport ;$43E1 _CpyTo2FPS6 .dl errnosupport ;$43E4 _CpyTo1FPS6 .dl errnosupport ;$43E7 _CpyTo2FPS7 .dl errnosupport ;$43EA _CpyTo1FPS7 .dl errnosupport ;$43ED _CpyTo1FPS8 .dl errnosupport ;$43F0 _CpyTo2FPS8 .dl errnosupport ;$43F3 _CpyTo1FPS10 .dl errnosupport ;$43F6 _CpyTo1FPS9 .dl errnosupport ;$43F9 _CpyTo2FPS4 .dl errnosupport ;$43FC _CpyTo6FPS3 .dl errnosupport ;$43FF _CpyTo6FPS2 .dl errnosupport ;$4402 _CpyTo2FPS3 .dl errnosupport ;$4405 _CPYCTO1FPS3 .dl errnosupport ;$4408 _CpyTo1FPS3 .dl errnosupport ;$440B _CPYFPS3 .dl errnosupport ;$440E _CpyTo1FPS4 .dl errnosupport ;$4411 _CpyTo3FPS2 .dl errnosupport ;$4414 _CpyTo5FPST .dl errnosupport ;$4417 _CpyTo6FPST .dl errnosupport ;$441A _CpyTo4FPST .dl errnosupport ;$441D _CpyTo3FPST .dl errnosupport ;$4420 _CpyTo2FPST .dl errnosupport ;$4423 _CpyTo1FPST .dl errnosupport ;$4426 _CPYFPST .dl errnosupport ;$4429 _CpyStack .dl errnosupport ;$442C _CpyTo3FPS1 .dl errnosupport ;$442F _CpyTo2FPS1 .dl errnosupport ;$4432 _CpyTo1FPS1 .dl errnosupport ;$4435 _CPYFPS1 .dl errnosupport ;$4438 _CpyTo2FPS2 .dl errnosupport ;$443B _CpyTo1FPS2 .dl errnosupport ;$443E _CPYFPS2 .dl errnosupport ;$4441 _CpyO3ToFPST .dl errnosupport ;$4444 _CpyO2ToFPST .dl errnosupport ;$4447 _CpyO6ToFPST .dl errnosupport ;$444A _CpyO1ToFPST .dl errnosupport ;$444D _CpyToFPST .dl errnosupport ;$4450 _CpyToStack .dl errnosupport ;$4453 _CpyO3ToFPS1 .dl errnosupport ;$4456 _CpyO5ToFPS1 .dl errnosupport ;$4459 _CpyO2ToFPS1 .dl errnosupport ;$445C _CpyO1ToFPS1 .dl errnosupport ;$445F _CpyToFPS1 .dl errnosupport ;$4462 _CpyO2ToFPS2 .dl errnosupport ;$4465 _CpyO3ToFPS2 .dl errnosupport ;$4468 _CpyO6ToFPS2 .dl errnosupport ;$446B _CpyO1ToFPS2 .dl errnosupport ;$446E _CpyToFPS2 .dl errnosupport ;$4471 _CpyO5ToFPS3 .dl errnosupport ;$4474 _CpyO2ToFPS3 .dl errnosupport ;$4477 _CpyO1ToFPS3 .dl errnosupport ;$447A _CpyToFPS3 .dl errnosupport ;$447D _CpyO1ToFPS6 .dl errnosupport ;$4480 _CpyO1ToFPS7 .dl errnosupport ;$4483 _CpyO1ToFPS5 .dl errnosupport ;$4486 _CpyO2ToFPS4 .dl errnosupport ;$4489 _CpyO1ToFPS4 .dl ErrNotEnoughMem ;$448C _ErrNotEnoughMem .dl errnosupport ;$448F _FPSMINUS9 .dl errnosupport ;$4492 _HLMINUS9 .dl errnosupport ;$4495 _ErrOverflow .dl errnosupport ;$4498 _ErrDivBy0 .dl errnosupport ;$449B _ErrSingularMat .dl errnosupport ;$449E _ErrDomain .dl errnosupport ;$44A1 _ErrIncrement .dl errnosupport ;$44A4 _ErrNon_Real .dl errnosupport ;$44A7 _ErrSyntax .dl errnosupport ;$44AA _ErrDataType .dl errnosupport ;$44AD _ErrArgument .dl errnosupport ;$44B0 _ErrDimMismatch .dl errnosupport ;$44B3 _ErrDimension .dl errnosupport ;$44B6 _ErrUndefined .dl errnosupport ;$44B9 _ErrMemory .dl errnosupport ;$44BC _ErrInvalid .dl errnosupport ;$44BF _ErrBreak .dl errnosupport ;$44C2 _ErrStat .dl errnosupport ;$44C5 _ErrSignChange .dl errnosupport ;$44C8 _ErrIterations .dl errnosupport ;$44CB _ErrBadGuess .dl errnosupport ;$44CE _ErrTolTooSmall .dl errnosupport ;$44D1 _ErrStatPlot .dl errnosupport ;$44D4 _ErrLinkXmit .dl errnosupport ;$44D7 _JError .dl errnosupport ;$44DA _noErrorEntry .dl errnosupport ;$44DD _pushErrorHandleR .dl errnosupport ;$44E0 _popErrorHandleR .dl errnosupport ;$44E3 _strcopy .dl errnosupport ;$44E6 _strCat .dl errnosupport ;$44E9 _isInSet .dl errnosupport ;$44EC _sDone .dl errnosupport ;$44EF _serrort .dl errnosupport ;$44F2 _sNameEq .dl errnosupport ;$44F5 _sUnderScr .dl errnosupport ;$44F8 _sFAIL .dl errnosupport ;$44FB _sName .dl errnosupport ;$44FE _sOK .dl PutMap ;$4501 _PutMap .dl PutC ;$4504 _PutC .dl DispHL ;$4507 _DispHL .dl PutS ;$450A _PutS .dl errnosupport ;$450D _putpsb .dl PutPS ;$4510 _PutPS .dl errnosupport ;$4513 _wputps .dl errnosupport ;$4516 _putbuf .dl errnosupport ;$4519 _putbuf1 .dl errnosupport ;$451C _wputc .dl errnosupport ;$451F _wputs .dl errnosupport ;$4522 _wputsEOL .dl errnosupport ;$4525 _wdispEOL .dl errnosupport ;$4528 _whomeup .dl errnosupport ;$452B _setNumWindow .dl NewLine ;$452E _newline .dl errnosupport ;$4531 _moveDown .dl errnosupport ;$4534 _scrollUp .dl errnosupport ;$4537 _shrinkWindow .dl errnosupport ;$453A _moveUp .dl errnosupport ;$453D _scrollDown .dl ClrLCDFull ;$4540 _ClrLCDFull .dl errnosupport ;$4543 _ClrLCD .dl ClrScrnFull ;$4546 _ClrScrnFull .dl errnosupport ;$4549 _ClrScrn .dl ClrTxtShd ;$454C _ClrTxtShd .dl errnosupport ;$454F _ClrWindow .dl errnosupport ;$4552 _EraseEOL .dl errnosupport ;$4555 _EraseEOW .dl HomeUp ;$4558 _HomeUp .dl errnosupport ;$455B _getcurloc .dl VPutMap ;$455E _VPutMap .dl VPutS ;$4561 _VPutS .dl VPutSN ;$4564 _VPutSN .dl errnosupport ;$4567 _vputsnG .dl errnosupport ;$456A _vputsnT .dl errnosupport ;$456D _RunIndicOn .dl errnosupport ;$4570 _RunIndicOff .dl errnosupport ;$4573 _saveCmdShadow .dl errnosupport ;$4576 _saveShadow .dl errnosupport ;$4579 _rstrShadow .dl errnosupport ;$457C _rstrpartial .dl errnosupport ;$457F _rstrCurRow .dl errnosupport ;$4582 _rstrUnderMenu .dl errnosupport ;$4585 _rstrbotrow .dl errnosupport ;$4588 _saveTR .dl errnosupport ;$458B _restoreTR .dl errnosupport ;$458E _GetKeyPress .dl errnosupport ;$4591 _GetTokLen .dl errnosupport ;$4594 _GET_TOK_STRNG .dl errnosupport ;$4597 _GETTOKSTRING .dl errnosupport ;$459A _PUTBPATBUF2 .dl errnosupport ;$459D _PUTBPATBUF .dl errnosupport ;$45A0 _putbPAT .dl errnosupport ;$45A3 _putcCheckScrolL .dl errnosupport ;$45A6 _DispEOL .dl errnosupport ;$45A9 _fdispEOL .dl errnosupport ;$45AC _MAKEROWCMD .dl errnosupport ;$45AF _TOTOSTRP .dl errnosupport ;$45B2 _SETVARNAME .dl errnosupport ;$45B5 _DispDone .dl errnosupport ;$45B8 _finishoutput .dl errnosupport ;$45BB _curBlink .dl errnosupport ;$45BE _CursorOff .dl errnosupport ;$45C1 _hideCursor .dl errnosupport ;$45C4 _CursorOn .dl errnosupport ;$45C7 _showCursor .dl errnosupport ;$45CA _KeyToString .dl errnosupport ;$45CD _PULLDOWNCHK .dl errnosupport ;$45D0 _MenuCatCommon .dl errnosupport ;$45D3 _ZIfCatalog .dl errnosupport ;$45D6 _ZIfMatrixMenu .dl errnosupport ;$45D9 _LoadMenuNum .dl errnosupport ;$45DC _LoadMenuNumL .dl errnosupport ;$45DF _MenCatRet .dl errnosupport ;$45E2 _MenuSwitchContext .dl errnosupport ;$45E5 _MenuEdKey .dl errnosupport ;$45E8 _BackUpGraphSettings .dl errnosupport ;$45EB _notalphnum .dl errnosupport ;$45EE _SaveSavedFlags .dl errnosupport ;$45F1 _SetMenuFlags .dl errnosupport ;$45F4 _RstrSomeFlags .dl errnosupport ;$45F7 _RstrOScreen .dl errnosupport ;$45FA _SaveOScreen .dl errnosupport ;$45FD _dispListName .dl errnosupport ;$4600 _PrevContext .dl errnosupport ;$4603 _CompareContext .dl errnosupport ;$4606 _AdrMRow .dl errnosupport ;$4609 _AdrMEle .dl errnosupport ;$460C _GETMATOP1A .dl errnosupport ;$460F _GETM1TOOP1 .dl errnosupport ;$4612 _GETM1TOP1A .dl errnosupport ;$4615 _GetMToOP1 .dl errnosupport ;$4618 _PUTTOM1A .dl errnosupport ;$461B _PUTTOMA1 .dl errnosupport ;$461E _PutToMat .dl errnosupport ;$4621 _MAT_EL_DIV .dl errnosupport ;$4624 _CMATFUN .dl errnosupport ;$4627 _ROWECH_POLY .dl errnosupport ;$462A _ROWECHELON .dl errnosupport ;$462D _AdrLEle .dl errnosupport ;$4630 _GETL1TOOP1 .dl errnosupport ;$4633 _GETL1TOP1A .dl errnosupport ;$4636 _GetLToOP1 .dl errnosupport ;$4639 _GETL1TOOP2 .dl errnosupport ;$463C _GETL1TOP2A .dl errnosupport ;$463F _GETL2TOP1A .dl errnosupport ;$4642 _PUTTOLA1 .dl errnosupport ;$4645 _PutToL .dl errnosupport ;$4648 _MAXMINLST .dl errnosupport ;$464B _LLOW .dl errnosupport ;$464E _LHIGH .dl errnosupport ;$4651 _LSUM .dl errnosupport ;$4654 CUMSUM .dl errnosupport ;$4657 _ToFrac .dl errnosupport ;$465A _SEQSET .dl errnosupport ;$465D _SEQSOLVE .dl errnosupport ;$4660 _CMP_NUM_INIT .dl errnosupport ;$4663 _BinOPExec .dl errnosupport ;$4666 _EXMEAN1 .dl errnosupport ;$4669 _SET2MVLPTRS .dl errnosupport ;$466C _SETMAT1 .dl errnosupport ;$466F _CREATETLIST .dl errnosupport ;$4672 _UnOPExec .dl errnosupport ;$4675 _ThreeExec .dl errnosupport ;$4678 _RESTOREERRNO .dl errnosupport ;$467B _FourExec .dl errnosupport ;$467E _FiveExec .dl errnosupport ;$4681 _CPYTO2ES1 .dl errnosupport ;$4684 _CPYTO6ES1 .dl errnosupport ;$4687 _CPYTO1ES1 .dl errnosupport ;$468A _CPYTO3ES1 .dl errnosupport ;$468D _CPYTO3ES2 .dl errnosupport ;$4690 _CPYTO2ES2 .dl errnosupport ;$4693 _CPYTO1ES2 .dl errnosupport ;$4696 _CPYTO2ES3 .dl errnosupport ;$4699 _CPYTO1ES3 .dl errnosupport ;$469C _CPYTO3ES4 .dl errnosupport ;$469F _CPYTO6ES3 .dl errnosupport ;$46A2 _CPYTO2ES4 .dl errnosupport ;$46A5 _CPYTO1ES4 .dl errnosupport ;$46A8 _CPYTO2ES5 .dl errnosupport ;$46AB _CPYTO1ES5 .dl errnosupport ;$46AE _CPYTO4EST .dl errnosupport ;$46B1 _CPYTO2EST .dl errnosupport ;$46B4 _CPYTO1EST .dl errnosupport ;$46B7 _CPYTO2ES6 .dl errnosupport ;$46BA _CPYTO1ES6 .dl errnosupport ;$46BD _CPYTO2ES7 .dl errnosupport ;$46C0 _CPYTO1ES7 .dl errnosupport ;$46C3 _CPYTO2ES8 .dl errnosupport ;$46C6 _CPYTO1ES8 .dl errnosupport ;$46C9 _CPYTO1ES9 .dl errnosupport ;$46CC _CPYTO2ES9 .dl errnosupport ;$46CF _CPYTO2ES10 .dl errnosupport ;$46D2 _CPYTO1ES10 .dl errnosupport ;$46D5 _CPYTO2ES11 .dl errnosupport ;$46D8 _CPYTO1ES11 .dl errnosupport ;$46DB _CPYTO2ES12 .dl errnosupport ;$46DE _CPYTO1ES12 .dl errnosupport ;$46E1 _CPYTO2ES13 .dl errnosupport ;$46E4 _CPYTO1ES13 .dl errnosupport ;$46E7 _CPYTO1ES14 .dl errnosupport ;$46EA _CPYTO1ES16 .dl errnosupport ;$46ED _CPYTO1ES17 .dl errnosupport ;$46F0 _CPYTO1ES18 .dl errnosupport ;$46F3 _CPYTO1ES15 .dl errnosupport ;$46F6 _CPYTO2ES15 .dl errnosupport ;$46F9 _CPYO1TOEST .dl errnosupport ;$46FC _CPYO1TOES1 .dl errnosupport ;$46FF _CPYO6TOES1 .dl errnosupport ;$4702 _CPYO6TOES3 .dl errnosupport ;$4705 _CPYO1TOES2 .dl errnosupport ;$4708 _CPYO2TOES2 .dl errnosupport ;$470B _CPYO1TOES3 .dl errnosupport ;$470E _CPYO1TOES4 .dl errnosupport ;$4711 _CPYO1TOES5 .dl errnosupport ;$4714 _CPYO1TOES6 .dl errnosupport ;$4717 _CPYO1TOES7 .dl errnosupport ;$471A _CPYO2TOES4 .dl errnosupport ;$471D _CPYO2TOES5 .dl errnosupport ;$4720 _CPYO2TOES6 .dl errnosupport ;$4723 _CPYO2TOES7 .dl errnosupport ;$4726 _CPYO2TOES8 .dl errnosupport ;$4729 _CPYO2TOES9 .dl errnosupport ;$472C _CPYO1TOES8 .dl errnosupport ;$472F _CPYO1TOES9 .dl errnosupport ;$4732 _CPYO1TOES10 .dl errnosupport ;$4735 _CPYO1TOES11 .dl errnosupport ;$4738 _CPYO1TOES12 .dl errnosupport ;$473B _CPYO1TOES13 .dl errnosupport ;$473E _CPYO1TOES14 .dl errnosupport ;$4741 _CPYO1TOES15 .dl errnosupport ;$4744 _EVALF3A .dl errnosupport ;$4747 _GetK .dl errnosupport ;$474A _setTitle .dl errnosupport ;$474D _dispVarVal .dl errnosupport ;$4750 _RecallEd .dl errnosupport ;$4753 _createNumEditBuf .dl errnosupport ;$4756 _ProcessBufKeys .dl errnosupport ;$4759 _CallCommon .dl errnosupport ;$475C _CommonKeys .dl errnosupport ;$475F _Leftmore .dl errnosupport ;$4762 _fDel .dl errnosupport ;$4765 _fClear .dl errnosupport ;$4768 _finsDisp .dl errnosupport ;$476B _FinsDisp02 .dl errnosupport ;$476E _closeeditbufnor .dl errnosupport ;$4771 _releaseBuffer .dl errnosupport ;$4774 _varnameToOP1hl .dl errnosupport ;$4777 _nameToOP1 .dl errnosupport ;$477A _numPPutAway .dl errnosupport ;$477D _numRedisp .dl errnosupport ;$4780 _numError02 .dl Load_SFont ;$4783 _Load_SFont .dl SFont_Len ;$4786 _SFont_Len .dl errnosupport ;$4789 _InitNumVec .dl SetXXOp1 ;$478C _SetXXOP1 .dl SetXXOp2 ;$478F _SetXXOP2 .dl SetXXXXOP2 ;$4792 _SetXXXXOP2 .dl errnosupport ;$4795 _UCLineS .dl errnosupport ;$4798 _CLine .dl errnosupport ;$479B _CLineS .dl errnosupport ;$479E _XRootY .dl errnosupport ;$47A1 _YToX .dl errnosupport ;$47A4 _ZmStats .dl errnosupport ;$47A7 _POINT_STAT_HLP .dl errnosupport ;$47AA _DRAWSPLOT .dl errnosupport ;$47AD _INITNEWTRACEP .dl errnosupport ;$47B0 _SPLOTCOORD .dl errnosupport ;$47B3 _SPLOTRIGHT .dl errnosupport ;$47B6 _SPLOTLEFT .dl errnosupport ;$47B9 _CMPBOXINFO .dl errnosupport ;$47BC _NEXTPLOT .dl errnosupport ;$47BF _PREVPLOT .dl errnosupport ;$47C2 _CLRPREVPLOT .dl errnosupport ;$47C5 _PUT_INDEX_LST .dl errnosupport ;$47C8 _GET_INDEX_LST .dl errnosupport ;$47CB _HEAP_SORT .dl errnosupport ;$47CE _StoGDB2 .dl errnosupport ;$47D1 _RclGDB2 .dl errnosupport ;$47D4 _CircCmd .dl errnosupport ;$47D7 _GrphCirc .dl Mov18B ;$47DA _Mov18B .dl errnosupport ;$47DD _DarkLine .dl errnosupport ;$47E0 _ILine .dl errnosupport ;$47E3 _IPoint .dl errnosupport ;$47E6 _XYRNDBOTH .dl errnosupport ;$47E9 _XYRND .dl errnosupport ;$47EC _CheckTOP .dl errnosupport ;$47EF _CheckXY .dl errnosupport ;$47F2 _DarkPnt .dl errnosupport ;$47F5 _CPointS .dl errnosupport ;$47F8 _WTOV .dl errnosupport ;$47FB _VtoWHLDE .dl errnosupport ;$47FE _Xitof .dl errnosupport ;$4801 _YftoI .dl errnosupport ;$4804 _XftoI .dl errnosupport ;$4807 _TraceOff .dl errnosupport ;$480A _GrRedisp .dl errnosupport ;$480D _GDISPTOKEN .dl errnosupport ;$4810 _GRDECODA .dl errnosupport ;$4813 _LABCOOR .dl errnosupport ;$4816 _COORDISP .dl errnosupport ;$4819 _TMPEQUNOSRC .dl errnosupport ;$481C _GRLABELS .dl errnosupport ;$481F _YPIXSET .dl errnosupport ;$4822 _XPIXSET .dl errnosupport ;$4825 _COPYRNG .dl errnosupport ;$4828 _VALCUR .dl errnosupport ;$482B _GRPUTAWAY .dl errnosupport ;$482E _RSTGFLAGS .dl errnosupport ;$4831 _GRReset .dl errnosupport ;$4834 _XYCENT .dl errnosupport ;$4837 _ZOOMXYCMD .dl errnosupport ;$483A _CPTDELY .dl errnosupport ;$483D _CPTDELX .dl errnosupport ;$4840 _SetFuncM .dl errnosupport ;$4843 _SetSeqM .dl errnosupport ;$4846 _SetPolM .dl errnosupport ;$4849 _SetParM .dl errnosupport ;$484C _ZmInt .dl errnosupport ;$484F _ZmDecml .dl errnosupport ;$4852 _ZmPrev .dl errnosupport ;$4855 _ZmUsr .dl errnosupport ;$4858 _SETUZM .dl errnosupport ;$485B _ZmFit .dl errnosupport ;$485E _ZmSquare .dl errnosupport ;$4861 _ZmTrig .dl errnosupport ;$4864 _SetXMinMax .dl errnosupport ;$4867 _ZooDefault .dl GrBufCpy ;$486A _GrBufCpy .dl errnosupport ;$486D _DRAWSPLITLINE .dl errnosupport ;$4870 _RestoreDisp .dl errnosupport ;$4873 _FNDDB .dl errnosupport ;$4876 _AllEq .dl errnosupport ;$4879 _fndallseleq .dl errnosupport ;$487C _NEXTEQ .dl errnosupport ;$487F _PREVEQ .dl errnosupport ;$4882 _BLINKGCUR .dl errnosupport ;$4885 _NBCURSOR .dl errnosupport ;$4888 _STATMARK .dl errnosupport ;$488B _CHKTEXTCURS .dl errnosupport ;$488E _Regraph .dl errnosupport ;$4891 _DOREFFLAGS02 .dl errnosupport ;$4894 INITNSEQ .dl errnosupport ;$4897 _YRES .dl errnosupport ;$489A _Ceiling .dl errnosupport ;$489D _PutXY .dl errnosupport ;$48A0 _PUTEQUNO .dl errnosupport ;$48A3 _PDspGrph .dl errnosupport ;$48A6 _HorizCmd .dl errnosupport ;$48A9 _VertCmd .dl errnosupport ;$48AC _LineCmd .dl errnosupport ;$48AF _UnLineCmd .dl errnosupport ;$48B2 _PointCmd .dl errnosupport ;$48B5 _PixelTest .dl errnosupport ;$48B8 _PixelCmd .dl errnosupport ;$48BB _TanLnF .dl errnosupport ;$48BE _DRAWCMD_INIT .dl errnosupport ;$48C1 _DrawCmd .dl errnosupport ;$48C4 _SHADECMD .dl errnosupport ;$48C7 _InvCmd .dl errnosupport ;$48CA _STATSHADE .dl errnosupport ;$48CD _dspmattable .dl errnosupport ;$48D0 _dsplsts .dl errnosupport ;$48D3 _closeEditBuf .dl errnosupport ;$48D6 _parseEditBuf .dl errnosupport ;$48D9 _putsm .dl errnosupport ;$48DC _DspCurTbl .dl errnosupport ;$48DF _DSPGRTBL .dl errnosupport ;$48E2 _zeroTemplate .dl errnosupport ;$48E5 _settblrefs .dl errnosupport ;$48E8 _dispTblBot .dl errnosupport ;$48EB _DispTblTop .dl errnosupport ;$48EE _dispTblbody .dl errnosupport ;$48F1 _VPUTBLANK .dl errnosupport ;$48F4 _TBLTRACE .dl errnosupport ;$48F7 _dispListNameY .dl errnosupport ;$48FA _CurNameLength .dl errnosupport ;$48FD _NameToBuf .dl errnosupport ;$4900 _jpromptcursor .dl errnosupport ;$4903 _BufLeft .dl errnosupport ;$4906 _BufRight .dl errnosupport ;$4909 _bufInsert .dl errnosupport ;$490C _bufQueueChar .dl errnosupport ;$490F _BufReplace .dl errnosupport ;$4912 _BufDelete .dl errnosupport ;$4915 _BUFPEEK .dl errnosupport ;$4918 _BUFPEEK1 .dl errnosupport ;$491B _BUFPEEK2 .dl errnosupport ;$491E _BUFPEEK3 .dl errnosupport ;$4921 _BufToBtm .dl errnosupport ;$4924 _setupEditEqu .dl errnosupport ;$4927 _BufToTop .dl errnosupport ;$492A _isEditFull .dl errnosupport ;$492D _IsEditEmpty .dl errnosupport ;$4930 _IsAtTop .dl errnosupport ;$4933 _IsAtBtm .dl errnosupport ;$4936 _BufClear .dl errnosupport ;$4939 _JcursorFirst .dl errnosupport ;$493C _JcursorLast .dl errnosupport ;$493F _CursorLeft .dl errnosupport ;$4942 _cursorRight .dl errnosupport ;$4945 _cursorUp .dl errnosupport ;$4948 _CursorDown .dl errnosupport ;$494B _cursorToOffset .dl errnosupport ;$494E _InsDisp .dl errnosupport ;$4951 _FDISPBOL1 .dl errnosupport ;$4954 _FDISPBOL .dl errnosupport ;$4957 _DispEOW .dl errnosupport ;$495A _DispHead .dl errnosupport ;$495D _DispTail .dl errnosupport ;$4960 _PutTokString .dl errnosupport ;$4963 _setupEditCmd .dl errnosupport ;$4966 _setEmptyEditEqu .dl errnosupport ;$4969 _SetEmptyEditPtr .dl errnosupport ;$496C _CloseEditEqu .dl errnosupport ;$496F _GetPrevTok .dl errnosupport ;$4972 _getkey .dl errnosupport ;$4975 _canIndic .dl errnosupport ;$4978 _LCD_DRIVERON .dl errnosupport ;$497B _DFMIN2 .dl errnosupport ;$497E _formDisp .dl errnosupport ;$4981 _formMatrix .dl errnosupport ;$4984 _wscrollLeft .dl errnosupport ;$4987 _wscrollUp .dl errnosupport ;$498A _wscrollDown .dl errnosupport ;$498D _wscrollRight .dl errnosupport ;$4990 _FormEReal .dl errnosupport ;$4993 _formERealTOK .dl errnosupport ;$4996 _FormDCplx .dl errnosupport ;$4999 _FormReal .dl errnosupport ;$499C _formScrollUp .dl errnosupport ;$499F _setwinabove .dl errnosupport ;$49A2 _disarmScroll .dl errnosupport ;$49A5 _OP1toEdit .dl errnosupport ;$49A8 _MinToEdit .dl errnosupport ;$49AB _rclVarToEdit .dl errnosupport ;$49AE _rclVarToEditPtR .dl errnosupport ;$49B1 _RCLENTRYTOEDIT .dl errnosupport ;$49B4 _rclToQueue .dl errnosupport ;$49B7 _FORMTOTOK .dl errnosupport ;$49BA _DISP_INTERVAL .dl errnosupport ;$49BD _DisplstName .dl errnosupport ;$49C0 _dispSLstNameHL .dl errnosupport ;$49C3 _EditEqu .dl errnosupport ;$49C6 _closeEquField .dl errnosupport ;$49C9 _AutoSelect .dl errnosupport ;$49CC _DISPYEOS .dl errnosupport ;$49CF _dispNumEOS .dl errnosupport ;$49D2 _setupdispeq .dl errnosupport ;$49D5 _DispForward .dl errnosupport ;$49D8 _DispYPrompt2 .dl errnosupport ;$49DB _stringwidth .dl errnosupport ;$49DE _dispErrorScreen .dl errnosupport ;$49E1 _POPCX .dl errnosupport ;$49E4 _loadnoeentry .dl errnosupport ;$49E7 _SaveScreen .dl errnosupport ;$49EA _RETSCREEN .dl errnosupport ;$49ED _RetScreenErr .dl errnosupport ;$49F0 _CheckSplitFlag .dl errnosupport ;$49F3 _SolveRedisp .dl errnosupport ;$49F6 _SolveDisp .dl errnosupport ;$49F9 _itemName .dl errnosupport ;$49FC _SetNorm_Vals .dl errnosupport ;$49FF _SetYOffset .dl errnosupport ;$4A02 _ConvKeyToTok .dl errnosupport ;$4A05 _ConvFCKeyToTok .dl errnosupport ;$4A08 _ConvFEKeyToTok .dl errnosupport ;$4A0B _TokToKey .dl errnosupport ;$4A0E _SendSkipExitPacket .dl errnosupport ;$4A11 _GETVARCMD .dl errnosupport ;$4A14 _SendVarCmd .dl errnosupport ;$4A17 _SendScreenshot .dl errnosupport ;$4A1A keyscnlnk .dl errnosupport ;$4A1D _DeselectAllVars .dl errnosupport ;$4A20 _DelRes .dl errnosupport ;$4A23 _ConvLcToLr .dl errnosupport ;$4A26 _RedimMat .dl errnosupport ;$4A29 _IncLstSize .dl errnosupport ;$4A2C _InsertList .dl errnosupport ;$4A2F _dellistel .dl errnosupport ;$4A32 _EditProg .dl errnosupport ;$4A35 _CloseProg .dl errnosupport ;$4A38 _ClrGraphRef .dl errnosupport ;$4A3B _FixTempCnt .dl errnosupport ;$4A3E _SAVEDATA .dl errnosupport ;$4A41 _RESTOREDATA .dl errnosupport ;$4A44 _FindAlphaUp .dl errnosupport ;$4A47 _FindAlphaDn .dl errnosupport ;$4A4A _CmpSyms .dl errnosupport ;$4A4D _CREATETEMP .dl errnosupport ;$4A50 _CleanAll .dl errnosupport ;$4A53 _MoveToNextSym .dl errnosupport ;$4A56 _ConvLrToLc .dl errnosupport ;$4A59 _TblScreenDn .dl errnosupport ;$4A5C _TblScreenUp .dl errnosupport ;$4A5F _SCREENUP .dl errnosupport ;$4A62 _ScreenUpDown .dl errnosupport ;$4A65 _ZifRclHandler .dl errnosupport ;$4A68 _zifrclkapp .dl errnosupport ;$4A6B _RCLKEY .dl errnosupport ;$4A6E _RCLREGEQ_CALL .dl errnosupport ;$4A71 _RCLREGEQ .dl errnosupport ;$4A74 _initNamePrompt .dl errnosupport ;$4A77 _NamePrompt2 .dl errnosupport ;$4A7A _CATALOGCHK .dl errnosupport ;$4A7D _clrTR .dl errnosupport ;$4A80 _QUAD .dl errnosupport ;$4A83 _GRAPHQUAD .dl errnosupport ;$4A86 _BC2NOREAL .dl errnosupport ;$4A89 _ErrNonReal_FPST_FPS1 .dl errnosupport ;$4A8C _ErrNonReal .dl errnosupport ;$4A8F _WRITE_TEXT .dl errnosupport ;$4A92 _FORSEQINIT .dl errnosupport ;$4A95 _GRPHPARS .dl errnosupport ;$4A98 _PLOTPARS .dl errnosupport ;$4A9B _ParseInp .dl errnosupport ;$4A9E _PARSEOFF .dl errnosupport ;$4AA1 _PARSESCAN .dl errnosupport ;$4AA4 _GETPARSE .dl errnosupport ;$4AA7 _SAVEPARSE .dl errnosupport ;$4AAA _InitPFlgs .dl errnosupport ;$4AAD _CKENDLINERR .dl OP2Set60 ;$4AB0 _OP2Set60 .dl errnosupport ;$4AB3 _GETSTATPTR .dl errnosupport ;$4AB6 _CMP_STATPTR .dl errnosupport ;$4AB9 _VARSYSADR .dl errnosupport ;$4ABC _StoSysTok .dl errnosupport ;$4ABF _StoAns .dl errnosupport ;$4AC2 _StoTheta .dl errnosupport ;$4AC5 _StoR .dl errnosupport ;$4AC8 _StoY .dl errnosupport ;$4ACB _StoN .dl errnosupport ;$4ACE _StoT .dl errnosupport ;$4AD1 _StoX .dl errnosupport ;$4AD4 _StoOther .dl errnosupport ;$4AD7 _RclAns .dl errnosupport ;$4ADA _RclY .dl errnosupport ;$4ADD _RclN .dl errnosupport ;$4AE0 _RclX .dl errnosupport ;$4AE3 _RclVarSym .dl errnosupport ;$4AE6 _RclSysTok .dl errnosupport ;$4AE9 _StMatEl .dl errnosupport ;$4AEC _STLSTVECEL .dl errnosupport ;$4AEF _ConvOP1 .dl errnosupport ;$4AF2 _Find_Parse_Formula .dl errnosupport ;$4AF5 _PARSE_FORMULA .dl errnosupport ;$4AF8 _FetchQuotedString .dl errnosupport ;$4AFB _FetchNumLine .dl errnosupport ;$4AFE _ParseNameTokens .dl errnosupport ;$4B01 _ParseInpGraph .dl errnosupport ;$4B04 _ParseInpGraphReset .dl errnosupport ;$4B07 _ParseInpLastEnt .dl errnosupport ;$4B0A _ErrOnCertainTypes .dl errnosupport ;$4B0D _CreatePair .dl errnosupport ;$4B10 _PUSHNUM .dl errnosupport ;$4B13 _INCCURPCERREND .dl errnosupport ;$4B16 _ERREND .dl errnosupport ;$4B19 _COMMAERRF .dl errnosupport ;$4B1C _COMMAERR .dl errnosupport ;$4B1F _STEQARG2 .dl errnosupport ;$4B22 _STEQARG .dl errnosupport ;$4B25 _INPARG .dl errnosupport ;$4B28 _STEQARG3 .dl errnosupport ;$4B2B _NXTFETCH .dl errnosupport ;$4B2E _CKFETCHVAR .dl errnosupport ;$4B31 _FETCHVARA .dl errnosupport ;$4B34 _FETCHVAR .dl errnosupport ;$4B37 _CKENDLIN .dl errnosupport ;$4B3A _CKENDEXP .dl errnosupport ;$4B3D _CKPARSEND .dl errnosupport ;$4B40 _STOTYPEARG .dl errnosupport ;$4B43 _ConvDim .dl errnosupport ;$4B46 _ConvDim00 .dl errnosupport ;$4B49 _AHEADEQUAL .dl errnosupport ;$4B4C _PARSAHEADS .dl errnosupport ;$4B4F _PARSAHEAD .dl errnosupport ;$4B52 _AnsName .dl errnosupport ;$4B55 _STOCMPREALS .dl errnosupport ;$4B58 _GETDEPTR .dl errnosupport ;$4B5B _PUSH2BOPER .dl errnosupport ;$4B5E _POP2BOPER .dl errnosupport ;$4B61 _PUSHOPER .dl errnosupport ;$4B64 _POPOPER .dl errnosupport ;$4B67 _FIND_E_UNDEF .dl errnosupport ;$4B6A _STTMPEQ .dl errnosupport ;$4B6D _FINDEOL .dl errnosupport ;$4B70 _BRKINC .dl errnosupport ;$4B73 _INCFETCH .dl errnosupport ;$4B76 _CURFETCH .dl errnosupport ;$4B79 _Random .dl errnosupport ;$4B7C _StoRand .dl errnosupport ;$4B7F _RandInit .dl errnosupport ;$4B82 _resetStacks .dl errnosupport ;$4B85 _Factorial .dl errnosupport ;$4B88 _YONOFF .dl errnosupport ;$4B8B _EQSELUNSEL .dl errnosupport ;$4B8E _ITSOLVER .dl errnosupport ;$4B91 _GRITSOLVER .dl errnosupport ;$4B94 _ITSOLVERB .dl errnosupport ;$4B97 _ITSOLVERNB .dl errnosupport ;$4B9A _ExTest_INT .dl errnosupport ;$4B9D .dl errnosupport ;$4BA0 _LogGamma .dl errnosupport ;$4BA3 _OneVar .dl errnosupport ;$4BA6 _ONEVARS_0 .dl errnosupport ;$4BA9 _ORDSTAT .dl errnosupport ;$4BAC _INITSTATANS2 .dl errnosupport ;$4BAF _ANOVA_SPEC .dl errnosupport ;$4BB2 _OutputExpr .dl errnosupport ;$4BB5 _CentCursor .dl errnosupport ;$4BB8 _TEXT .dl errnosupport ;$4BBB _FINISHSPEC .dl errnosupport ;$4BBE _TRCYFUNC .dl errnosupport ;$4BC1 _RCL_SEQ_X .dl errnosupport ;$4BC4 _RCLSEQ2 .dl errnosupport ;$4BC7 _GRPPutAway .dl errnosupport ;$4BCA _CKVALDELX .dl errnosupport ;$4BCD _CKVALDELTA .dl GrBufClr ;$4BD0 _GrBufClr .dl errnosupport ;$4BD3 _GRBUFCPY_V .dl errnosupport ;$4BD6 _FNDSELEQ .dl errnosupport ;$4BD9 _CLRGRAPHXY .dl errnosupport ;$4BDC _NEDXT_Y_STYLE .dl errnosupport ;$4BDF _PLOTPT .dl errnosupport ;$4BE2 _NEWINDEP .dl errnosupport ;$4BE5 _Axes .dl errnosupport ;$4BE8 _setPenX .dl errnosupport ;$4BEB _setPenY .dl errnosupport ;$4BEE _setPenT .dl errnosupport ;$4BF1 _TAN_EQU_DISP .dl errnosupport ;$4BF4 _PutAns .dl errnosupport ;$4BF7 _DispOP1A .dl errnosupport ;$4BFA _MATHTANLN .dl errnosupport ;$4BFD _ENDDRAW .dl errnosupport ;$4C00 _SetTblGraphDraw .dl errnosupport ;$4C03 _StartDialog .dl errnosupport ;$4C06 _DialogInit .dl errnosupport ;$4C09 _GetDialogNumOP1 .dl errnosupport ;$4C0C _SetDialogNumOP1 .dl errnosupport ;$4C0F _GetDialogNumHL .dl errnosupport ;$4C12 _ErrArgumentO123 .dl errnosupport ;$4C15 _SetDialogKeyOverride .dl errnosupport ;$4C18 _ResDialogKeyOverride .dl errnosupport ;$4C1B _ForceDialogKeypress .dl errnosupport ;$4C1E _DialogStartGetKey .dl errnosupport ;$4C21 _StartDialog_Override .dl errnosupport ;$4C24 _CallDialogCallback .dl errnosupport ;$4C27 _SetDialogCallback .dl errnosupport ;$4C2A _ResDialogCallback .dl errnosupport ;$4C2D _CopyDialogNum .dl MemClear ;$4C30 _MemClear .dl MemSet ;$4C33 _MemSet .dl errnosupport ;$4C36 _ReloadAppEntryVecs .dl errnosupport ;$4C39 _PointOn .dl errnosupport ;$4C3C _ExecuteNewPrgm .dl errnosupport ;$4C3F _StrLength .dl errnosupport ;$4C42 _VPutMapRec .dl errnosupport ;$4C45 _getRomPage .dl errnosupport ;$4C48 _FindAppUp .dl errnosupport ;$4C4B _FindAppDn .dl errnosupport ;$4C4E _FindApp .dl errnosupport ;$4C51 _ExecuteApp .dl errnosupport ;$4C54 _MonReset .dl errnosupport ;$4C57 _ClearParseVar .dl errnosupport ;$4C5A _SetParseVarProg .dl errnosupport ;$4C5D _isContextKey .dl errnosupport ;$4C60 _IBounds .dl errnosupport ;$4C63 _IOffset .dl errnosupport ;$4C66 _DrawCirc2 .dl errnosupport ;$4C69 _CanAlphIns .dl errnosupport ;$4C6C cxRedisp .dl errnosupport ;$4C6F _GetBaseVer .dl errnosupport ;$4C72 _OPSet0DE .dl errnosupport ;$4C75 _AppGetCbl .dl errnosupport ;$4C78 _AppGetCalc .dl errnosupport ;$4C7B _SaveDisp .dl errnosupport ;$4C7E _SetIgnoreKey .dl errnosupport ;$4C81 _SetSendThisKeyBack .dl errnosupport ;$4C84 _DisableApd .dl errnosupport ;$4C87 _EnableApd .dl errnosupport ;$4C8A _JForceCmdNoChar2 .dl errnosupport ;$4C8D _set2IY34 .dl errnosupport ;$4C90 _forcecmd .dl errnosupport ;$4C93 _ApdSetup .dl errnosupport ;$4C96 _Get_NumKey .dl errnosupport ;$4C99 _AppSetup .dl errnosupport ;$4C9C _HandleLinkKeyActivity .dl errnosupport ;$4C9F _JForceCmdNoChar3 .dl errnosupport ;$4CA2 _ReleaseSedit .dl errnosupport ;$4CA5 _initsmalleditline .dl errnosupport ;$4CA8 _startsmalledit .dl errnosupport ;$4CAB .dl errnosupport ;$4CAE _SGetTokString .dl LoadPattern ;$4CB1 _LoadPattern .dl SStringLength ;$4CB4 _SStringLength .dl errnosupport ;$4CB7 _RestorePenCol .dl errnosupport ;$4CBA .dl errnosupport ;$4CBD _DoNothing .dl errnosupport ;$4CC0 _ForceSmallEditReturn .dl errnosupport ;$4CC3 .dl errnosupport ;$4CC6 .dl errnosupport ;$4CC9 .dl errnosupport ;$4CCC .dl errnosupport ;$4CCF _VEraseEOL .dl errnosupport ;$4CD2 .dl errnosupport ;$4CD5 .dl errnosupport ;$4CD8 _GoToErr .dl errnosupport ;$4CDB _initsmalleditBox .dl errnosupport ;$4CDE .dl errnosupport ;$4CE1 _EmptyHook .dl errnosupport ;$4CE4 _ForceSmallEditReturn2 .dl errnosupport ;$4CE7 .dl errnosupport ;$4CEA .dl errnosupport ;$4CED _ClearRow .dl errnosupport ;$4CF0 .dl errnosupport ;$4CF3 .dl errnosupport ;$4CF6 .dl errnosupport ;$4CF9 .dl errnosupport ;$4CFC .dl errnosupport ;$4CFF .dl errnosupport ;$4D02 .dl errnosupport ;$4D05 .dl errnosupport ;$4D08 .dl errnosupport ;$4D0B .dl errnosupport ;$4D0E .dl errnosupport ;$4D11 .dl errnosupport ;$4D14 .dl errnosupport ;$4D17 .dl errnosupport ;$4D1A .dl errnosupport ;$4D1D .dl errnosupport ;$4D20 .dl errnosupport ;$4D23 .dl errnosupport ;$4D26 _AppScreenUpDown .dl errnosupport ;$4D29 _AppScreenUpDown1 .dl errnosupport ;$4D2C .dl errnosupport ;$4D2F _initsmalleditlinevar .dl errnosupport ;$4D32 _initsmalleditlineop1 .dl errnosupport ;$4D35 _initsmalleditboxvar .dl errnosupport ;$4D38 _initsmalleditboxop1 .dl errnosupport ;$4D3B .dl errnosupport ;$4D3E _RestartDialog .dl errnosupport ;$4D41 _ErrCustom1 .dl errnosupport ;$4D44 _ErrCustom2 .dl errnosupport ;$4D47 _AppStartMouse .dl errnosupport ;$4D4A _AppStartMouseNoSetup .dl errnosupport ;$4D4D _AppMouseGetKey .dl errnosupport ;$4D50 _AppDispMouse .dl errnosupport ;$4D53 _AppEraseMouse .dl errnosupport ;$4D56 _AppSetupMouseMem .dl errnosupport ;$4D59 _GetDispRowOffset .dl errnosupport ;$4D5C _ClearRect .dl errnosupport ;$4D5F _InvertRect .dl errnosupport ;$4D62 _FillRect .dl errnosupport ;$4D65 _AppUpdateMouse .dl errnosupport ;$4D68 _AppDispPrevMouse .dl errnosupport ;$4D6B .dl errnosupport ;$4D6E _initcellbox .dl errnosupport ;$4D71 _drawcell .dl errnosupport ;$4D74 .dl errnosupport ;$4D77 _invertcell .dl errnosupport ;$4D7A _setcelloverride .dl errnosupport ;$4D7D _DrawRectBorder .dl errnosupport ;$4D80 _ClearCell .dl errnosupport ;$4D83 _covercell .dl errnosupport ;$4D86 _EraseRectBorder .dl errnosupport ;$4D89 _FillRectPattern .dl errnosupport ;$4D8C _DrawRectBorderClear .dl errnosupport ;$4D8F .dl errnosupport ;$4D92 .dl errnosupport ;$4D95 _VerticalLine .dl errnosupport ;$4D98 _IBoundsFull .dl errnosupport ;$4D9B _DisplayImage .dl errnosupport ;$4D9E .dl errnosupport ;$4DA1 .dl errnosupport ;$4DA4 _AppUpdateMouseCoords .dl errnosupport ;$4DA7 _ShiftBitsLeft .dl errnosupport ;$4DAA .dl errnosupport ;$4DAD .dl errnosupport ;$4DB0 .dl errnosupport ;$4DB3 .dl errnosupport ;$4DB6 .dl errnosupport ;$4DB9 .dl errnosupport ;$4DBC .dl errnosupport ;$4DBF _AppUpdateMouseRow .dl errnosupport ;$4DC2 _AppDrawMouse .dl errnosupport ;$4DC5 _AppDrawMouseDirect .dl errnosupport ;$4DC8 _CPoint .dl errnosupport ;$4DCB _DeleteApp .dl errnosupport ;$4DCE _AppUpdateMouseXY .dl errnosupport ;$4DD1 _setmodecellflag .dl errnosupport ;$4DD4 _resetmodecellflag .dl errnosupport ;$4DD7 _ismodecellset .dl errnosupport ;$4DDA _getmodecellflag .dl errnosupport ;$4DDD .dl errnosupport ;$4DE0 _CellBoxManager .dl errnosupport ;$4DE3 _startnewcell .dl errnosupport ;$4DE6 .dl errnosupport ;$4DE9 _CellCursorHandle .dl errnosupport ;$4DEC .dl errnosupport ;$4DEF .dl errnosupport ;$4DF2 _ClearCurCell .dl errnosupport ;$4DF5 _drawcurcell .dl errnosupport ;$4DF8 _invertcurcell .dl errnosupport ;$4DFB _covercurcell .dl errnosupport ;$4DFE _BlinkCell .dl errnosupport ;$4E01 _BlinkCellNoLookUp .dl errnosupport ;$4E04 _BlinkCurCell .dl errnosupport ;$4E07 _BlinkCellToOn .dl errnosupport ;$4E0A _BlinkCellToOnNoLookUp .dl errnosupport ;$4E0D _BlinkCurCellToOn .dl errnosupport ;$4E10 _BlinkCellToOff .dl errnosupport ;$4E13 _BlinkCellToOffNoLookUp .dl errnosupport ;$4E16 _BlinkCurCellToOff .dl errnosupport ;$4E19 _getcurmodecellflag .dl errnosupport ;$4E1C .dl errnosupport ;$4E1F _startsmalleditreturn .dl errnosupport ;$4E22 .dl errnosupport ;$4E25 .dl errnosupport ;$4E28 _CellkHandle .dl errnosupport ;$4E2B _errchkalphabox .dl errnosupport ;$4E2E .dl errnosupport ;$4E31 .dl errnosupport ;$4E34 .dl errnosupport ;$4E37 .dl errnosupport ;$4E3A _eraseallcells .dl errnosupport ;$4E3D _iscurmodecellset .dl errnosupport ;$4E40 .dl errnosupport ;$4E43 _initalphabox .dl errnosupport ;$4E46 .dl errnosupport ;$4E49 .dl errnosupport ;$4E4C _drawblnkcell .dl errnosupport ;$4E4F _ClearBlnkCell .dl errnosupport ;$4E52 _invertblnkcell .dl errnosupport ;$4E55 _AppMouseForceKey .dl errnosupport ;$4E58 _AppSetupMouseMemCoords .dl errnosupport ;$4E5B _AppMoveMouse .dl errnosupport ;$4E5E _GetStringInput .dl errnosupport ;$4E61 _GetStringInput2 .dl errnosupport ;$4E64 _WaitEnterKeyValue .dl errnosupport ;$4E67 _HorizontalLine .dl errnosupport ;$4E6A _CreateAppVar .dl errnosupport ;$4E6D _CreateProtProg .dl errnosupport ;$4E70 _CreateVar .dl errnosupport ;$4E73 _AsmComp .dl errnosupport ;$4E76 _GetAsmSize .dl errnosupport ;$4E79 _SquishPrgm .dl errnosupport ;$4E7C _ExecutePrgm .dl errnosupport ;$4E7F _ChkFindSymAsm .dl errnosupport ;$4E82 _ParsePrgmName .dl errnosupport ;$4E85 _CSub .dl errnosupport ;$4E88 _CAdd .dl errnosupport ;$4E8B _CSqaure .dl errnosupport ;$4E8E _CMult .dl errnosupport ;$4E91 _CRecip .dl errnosupport ;$4E94 _CDiv .dl errnosupport ;$4E97 _CAbs .dl errnosupport ;$4E9A _AddSquares .dl errnosupport ;$4E9D _CSqRoot .dl errnosupport ;$4EA0 _CLN .dl errnosupport ;$4EA3 _CLog .dl errnosupport ;$4EA6 _CTenX .dl errnosupport ;$4EA9 _CEtoX .dl errnosupport ;$4EAC _CXrootY .dl errnosupport ;$4EAF .dl errnosupport ;$4EB2 _CYtoX .dl errnosupport ;$4EB5 _InvertNonReal .dl errnosupport ;$4EB8 _CplxMult .dl errnosupport ;$4EBB _CplxDiv .dl errnosupport ;$4EBE _CplxTrunc .dl errnosupport ;$4EC1 _CplxFrac .dl errnosupport ;$4EC4 _CplxFloor .dl errnosupport ;$4EC7 _SendHeaderPacket .dl errnosupport ;$4ECA _CancelTransmission .dl errnosupport ;$4ECD _SendScreenContents .dl errnosupport ;$4ED0 _SendRAMVarData .dl errnosupport ;$4ED3 _SendRAMCmd .dl errnosupport ;$4ED6 _SendPacket .dl errnosupport ;$4ED9 _ReceiveAck .dl errnosupport ;$4EDC _Send4BytePacket .dl errnosupport ;$4EDF _SendDataByte .dl errnosupport ;$4EE2 _Send4Bytes .dl errnosupport ;$4EE5 _SendAByte .dl errnosupport ;$4EE8 _SendCByte .dl errnosupport ;$4EEB _GetSmallPacket .dl errnosupport ;$4EEE _GetDataPacket .dl errnosupport ;$4EF1 _SendAck .dl errnosupport ;$4EF4 _Get4Bytes .dl errnosupport ;$4EF7 _Get3Bytes .dl errnosupport ;$4EFA _Rec1stByte .dl errnosupport ;$4EFD _Rec1stByteNC .dl errnosupport ;$4F00 _ContinueGetByte .dl errnosupport ;$4F03 _RecAByteIO .dl errnosupport ;$4F06 _ReceiveVar .dl errnosupport ;$4F09 _ReceiveVarDataExists .dl errnosupport ;$4F0C _ReceiveVarData .dl errnosupport ;$4F0F _SrchVLstUp .dl errnosupport ;$4F12 _SrchVLstDn .dl errnosupport ;$4F15 _SendVariable .dl errnosupport ;$4F18 _Get4BytesCursor .dl errnosupport ;$4F1B _Get4BytesNC .dl errnosupport ;$4F1E _Convert85List .dl errnosupport ;$4F21 _SendDirectoryContents .dl errnosupport ;$4F24 _SendReadyPacket .dl errnosupport ;$4F27 _Convert85Real .dl errnosupport ;$4F2A _ret_6 .dl errnosupport ;$4F2D _SendCertificate .dl errnosupport ;$4F30 _SendApplication .dl errnosupport ;$4F33 _SendOSHeader .dl errnosupport ;$4F36 _SendOSPage .dl errnosupport ;$4F39 _SendOS .dl errnosupport ;$4F3C _FlashWriteDisable .dl errnosupport ;$4F3F _SendCmd .dl errnosupport ;$4F42 _SendOSValidationData .dl errnosupport ;$4F45 _Disp .dl errnosupport ;$4F48 _SendGetkeyPress .dl errnosupport ;$4F4B _RejectCommand .dl errnosupport ;$4F4E _CheckLinkLines .dl errnosupport ;$4F51 _GetHookByte .dl errnosupport ;$4F54 _GetBytePaged .dl errnosupport ;$4F57 _cursorhook .dl errnosupport ;$4F5A _call_library_hook .dl errnosupport ;$4F5D _call_rawkey_hook .dl errnosupport ;$4F60 _setCursorHook .dl errnosupport ;$4F63 _EnableLibraryHook .dl errnosupport ;$4F66 _SetGetKeyHook .dl errnosupport ;$4F69 _ClrCursorHook .dl errnosupport ;$4F6C _DisableLibraryHook .dl errnosupport ;$4F6F _ClrRawKeyHook .dl errnosupport ;$4F72 _ResetHookBytes .dl errnosupport ;$4F75 _AdjustAllHooks .dl errnosupport ;$4F78 _getkeyhook .dl errnosupport ;$4F7B _SetGetcscHook .dl errnosupport ;$4F7E _ClrGetKeyHook .dl errnosupport ;$4F81 _call_linkactivity_hook .dl errnosupport ;$4F84 _EnableLinkActivityHook .dl errnosupport ;$4F87 _DisableLinkHook .dl errnosupport ;$4F8A _GetSmallPacket2 .dl errnosupport ;$4F8D _EnableCatalog2Hook .dl errnosupport ;$4F90 _DisableCatalog2Hook .dl errnosupport ;$4F93 _EnableLocalizeHook .dl errnosupport ;$4F96 _DisableLocalizeHook .dl errnosupport ;$4F99 _SetTokenHook .dl errnosupport ;$4F9C _ClearTokenHook .dl errnosupport ;$4F9F .dl errnosupport ;$4FA2 .dl errnosupport ;$4FA5 _DispListElementOffLA .dl errnosupport ;$4FA8 _Bit_VertSplit .dl errnosupport ;$4FAB _SetHomescreenHook .dl errnosupport ;$4FAE _ClrHomeScreenHook .dl errnosupport ;$4FB1 _SetWindowHook .dl errnosupport ;$4FB4 _DisableWindowHook .dl errnosupport ;$4FB7 _SetGraphModeHook .dl errnosupport ;$4FBA _DisableGraphHook .dl errnosupport ;$4FBD _ParseAndStoreSysVar .dl errnosupport ;$4FC0 _DisplayEditSysVar .dl errnosupport ;$4FC3 _JForceWindowSettings .dl errnosupport ;$4FC6 _DelVarArc .dl errnosupport ;$4FC9 _DelVarNoArc .dl errnosupport ;$4FCC _SetAllPlots .dl errnosupport ;$4FCF _SetYeditHook .dl errnosupport ;$4FD2 _DisableYEquHook .dl errnosupport ;$4FD5 _JForceYEqu .dl errnosupport ;$4FD8 _Arc_Unarc .dl errnosupport ;$4FDB _ArchiveVar .dl errnosupport ;$4FDE _UnarchiveVar .dl errnosupport ;$4FE1 _DialogKeyHook .dl errnosupport ;$4FE4 _SetFontHook .dl errnosupport ;$4FE7 _ClrFontHook .dl errnosupport ;$4FEA _SetRegraphHook .dl errnosupport ;$4FED _DisableRegraphHook .dl errnosupport ;$4FF0 _RunGraphingHook .dl errnosupport ;$4FF3 _SetTraceHook .dl errnosupport ;$4FF6 _DisableTraceHook .dl errnosupport ;$4FF9 _RunTraceHook .dl errnosupport ;$4FFC _NDeriv .dl errnosupport ;$4FFF _PolarDerivative .dl errnosupport ;$5002 _JForceGraphNoKey .dl errnosupport ;$5005 _JForceGraphKey .dl errnosupport ;$5008 _PowerOff .dl errnosupport ;$500B _GetKeyRetOff .dl errnosupport ;$500E _FindGroupSym .dl errnosupport ;$5011 _FillBasePageTable .dl errnosupport ;$5014 _ArcChk .dl errnosupport ;$5017 _FlashToRam .dl errnosupport ;$501A _LoadDEIndPaged .dl errnosupport ;$501D _LoadCIndPaged .dl errnosupport ;$5020 _SetupPagedPtr .dl errnosupport ;$5023 _PagedGet .dl errnosupport ;$5026 _SetParserHook .dl errnosupport ;$5029 _ClearParserHook .dl errnosupport ;$502C _SetAppChangeHook .dl errnosupport ;$502F _ClearAppChangeHook .dl errnosupport ;$5032 _EnableGraphicsHook .dl errnosupport ;$5035 _DisableGraphicsHook .dl errnosupport ;$5038 _IPointNoGraphicsHook .dl errnosupport ;$503B _ILineNoHook .dl errnosupport ;$503E .dl errnosupport ;$5041 _DeleteTempPrograms .dl errnosupport ;$5044 _EnableCatalog1Hook .dl errnosupport ;$5047 _DisableCatalog1Hook .dl errnosupport ;$504A _EnableHelpHook .dl errnosupport ;$504D _DisableHelpHook .dl errnosupport ;$5050 _DispCatalogEnd .dl errnosupport ;$5053 _GetMenuKeypress .dl errnosupport ;$5056 _GetCatalogItem .dl errnosupport ;$5059 _RunCatalog2Hook .dl errnosupport ;$505C _RunCatalog1Hook .dl errnosupport ;$505F .dl errnosupport ;$5062 .dl errnosupport ;$5065 _dispMenuTitle .dl errnosupport ;$5068 .dl errnosupport ;$506B _EnablecxRedispHook .dl errnosupport ;$506E _DisablecxRedispHook .dl errnosupport ;$5071 _BufCpy .dl errnosupport ;$5074 _BufClr .dl errnosupport ;$5077 _UnOPExec2 .dl errnosupport ;$507A _BinOPExec2 .dl errnosupport ;$507D _LoadMenuB .dl errnosupport ;$5080 _DisplayVarInfo .dl errnosupport ;$5083 _SetMenuHook .dl errnosupport ;$5086 _ClearMenuHook .dl errnosupport ;$5089 _getBCOffsetIX .dl errnosupport ;$508C _GetBCOffsetIX2 .dl errnosupport ;$508F _ForceFullScreen .dl errnosupport ;$5092 _GetVariableData .dl errnosupport ;$5095 _FindSwapSector .dl errnosupport ;$5098 _CopyFlashPage .dl errnosupport ;$509B _FindAppNumPages .dl HLMinus5 ;$509E _HLMinus5 .dl errnosupport ;$50A1 _SendArcPacket .dl errnosupport ;$50A4 _ForceGraphKeypress .dl errnosupport ;$50A7 _DoNothing3 .dl errnosupport ;$50AA _FormBase .dl errnosupport ;$50AD .dl errnosupport ;$50B0 _IsFragmented .dl errnosupport ;$50B3 _Chk_Batt_Low .dl errnosupport ;$50B6 _Chk_Batt_Low_2 .dl errnosupport ;$50B9 _Arc_Unarc2 .dl errnosupport ;$50BC _GetAppBasePage .dl errnosupport ;$50BF _SetExSpeed .dl errnosupport ;$50C2 _RclExit .dl errnosupport ;$50C5 _GroupAllVars .dl errnosupport ;$50C8 _UngroupVar .dl errnosupport ;$50CB _WriteToFlash .dl errnosupport ;$50CE _SetSilentLinkHook .dl errnosupport ;$50D1 _DisableSilentLinkHook .dl errnosupport ;$50D4 _TwoVarSet .dl errnosupport ;$50D7 _ExecClassCToken .dl errnosupport ;$50DA _ExecClass3Token .dl errnosupport ;$50DD _GetSysInfo .dl errnosupport ;$50E0 _NZIf83Plus .dl errnosupport ;$50E3 _LinkStatus .dl errnosupport ;$50E6 _DoNothing2 .dl errnosupport ;$50E9 _KeyboardGetKey .dl errnosupport ;$50EC _RunAppLib .dl errnosupport ;$50EF _FindSpecialAppHeader .dl errnosupport ;$50F2 _SendUSBData .dl errnosupport ;$50F5 _AppGetCBLUSB .dl errnosupport ;$50F8 _AppGetCalcUSB .dl errnosupport ;$50FB _GetVarCmdUSB .dl errnosupport ;$50FE .dl errnosupport ;$5101 _TenX2 .dl errnosupport ;$5104 .dl errnosupport ;$5107 .dl errnosupport ;$510A _GetVarVersion .dl errnosupport ;$510D .dl errnosupport ;$5110 .dl errnosupport ;$5113 _DeleteTempEditEqu .dl errnosupport ;$5116 _JcursorFirst2 .dl errnosupport ;$5119 .dl errnosupport ;$511C _PromptMoveBackLeft .dl errnosupport ;$511F _wputsEOL2 .dl errnosupport ;$5122 _InvertTextInsMode .dl errnosupport ;$5125 .dl errnosupport ;$5128 _ResetDefaults .dl errnosupport ;$512B _ZeroFinanceVars .dl errnosupport ;$512E _DispHeader .dl errnosupport ;$5131 _JForceGroup .dl errnosupport ;$5134 .dl errnosupport ;$5137 .dl errnosupport ;$513A _DispCoords .dl errnosupport ;$513D .dl errnosupport ;$5140 .dl errnosupport ;$5143 _chkTmr .dl errnosupport ;$5146 .dl errnosupport ;$5149 .dl errnosupport ;$514C .dl errnosupport ;$514F _getDate .dl errnosupport ;$5152 _GetDateString .dl errnosupport ;$5155 _getDtFmt .dl errnosupport ;$5158 _getDtStr .dl errnosupport ;$515B _getTime .dl errnosupport ;$515E _GetTimeString .dl errnosupport ;$5161 _getTmFmt .dl errnosupport ;$5164 _getTmStr .dl errnosupport ;$5167 _SetZeroOne .dl errnosupport ;$516A _setDate .dl errnosupport ;$516D _IsOneTwoThree .dl errnosupport ;$5170 _setTime .dl errnosupport ;$5173 _IsOP112or24 .dl errnosupport ;$5176 _chkTimer0 .dl errnosupport ;$5179 _timeCnv .dl errnosupport ;$517C _GetLToOP1Extra .dl errnosupport ;$517F _ClrWindowAndFlags .dl errnosupport ;$5182 _SetMachineID .dl errnosupport ;$5185 _ResetLists .dl errnosupport ;$5188 _DispValue .dl errnosupport ;$518B .dl errnosupport ;$518E .dl errnosupport ;$5191 _ExecLib .dl errnosupport ;$5194 .dl errnosupport ;$5197 _CPOP1OP2Rounded .dl errnosupport ;$519A _CPOP1OP2Rounded2 .dl errnosupport ;$519D _OpenLib .dl errnosupport ;$51A0 .dl errnosupport ;$51A3 .dl errnosupport ;$51A6 _ResetIOPrompt .dl errnosupport ;$51A9 _StrCpyVarData .dl errnosupport ;$51AC _SetUpEditor .dl errnosupport ;$51AF _SortA .dl errnosupport ;$51B2 _SortD .dl errnosupport ;$51B5 .dl errnosupport ;$51B8 _IsOP1ResID .dl errnosupport ;$51BB _ListEdNameCxMain .dl errnosupport ;$51BE _ListEdEnterNewName .dl errnosupport ;$51C1 .dl errnosupport ;$51C4 _ForceModeKeypress .dl errnosupport ;$51C7 _DispAboutScreen .dl errnosupport ;$51CA _ChkHelpHookVer .dl errnosupport ;$51CD _Disp32 .dl errnosupport ;$51D0 .dl errnosupport ;$51D3 .dl errnosupport ;$51D6 .dl errnosupport ;$51D9 .dl errnosupport ;$51DC _DrawTableEditor .dl errnosupport ;$51DF _DisplayListNameEquals .dl errnosupport ;$51E2 _DisplayListHeader .dl errnosupport ;$51E5 _DispMatrixDimensions .dl errnosupport ;$51E8 _HighlightListEdItem .dl errnosupport ;$51EB .dl errnosupport ;$51EE .dl errnosupport ;$51F1 _MatrixName .dl errnosupport ;$51F4 .dl errnosupport ;$51F7 .dl errnosupport ;$51FA .dl errnosupport ;$51FD .dl errnosupport ;$5200 .dl errnosupport ;$5203 .dl errnosupport ;$5206 .dl errnosupport ;$5209 .dl errnosupport ;$520C .dl errnosupport ;$520F .dl errnosupport ;$5212 _SetupEmptyEditTempEqu .dl errnosupport ;$5215 _ExecClass1Token .dl errnosupport ;$5218 _HandleMathTokenParse .dl errnosupport ;$521B _MaybePushMultiplyOp .dl errnosupport ;$521E _RestartParseOP1Result .dl errnosupport ;$5221 _Chk_Batt_Level .dl errnosupport ;$5224 .dl errnosupport ;$5227 .dl errnosupport ;$522A .dl errnosupport ;$522D _DisplayListEquals .dl errnosupport ;$5230 _GetCurPlotListOffset .dl errnosupport ;$5233 _GoToLastRow .dl errnosupport ;$5236 _RectBorder .dl errnosupport ;$5239 .dl errnosupport ;$523C .dl errnosupport ;$523F .dl errnosupport ;$5242 _LoadA5 .dl errnosupport ;$5245 .dl errnosupport ;$5248 _NamedListToOP1 .dl errnosupport ;$524B .dl errnosupport ;$524E .dl errnosupport ;$5251 .dl errnosupport ;$5254 _InitUSBDeviceCallback .dl errnosupport ;$5257 _KillUSBDevice .dl errnosupport ;$525A _SetUSBConfiguration .dl errnosupport ;$525D _RequestUSBData .dl errnosupport ;$5260 _StopReceivingUSBData .dl errnosupport ;$5263 _FindAppHeaderByPage .dl errnosupport ;$5266 _FindNextHeaderByPage .dl errnosupport ;$5269 _IsMatchingLaunchApp .dl errnosupport ;$526C _InitTimer .dl errnosupport ;$526F _KillTimer .dl errnosupport ;$5272 _StartTimer .dl errnosupport ;$5275 _RestartTimer .dl errnosupport ;$5278 _StopTimer .dl errnosupport ;$527B _WaitTimer .dl errnosupport ;$527E _CheckTimer .dl errnosupport ;$5281 _CheckTimerRestart .dl errnosupport ;$5284 _SetVertGraphActive .dl errnosupport ;$5287 _ClearVertGraphActive .dl errnosupport ;$528A _EnableUSBHook .dl errnosupport ;$528D _DisableUSBHook .dl errnosupport ;$5290 _InitUSBDevice .dl errnosupport ;$5293 _KillUSBPeripheral .dl errnosupport ;$5296 _GetCurPlotListOffset2 .dl errnosupport ;$5299 .dl errnosupport ;$529C _GraphLine .dl errnosupport ;$529F .dl errnosupport ;$52A2 .dl errnosupport ;$52A5 .dl errnosupport ;$52A8 .dl errnosupport ;$52AB .dl errnosupport ;$52AE .dl errnosupport ;$52B1 _ZifTableEditor .dl errnosupport ;$52B4 .dl errnosupport ;$52B7 _GetCurPlotOffset .dl errnosupport ;$52BA .dl errnosupport ;$52BD _FindAppName .dl errnosupport ;$52C0 .dl errnosupport ;$52C3 .dl errnosupport ;$52C6 _UpdateStatPlotLists .dl errnosupport ;$52C9 _GrBufCpyCustom .dl errnosupport ;$52CC .dl errnosupport ;$52CF .dl errnosupport ;$52D2 .dl errnosupport ;$52D5 _VDispRealOP1 .dl errnosupport ;$52D8 _DispXEqualsNum .dl errnosupport ;$52DB _ResetGraphSettings .dl errnosupport ;$52DE _InitializeVariables .dl errnosupport ;$52E1 .dl errnosupport ;$52E4 _DelVarSym .dl errnosupport ;$52E7 _FindAppUpNoCase .dl errnosupport ;$52EA _FindAppDnNoCase .dl errnosupport ;$52ED _DeleteInvalidApps .dl errnosupport ;$52F0 _DeleteApp_Link .dl errnosupport ;$52F3 _CmpSymsNoCase .dl errnosupport ;$52F6 _SetAppRestrictions .dl errnosupport ;$52F9 _RemoveAppRestrictions .dl errnosupport ;$52FC _QueryAppRestrictions .dl errnosupport ;$52FF _DispAppRestrictions .dl errnosupport ;$5302 _SetupHome .dl errnosupport ;$5305 _GRPUTAWAYFull .dl errnosupport ;$5308 _SendSmartPadKeypress .dl errnosupport ;$530B _ToggleUSBSmartPadInput .dl errnosupport ;$530E _IsUSBDeviceConnected .dl errnosupport ;$5311 _RecycleUSB .dl errnosupport ;$5314 _PolarEquToOP1 .dl errnosupport ;$5317 _ParamXEquToOP1 .dl errnosupport ;$531A _ParamYEquToOP1 .dl errnosupport ;$531D _GetRestrictionsOptions .dl errnosupport ;$5320 _DispResetComplete .dl errnosupport ;$5323 _PTTReset .dl errnosupport ;$5326 _FindAppCustom .dl errnosupport ;$5329 _ClearGraphStyles .dl errnosupport ;$532C .dl errnosupport ;$532F .dl errnosupport ;$5332 ;=============================================================================== ;84+SE boot 1.00 basecall table is 276 bytes long (92 entries) starting at #8018 #DEFINE BOOT_NUMCALLS 92 .dl getDirectInput ;$8015 - VANISH exclusive: getDirectInput bcall_sbase_boot: ;.ds (bcall_sbase_boot+(3*BOOT_NUMCALLS))-$ .dl errnosupport ;$8018 * MD5Final .dl errnosupport ;$801B * RSAValidate .dl errnosupport ;$801E * BigNumCompare .dl errnosupport ;$8021 * WriteAByte .dl errnosupport ;$8024 * EraseFlash .dl errnosupport ;$8027 * FindFirstCertificateField .dl errnosupport ;$802A * ZeroToCertificate .dl errnosupport ;$802D * GetCertificateField .dl errnosupport ;$8030 * FindGroupedField .dl donothing ;$8033 * RET .dl donothing ;$8036 * RET .dl donothing ;$8039 * RET .dl donothing ;$803C * RET .dl donothing ;$803F * RET .dl errnosupport ;$8042 * Mult8By8 .dl errnosupport ;$8045 * Mult16By8 .dl errnosupport ;$8048 * Div16By8 .dl errnosupport ;$804B * Divide16By16 .dl errnosupport ;$804E .dl errnosupport ;$8051 * LoadAIndPaged .dl errnosupport ;$8054 * FlashToRAM2 .dl errnosupport ;$8057 * GetCertificateStart .dl errnosupport ;$805A * GetFieldSize .dl errnosupport ;$805D * FindSubField .dl errnosupport ;$8060 * EraseCertificateSector .dl errnosupport ;$8063 * CheckHeaderKey .dl errnosupport ;$8066 .dl errnosupport ;$8069 .dl errnosupport ;$806C * Load_LFontV2 .dl errnosupport ;$806F * Load_LFontV .dl errnosupport ;$8072 * ReceiveOS .dl errnosupport ;$8075 * FindOSHeaderSubField .dl errnosupport ;$8078 * FindNextCertificateField .dl errnosupport ;$807B * GetByteOrBoot .dl errnosupport ;$807E * GetCalcSerial .dl errnosupport ;$8081 .dl errnosupport ;$8084 * EraseFlashPage .dl errnosupport ;$8087 * WriteFlashUnsafe .dl errnosupport ;$808A * DispBootVer .dl errnosupport ;$808D * MD5Init .dl errnosupport ;$8090 * MD5Update .dl errnosupport ;$8093 * MarkOSInvalid .dl errnosupport ;$8096 .dl errnosupport ;$8099 * MarkOSValid .dl errnosupport ;$809C * CheckOSValidated .dl errnosupport ;$809F * SetupAppPubKey .dl errnosupport ;$80A2 * SigModR .dl errnosupport ;$80A5 * TransformHash .dl errnosupport ;$80A8 * IsAppFreeware .dl errnosupport ;$80AB * FindAppheaderSubField .dl errnosupport ;$80AE .dl errnosupport ;$80B1 * Div32By16 .dl errnosupport ;$80B4 .dl errnosupport ;$80B7 * GetBootVer .dl errnosupport ;$80BA * GetHWVer .dl r0_bootxora ;$80BD * XorA .dl errnosupport ;$80C0 * bignumpowermod17 .dl errnosupport ;$80C3 * ProdNrPart1 .dl errnosupport ;$80C6 * WriteAByteSafe .dl errnosupport ;$80C9 * WriteFlash .dl errnosupport ;$80CC * SetupDateStampPubKey .dl errnosupport ;$80CF * SetFlashLowerBound .dl errnosupport ;$80D2 * LowBatteryBoot .dl errnosupport ;$80D5 .dl errnosupport ;$80D8 .dl errnosupport ;$80DB .dl errnosupport ;$80DE .dl errnosupport ;$80E1 .dl errnosupport ;$80E4 .dl errnosupport ;$80E7 ** DisplayBootMessage .dl errnosupport ;$80EA ** NewLineWrap .dl errnosupport ;$80ED .dl errnosupport ;$80F0 .dl errnosupport ;$80F3 .dl errnosupport ;$80F6 .dl errnosupport ;$80F9 ** DispOSPercentage .dl errnosupport ;$80FC ** ResetCalc .dl errnosupport ;$80FF ** SetupOSPubKey .dl errnosupport ;$8102 .dl errnosupport ;$8105 .dl errnosupport ;$8108 .dl errnosupport ;$810B .dl errnosupport ;$810E .dl errnosupport ;$8111 #* Validate2048 .dl errnosupport ;$8114 .dl errnosupport ;$8117 .dl errnosupport ;$811A .dl errnosupport ;$811D .dl errnosupport ;$8120 .dl errnosupport ;$8123 .dl errnosupport ;$8126 .dl errnosupport ;$8129 ;** - These calls are present only on the TI-84+(SE), minimum HW ver 2 ;#* - These calls are present only on the TI-84+(SE), minimum HW ver 3
; int p_forward_list_empty(p_forward_list_t *list) SECTION code_adt_p_forward_list PUBLIC p_forward_list_empty defc p_forward_list_empty = asm_p_forward_list_empty INCLUDE "adt/p_forward_list/z80/asm_p_forward_list_empty.asm"
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The NV developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "rpcconsole.h" #include "ui_rpcconsole.h" #include "clientmodel.h" #include "guiutil.h" #include "peertablemodel.h" #include "chainparams.h" #include "main.h" #include "rpcclient.h" #include "rpcserver.h" #include "util.h" #include "json/json_spirit_value.h" #include <openssl/crypto.h> #ifdef ENABLE_WALLET #include <db_cxx.h> #endif #include <QDir> #include <QKeyEvent> #include <QScrollBar> #include <QThread> #include <QTime> #include <QStringList> #if QT_VERSION < 0x050000 #include <QUrl> #endif // TODO: add a scrollback limit, as there is currently none // TODO: make it possible to filter out categories (esp debug messages when implemented) // TODO: receive errors and debug messages through ClientModel const int CONSOLE_HISTORY = 50; const QSize ICON_SIZE(24, 24); const int INITIAL_TRAFFIC_GRAPH_MINS = 30; // Repair parameters const QString SALVAGEWALLET("-salvagewallet"); const QString RESCAN("-rescan"); const QString ZAPTXES1("-zapwallettxes=1"); const QString ZAPTXES2("-zapwallettxes=2"); const QString UPGRADEWALLET("-upgradewallet"); const QString REINDEX("-reindex"); const struct { const char* url; const char* source; } ICON_MAPPING[] = { {"cmd-request", ":/icons/tx_input"}, {"cmd-reply", ":/icons/tx_output"}, {"cmd-error", ":/icons/tx_output"}, {"misc", ":/icons/tx_inout"}, {NULL, NULL}}; /* Object for executing console RPC commands in a separate thread. */ class RPCExecutor : public QObject { Q_OBJECT public slots: void request(const QString& command); signals: void reply(int category, const QString& command); }; #include "rpcconsole.moc" /** * Split shell command line into a list of arguments. Aims to emulate \c bash and friends. * * - Arguments are delimited with whitespace * - Extra whitespace at the beginning and end and between arguments will be ignored * - Text can be "double" or 'single' quoted * - The backslash \c \ is used as escape character * - Outside quotes, any character can be escaped * - Within double quotes, only escape \c " and backslashes before a \c " or another backslash * - Within single quotes, no escaping is possible and no special interpretation takes place * * @param[out] args Parsed arguments will be appended to this list * @param[in] strCommand Command line to split */ bool parseCommandLine(std::vector<std::string>& args, const std::string& strCommand) { enum CmdParseState { STATE_EATING_SPACES, STATE_ARGUMENT, STATE_SINGLEQUOTED, STATE_DOUBLEQUOTED, STATE_ESCAPE_OUTER, STATE_ESCAPE_DOUBLEQUOTED } state = STATE_EATING_SPACES; std::string curarg; foreach (char ch, strCommand) { switch (state) { case STATE_ARGUMENT: // In or after argument case STATE_EATING_SPACES: // Handle runs of whitespace switch (ch) { case '"': state = STATE_DOUBLEQUOTED; break; case '\'': state = STATE_SINGLEQUOTED; break; case '\\': state = STATE_ESCAPE_OUTER; break; case ' ': case '\n': case '\t': if (state == STATE_ARGUMENT) // Space ends argument { args.push_back(curarg); curarg.clear(); } state = STATE_EATING_SPACES; break; default: curarg += ch; state = STATE_ARGUMENT; } break; case STATE_SINGLEQUOTED: // Single-quoted string switch (ch) { case '\'': state = STATE_ARGUMENT; break; default: curarg += ch; } break; case STATE_DOUBLEQUOTED: // Double-quoted string switch (ch) { case '"': state = STATE_ARGUMENT; break; case '\\': state = STATE_ESCAPE_DOUBLEQUOTED; break; default: curarg += ch; } break; case STATE_ESCAPE_OUTER: // '\' outside quotes curarg += ch; state = STATE_ARGUMENT; break; case STATE_ESCAPE_DOUBLEQUOTED: // '\' in double-quoted text if (ch != '"' && ch != '\\') curarg += '\\'; // keep '\' for everything but the quote and '\' itself curarg += ch; state = STATE_DOUBLEQUOTED; break; } } switch (state) // final state { case STATE_EATING_SPACES: return true; case STATE_ARGUMENT: args.push_back(curarg); return true; default: // ERROR to end in one of the other states return false; } } void RPCExecutor::request(const QString& command) { std::vector<std::string> args; if (!parseCommandLine(args, command.toStdString())) { emit reply(RPCConsole::CMD_ERROR, QString("Parse error: unbalanced ' or \"")); return; } if (args.empty()) return; // Nothing to do try { std::string strPrint; // Convert argument list to JSON objects in method-dependent way, // and pass it along with the method name to the dispatcher. json_spirit::Value result = tableRPC.execute( args[0], RPCConvertValues(args[0], std::vector<std::string>(args.begin() + 1, args.end()))); // Format result reply if (result.type() == json_spirit::null_type) strPrint = ""; else if (result.type() == json_spirit::str_type) strPrint = result.get_str(); else strPrint = write_string(result, true); emit reply(RPCConsole::CMD_REPLY, QString::fromStdString(strPrint)); } catch (json_spirit::Object& objError) { try // Nice formatting for standard-format error { int code = find_value(objError, "code").get_int(); std::string message = find_value(objError, "message").get_str(); emit reply(RPCConsole::CMD_ERROR, QString::fromStdString(message) + " (code " + QString::number(code) + ")"); } catch (std::runtime_error&) // raised when converting to invalid type, i.e. missing code or message { // Show raw JSON object emit reply(RPCConsole::CMD_ERROR, QString::fromStdString(write_string(json_spirit::Value(objError), false))); } } catch (std::exception& e) { emit reply(RPCConsole::CMD_ERROR, QString("Error: ") + QString::fromStdString(e.what())); } } RPCConsole::RPCConsole(QWidget* parent) : QDialog(parent), ui(new Ui::RPCConsole), clientModel(0), historyPtr(0), cachedNodeid(-1) { ui->setupUi(this); GUIUtil::restoreWindowGeometry("nRPCConsoleWindow", this->size(), this); #ifndef Q_OS_MAC ui->openDebugLogfileButton->setIcon(QIcon(":/icons/export")); #endif // Install event filter for up and down arrow ui->lineEdit->installEventFilter(this); ui->messagesWidget->installEventFilter(this); connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clear())); connect(ui->btnClearTrafficGraph, SIGNAL(clicked()), ui->trafficGraph, SLOT(clear())); // Wallet Repair Buttons connect(ui->btn_salvagewallet, SIGNAL(clicked()), this, SLOT(walletSalvage())); connect(ui->btn_rescan, SIGNAL(clicked()), this, SLOT(walletRescan())); connect(ui->btn_zapwallettxes1, SIGNAL(clicked()), this, SLOT(walletZaptxes1())); connect(ui->btn_zapwallettxes2, SIGNAL(clicked()), this, SLOT(walletZaptxes2())); connect(ui->btn_upgradewallet, SIGNAL(clicked()), this, SLOT(walletUpgrade())); connect(ui->btn_reindex, SIGNAL(clicked()), this, SLOT(walletReindex())); // set library version labels ui->openSSLVersion->setText(SSLeay_version(SSLEAY_VERSION)); #ifdef ENABLE_WALLET ui->berkeleyDBVersion->setText(DbEnv::version(0, 0, 0)); ui->wallet_path->setText(QString::fromStdString(GetDataDir().string() + QDir::separator().toLatin1() + GetArg("-wallet", "wallet.dat"))); #else ui->label_berkeleyDBVersion->hide(); ui->berkeleyDBVersion->hide(); #endif startExecutor(); setTrafficGraphRange(INITIAL_TRAFFIC_GRAPH_MINS); ui->peerHeading->setText(tr("Select a peer to view detailed information.")); clear(); } RPCConsole::~RPCConsole() { GUIUtil::saveWindowGeometry("nRPCConsoleWindow", this); emit stopExecutor(); delete ui; } bool RPCConsole::eventFilter(QObject* obj, QEvent* event) { if (event->type() == QEvent::KeyPress) // Special key handling { QKeyEvent* keyevt = static_cast<QKeyEvent*>(event); int key = keyevt->key(); Qt::KeyboardModifiers mod = keyevt->modifiers(); switch (key) { case Qt::Key_Up: if (obj == ui->lineEdit) { browseHistory(-1); return true; } break; case Qt::Key_Down: if (obj == ui->lineEdit) { browseHistory(1); return true; } break; case Qt::Key_PageUp: /* pass paging keys to messages widget */ case Qt::Key_PageDown: if (obj == ui->lineEdit) { QApplication::postEvent(ui->messagesWidget, new QKeyEvent(*keyevt)); return true; } break; case Qt::Key_Return: case Qt::Key_Enter: // forward these events to lineEdit if(obj == autoCompleter->popup()) { QApplication::postEvent(ui->lineEdit, new QKeyEvent(*keyevt)); return true; } break; default: // Typing in messages widget brings focus to line edit, and redirects key there // Exclude most combinations and keys that emit no text, except paste shortcuts if (obj == ui->messagesWidget && ((!mod && !keyevt->text().isEmpty() && key != Qt::Key_Tab) || ((mod & Qt::ControlModifier) && key == Qt::Key_V) || ((mod & Qt::ShiftModifier) && key == Qt::Key_Insert))) { ui->lineEdit->setFocus(); QApplication::postEvent(ui->lineEdit, new QKeyEvent(*keyevt)); return true; } } } return QDialog::eventFilter(obj, event); } void RPCConsole::setClientModel(ClientModel* model) { clientModel = model; ui->trafficGraph->setClientModel(model); if (model) { // Keep up to date with client setNumConnections(model->getNumConnections()); connect(model, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int))); setNumBlocks(model->getNumBlocks()); connect(model, SIGNAL(numBlocksChanged(int)), this, SLOT(setNumBlocks(int))); setMasternodeCount(model->getMasternodeCountString()); connect(model, SIGNAL(strMasternodesChanged(QString)), this, SLOT(setMasternodeCount(QString))); updateTrafficStats(model->getTotalBytesRecv(), model->getTotalBytesSent()); connect(model, SIGNAL(bytesChanged(quint64, quint64)), this, SLOT(updateTrafficStats(quint64, quint64))); // set up peer table ui->peerWidget->setModel(model->getPeerTableModel()); ui->peerWidget->verticalHeader()->hide(); ui->peerWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); ui->peerWidget->setSelectionBehavior(QAbstractItemView::SelectRows); ui->peerWidget->setSelectionMode(QAbstractItemView::SingleSelection); ui->peerWidget->setColumnWidth(PeerTableModel::Address, ADDRESS_COLUMN_WIDTH); ui->peerWidget->setColumnWidth(PeerTableModel::Subversion, SUBVERSION_COLUMN_WIDTH); ui->peerWidget->setColumnWidth(PeerTableModel::Ping, PING_COLUMN_WIDTH); // connect the peerWidget selection model to our peerSelected() handler connect(ui->peerWidget->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)), this, SLOT(peerSelected(const QItemSelection&, const QItemSelection&))); connect(model->getPeerTableModel(), SIGNAL(layoutChanged()), this, SLOT(peerLayoutChanged())); // Provide initial values ui->clientVersion->setText(model->formatFullVersion()); ui->clientName->setText(model->clientName()); ui->buildDate->setText(model->formatBuildDate()); ui->startupTime->setText(model->formatClientStartupTime()); ui->networkName->setText(QString::fromStdString(Params().NetworkIDString())); //Setup autocomplete and attach it QStringList wordList; std::vector<std::string> commandList = tableRPC.listCommands(); for (size_t i = 0; i < commandList.size(); ++i) { wordList << commandList[i].c_str(); } autoCompleter = new QCompleter(wordList, this); ui->lineEdit->setCompleter(autoCompleter); // clear the lineEdit after activating from QCompleter autoCompleter->popup()->installEventFilter(this); } } static QString categoryClass(int category) { switch (category) { case RPCConsole::CMD_REQUEST: return "cmd-request"; break; case RPCConsole::CMD_REPLY: return "cmd-reply"; break; case RPCConsole::CMD_ERROR: return "cmd-error"; break; default: return "misc"; } } /** Restart wallet with "-salvagewallet" */ void RPCConsole::walletSalvage() { buildParameterlist(SALVAGEWALLET); } /** Restart wallet with "-rescan" */ void RPCConsole::walletRescan() { buildParameterlist(RESCAN); } /** Restart wallet with "-zapwallettxes=1" */ void RPCConsole::walletZaptxes1() { buildParameterlist(ZAPTXES1); } /** Restart wallet with "-zapwallettxes=2" */ void RPCConsole::walletZaptxes2() { buildParameterlist(ZAPTXES2); } /** Restart wallet with "-upgradewallet" */ void RPCConsole::walletUpgrade() { buildParameterlist(UPGRADEWALLET); } /** Restart wallet with "-reindex" */ void RPCConsole::walletReindex() { buildParameterlist(REINDEX); } /** Build command-line parameter list for restart */ void RPCConsole::buildParameterlist(QString arg) { // Get command-line arguments and remove the application name QStringList args = QApplication::arguments(); args.removeFirst(); // Remove existing repair-options args.removeAll(SALVAGEWALLET); args.removeAll(RESCAN); args.removeAll(ZAPTXES1); args.removeAll(ZAPTXES2); args.removeAll(UPGRADEWALLET); args.removeAll(REINDEX); // Append repair parameter to command line. args.append(arg); // Send command-line arguments to BitcoinGUI::handleRestart() emit handleRestart(args); } void RPCConsole::clear() { ui->messagesWidget->clear(); history.clear(); historyPtr = 0; ui->lineEdit->clear(); ui->lineEdit->setFocus(); // Add smoothly scaled icon images. // (when using width/height on an img, Qt uses nearest instead of linear interpolation) for (int i = 0; ICON_MAPPING[i].url; ++i) { ui->messagesWidget->document()->addResource( QTextDocument::ImageResource, QUrl(ICON_MAPPING[i].url), QImage(ICON_MAPPING[i].source).scaled(ICON_SIZE, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); } // Set default style sheet ui->messagesWidget->document()->setDefaultStyleSheet( "table { }" "td.time { color: #808080; padding-top: 3px; } " "td.message { font-family: Courier, Courier New, Lucida Console, monospace; font-size: 12px; } " // Todo: Remove fixed font-size "td.cmd-request { color: #006060; } " "td.cmd-error { color: red; } " "b { color: #006060; } "); message(CMD_REPLY, (tr("Welcome to the NV RPC console.") + "<br>" + tr("Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.") + "<br>" + tr("Type <b>help</b> for an overview of available commands.")), true); } void RPCConsole::reject() { // Ignore escape keypress if this is not a seperate window if (windowType() != Qt::Widget) QDialog::reject(); } void RPCConsole::message(int category, const QString& message, bool html) { QTime time = QTime::currentTime(); QString timeString = time.toString(); QString out; out += "<table><tr><td class=\"time\" width=\"65\">" + timeString + "</td>"; out += "<td class=\"icon\" width=\"32\"><img src=\"" + categoryClass(category) + "\"></td>"; out += "<td class=\"message " + categoryClass(category) + "\" valign=\"middle\">"; if (html) out += message; else out += GUIUtil::HtmlEscape(message, true); out += "</td></tr></table>"; ui->messagesWidget->append(out); } void RPCConsole::setNumConnections(int count) { if (!clientModel) return; QString connections = QString::number(count) + " ("; connections += tr("In:") + " " + QString::number(clientModel->getNumConnections(CONNECTIONS_IN)) + " / "; connections += tr("Out:") + " " + QString::number(clientModel->getNumConnections(CONNECTIONS_OUT)) + ")"; ui->numberOfConnections->setText(connections); } void RPCConsole::setNumBlocks(int count) { ui->numberOfBlocks->setText(QString::number(count)); if (clientModel) ui->lastBlockTime->setText(clientModel->getLastBlockDate().toString()); } void RPCConsole::setMasternodeCount(const QString& strMasternodes) { ui->masternodeCount->setText(strMasternodes); } void RPCConsole::on_lineEdit_returnPressed() { QString cmd = ui->lineEdit->text(); ui->lineEdit->clear(); if (!cmd.isEmpty()) { message(CMD_REQUEST, cmd); emit cmdRequest(cmd); // Remove command, if already in history history.removeOne(cmd); // Append command to history history.append(cmd); // Enforce maximum history size while (history.size() > CONSOLE_HISTORY) history.removeFirst(); // Set pointer to end of history historyPtr = history.size(); // Scroll console view to end scrollToEnd(); } } void RPCConsole::browseHistory(int offset) { historyPtr += offset; if (historyPtr < 0) historyPtr = 0; if (historyPtr > history.size()) historyPtr = history.size(); QString cmd; if (historyPtr < history.size()) cmd = history.at(historyPtr); ui->lineEdit->setText(cmd); } void RPCConsole::startExecutor() { QThread* thread = new QThread; RPCExecutor* executor = new RPCExecutor(); executor->moveToThread(thread); // Replies from executor object must go to this object connect(executor, SIGNAL(reply(int, QString)), this, SLOT(message(int, QString))); // Requests from this object must go to executor connect(this, SIGNAL(cmdRequest(QString)), executor, SLOT(request(QString))); // On stopExecutor signal // - queue executor for deletion (in execution thread) // - quit the Qt event loop in the execution thread connect(this, SIGNAL(stopExecutor()), executor, SLOT(deleteLater())); connect(this, SIGNAL(stopExecutor()), thread, SLOT(quit())); // Queue the thread for deletion (in this thread) when it is finished connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater())); // Default implementation of QThread::run() simply spins up an event loop in the thread, // which is what we want. thread->start(); } void RPCConsole::on_tabWidget_currentChanged(int index) { if (ui->tabWidget->widget(index) == ui->tab_console) { ui->lineEdit->setFocus(); } } void RPCConsole::on_openDebugLogfileButton_clicked() { GUIUtil::openDebugLogfile(); } void RPCConsole::scrollToEnd() { QScrollBar* scrollbar = ui->messagesWidget->verticalScrollBar(); scrollbar->setValue(scrollbar->maximum()); } void RPCConsole::on_sldGraphRange_valueChanged(int value) { const int multiplier = 5; // each position on the slider represents 5 min int mins = value * multiplier; setTrafficGraphRange(mins); } QString RPCConsole::FormatBytes(quint64 bytes) { if (bytes < 1024) return QString(tr("%1 B")).arg(bytes); if (bytes < 1024 * 1024) return QString(tr("%1 KB")).arg(bytes / 1024); if (bytes < 1024 * 1024 * 1024) return QString(tr("%1 MB")).arg(bytes / 1024 / 1024); return QString(tr("%1 GB")).arg(bytes / 1024 / 1024 / 1024); } void RPCConsole::setTrafficGraphRange(int mins) { ui->trafficGraph->setGraphRangeMins(mins); ui->lblGraphRange->setText(GUIUtil::formatDurationStr(mins * 60)); } void RPCConsole::updateTrafficStats(quint64 totalBytesIn, quint64 totalBytesOut) { ui->lblBytesIn->setText(FormatBytes(totalBytesIn)); ui->lblBytesOut->setText(FormatBytes(totalBytesOut)); } void RPCConsole::showInfo() { ui->tabWidget->setCurrentIndex(0); show(); } void RPCConsole::showConsole() { ui->tabWidget->setCurrentIndex(1); show(); } void RPCConsole::showNetwork() { ui->tabWidget->setCurrentIndex(2); show(); } void RPCConsole::showPeers() { ui->tabWidget->setCurrentIndex(3); show(); } void RPCConsole::showRepair() { ui->tabWidget->setCurrentIndex(4); show(); } void RPCConsole::showConfEditor() { GUIUtil::openConfigfile(); } void RPCConsole::showMNConfEditor() { GUIUtil::openMNConfigfile(); } void RPCConsole::peerSelected(const QItemSelection& selected, const QItemSelection& deselected) { Q_UNUSED(deselected); if (!clientModel || selected.indexes().isEmpty()) return; const CNodeCombinedStats* stats = clientModel->getPeerTableModel()->getNodeStats(selected.indexes().first().row()); if (stats) updateNodeDetail(stats); } void RPCConsole::peerLayoutChanged() { if (!clientModel) return; const CNodeCombinedStats* stats = NULL; bool fUnselect = false; bool fReselect = false; if (cachedNodeid == -1) // no node selected yet return; // find the currently selected row int selectedRow; QModelIndexList selectedModelIndex = ui->peerWidget->selectionModel()->selectedIndexes(); if (selectedModelIndex.isEmpty()) selectedRow = -1; else selectedRow = selectedModelIndex.first().row(); // check if our detail node has a row in the table (it may not necessarily // be at selectedRow since its position can change after a layout change) int detailNodeRow = clientModel->getPeerTableModel()->getRowByNodeId(cachedNodeid); if (detailNodeRow < 0) { // detail node dissapeared from table (node disconnected) fUnselect = true; cachedNodeid = -1; ui->peerHeading->setText(tr("Select a peer to view detailed information.")); } else { if (detailNodeRow != selectedRow) { // detail node moved position fUnselect = true; fReselect = true; } // get fresh stats on the detail node. stats = clientModel->getPeerTableModel()->getNodeStats(detailNodeRow); } if (fUnselect && selectedRow >= 0) { ui->peerWidget->selectionModel()->select(QItemSelection(selectedModelIndex.first(), selectedModelIndex.last()), QItemSelectionModel::Deselect); } if (fReselect) { ui->peerWidget->selectRow(detailNodeRow); } if (stats) updateNodeDetail(stats); } void RPCConsole::updateNodeDetail(const CNodeCombinedStats* stats) { // Update cached nodeid cachedNodeid = stats->nodeStats.nodeid; // update the detail ui with latest node information QString peerAddrDetails(QString::fromStdString(stats->nodeStats.addrName)); if (!stats->nodeStats.addrLocal.empty()) peerAddrDetails += "<br />" + tr("via %1").arg(QString::fromStdString(stats->nodeStats.addrLocal)); ui->peerHeading->setText(peerAddrDetails); ui->peerServices->setText(GUIUtil::formatServicesStr(stats->nodeStats.nServices)); ui->peerLastSend->setText(stats->nodeStats.nLastSend ? GUIUtil::formatDurationStr(GetTime() - stats->nodeStats.nLastSend) : tr("never")); ui->peerLastRecv->setText(stats->nodeStats.nLastRecv ? GUIUtil::formatDurationStr(GetTime() - stats->nodeStats.nLastRecv) : tr("never")); ui->peerBytesSent->setText(FormatBytes(stats->nodeStats.nSendBytes)); ui->peerBytesRecv->setText(FormatBytes(stats->nodeStats.nRecvBytes)); ui->peerConnTime->setText(GUIUtil::formatDurationStr(GetTime() - stats->nodeStats.nTimeConnected)); ui->peerPingTime->setText(GUIUtil::formatPingTime(stats->nodeStats.dPingTime)); ui->peerVersion->setText(QString("%1").arg(stats->nodeStats.nVersion)); ui->peerSubversion->setText(QString::fromStdString(stats->nodeStats.cleanSubVer)); ui->peerDirection->setText(stats->nodeStats.fInbound ? tr("Inbound") : tr("Outbound")); ui->peerHeight->setText(QString("%1").arg(stats->nodeStats.nStartingHeight)); // This check fails for example if the lock was busy and // nodeStateStats couldn't be fetched. if (stats->fNodeStateStatsAvailable) { // Ban score is init to 0 ui->peerBanScore->setText(QString("%1").arg(stats->nodeStateStats.nMisbehavior)); // Sync height is init to -1 if (stats->nodeStateStats.nSyncHeight > -1) ui->peerSyncHeight->setText(QString("%1").arg(stats->nodeStateStats.nSyncHeight)); else ui->peerSyncHeight->setText(tr("Unknown")); } else { ui->peerBanScore->setText(tr("Fetching...")); ui->peerSyncHeight->setText(tr("Fetching...")); } ui->detailWidget->show(); } void RPCConsole::resizeEvent(QResizeEvent* event) { QWidget::resizeEvent(event); } void RPCConsole::showEvent(QShowEvent* event) { QWidget::showEvent(event); if (!clientModel) return; // start PeerTableModel auto refresh clientModel->getPeerTableModel()->startAutoRefresh(); } void RPCConsole::hideEvent(QHideEvent* event) { QWidget::hideEvent(event); if (!clientModel) return; // stop PeerTableModel auto refresh clientModel->getPeerTableModel()->stopAutoRefresh(); } void RPCConsole::showBackups() { GUIUtil::showBackups(); }
; flat assembler interface for Linux ; Copyright (c) 1999-2018, Tomasz Grysztar. ; All rights reserved. format ELF executable 3 entry start segment readable executable start: mov [con_handle],1 mov esi,_logo call display_string mov [command_line],esp mov ecx,[esp] mov ebx,[esp+4+ecx*4+4] mov [environment],ebx call get_params jc information call init_memory mov esi,_memory_prefix call display_string mov eax,[memory_end] sub eax,[memory_start] add eax,[additional_memory_end] sub eax,[additional_memory] shr eax,10 call display_number mov esi,_memory_suffix call display_string mov eax,78 mov ebx,buffer xor ecx,ecx int 0x80 mov eax,dword [buffer] mov ecx,1000 mul ecx mov ebx,eax mov eax,dword [buffer+4] div ecx add eax,ebx mov [start_time],eax and [preprocessing_done],0 call preprocessor or [preprocessing_done],-1 call parser call assembler call formatter call display_user_messages movzx eax,[current_pass] inc eax call display_number mov esi,_passes_suffix call display_string mov eax,78 mov ebx,buffer xor ecx,ecx int 0x80 mov eax,dword [buffer] mov ecx,1000 mul ecx mov ebx,eax mov eax,dword [buffer+4] div ecx add eax,ebx sub eax,[start_time] jnc time_ok add eax,3600000 time_ok: xor edx,edx mov ebx,100 div ebx or eax,eax jz display_bytes_count xor edx,edx mov ebx,10 div ebx push edx call display_number mov dl,'.' call display_character pop eax call display_number mov esi,_seconds_suffix call display_string display_bytes_count: mov eax,[written_size] call display_number mov esi,_bytes_suffix call display_string xor al,al jmp exit_program information: mov esi,_usage call display_string mov al,1 jmp exit_program get_params: mov ebx,[command_line] mov [input_file],0 mov [output_file],0 mov [symbols_file],0 mov [memory_setting],0 mov [passes_limit],100 mov ecx,[ebx] add ebx,8 dec ecx jz bad_params mov [definitions_pointer],predefinitions get_param: mov esi,[ebx] mov al,[esi] cmp al,'-' je option_param cmp [input_file],0 jne get_output_file mov [input_file],esi jmp next_param get_output_file: cmp [output_file],0 jne bad_params mov [output_file],esi jmp next_param option_param: inc esi lodsb cmp al,'m' je memory_option cmp al,'M' je memory_option cmp al,'p' je passes_option cmp al,'P' je passes_option cmp al,'d' je definition_option cmp al,'D' je definition_option cmp al,'s' je symbols_option cmp al,'S' je symbols_option bad_params: stc ret memory_option: cmp byte [esi],0 jne get_memory_setting dec ecx jz bad_params add ebx,4 mov esi,[ebx] get_memory_setting: call get_option_value or edx,edx jz bad_params cmp edx,1 shl (32-10) jae bad_params mov [memory_setting],edx jmp next_param passes_option: cmp byte [esi],0 jne get_passes_setting dec ecx jz bad_params add ebx,4 mov esi,[ebx] get_passes_setting: call get_option_value or edx,edx jz bad_params cmp edx,10000h ja bad_params mov [passes_limit],dx next_param: add ebx,4 dec ecx jnz get_param cmp [input_file],0 je bad_params mov eax,[definitions_pointer] mov byte [eax],0 mov [initial_definitions],predefinitions clc ret definition_option: cmp byte [esi],0 jne get_definition dec ecx jz bad_params add ebx,4 mov esi,[ebx] get_definition: push edi mov edi,[definitions_pointer] call convert_definition_option mov [definitions_pointer],edi pop edi jc bad_params jmp next_param symbols_option: cmp byte [esi],0 jne get_symbols_setting dec ecx jz bad_params add ebx,4 mov esi,[ebx] get_symbols_setting: mov [symbols_file],esi jmp next_param get_option_value: xor eax,eax mov edx,eax get_option_digit: lodsb cmp al,20h je option_value_ok or al,al jz option_value_ok sub al,30h jc invalid_option_value cmp al,9 ja invalid_option_value imul edx,10 jo invalid_option_value add edx,eax jc invalid_option_value jmp get_option_digit option_value_ok: dec esi clc ret invalid_option_value: stc ret convert_definition_option: mov edx,edi cmp edi,predefinitions+1000h jae bad_definition_option xor al,al stosb copy_definition_name: lodsb cmp al,'=' je copy_definition_value cmp al,20h je bad_definition_option or al,al jz bad_definition_option cmp edi,predefinitions+1000h jae bad_definition_option stosb inc byte [edx] jnz copy_definition_name bad_definition_option: stc ret copy_definition_value: lodsb cmp al,20h je definition_value_end or al,al jz definition_value_end cmp edi,predefinitions+1000h jae bad_definition_option stosb jmp copy_definition_value definition_value_end: dec esi cmp edi,predefinitions+1000h jae bad_definition_option xor al,al stosb clc ret include 'system.inc' include '..\version.inc' _copyright db 'Copyright (c) 1999-2018, Tomasz Grysztar',0xA,0 _logo db 'flat assembler version ',VERSION_STRING,0 _usage db 0xA db 'usage: fasm <source> [output]',0xA db 'optional settings:',0xA db ' -m <limit> set the limit in kilobytes for the available memory',0xA db ' -p <limit> set the maximum allowed number of passes',0xA db ' -d <name>=<value> define symbolic variable',0xA db ' -s <file> dump symbolic information for debugging',0xA db 0 _memory_prefix db ' (',0 _memory_suffix db ' kilobytes memory)',0xA,0 _passes_suffix db ' passes, ',0 _seconds_suffix db ' seconds, ',0 _bytes_suffix db ' bytes.',0xA,0 include '..\errors.inc' include '..\symbdump.inc' include '..\preproce.inc' include '..\parser.inc' include '..\exprpars.inc' include '..\assemble.inc' include '..\exprcalc.inc' include '..\formats.inc' include '..\x86_64.inc' include '..\avx.inc' include '..\tables.inc' include '..\messages.inc' segment readable writeable align 4 include '..\variable.inc' command_line dd ? memory_setting dd ? definitions_pointer dd ? environment dd ? timestamp dq ? start_time dd ? con_handle dd ? displayed_count dd ? last_displayed db ? character db ? preprocessing_done db ? predefinitions rb 1000h buffer rb 1000h
; A074065: Numerators a(n) of fractions slowly converging to sqrt(3): let a(1) = 0, b(n) = n - a(n); if (a(n) + 1) / b(n) < sqrt(3), then a(n+1) = a(n) + 1, else a(n+1)= a(n). ; 0,1,1,2,3,3,4,5,5,6,6,7,8,8,9,10,10,11,12,12,13,13,14,15,15,16,17,17,18,19,19,20,20,21,22,22,23,24,24,25,25,26,27,27,28,29,29,30,31,31,32,32,33,34,34,35,36,36,37,38,38,39,39,40,41,41,42,43,43,44,45,45,46,46 add $0,1 mov $1,45 mul $1,$0 div $1,71 mov $0,$1
; A282029: a(n) = n - pi(n/2). ; 0,1,2,3,3,4,4,5,6,7,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,22,23,24,25,26,27,27,28,29,30,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,47,48,48,49,50,51,51,52,53,54,55,56,57,58,59,60,61,62,62,63,64,65,66,67,68,69,69,70,71,72,72,73,74,75,76,77,78,79,79,80,81,82,83,84,85,86,87,88,89,90,90,91,92,93,94,95,96,97,98,99,100,101,101,102,103,104,104,105,106,107,108,109,110,111,112,113,114,115,115,116,117,118,119,120,121,122,122,123,124,125,125,126,127,128,129,130,131,132,133,134,135,136,136,137,138,139,140,141,142,143,143,144,145,146,147,148,149,150,151,152,153,154,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,169,170,171,172,173,174,175,176,176,177,178,179,179,180,181,182,183,184,185,186,186,187,188,189,189,190,191,192,193,194,195,196,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219 mov $1,1 mul $1,$0 div $0,2 cal $0,230980 ; Number of primes <= n, starting at n=0. add $1,3 sub $1,$0 sub $1,3
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Berkeley Softworks 1990 -- All Rights Reserved PROJECT: PC GEOS MODULE: citoh 9-pin Print Driver FILE: citoh9ControlCodes.asm AUTHOR: Dave Durran, 1 April 1990 ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- Dave 4/1/90 Initial revision Dave 5/92 Initial 2.0 version DC_ESCRIPTION: This file contains all the Printer Control Codes for the citoh 9-pin driver. $Id: citoh9ControlCodes.asm,v 1.1 97/04/18 11:53:30 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ;***************************************************************************** ; ;CONTROL CODES FOR THE CITOH 9-PIN PRINTERS..... ; ; the first byte is the byte count for the control code. ; ;***************************************************************************** ;__________Job Control______________________________________ pr_codes_ResetPrinter label byte byte 2,C_ESC,"c" pr_codes_InitPrinter label byte ;general init codes. byte 2,C_ESC,">" ;unidirectional print. pr_codes_InitTextMode label byte byte 2 ;count byte C_ESC,"<" ;set bi-directional ;__________Cursor Control______________________________________ pr_codes_AbsPos label byte byte 3,C_CR,C_ESC,"F" pr_codes_SetLineFeed label byte byte 2,C_ESC,"T" pr_codes_SetMaxLineFeed label byte byte 4,C_ESC,"T99" pr_codes_Do1ScanlineFeed label byte byte 5,C_ESC,"T01",C_LF ;__________ASF Control______________________________________ pr_codes_InitPaperLength label byte pr_codes_ASFControl label byte pr_codes_EnableASF label byte pr_codes_DisableASF label byte pr_codes_DefeatPaperOut label byte byte C_NULL ;__________Graphics Control______________________________________ pr_codes_SetLoGraphics label byte byte 5,C_CR,C_ESC,"N",C_ESC,"S" pr_codes_SetHiGraphics label byte byte 5,C_CR,C_ESC,"P",C_ESC,"S" ;__________Pitch Control______________________________________ pr_codes_Set10Pitch label byte byte 2,C_ESC,"N" pr_codes_Set12Pitch label byte byte 2,C_ESC,"E" pr_codes_SetProportional label byte byte 2,C_ESC,"P" pr_codes_Set17Pitch label byte byte 2,C_ESC,"Q" ;__________Style Control______________________________________ pr_codes_SetCondensed label byte byte C_NULL pr_codes_SetSubscript label byte byte 3,C_ESC,"s2" pr_codes_SetSuperscript label byte byte 3,C_ESC,"s1" pr_codes_SetNLQ label byte pr_codes_SetBold label byte byte 2,C_ESC,"!" pr_codes_SetItalic label byte byte 3,C_ESC,"i1" pr_codes_SetUnderline label byte byte 2,C_ESC,"X" pr_codes_SetDblWidth label byte byte 1,C_SO pr_codes_ResetCondensed label byte byte C_NULL pr_codes_ResetScript label byte byte 3,C_ESC,"s0" pr_codes_ResetNLQ label byte pr_codes_ResetBold label byte byte 2,C_ESC,"\"" pr_codes_ResetItalic label byte byte 3,C_ESC,"i0" pr_codes_ResetUnderline label byte byte 2,C_ESC,"Y" pr_codes_ResetDblWidth label byte byte 1,C_SI pr_codes_SetStrikeThru label byte pr_codes_SetDblHeight label byte pr_codes_ResetStrikeThru label byte pr_codes_ResetDblHeight label byte byte C_NULL ;__________Color Control______________________________________ pr_codes_SetColor label byte byte 2 byte C_ESC,"K" pr_codes_SetYellow label byte byte 3 byte C_ESC,"K1" pr_codes_SetCyan label byte byte 3 byte C_ESC,"K3" pr_codes_SetMagenta label byte byte 3 byte C_ESC,"K2" pr_codes_SetBlack label byte byte 3 byte C_ESC,"K0"
;============================================================================== ; Contents of this file are copyright Phillip Stevens ; ; You have permission to use this for NON COMMERCIAL USE ONLY ; If you wish to use it elsewhere, please include an acknowledgement to myself. ; ; https://github.com/feilipu/ ; ; https://feilipu.me/ ; ;============================================================================== ; ; REQUIRES ; ; Z180_VECTOR_BASE .EQU RAM vector address for Z180 Vectors ; INCLUDE "yaz180.h" INCLUDE "yaz180.h" ;============================================================================== ; ; Z180 TRAP HANDLING ; SECTION z180_vector_trap_handler EXTERN Z180_INIT, Z180_TRAP PUBLIC INIT, REINIT INIT: PUSH AF ; Set I/O Control Reg (ICR) LD A,Z180_IO_BASE ; ICR = $00 [xx00 0000] for I/O Registers at $00 - $3F OUT0 (ICR),A ; Standard I/O Mapping (0 Enabled) IN0 A,(ITC) ; Check whether TRAP is set, or normal RESET AND ITC_TRAP JR NZ, Z180_TRAP_HANDLER ; Handle the TRAP event POP AF REINIT: LD A,Z180_VECTOR_BASE/$100 LD I,A ; Set interrupt vector address high byte (I) ; IL = $40 [010x xxxx] for Vectors at $nn40 - $nn5F LD A,Z180_VECTOR_BASE%$100 OUT0 (IL),A ; Set interrupt vector address low byte (IL) IM 1 ; Interrupt mode 1 for INT0 XOR A ; Zero Accumulator ; Clear Refresh Control Reg (RCR) OUT0 (RCR),A ; DRAM Refresh Enable (0 Disabled) OUT0 (TCR),A ; Disable PRT downcounting ; Clear INT/TRAP Control Register (ITC) OUT0 (ITC),A ; Disable all external interrupts. ; Set Operation Mode Control Reg (OMCR) LD A,OMCR_M1E ; Enable M1 for single step, disable 64180 I/O _RD Mode OUT0 (OMCR),A ; X80 Mode (M1 Disabled, IOC Disabled) ; Set internal clock = crystal x 2 = 36.864MHz ; if using ZS8180 or Z80182 at High-Speed LD A,CMR_X2 ; Set Hi-Speed flag OUT0 (CMR),A ; CPU Clock Multiplier Reg (CMR) ; DMA/Wait Control Reg Set I/O Wait States LD A,DCNTL_IWI0 OUT0 (DCNTL),A ; 0 Memory Wait & 2 I/O Wait LD HL,Z80_VECTOR_PROTO ; Establish Z80 RST Vector Table LD DE,Z80_VECTOR_BASE LD BC,Z80_VECTOR_SIZE LDIR LD HL,Z180_VECTOR_PROTO ; Establish Z180 Vector Table LD DE,Z180_VECTOR_BASE LD BC,Z180_VECTOR_SIZE LDIR JP Z180_INIT ; Start normal Configuration Z180_TRAP_HANDLER: XOR ITC_TRAP ; Clear TRAP bit, It must be set to get here. OUT0 (ITC),A POP AF JP Z180_TRAP ; Jump to proper TRAP handling ;============================================================================== ; ; Z180 INTERRUPT VECTOR TABLE PROTOTYPE ; ; WILL BE DUPLICATED DURING INIT TO: ; ; .ORG Z180_VECTOR_BASE SECTION z180_vector_table_prototype EXTERN INT_INT1, INT_INT2, INT_PRT0, INT_PRT1 EXTERN INT_DMA0, INT_DMA1, INT_CSIO, INT_ASCI0, INT_ASCI1 ;------------------------------------------------------------------------------ ; Z180_VECTOR_INT1 DEFW INT_INT1 ;------------------------------------------------------------------------------ ; Z180_VECTOR_INT2 DEFW INT_INT2 ;------------------------------------------------------------------------------ ; Z180_VECTOR_PRT0 DEFW INT_PRT0 ;------------------------------------------------------------------------------ ; Z180_VECTOR_PRT1 DEFW INT_PRT1 ;------------------------------------------------------------------------------ ; Z180_VECTOR_DMA0 DEFW INT_DMA0 ;------------------------------------------------------------------------------ ; Z180_VECTOR_DMA1 DEFW INT_DMA1 ;------------------------------------------------------------------------------ ; Z180_VECTOR_CSIO DEFW INT_CSIO ;------------------------------------------------------------------------------ ; Z180_VECTOR_ASCI0 DEFW INT_ASCI0 ;------------------------------------------------------------------------------ ; Z180_VECTOR_ASCI1 DEFW INT_ASCI1 ;============================================================================== ; .END ; ;==============================================================================
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.21.27702.2 include listing.inc INCLUDELIB MSVCRTD INCLUDELIB OLDNAMES PUBLIC ?gAntiOptimizationMask@@3HA ; gAntiOptimizationMask PUBLIC ??_C@_03GCDGINBO@ref@ ; `string' PUBLIC ??_C@_03OEPHKLAG@SSE@ ; `string' _BSS SEGMENT ?gAntiOptimizationMask@@3HA DD 01H DUP (?) ; gAntiOptimizationMask _BSS ENDS msvcjmc SEGMENT __B0C4CEA9_malloc@h DB 01H __F66CEB67_corecrt_stdio_config@h DB 01H __101834BA_corecrt_wstdio@h DB 01H __AD6A91B7_stdio@h DB 01H __367CC694_corecrt_memcpy_s@h DB 01H __35D7DDB3_corecrt_memory@h DB 01H __DC9673E3_corecrt_wstring@h DB 01H __A29A7DFB_string@h DB 01H __24E9E95F_stdlib@h DB 01H __FE541EC8_InstructionSetLevel@h DB 01H __8F6F464D_Main@cpp DB 01H msvcjmc ENDS ; COMDAT ??_C@_03OEPHKLAG@SSE@ CONST SEGMENT ??_C@_03OEPHKLAG@SSE@ DB 'SSE', 00H ; `string' CONST ENDS ; COMDAT ??_C@_03GCDGINBO@ref@ CONST SEGMENT ??_C@_03GCDGINBO@ref@ DB 'ref', 00H ; `string' CONST ENDS CONST SEGMENT ?perfVariants@?1??RunPerformanceTest@@YAXXZ@4QBU<unnamed-type-perfVariants>@?1??1@YAXXZ@B DQ FLAT:??_C@_03GCDGINBO@ref@ ; `RunPerformanceTest'::`2'::perfVariants DQ FLAT:?RunRef@@YAXPEATVec4f@@PEBT1@1H@Z DQ FLAT:??_C@_03OEPHKLAG@SSE@ DQ FLAT:?RunSSE@@YAXPEATVec4f@@PEBT1@1H@Z CONST ENDS PUBLIC __local_stdio_printf_options PUBLIC _vfprintf_l PUBLIC printf PUBLIC ?VecAddRef@@YAXAEATVec4f@@AEBT1@1@Z ; VecAddRef PUBLIC ?VecAddSSE@@YAXAEATVec4f@@AEBT1@1@Z ; VecAddSSE PUBLIC main PUBLIC __JustMyCode_Default PUBLIC ?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA ; `__local_stdio_printf_options'::`2'::_OptionsStorage PUBLIC ??_C@_0DA@KNEDKHD@?$CF12s?3?5?$CF?42f?5average?5cycles?5?$HM?5?$CF?42@ ; `string' PUBLIC __real@40b0000000000000 PUBLIC __real@4170000000000000 PUBLIC __real@44800000 PUBLIC __real@46800000 EXTRN __imp___acrt_iob_func:PROC EXTRN __imp___stdio_common_vfprintf:PROC EXTRN __imp_rand:PROC EXTRN _RTC_CheckStackVars:PROC EXTRN _RTC_InitBase:PROC EXTRN _RTC_Shutdown:PROC EXTRN __CheckForDebuggerJustMyCode:PROC EXTRN __GSHandlerCheck:PROC EXTRN __security_check_cookie:PROC EXTRN __security_cookie:QWORD EXTRN _fltused:DWORD ; COMDAT ?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA _BSS SEGMENT ?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA DQ 01H DUP (?) ; `__local_stdio_printf_options'::`2'::_OptionsStorage _BSS ENDS ; COMDAT pdata pdata SEGMENT $pdata$__local_stdio_printf_options DD imagerel $LN3 DD imagerel $LN3+59 DD imagerel $unwind$__local_stdio_printf_options pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$_vfprintf_l DD imagerel $LN3 DD imagerel $LN3+126 DD imagerel $unwind$_vfprintf_l pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$printf DD imagerel $LN3 DD imagerel $LN3+189 DD imagerel $unwind$printf pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$?VecAddRef@@YAXAEATVec4f@@AEBT1@1@Z DD imagerel $LN6 DD imagerel $LN6+148 DD imagerel $unwind$?VecAddRef@@YAXAEATVec4f@@AEBT1@1@Z pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$?VecAddSSE@@YAXAEATVec4f@@AEBT1@1@Z DD imagerel $LN3 DD imagerel $LN3+118 DD imagerel $unwind$?VecAddSSE@@YAXAEATVec4f@@AEBT1@1@Z pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$?Randf@@YAMXZ DD imagerel ?Randf@@YAMXZ DD imagerel ?Randf@@YAMXZ+78 DD imagerel $unwind$?Randf@@YAMXZ pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$?RandVec@@YAXAEATVec4f@@@Z DD imagerel ?RandVec@@YAXAEATVec4f@@@Z DD imagerel ?RandVec@@YAXAEATVec4f@@@Z+110 DD imagerel $unwind$?RandVec@@YAXAEATVec4f@@@Z pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$?RunRef@@YAXPEATVec4f@@PEBT1@1H@Z DD imagerel ?RunRef@@YAXPEATVec4f@@PEBT1@1H@Z DD imagerel ?RunRef@@YAXPEATVec4f@@PEBT1@1H@Z+216 DD imagerel $unwind$?RunRef@@YAXPEATVec4f@@PEBT1@1H@Z pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$?RunSSE@@YAXPEATVec4f@@PEBT1@1H@Z DD imagerel ?RunSSE@@YAXPEATVec4f@@PEBT1@1H@Z DD imagerel ?RunSSE@@YAXPEATVec4f@@PEBT1@1H@Z+216 DD imagerel $unwind$?RunSSE@@YAXPEATVec4f@@PEBT1@1H@Z pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$?RunPerformanceTest@@YAXXZ DD imagerel ?RunPerformanceTest@@YAXXZ DD imagerel ?RunPerformanceTest@@YAXXZ+562 DD imagerel $unwind$?RunPerformanceTest@@YAXXZ pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$?RunTests@@YAHXZ DD imagerel ?RunTests@@YAHXZ DD imagerel ?RunTests@@YAHXZ+59 DD imagerel $unwind$?RunTests@@YAHXZ pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$main DD imagerel $LN3 DD imagerel $LN3+72 DD imagerel $unwind$main pdata ENDS ; COMDAT __real@46800000 CONST SEGMENT __real@46800000 DD 046800000r ; 16384 CONST ENDS ; COMDAT __real@44800000 CONST SEGMENT __real@44800000 DD 044800000r ; 1024 CONST ENDS ; COMDAT __real@4170000000000000 CONST SEGMENT __real@4170000000000000 DQ 04170000000000000r ; 1.67772e+07 CONST ENDS ; COMDAT __real@40b0000000000000 CONST SEGMENT __real@40b0000000000000 DQ 040b0000000000000r ; 4096 CONST ENDS ; COMDAT rtc$TMZ rtc$TMZ SEGMENT _RTC_Shutdown.rtc$TMZ DQ FLAT:_RTC_Shutdown rtc$TMZ ENDS ; COMDAT rtc$IMZ rtc$IMZ SEGMENT _RTC_InitBase.rtc$IMZ DQ FLAT:_RTC_InitBase rtc$IMZ ENDS ; COMDAT ??_C@_0DA@KNEDKHD@?$CF12s?3?5?$CF?42f?5average?5cycles?5?$HM?5?$CF?42@ CONST SEGMENT ??_C@_0DA@KNEDKHD@?$CF12s?3?5?$CF?42f?5average?5cycles?5?$HM?5?$CF?42@ DB '%' DB '12s: %.2f average cycles | %.2f lowest cycles', 0aH, 00H ; `string' CONST ENDS ; COMDAT xdata xdata SEGMENT $unwind$main DD 025052d01H DD 01122317H DD 0700b001dH DD 0500aH xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$?RunTests@@YAHXZ DD 025051e01H DD 010a230fH DD 07003001dH DD 05002H xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$?RunPerformanceTest@@YAXXZ DD 025052f19H DD 010a230fH DD 07003004dH DD 05002H DD imagerel __GSHandlerCheck DD 0250H xdata ENDS ; COMDAT CONST CONST SEGMENT ?RunPerformanceTest@@YAXXZ$rtcName$0 DB 041H ; RunPerformanceTest DB 070H DB 065H DB 072H DB 066H DB 00H ORG $+2 ?RunPerformanceTest@@YAXXZ$rtcName$1 DB 042H ; RunPerformanceTest DB 070H DB 065H DB 072H DB 066H DB 00H ORG $+2 ?RunPerformanceTest@@YAXXZ$rtcName$2 DB 06fH ; RunPerformanceTest DB 075H DB 074H DB 00H ORG $+12 ?RunPerformanceTest@@YAXXZ$rtcVarDesc DD 090H ; RunPerformanceTest DD 010H DQ FLAT:?RunPerformanceTest@@YAXXZ$rtcName$2 DD 060H DD 010H DQ FLAT:?RunPerformanceTest@@YAXXZ$rtcName$1 DD 030H DD 010H DQ FLAT:?RunPerformanceTest@@YAXXZ$rtcName$0 ORG $+144 ?RunPerformanceTest@@YAXXZ$rtcFrameData DD 03H ; RunPerformanceTest DD 00H DQ FLAT:?RunPerformanceTest@@YAXXZ$rtcVarDesc CONST ENDS ; COMDAT xdata xdata SEGMENT $unwind$?RunSSE@@YAXPEATVec4f@@PEBT1@1H@Z DD 025053901H DD 011d2322H DD 070160025H DD 05015H xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$?RunRef@@YAXPEATVec4f@@PEBT1@1H@Z DD 025053901H DD 011d2322H DD 070160025H DD 05015H xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$?RandVec@@YAXAEATVec4f@@@Z DD 025052a01H DD 010e2313H DD 070070021H DD 05006H xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$?Randf@@YAMXZ DD 035051e01H DD 010a330fH DD 07003001fH DD 05002H xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$?VecAddSSE@@YAXAEATVec4f@@AEBT1@1@Z DD 025053401H DD 0118231dH DD 070110023H DD 05010H xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$?VecAddRef@@YAXAEATVec4f@@AEBT1@1@Z DD 025053401H DD 0118231dH DD 070110021H DD 05010H xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$printf DD 025054a19H DD 011d2322H DD 070160029H DD 05015H DD imagerel __GSHandlerCheck DD 0138H xdata ENDS ; COMDAT CONST CONST SEGMENT printf$rtcName$0 DB 05fH DB 041H DB 072H DB 067H DB 04cH DB 069H DB 073H DB 074H DB 00H ORG $+7 printf$rtcVarDesc DD 048H DD 08H DQ FLAT:printf$rtcName$0 ORG $+48 printf$rtcFrameData DD 01H DD 00H DQ FLAT:printf$rtcVarDesc CONST ENDS ; COMDAT xdata xdata SEGMENT $unwind$_vfprintf_l DD 035053901H DD 011d3322H DD 07016001fH DD 05015H xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$__local_stdio_printf_options DD 025051e01H DD 010a230fH DD 07003001dH DD 05002H xdata ENDS ; Function compile flags: /Odt ; COMDAT __JustMyCode_Default _TEXT SEGMENT __JustMyCode_Default PROC ; COMDAT ret 0 __JustMyCode_Default ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI ; File D:\#Programming\Parallelism\Main.cpp ; COMDAT main _TEXT SEGMENT argc$ = 224 argv$ = 232 main PROC ; COMDAT ; 10 : { $LN3: mov QWORD PTR [rsp+16], rdx mov DWORD PTR [rsp+8], ecx push rbp push rdi sub rsp, 232 ; 000000e8H lea rbp, QWORD PTR [rsp+32] mov rdi, rsp mov ecx, 58 ; 0000003aH mov eax, -858993460 ; ccccccccH rep stosd mov ecx, DWORD PTR [rsp+264] lea rcx, OFFSET FLAT:__8F6F464D_Main@cpp call __CheckForDebuggerJustMyCode ; 11 : return RunTests(); call ?RunTests@@YAHXZ ; RunTests ; 12 : } lea rsp, QWORD PTR [rbp+200] pop rdi pop rbp ret 0 main ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI ; File D:\#Programming\Parallelism\InstructionSetLevel.h ; COMDAT ?RunTests@@YAHXZ _TEXT SEGMENT ?RunTests@@YAHXZ PROC ; RunTests, COMDAT ; 131 : { push rbp push rdi sub rsp, 232 ; 000000e8H lea rbp, QWORD PTR [rsp+32] mov rdi, rsp mov ecx, 58 ; 0000003aH mov eax, -858993460 ; ccccccccH rep stosd lea rcx, OFFSET FLAT:__FE541EC8_InstructionSetLevel@h call __CheckForDebuggerJustMyCode ; 132 : //if (RunCorrectnessTest()) ; 133 : // return EXIT_FAILURE; ; 134 : // ; 135 : //printf("All tests correct.\n"); ; 136 : ; 137 : RunPerformanceTest(); call ?RunPerformanceTest@@YAXXZ ; RunPerformanceTest ; 138 : ; 139 : return EXIT_SUCCESS; xor eax, eax ; 140 : } lea rsp, QWORD PTR [rbp+200] pop rdi pop rbp ret 0 ?RunTests@@YAHXZ ENDP ; RunTests _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI ; File D:\#Programming\Parallelism\InstructionSetLevel.h ; COMDAT ?RunPerformanceTest@@YAXXZ _TEXT SEGMENT Aperf$ = 16 Bperf$ = 64 out$ = 112 i$6 = 148 bestTime$7 = 184 sumTime$8 = 216 run$9 = 244 time$10 = 280 avgTime$11 = 312 cyclesPerRun$12 = 344 tv128 = 552 __$ArrayPad$ = 560 ?RunPerformanceTest@@YAXXZ PROC ; RunPerformanceTest, COMDAT ; 90 : { push rbp push rdi sub rsp, 616 ; 00000268H lea rbp, QWORD PTR [rsp+32] mov rdi, rsp mov ecx, 154 ; 0000009aH mov eax, -858993460 ; ccccccccH rep stosd mov rax, QWORD PTR __security_cookie xor rax, rbp mov QWORD PTR __$ArrayPad$[rbp], rax lea rcx, OFFSET FLAT:__FE541EC8_InstructionSetLevel@h call __CheckForDebuggerJustMyCode ; 91 : static constexpr struct { ; 92 : const char* name; ; 93 : void (*Run)(Vec4f* out, const Vec4f* A, const Vec4f* B, int count); ; 94 : } perfVariants[] = { ; 95 : { "ref", RunRef }, ; 96 : { "SSE", RunSSE }, ; 97 : }; ; 98 : static constexpr int nPerfVars = (int)(sizeof(perfVariants) / sizeof(*perfVariants)); ; 99 : ; 100 : Vec4f Aperf, Bperf, out; ; 101 : RandVec(Aperf); lea rcx, QWORD PTR Aperf$[rbp] call ?RandVec@@YAXAEATVec4f@@@Z ; RandVec ; 102 : RandVec(Bperf); lea rcx, QWORD PTR Bperf$[rbp] call ?RandVec@@YAXAEATVec4f@@@Z ; RandVec ; 103 : ; 104 : for (int i = 0; i < nPerfVars; i++) mov DWORD PTR i$6[rbp], 0 jmp SHORT $LN4@RunPerform $LN2@RunPerform: mov eax, DWORD PTR i$6[rbp] inc eax mov DWORD PTR i$6[rbp], eax $LN4@RunPerform: cmp DWORD PTR i$6[rbp], 2 jge $LN3@RunPerform ; 105 : { ; 106 : static constexpr int nRuns = 4096; ; 107 : static constexpr int addsPerRun = 4096; ; 108 : ; 109 : unsigned long long bestTime = ~0ull; mov QWORD PTR bestTime$7[rbp], -1 ; 110 : unsigned long long sumTime = 0ull; mov QWORD PTR sumTime$8[rbp], 0 ; 111 : ; 112 : for (int run = 0; run < nRuns; run++) mov DWORD PTR run$9[rbp], 0 jmp SHORT $LN7@RunPerform $LN5@RunPerform: mov eax, DWORD PTR run$9[rbp] inc eax mov DWORD PTR run$9[rbp], eax $LN7@RunPerform: cmp DWORD PTR run$9[rbp], 4096 ; 00001000H jge $LN6@RunPerform ; 113 : { ; 114 : unsigned long long time = __rdtsc(); // The processor time stamp records the number of clock cycles since the last reset rdtsc shl rdx, 32 ; 00000020H or rax, rdx mov QWORD PTR time$10[rbp], rax ; 115 : perfVariants[i].Run(&out, &Aperf, &Bperf, addsPerRun); movsxd rax, DWORD PTR i$6[rbp] imul rax, rax, 16 lea rcx, OFFSET FLAT:?perfVariants@?1??RunPerformanceTest@@YAXXZ@4QBU<unnamed-type-perfVariants>@?1??1@YAXXZ@B mov QWORD PTR tv128[rbp], rcx mov r9d, 4096 ; 00001000H lea r8, QWORD PTR Bperf$[rbp] lea rdx, QWORD PTR Aperf$[rbp] lea rcx, QWORD PTR out$[rbp] mov r10, QWORD PTR tv128[rbp] call QWORD PTR [r10+rax+8] ; 116 : time = __rdtsc() - time; rdtsc shl rdx, 32 ; 00000020H or rax, rdx sub rax, QWORD PTR time$10[rbp] mov QWORD PTR time$10[rbp], rax ; 117 : ; 118 : sumTime += time; mov rax, QWORD PTR time$10[rbp] mov rcx, QWORD PTR sumTime$8[rbp] add rcx, rax mov rax, rcx mov QWORD PTR sumTime$8[rbp], rax ; 119 : ; 120 : if (time < bestTime) mov rax, QWORD PTR bestTime$7[rbp] cmp QWORD PTR time$10[rbp], rax jae SHORT $LN8@RunPerform ; 121 : bestTime = time; mov rax, QWORD PTR time$10[rbp] mov QWORD PTR bestTime$7[rbp], rax $LN8@RunPerform: ; 122 : } jmp $LN5@RunPerform $LN6@RunPerform: ; 123 : ; 124 : double avgTime = (double)sumTime / (double)(addsPerRun * nRuns); mov rax, QWORD PTR sumTime$8[rbp] test rax, rax jl SHORT $LN12@RunPerform cvtsi2sd xmm0, rax jmp SHORT $LN13@RunPerform $LN12@RunPerform: mov rcx, rax shr rcx, 1 and rax, 1 or rcx, rax cvtsi2sd xmm1, rcx addsd xmm1, xmm1 movaps xmm0, xmm1 $LN13@RunPerform: divsd xmm0, QWORD PTR __real@4170000000000000 movsd QWORD PTR avgTime$11[rbp], xmm0 ; 125 : double cyclesPerRun = (double)bestTime / (double)addsPerRun; mov rax, QWORD PTR bestTime$7[rbp] test rax, rax jl SHORT $LN10@RunPerform cvtsi2sd xmm0, rax jmp SHORT $LN11@RunPerform $LN10@RunPerform: mov rcx, rax shr rcx, 1 and rax, 1 or rcx, rax cvtsi2sd xmm1, rcx addsd xmm1, xmm1 movaps xmm0, xmm1 $LN11@RunPerform: divsd xmm0, QWORD PTR __real@40b0000000000000 movsd QWORD PTR cyclesPerRun$12[rbp], xmm0 ; 126 : printf("%12s: %.2f average cycles | %.2f lowest cycles\n", perfVariants[i].name, avgTime, cyclesPerRun); movsxd rax, DWORD PTR i$6[rbp] imul rax, rax, 16 lea rcx, OFFSET FLAT:?perfVariants@?1??RunPerformanceTest@@YAXXZ@4QBU<unnamed-type-perfVariants>@?1??1@YAXXZ@B movsd xmm3, QWORD PTR cyclesPerRun$12[rbp] movq r9, xmm3 movsd xmm2, QWORD PTR avgTime$11[rbp] movq r8, xmm2 mov rdx, QWORD PTR [rcx+rax] lea rcx, OFFSET FLAT:??_C@_0DA@KNEDKHD@?$CF12s?3?5?$CF?42f?5average?5cycles?5?$HM?5?$CF?42@ call printf ; 127 : } jmp $LN2@RunPerform $LN3@RunPerform: ; 128 : } lea rcx, QWORD PTR [rbp-32] lea rdx, OFFSET FLAT:?RunPerformanceTest@@YAXXZ$rtcFrameData call _RTC_CheckStackVars mov rcx, QWORD PTR __$ArrayPad$[rbp] xor rcx, rbp call __security_check_cookie lea rsp, QWORD PTR [rbp+584] pop rdi pop rbp ret 0 ?RunPerformanceTest@@YAXXZ ENDP ; RunPerformanceTest _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI ; File D:\#Programming\Parallelism\InstructionSetLevel.h ; COMDAT ?RunSSE@@YAXPEATVec4f@@PEBT1@1H@Z _TEXT SEGMENT i$1 = 4 j$2 = 36 tv77 = 248 out$ = 288 A$ = 296 B$ = 304 count$ = 312 ?RunSSE@@YAXPEATVec4f@@PEBT1@1H@Z PROC ; RunSSE, COMDAT ; 56 : { mov DWORD PTR [rsp+32], r9d mov QWORD PTR [rsp+24], r8 mov QWORD PTR [rsp+16], rdx mov QWORD PTR [rsp+8], rcx push rbp push rdi sub rsp, 296 ; 00000128H lea rbp, QWORD PTR [rsp+32] mov rdi, rsp mov ecx, 74 ; 0000004aH mov eax, -858993460 ; ccccccccH rep stosd mov rcx, QWORD PTR [rsp+328] lea rcx, OFFSET FLAT:__FE541EC8_InstructionSetLevel@h call __CheckForDebuggerJustMyCode ; 57 : for (int i = 0; i < count; i++) mov DWORD PTR i$1[rbp], 0 jmp SHORT $LN4@RunSSE $LN2@RunSSE: mov eax, DWORD PTR i$1[rbp] inc eax mov DWORD PTR i$1[rbp], eax $LN4@RunSSE: mov eax, DWORD PTR count$[rbp] cmp DWORD PTR i$1[rbp], eax jge SHORT $LN3@RunSSE ; 58 : { ; 59 : int j = i & gAntiOptimizationMask; // Only take first element mov eax, DWORD PTR ?gAntiOptimizationMask@@3HA ; gAntiOptimizationMask mov ecx, DWORD PTR i$1[rbp] and ecx, eax mov eax, ecx mov DWORD PTR j$2[rbp], eax ; 60 : VecAddSSE(out[j], A[j], B[j]); movsxd rax, DWORD PTR j$2[rbp] imul rax, rax, 16 mov rcx, QWORD PTR B$[rbp] add rcx, rax mov rax, rcx movsxd rcx, DWORD PTR j$2[rbp] imul rcx, rcx, 16 mov rdx, QWORD PTR A$[rbp] add rdx, rcx mov rcx, rdx movsxd rdx, DWORD PTR j$2[rbp] imul rdx, rdx, 16 mov r8, QWORD PTR out$[rbp] add r8, rdx mov rdx, r8 mov QWORD PTR tv77[rbp], rdx mov r8, rax mov rdx, rcx mov rax, QWORD PTR tv77[rbp] mov rcx, rax call ?VecAddSSE@@YAXAEATVec4f@@AEBT1@1@Z ; VecAddSSE ; 61 : } jmp SHORT $LN2@RunSSE $LN3@RunSSE: ; 62 : } lea rsp, QWORD PTR [rbp+264] pop rdi pop rbp ret 0 ?RunSSE@@YAXPEATVec4f@@PEBT1@1H@Z ENDP ; RunSSE _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI ; File D:\#Programming\Parallelism\InstructionSetLevel.h ; COMDAT ?RunRef@@YAXPEATVec4f@@PEBT1@1H@Z _TEXT SEGMENT i$1 = 4 j$2 = 36 tv77 = 248 out$ = 288 A$ = 296 B$ = 304 count$ = 312 ?RunRef@@YAXPEATVec4f@@PEBT1@1H@Z PROC ; RunRef, COMDAT ; 47 : { mov DWORD PTR [rsp+32], r9d mov QWORD PTR [rsp+24], r8 mov QWORD PTR [rsp+16], rdx mov QWORD PTR [rsp+8], rcx push rbp push rdi sub rsp, 296 ; 00000128H lea rbp, QWORD PTR [rsp+32] mov rdi, rsp mov ecx, 74 ; 0000004aH mov eax, -858993460 ; ccccccccH rep stosd mov rcx, QWORD PTR [rsp+328] lea rcx, OFFSET FLAT:__FE541EC8_InstructionSetLevel@h call __CheckForDebuggerJustMyCode ; 48 : for (int i = 0; i < count; i++) mov DWORD PTR i$1[rbp], 0 jmp SHORT $LN4@RunRef $LN2@RunRef: mov eax, DWORD PTR i$1[rbp] inc eax mov DWORD PTR i$1[rbp], eax $LN4@RunRef: mov eax, DWORD PTR count$[rbp] cmp DWORD PTR i$1[rbp], eax jge SHORT $LN3@RunRef ; 49 : { ; 50 : int j = i & gAntiOptimizationMask; // Only take first element mov eax, DWORD PTR ?gAntiOptimizationMask@@3HA ; gAntiOptimizationMask mov ecx, DWORD PTR i$1[rbp] and ecx, eax mov eax, ecx mov DWORD PTR j$2[rbp], eax ; 51 : VecAddRef(out[j], A[j], B[j]); movsxd rax, DWORD PTR j$2[rbp] imul rax, rax, 16 mov rcx, QWORD PTR B$[rbp] add rcx, rax mov rax, rcx movsxd rcx, DWORD PTR j$2[rbp] imul rcx, rcx, 16 mov rdx, QWORD PTR A$[rbp] add rdx, rcx mov rcx, rdx movsxd rdx, DWORD PTR j$2[rbp] imul rdx, rdx, 16 mov r8, QWORD PTR out$[rbp] add r8, rdx mov rdx, r8 mov QWORD PTR tv77[rbp], rdx mov r8, rax mov rdx, rcx mov rax, QWORD PTR tv77[rbp] mov rcx, rax call ?VecAddRef@@YAXAEATVec4f@@AEBT1@1@Z ; VecAddRef ; 52 : } jmp SHORT $LN2@RunRef $LN3@RunRef: ; 53 : } lea rsp, QWORD PTR [rbp+264] pop rdi pop rbp ret 0 ?RunRef@@YAXPEATVec4f@@PEBT1@1H@Z ENDP ; RunRef _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI ; File D:\#Programming\Parallelism\InstructionSetLevel.h ; COMDAT ?RandVec@@YAXAEATVec4f@@@Z _TEXT SEGMENT i$1 = 4 M$ = 256 ?RandVec@@YAXAEATVec4f@@@Z PROC ; RandVec, COMDAT ; 35 : { mov QWORD PTR [rsp+8], rcx push rbp push rdi sub rsp, 264 ; 00000108H lea rbp, QWORD PTR [rsp+32] mov rdi, rsp mov ecx, 66 ; 00000042H mov eax, -858993460 ; ccccccccH rep stosd mov rcx, QWORD PTR [rsp+296] lea rcx, OFFSET FLAT:__FE541EC8_InstructionSetLevel@h call __CheckForDebuggerJustMyCode ; 36 : for (int i = 0; i < 4; i++) mov DWORD PTR i$1[rbp], 0 jmp SHORT $LN4@RandVec $LN2@RandVec: mov eax, DWORD PTR i$1[rbp] inc eax mov DWORD PTR i$1[rbp], eax $LN4@RandVec: cmp DWORD PTR i$1[rbp], 4 jge SHORT $LN3@RandVec ; 37 : M.m[i] = Randf(); call ?Randf@@YAMXZ ; Randf movsxd rax, DWORD PTR i$1[rbp] mov rcx, QWORD PTR M$[rbp] movss DWORD PTR [rcx+rax*4], xmm0 jmp SHORT $LN2@RandVec $LN3@RandVec: ; 38 : } lea rsp, QWORD PTR [rbp+232] pop rdi pop rbp ret 0 ?RandVec@@YAXAEATVec4f@@@Z ENDP ; RandVec _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI ; File D:\#Programming\Parallelism\InstructionSetLevel.h ; COMDAT ?Randf@@YAMXZ _TEXT SEGMENT ?Randf@@YAMXZ PROC ; Randf, COMDAT ; 30 : { push rbp push rdi sub rsp, 248 ; 000000f8H lea rbp, QWORD PTR [rsp+48] mov rdi, rsp mov ecx, 62 ; 0000003eH mov eax, -858993460 ; ccccccccH rep stosd lea rcx, OFFSET FLAT:__FE541EC8_InstructionSetLevel@h call __CheckForDebuggerJustMyCode ; 31 : return (rand() - 16384.0f) / 1024.0f; call QWORD PTR __imp_rand cvtsi2ss xmm0, eax subss xmm0, DWORD PTR __real@46800000 divss xmm0, DWORD PTR __real@44800000 ; 32 : } lea rsp, QWORD PTR [rbp+200] pop rdi pop rbp ret 0 ?Randf@@YAMXZ ENDP ; Randf _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI ; File D:\#Programming\Parallelism\InstructionSetLevel.h ; COMDAT ?VecAddSSE@@YAXAEATVec4f@@AEBT1@1@Z _TEXT SEGMENT $T1 = 208 out$ = 272 A$ = 280 B$ = 288 ?VecAddSSE@@YAXAEATVec4f@@AEBT1@1@Z PROC ; VecAddSSE, COMDAT ; 20 : { $LN3: mov QWORD PTR [rsp+24], r8 mov QWORD PTR [rsp+16], rdx mov QWORD PTR [rsp+8], rcx push rbp push rdi sub rsp, 280 ; 00000118H lea rbp, QWORD PTR [rsp+32] mov rdi, rsp mov ecx, 70 ; 00000046H mov eax, -858993460 ; ccccccccH rep stosd mov rcx, QWORD PTR [rsp+312] lea rcx, OFFSET FLAT:__FE541EC8_InstructionSetLevel@h call __CheckForDebuggerJustMyCode ; 21 : out.row = _mm_add_ps(A.row, B.row); mov rax, QWORD PTR A$[rbp] mov rcx, QWORD PTR B$[rbp] movups xmm0, XMMWORD PTR [rax] addps xmm0, XMMWORD PTR [rcx] movaps XMMWORD PTR $T1[rbp], xmm0 mov rax, QWORD PTR out$[rbp] movaps xmm0, XMMWORD PTR $T1[rbp] movups XMMWORD PTR [rax], xmm0 ; 22 : } lea rsp, QWORD PTR [rbp+248] pop rdi pop rbp ret 0 ?VecAddSSE@@YAXAEATVec4f@@AEBT1@1@Z ENDP ; VecAddSSE _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI ; File D:\#Programming\Parallelism\InstructionSetLevel.h ; COMDAT ?VecAddRef@@YAXAEATVec4f@@AEBT1@1@Z _TEXT SEGMENT i$1 = 4 out$ = 256 A$ = 264 B$ = 272 ?VecAddRef@@YAXAEATVec4f@@AEBT1@1@Z PROC ; VecAddRef, COMDAT ; 14 : { $LN6: mov QWORD PTR [rsp+24], r8 mov QWORD PTR [rsp+16], rdx mov QWORD PTR [rsp+8], rcx push rbp push rdi sub rsp, 264 ; 00000108H lea rbp, QWORD PTR [rsp+32] mov rdi, rsp mov ecx, 66 ; 00000042H mov eax, -858993460 ; ccccccccH rep stosd mov rcx, QWORD PTR [rsp+296] lea rcx, OFFSET FLAT:__FE541EC8_InstructionSetLevel@h call __CheckForDebuggerJustMyCode ; 15 : for (int i = 0; i < 4; i++) mov DWORD PTR i$1[rbp], 0 jmp SHORT $LN4@VecAddRef $LN2@VecAddRef: mov eax, DWORD PTR i$1[rbp] inc eax mov DWORD PTR i$1[rbp], eax $LN4@VecAddRef: cmp DWORD PTR i$1[rbp], 4 jge SHORT $LN3@VecAddRef ; 16 : out.m[i] = A.m[i] + B.m[i]; movsxd rax, DWORD PTR i$1[rbp] movsxd rcx, DWORD PTR i$1[rbp] mov rdx, QWORD PTR A$[rbp] mov r8, QWORD PTR B$[rbp] movss xmm0, DWORD PTR [rdx+rax*4] addss xmm0, DWORD PTR [r8+rcx*4] movsxd rax, DWORD PTR i$1[rbp] mov rcx, QWORD PTR out$[rbp] movss DWORD PTR [rcx+rax*4], xmm0 jmp SHORT $LN2@VecAddRef $LN3@VecAddRef: ; 17 : } lea rsp, QWORD PTR [rbp+232] pop rdi pop rbp ret 0 ?VecAddRef@@YAXAEATVec4f@@AEBT1@1@Z ENDP ; VecAddRef _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI ; File C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h ; COMDAT printf _TEXT SEGMENT _Result$ = 4 _ArgList$ = 40 __$ArrayPad$ = 280 _Format$ = 320 printf PROC ; COMDAT ; 954 : { $LN3: mov QWORD PTR [rsp+8], rcx mov QWORD PTR [rsp+16], rdx mov QWORD PTR [rsp+24], r8 mov QWORD PTR [rsp+32], r9 push rbp push rdi sub rsp, 328 ; 00000148H lea rbp, QWORD PTR [rsp+32] mov rdi, rsp mov ecx, 82 ; 00000052H mov eax, -858993460 ; ccccccccH rep stosd mov rcx, QWORD PTR [rsp+360] mov rax, QWORD PTR __security_cookie xor rax, rbp mov QWORD PTR __$ArrayPad$[rbp], rax lea rcx, OFFSET FLAT:__AD6A91B7_stdio@h call __CheckForDebuggerJustMyCode ; 955 : int _Result; ; 956 : va_list _ArgList; ; 957 : __crt_va_start(_ArgList, _Format); lea rax, QWORD PTR _Format$[rbp+8] mov QWORD PTR _ArgList$[rbp], rax ; 958 : _Result = _vfprintf_l(stdout, _Format, NULL, _ArgList); mov ecx, 1 call QWORD PTR __imp___acrt_iob_func mov r9, QWORD PTR _ArgList$[rbp] xor r8d, r8d mov rdx, QWORD PTR _Format$[rbp] mov rcx, rax call _vfprintf_l mov DWORD PTR _Result$[rbp], eax ; 959 : __crt_va_end(_ArgList); mov QWORD PTR _ArgList$[rbp], 0 ; 960 : return _Result; mov eax, DWORD PTR _Result$[rbp] ; 961 : } mov edi, eax lea rcx, QWORD PTR [rbp-32] lea rdx, OFFSET FLAT:printf$rtcFrameData call _RTC_CheckStackVars mov eax, edi mov rcx, QWORD PTR __$ArrayPad$[rbp] xor rcx, rbp call __security_check_cookie lea rsp, QWORD PTR [rbp+296] pop rdi pop rbp ret 0 printf ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI ; File C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\stdio.h ; COMDAT _vfprintf_l _TEXT SEGMENT _Stream$ = 224 _Format$ = 232 _Locale$ = 240 _ArgList$ = 248 _vfprintf_l PROC ; COMDAT ; 642 : { $LN3: mov QWORD PTR [rsp+32], r9 mov QWORD PTR [rsp+24], r8 mov QWORD PTR [rsp+16], rdx mov QWORD PTR [rsp+8], rcx push rbp push rdi sub rsp, 248 ; 000000f8H lea rbp, QWORD PTR [rsp+48] mov rdi, rsp mov ecx, 62 ; 0000003eH mov eax, -858993460 ; ccccccccH rep stosd mov rcx, QWORD PTR [rsp+280] lea rcx, OFFSET FLAT:__AD6A91B7_stdio@h call __CheckForDebuggerJustMyCode ; 643 : return __stdio_common_vfprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Stream, _Format, _Locale, _ArgList); call __local_stdio_printf_options mov rcx, QWORD PTR _ArgList$[rbp] mov QWORD PTR [rsp+32], rcx mov r9, QWORD PTR _Locale$[rbp] mov r8, QWORD PTR _Format$[rbp] mov rdx, QWORD PTR _Stream$[rbp] mov rcx, QWORD PTR [rax] call QWORD PTR __imp___stdio_common_vfprintf ; 644 : } lea rsp, QWORD PTR [rbp+200] pop rdi pop rbp ret 0 _vfprintf_l ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI ; File C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_stdio_config.h ; COMDAT __local_stdio_printf_options _TEXT SEGMENT __local_stdio_printf_options PROC ; COMDAT ; 86 : { $LN3: push rbp push rdi sub rsp, 232 ; 000000e8H lea rbp, QWORD PTR [rsp+32] mov rdi, rsp mov ecx, 58 ; 0000003aH mov eax, -858993460 ; ccccccccH rep stosd lea rcx, OFFSET FLAT:__F66CEB67_corecrt_stdio_config@h call __CheckForDebuggerJustMyCode ; 87 : static unsigned __int64 _OptionsStorage; ; 88 : return &_OptionsStorage; lea rax, OFFSET FLAT:?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA ; `__local_stdio_printf_options'::`2'::_OptionsStorage ; 89 : } lea rsp, QWORD PTR [rbp+200] pop rdi pop rbp ret 0 __local_stdio_printf_options ENDP _TEXT ENDS END
/* * Copyright (c) 2019, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ L0: mov (8|M0) r13.0<1>:ud 0x0:ud mov (8|M0) acc0.0<1>:w 0x64200000:v add (8|M0) acc0.0<1>:w acc0.0<8;8,1>:w 0x1C:uw shl (4|M0) r22.4<1>:w acc0.4<4;4,1>:w 0x5:uw mov (1|M0) r22.14<1>:uw 0x100:uw mov (1|M0) f0.0<1>:uw r24.0<0;1,0>:ub (W&~f0.0)jmpi L1760 L112: mov (8|M0) acc0.0<1>:f r26.2<0;1,0>:f mac (1|M0) r23.3<1>:f r26.4<0;1,0>:f 15.0:f cmp (1|M0) (eq)f1.0 null.0<1>:w r24.2<0;1,0>:ub 0x1:uw (f1.0) mov (1|M0) acc0.3<1>:f r23.3<0;1,0>:f (f1.0) mac (1|M0) r23.3<1>:f r26.4<0;1,0>:f -8.0:f mov (4|M0) r10.0<1>:f 0x48403000:vf mov (4|M0) r10.4<1>:f 0x5C585450:vf mov (8|M0) r13.0<1>:ud r0.0<8;8,1>:ud mov (2|M0) r13.0<1>:ud 0x0:ud mov (1|M0) r13.2<1>:ud 0x0:ud add (1|M0) a0.0<1>:ud r24.5<0;1,0>:ud 0xA8C0100:ud mov (8|M0) acc0.0<1>:f r26.3<0;1,0>:f mac (8|M0) r16.0<1>:f r26.5<0;1,0>:f r10.0<8;8,1>:f mac (8|M0) r17.0<1>:f r26.5<0;1,0>:f r10.0<8;8,1>:f mov (8|M0) acc0.0<1>:f r23.3<0;1,0>:f mac (8|M0) r14.0<1>:f r26.4<0;1,0>:f r10.0<0;1,0>:f mul (8|M0) acc0.0<1>:f r26.4<0;1,0>:f -1.0:f add (8|M0) r15.0<1>:f acc0.0<8;8,1>:f r14.0<8;8,1>:f send (16|M0) r37:uw r13:ub 0x2 a0.0 mul (8|M0) acc0.0<1>:f r26.4<0;1,0>:f -2.0:f add (8|M0) r14.0<1>:f acc0.0<8;8,1>:f r14.0<8;8,1>:f add (8|M0) r15.0<1>:f acc0.0<8;8,1>:f r15.0<8;8,1>:f mul (16|M0) acc0.0<1>:f r37.0<8;8,1>:f 65472.0:f mov (16|M0) (sat)r28.0<1>:ud acc0.0<8;8,1>:f mul (16|M0) acc0.0<1>:f r39.0<8;8,1>:f 65472.0:f mov (16|M0) (sat)r30.0<1>:ud acc0.0<8;8,1>:f mul (16|M0) acc0.0<1>:f r41.0<8;8,1>:f 65472.0:f mov (16|M0) (sat)r32.0<1>:ud acc0.0<8;8,1>:f mul (16|M0) acc0.0<1>:f r43.0<8;8,1>:f 65472.0:f mov (16|M0) (sat)r34.0<1>:ud acc0.0<8;8,1>:f mov (16|M0) r28.0<1>:uw r28.0<16;8,2>:uw mov (16|M0) r30.0<1>:uw r30.0<16;8,2>:uw mov (16|M0) r32.0<1>:uw r32.0<16;8,2>:uw mov (16|M0) r34.0<1>:uw r34.0<16;8,2>:uw send (16|M0) r37:uw r13:ub 0x2 a0.0 mul (8|M0) acc0.0<1>:f r26.5<0;1,0>:f 8.0:f add (8|M0) r16.0<1>:f acc0.0<8;8,1>:f r16.0<8;8,1>:f add (8|M0) r17.0<1>:f acc0.0<8;8,1>:f r17.0<8;8,1>:f mul (8|M0) acc0.0<1>:f r26.4<0;1,0>:f 2.0:f add (8|M0) r14.0<1>:f acc0.0<8;8,1>:f r14.0<8;8,1>:f add (8|M0) r15.0<1>:f acc0.0<8;8,1>:f r15.0<8;8,1>:f mul (16|M0) acc0.0<1>:f r37.0<8;8,1>:f 65472.0:f mov (16|M0) (sat)r37.0<1>:ud acc0.0<8;8,1>:f mul (16|M0) acc0.0<1>:f r39.0<8;8,1>:f 65472.0:f mov (16|M0) (sat)r39.0<1>:ud acc0.0<8;8,1>:f mul (16|M0) acc0.0<1>:f r41.0<8;8,1>:f 65472.0:f mov (16|M0) (sat)r41.0<1>:ud acc0.0<8;8,1>:f mul (16|M0) acc0.0<1>:f r43.0<8;8,1>:f 65472.0:f mov (16|M0) (sat)r43.0<1>:ud acc0.0<8;8,1>:f mov (16|M0) r29.0<1>:uw r37.0<16;8,2>:uw mov (16|M0) r31.0<1>:uw r39.0<16;8,2>:uw mov (16|M0) r33.0<1>:uw r41.0<16;8,2>:uw mov (16|M0) r35.0<1>:uw r43.0<16;8,2>:uw send (16|M0) r37:uw r13:ub 0x2 a0.0 mul (8|M0) acc0.0<1>:f r26.4<0;1,0>:f -2.0:f add (8|M0) r14.0<1>:f acc0.0<8;8,1>:f r14.0<8;8,1>:f add (8|M0) r15.0<1>:f acc0.0<8;8,1>:f r15.0<8;8,1>:f mul (16|M0) acc0.0<1>:f r37.0<8;8,1>:f 65472.0:f mov (16|M0) (sat)r37.0<1>:ud acc0.0<8;8,1>:f mul (16|M0) acc0.0<1>:f r39.0<8;8,1>:f 65472.0:f mov (16|M0) (sat)r39.0<1>:ud acc0.0<8;8,1>:f mul (16|M0) acc0.0<1>:f r41.0<8;8,1>:f 65472.0:f mov (16|M0) (sat)r41.0<1>:ud acc0.0<8;8,1>:f mul (16|M0) acc0.0<1>:f r43.0<8;8,1>:f 65472.0:f mov (16|M0) (sat)r43.0<1>:ud acc0.0<8;8,1>:f mov (16|M0) r9.0<1>:uw r37.0<16;8,2>:uw mov (16|M0) r10.0<1>:uw r39.0<16;8,2>:uw mov (16|M0) r11.0<1>:uw r41.0<16;8,2>:uw mov (16|M0) r12.0<1>:uw r43.0<16;8,2>:uw send (16|M0) r37:uw r13:ub 0x2 a0.0 mul (16|M0) acc0.0<1>:f r37.0<8;8,1>:f 65472.0:f mov (16|M0) (sat)r37.0<1>:ud acc0.0<8;8,1>:f mul (16|M0) acc0.0<1>:f r39.0<8;8,1>:f 65472.0:f mov (16|M0) (sat)r39.0<1>:ud acc0.0<8;8,1>:f mul (16|M0) acc0.0<1>:f r41.0<8;8,1>:f 65472.0:f mov (16|M0) (sat)r41.0<1>:ud acc0.0<8;8,1>:f mul (16|M0) acc0.0<1>:f r43.0<8;8,1>:f 65472.0:f mov (16|M0) (sat)r43.0<1>:ud acc0.0<8;8,1>:f mov (16|M0) r38.0<1>:uw r37.0<16;8,2>:uw mov (16|M0) r40.0<1>:uw r39.0<16;8,2>:uw mov (16|M0) r42.0<1>:uw r41.0<16;8,2>:uw mov (16|M0) r44.0<1>:uw r43.0<16;8,2>:uw mov (16|M0) r37.0<1>:uw r9.0<16;16,1>:uw mov (16|M0) r39.0<1>:uw r10.0<16;16,1>:uw mov (16|M0) r41.0<1>:uw r11.0<16;16,1>:uw mov (16|M0) r43.0<1>:uw r12.0<16;16,1>:uw mov (16|M0) r13.0<1>:uw r28.0<16;16,1>:uw mov (16|M0) r12.0<1>:uw r29.0<16;16,1>:uw mov (16|M0) r28.0<1>:uw r32.0<16;16,1>:uw mov (16|M0) r29.0<1>:uw r33.0<16;16,1>:uw mov (16|M0) r32.0<1>:uw r13.0<16;16,1>:uw mov (16|M0) r33.0<1>:uw r12.0<16;16,1>:uw mov (16|M0) r13.0<1>:uw r37.0<16;16,1>:uw mov (16|M0) r12.0<1>:uw r38.0<16;16,1>:uw mov (16|M0) r37.0<1>:uw r41.0<16;16,1>:uw mov (16|M0) r38.0<1>:uw r42.0<16;16,1>:uw mov (16|M0) r41.0<1>:uw r13.0<16;16,1>:uw mov (16|M0) r42.0<1>:uw r12.0<16;16,1>:uw mov (1|M0) a0.8<1>:uw 0x380:uw mov (1|M0) a0.9<1>:uw 0x3C0:uw mov (1|M0) a0.10<1>:uw 0x400:uw mov (1|M0) a0.11<1>:uw 0x440:uw add (4|M0) a0.12<1>:uw a0.8<4;4,1>:uw 0x120:uw L1760: nop
; $Id: bit_close_ei.asm,v 1.1 2008/03/31 17:16:20 stefano Exp $ ; ; VZ 200 - 1 bit sound functions ; ; Close sound and restore interrupts ; ; Stefano Bodrato - 31/03/2008 ; XLIB bit_close_ei .bit_close_ei ei ret
#include "StatusSample.hpp" namespace moreorg { StatusSample::~StatusSample() {} StatusSample::StatusSample(const Agent& instance, const base::Position& fromLocation, const base::Position& toLocation, size_t fromTime, size_t toTime, Agent::OperationalStatus operationalStatus, activity::Type activity ) : Sample(fromLocation, toLocation, fromTime, toTime) , mAgent(instance) , mOperationalStatus(operationalStatus) , mActivityType(activity) { } } // end namespace moreorg
.thumb @inserted inline at 2AEEC .equ origin, 0x2AAEC .equ Check_Effectiveness, . + 0x16BEC - origin .equ Next, . + 0x2AB4A - origin @r6=attacker, r8=defender, r4=attacker+0x5A (attack) mov r5,#0 cmp r0,#0 beq Label1 mov r5,r0 Label1: ldrh r0,[r7] @attacker's item mov r1,r8 bl Check_Effectiveness cmp r0,#0 beq Label2 cmp r0,r5 ble Label2 mov r5,r0 Label2: mov r0,#0 ldsh r0,[r4,r0] @current attack cmp r5,#0 beq Label3 mul r0,r5 lsr r0,#1 Label3: mov r5,r0 b Next
; A007509: Numerator of Sum_{k=0..n} (-1)^k/(2*k+1). ; Submitted by Jamie Morken(w3) ; 1,2,13,76,263,2578,36979,33976,622637,11064338,11757173,255865444,1346255081,3852854518,116752370597,3473755390832,3610501179557,3481569435902,133330680156299,129049485078524,5457995496252709,227848175409504262,234389556075339277,10721947005578370344,77030060483083029083,75131136154500923258,4078795356946236329749,3985471857670646656204,4075520848199724411379,235322937583626308226386,14657533947750493292463071,14364312994351975865004896,1126808597274538496041637,74075182166308956317107754 mul $0,2 mov $1,1 lpb $0 mov $2,$0 sub $0,2 add $2,1 mul $3,$2 add $3,$1 mul $1,$2 mul $3,-1 lpe add $1,$3 gcd $3,$1 div $1,$3 mov $0,$1
#include "WindowManager.hpp" namespace snp { WindowManager::WindowManager() : window(sf::VideoMode(1280, 720), "Default Name", sf::Style::Default) { } WindowManager::~WindowManager() { } }
; A048656: a(n) is the number of unitary (and also of squarefree) divisors of n!. ; 1,2,4,4,8,8,16,16,16,16,32,32,64,64,64,64,128,128,256,256,256,256,512,512,512,512,512,512,1024,1024,2048,2048,2048,2048,2048,2048,4096,4096,4096,4096,8192,8192,16384,16384,16384,16384,32768,32768,32768,32768,32768,32768,65536,65536,65536,65536,65536,65536,131072,131072,262144,262144,262144,262144,262144,262144,524288,524288,524288,524288,1048576,1048576,2097152,2097152,2097152,2097152,2097152,2097152,4194304,4194304,4194304,4194304,8388608,8388608,8388608,8388608,8388608,8388608,16777216,16777216,16777216,16777216,16777216,16777216,16777216,16777216,33554432,33554432,33554432,33554432 seq $0,36234 ; Number of primes <= n, if 1 is counted as a prime. mov $1,2 pow $1,$0 mul $1,13 sub $1,23 div $1,26 add $1,1 mov $0,$1
; A055112: a(n) = n*(n+1)*(2*n+1). ; 0,6,30,84,180,330,546,840,1224,1710,2310,3036,3900,4914,6090,7440,8976,10710,12654,14820,17220,19866,22770,25944,29400,33150,37206,41580,46284,51330,56730,62496,68640,75174,82110,89460,97236,105450,114114,123240,132840,142926,153510,164604,176220,188370,201066,214320,228144,242550,257550,273156,289380,306234,323730,341880,360696,380190,400374,421260,442860,465186,488250,512064,536640,561990,588126,615060,642804,671370,700770,731016,762120,794094,826950,860700,895356,930930,967434,1004880,1043280,1082646,1122990,1164324,1206660,1250010,1294386,1339800,1386264,1433790,1482390,1532076,1582860,1634754,1687770,1741920,1797216,1853670,1911294,1970100,2030100,2091306,2153730,2217384,2282280,2348430,2415846,2484540,2554524,2625810,2698410,2772336,2847600,2924214,3002190,3081540,3162276,3244410,3327954,3412920,3499320,3587166,3676470,3767244,3859500,3953250,4048506,4145280,4243584,4343430,4444830,4547796,4652340,4758474,4866210,4975560,5086536,5199150,5313414,5429340,5546940,5666226,5787210,5909904,6034320,6160470,6288366,6418020,6549444,6682650,6817650,6954456,7093080,7233534,7375830,7519980,7665996,7813890,7963674,8115360,8268960,8424486,8581950,8741364,8902740,9066090,9231426,9398760,9568104,9739470,9912870,10088316,10265820,10445394,10627050,10810800,10996656,11184630,11374734,11566980,11761380,11957946,12156690,12357624,12560760,12766110,12973686,13183500,13395564,13609890,13826490,14045376,14266560,14490054,14715870,14944020,15174516,15407370,15642594,15880200,16120200,16362606,16607430,16854684,17104380,17356530,17611146,17868240,18127824,18389910,18654510,18921636,19191300,19463514,19738290,20015640,20295576,20578110,20863254,21151020,21441420,21734466,22030170,22328544,22629600,22933350,23239806,23548980,23860884,24175530,24492930,24813096,25136040,25461774,25790310,26121660,26455836,26792850,27132714,27475440,27821040,28169526,28520910,28875204,29232420,29592570,29955666,30321720,30690744,31062750 mov $1,$0 mul $0,2 add $0,2 bin $0,2 mul $1,$0
; A226702: Positive solutions y/5 of the Pell equation x^2 - 61*y^2 = -4. ; Submitted by Jon Maiga ; 1,1522,2318005,3530320093,5376675183634,8188672774354489,12471343258666703113,18993847594276614486610,28927617414740025196403917,44056742328801464097508678981,67098389639147215080480521684146 mul $0,2 mov $2,1 lpb $0 sub $0,1 mov $1,$3 mov $3,$2 mul $2,39 add $2,$1 lpe mov $0,$2
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2019 The Bitstock developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "clientmodel.h" #include "bantablemodel.h" #include "guiconstants.h" #include "guiutil.h" #include "peertablemodel.h" #include "alert.h" #include "chainparams.h" #include "checkpoints.h" #include "clientversion.h" #include "main.h" #include "masternode-sync.h" #include "masternodeman.h" #include "net.h" #include "netbase.h" #include "guiinterface.h" #include "util.h" #include <stdint.h> #include <QDateTime> #include <QDebug> #include <QTimer> static const int64_t nClientStartupTime = GetTime(); ClientModel::ClientModel(OptionsModel* optionsModel, QObject* parent) : QObject(parent), optionsModel(optionsModel), peerTableModel(0), banTableModel(0), cachedNumBlocks(0), cachedMasternodeCountString(""), cachedReindexing(0), cachedImporting(0), numBlocksAtStartup(-1), pollTimer(0) { peerTableModel = new PeerTableModel(this); banTableModel = new BanTableModel(this); pollTimer = new QTimer(this); connect(pollTimer, SIGNAL(timeout()), this, SLOT(updateTimer())); pollTimer->start(MODEL_UPDATE_DELAY); pollMnTimer = new QTimer(this); connect(pollMnTimer, SIGNAL(timeout()), this, SLOT(updateMnTimer())); // no need to update as frequent as data for balances/txes/blocks pollMnTimer->start(MODEL_UPDATE_DELAY * 4); subscribeToCoreSignals(); } ClientModel::~ClientModel() { unsubscribeFromCoreSignals(); } int ClientModel::getNumConnections(unsigned int flags) const { LOCK(cs_vNodes); if (flags == CONNECTIONS_ALL) // Shortcut if we want total return vNodes.size(); int nNum = 0; for (CNode* pnode : vNodes) if (flags & (pnode->fInbound ? CONNECTIONS_IN : CONNECTIONS_OUT)) nNum++; return nNum; } QString ClientModel::getMasternodeCountString() const { int ipv4 = 0, ipv6 = 0, onion = 0; mnodeman.CountNetworks(ActiveProtocol(), ipv4, ipv6, onion); int nUnknown = mnodeman.size() - ipv4 - ipv6 - onion; if(nUnknown < 0) nUnknown = 0; return tr("Total: %1 (IPv4: %2 / IPv6: %3 / Tor: %4 / Unknown: %5)").arg(QString::number((int)mnodeman.size())).arg(QString::number((int)ipv4)).arg(QString::number((int)ipv6)).arg(QString::number((int)onion)).arg(QString::number((int)nUnknown)); } int ClientModel::getNumBlocks() const { LOCK(cs_main); return chainActive.Height(); } int ClientModel::getNumBlocksAtStartup() { if (numBlocksAtStartup == -1) numBlocksAtStartup = getNumBlocks(); return numBlocksAtStartup; } quint64 ClientModel::getTotalBytesRecv() const { return CNode::GetTotalBytesRecv(); } quint64 ClientModel::getTotalBytesSent() const { return CNode::GetTotalBytesSent(); } QDateTime ClientModel::getLastBlockDate() const { LOCK(cs_main); if (chainActive.Tip()) return QDateTime::fromTime_t(chainActive.Tip()->GetBlockTime()); else return QDateTime::fromTime_t(Params().GenesisBlock().GetBlockTime()); // Genesis block's time of current network } QString ClientModel::getLastBlockHash() const { LOCK(cs_main); if (chainActive.Tip()) return QString::fromStdString(chainActive.Tip()->GetBlockHash().ToString()); else return QString::fromStdString(Params().GenesisBlock().GetHash().ToString()); // Genesis block's hash of current network } double ClientModel::getVerificationProgress() const { LOCK(cs_main); return Checkpoints::GuessVerificationProgress(chainActive.Tip()); } void ClientModel::updateTimer() { // Get required lock upfront. This avoids the GUI from getting stuck on // periodical polls if the core is holding the locks for a longer time - // for example, during a wallet rescan. TRY_LOCK(cs_main, lockMain); if (!lockMain) return; // Some quantities (such as number of blocks) change so fast that we don't want to be notified for each change. // Periodically check and update with a timer. int newNumBlocks = getNumBlocks(); static int prevAttempt = -1; static int prevAssets = -1; // check for changed number of blocks we have, number of blocks peers claim to have, reindexing state and importing state if (cachedNumBlocks != newNumBlocks || cachedReindexing != fReindex || cachedImporting != fImporting || masternodeSync.RequestedMasternodeAttempt != prevAttempt || masternodeSync.RequestedMasternodeAssets != prevAssets) { cachedNumBlocks = newNumBlocks; cachedReindexing = fReindex; cachedImporting = fImporting; prevAttempt = masternodeSync.RequestedMasternodeAttempt; prevAssets = masternodeSync.RequestedMasternodeAssets; emit numBlocksChanged(newNumBlocks); } emit bytesChanged(getTotalBytesRecv(), getTotalBytesSent()); } void ClientModel::updateMnTimer() { // Get required lock upfront. This avoids the GUI from getting stuck on // periodical polls if the core is holding the locks for a longer time - // for example, during a wallet rescan. TRY_LOCK(cs_main, lockMain); if (!lockMain) return; QString newMasternodeCountString = getMasternodeCountString(); if (cachedMasternodeCountString != newMasternodeCountString) { cachedMasternodeCountString = newMasternodeCountString; emit strMasternodesChanged(cachedMasternodeCountString); } } void ClientModel::updateNumConnections(int numConnections) { emit numConnectionsChanged(numConnections); } void ClientModel::updateAlert(const QString& hash, int status) { // Show error message notification for new alert if (status == CT_NEW) { uint256 hash_256; hash_256.SetHex(hash.toStdString()); CAlert alert = CAlert::getAlertByHash(hash_256); if (!alert.IsNull()) { emit message(tr("Network Alert"), QString::fromStdString(alert.strStatusBar), CClientUIInterface::ICON_ERROR); } } emit alertsChanged(getStatusBarWarnings()); } bool ClientModel::inInitialBlockDownload() const { return IsInitialBlockDownload(); } enum BlockSource ClientModel::getBlockSource() const { if (fReindex) return BLOCK_SOURCE_REINDEX; else if (fImporting) return BLOCK_SOURCE_DISK; else if (getNumConnections() > 0) return BLOCK_SOURCE_NETWORK; return BLOCK_SOURCE_NONE; } QString ClientModel::getStatusBarWarnings() const { return QString::fromStdString(GetWarnings("statusbar")); } OptionsModel* ClientModel::getOptionsModel() { return optionsModel; } PeerTableModel* ClientModel::getPeerTableModel() { return peerTableModel; } BanTableModel *ClientModel::getBanTableModel() { return banTableModel; } QString ClientModel::formatFullVersion() const { return QString::fromStdString(FormatFullVersion()); } QString ClientModel::formatBuildDate() const { return QString::fromStdString(CLIENT_DATE); } bool ClientModel::isReleaseVersion() const { return CLIENT_VERSION_IS_RELEASE; } QString ClientModel::clientName() const { return QString::fromStdString(CLIENT_NAME); } QString ClientModel::formatClientStartupTime() const { return QDateTime::fromTime_t(nClientStartupTime).toString(); } QString ClientModel::dataDir() const { return GUIUtil::boostPathToQString(GetDataDir()); } void ClientModel::updateBanlist() { banTableModel->refresh(); } // Handlers for core signals static void ShowProgress(ClientModel* clientmodel, const std::string& title, int nProgress) { // emits signal "showProgress" QMetaObject::invokeMethod(clientmodel, "showProgress", Qt::QueuedConnection, Q_ARG(QString, QString::fromStdString(title)), Q_ARG(int, nProgress)); } static void NotifyNumConnectionsChanged(ClientModel* clientmodel, int newNumConnections) { // Too noisy: qDebug() << "NotifyNumConnectionsChanged : " + QString::number(newNumConnections); QMetaObject::invokeMethod(clientmodel, "updateNumConnections", Qt::QueuedConnection, Q_ARG(int, newNumConnections)); } static void NotifyAlertChanged(ClientModel* clientmodel, const uint256& hash, ChangeType status) { qDebug() << "NotifyAlertChanged : " + QString::fromStdString(hash.GetHex()) + " status=" + QString::number(status); QMetaObject::invokeMethod(clientmodel, "updateAlert", Qt::QueuedConnection, Q_ARG(QString, QString::fromStdString(hash.GetHex())), Q_ARG(int, status)); } static void BannedListChanged(ClientModel *clientmodel) { qDebug() << QString("%1: Requesting update for peer banlist").arg(__func__); QMetaObject::invokeMethod(clientmodel, "updateBanlist", Qt::QueuedConnection); } void ClientModel::subscribeToCoreSignals() { // Connect signals to client uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2)); uiInterface.NotifyNumConnectionsChanged.connect(boost::bind(NotifyNumConnectionsChanged, this, _1)); uiInterface.NotifyAlertChanged.connect(boost::bind(NotifyAlertChanged, this, _1, _2)); uiInterface.BannedListChanged.connect(boost::bind(BannedListChanged, this)); } void ClientModel::unsubscribeFromCoreSignals() { // Disconnect signals from client uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2)); uiInterface.NotifyNumConnectionsChanged.disconnect(boost::bind(NotifyNumConnectionsChanged, this, _1)); uiInterface.NotifyAlertChanged.disconnect(boost::bind(NotifyAlertChanged, this, _1, _2)); uiInterface.BannedListChanged.disconnect(boost::bind(BannedListChanged, this)); } bool ClientModel::getTorInfo(std::string& ip_port) const { proxyType onion; if (GetProxy((Network) 3, onion) && IsReachable((Network) 3)) { { LOCK(cs_mapLocalHost); for (const std::pair<const CNetAddr, LocalServiceInfo>& item : mapLocalHost) { if (item.first.IsTor()) { CService addrOnion = CService(item.first.ToString(), item.second.nPort); ip_port = addrOnion.ToStringIPPort(); return true; } } } } return false; }
#fn add1(value) => value + 1 #fn add1(value) => value + 1 ; error: duplicate / note:_:1: first declared
db "LICKING@" ; species name db "It has a tongue" next "that is over 6'6''" next "long. It uses this" page "long tongue to" next "lick its body" next "clean.@"
; A123522: Not of the form n + [log_10 n]. ; 0,10,101,1002,10003,100004,1000005,10000006,100000007,1000000008,10000000009,100000000010,1000000000011,10000000000012,100000000000013,1000000000000014,10000000000000015,100000000000000016,1000000000000000017,10000000000000000018,100000000000000000019,1000000000000000000020,10000000000000000000021,100000000000000000000022,1000000000000000000000023,10000000000000000000000024,100000000000000000000000025,1000000000000000000000000026,10000000000000000000000000027,100000000000000000000000000028 mov $2,10 pow $2,$0 add $0,$2 sub $0,1
#include <docopt.h> #include <spdlog/sinks/ansicolor_sink.h> #include <spdlog/spdlog.h> #include <sysrepo-cpp/Session.hpp> #include "VELIA_VERSION.h" #include "main.h" #include "system_vars.h" #include "system/Authentication.h" #include "system/Firmware.h" #include "system/IETFInterfaces.h" #include "system/IETFInterfacesConfig.h" #include "system/IETFSystem.h" #include "system/LED.h" #include "system/LLDP.h" #include "system/LLDPCallback.h" #include "utils/exceptions.h" #include "utils/exec.h" #include "utils/journal.h" #include "utils/log-init.h" #include "utils/sysrepo.h" static const char usage[] = R"(Sysrepo-powered system management. Usage: veliad-system [--sysrepo-log-level=<Level>] [--system-log-level=<Level>] veliad-system (-h | --help) veliad-system --version Options: -h --help Show this screen. --version Show version. --sysrepo-log-level=<N> Log level for the sysrepo library [default: 2] --system-log-level=<N> Log level for the system stuff [default: 3] (0 -> critical, 1 -> error, 2 -> warning, 3 -> info, 4 -> debug, 5 -> trace) )"; DBUS_EVENTLOOP_INIT int main(int argc, char* argv[]) { std::shared_ptr<spdlog::sinks::sink> loggingSink; if (velia::utils::isJournaldActive()) { loggingSink = velia::utils::create_journald_sink(); } else { loggingSink = std::make_shared<spdlog::sinks::ansicolor_stderr_sink_mt>(); } auto args = docopt::docopt(usage, {argv + 1, argv + argc}, true, "veliad-system " VELIA_VERSION, true); velia::utils::initLogs(loggingSink); velia::utils::initLogsSysrepo(); spdlog::set_level(spdlog::level::info); try { spdlog::get("sysrepo")->set_level(parseLogLevel("Sysrepo library", args["--sysrepo-log-level"])); spdlog::get("system")->set_level(parseLogLevel("System logging", args["--system-log-level"])); auto srConn = std::make_shared<sysrepo::Connection>(); auto srSess = std::make_shared<sysrepo::Session>(srConn); DBUS_EVENTLOOP_START // initialize ietf-system auto sysrepoIETFSystem = velia::system::IETFSystem(srSess, "/etc/os-release", *g_dbusConnection, "org.freedesktop.resolve1"); auto dbusConnection = sdbus::createConnection(); // second connection for RAUC (for calling methods). dbusConnection->enterEventLoopAsync(); // implements ietf-interfaces and ietf-routing const std::filesystem::path runtimeNetworkDirectory("/run/systemd/network"), persistentNetworkDirectory("/cfg/network/"); std::filesystem::create_directories(runtimeNetworkDirectory); std::filesystem::create_directories(persistentNetworkDirectory); auto srSessStartup = std::make_shared<sysrepo::Session>(srConn, SR_DS_STARTUP); std::vector<std::string> managedLinks = {"br0", "eth0", "eth1", "osc", "oscE", "oscW"}; auto sysrepoIETFInterfacesOperational = std::make_shared<velia::system::IETFInterfaces>(srSess); auto sysrepoIETFInterfacesStartup = velia::system::IETFInterfacesConfig(srSessStartup, persistentNetworkDirectory, managedLinks, [](const auto&) {}); auto sysrepoIETFInterfacesRunning = velia::system::IETFInterfacesConfig(srSess, runtimeNetworkDirectory, managedLinks, [](const auto& reconfiguredInterfaces) { auto log = spdlog::get("system"); /* Bring all the updated interfaces down (they will later be brought up by executing `networkctl reload`). * * This is required when transitioning from bridge to DHCP configuration. systemd-networkd apparently does not reset many * interface properties when reconfiguring the interface into new "bridge-less" configuration (the interface stays in the * bridge and it also does not obtain link local address). * * This doesn't seem to be required when transitioning from DHCP to bridge configuration. It's just a "precaution" because * there might be hidden some caveats that I am unable to see now (some leftover setting). Bringing the interface * down seems to reset the interface (and it is something we can afford in the interface reconfiguration process). */ for (const auto& interfaceName : reconfiguredInterfaces) { velia::utils::execAndWait(log, NETWORKCTL_EXECUTABLE, {"down", interfaceName}, ""); } velia::utils::execAndWait(log, NETWORKCTL_EXECUTABLE, {"reload"}, ""); }); auto sysrepoFirmware = velia::system::Firmware(srConn, *g_dbusConnection, *dbusConnection); auto srSess2 = std::make_shared<sysrepo::Session>(srConn); auto authentication = velia::system::Authentication(srSess2, REAL_ETC_PASSWD_FILE, REAL_ETC_SHADOW_FILE, AUTHORIZED_KEYS_FORMAT, velia::system::impl::changePassword); auto leds = velia::system::LED(srConn, "/sys/class/leds"); auto lldp = std::make_shared<velia::system::LLDPDataProvider>([]() { return velia::utils::execAndWait(spdlog::get("system"), NETWORKCTL_EXECUTABLE, {"lldp", "--json=short"}, ""); }); auto srSubs = std::make_shared<sysrepo::Subscribe>(srSess); srSubs->oper_get_items_subscribe("czechlight-lldp", velia::system::LLDPCallback(lldp), "/czechlight-lldp:nbr-list"); DBUS_EVENTLOOP_END return 0; } catch (std::exception& e) { velia::utils::fatalException(spdlog::get("main"), e, "main"); } }
/*========================================================================= Program: VMTK Module: $RCSfile: vtkvmtkPolyDataCenterlineProjection.cxx,v $ Language: C++ Date: $Date: 2005/03/31 15:07:48 $ Version: $Revision: 1.3 $ Copyright (c) Luca Antiga, David Steinman. All rights reserved. See LICENCE file for details. Portions of this code are covered under the VTK copyright. See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include "vtkvmtkPolyDataCenterlineProjection.h" #include "vtkPointData.h" #include "vtkvmtkPolyBallLine.h" #include "vtkCell.h" #include "vtkInformation.h" #include "vtkInformationVector.h" #include "vtkObjectFactory.h" vtkStandardNewMacro(vtkvmtkPolyDataCenterlineProjection); vtkvmtkPolyDataCenterlineProjection::vtkvmtkPolyDataCenterlineProjection() { this->Centerlines = NULL; this->CenterlineRadiusArrayName = NULL; this->UseRadiusInformation = 1; } vtkvmtkPolyDataCenterlineProjection::~vtkvmtkPolyDataCenterlineProjection() { if (this->Centerlines) { this->Centerlines->Delete(); this->Centerlines = NULL; } if (this->CenterlineRadiusArrayName) { delete[] this->CenterlineRadiusArrayName; this->CenterlineRadiusArrayName = NULL; } } int vtkvmtkPolyDataCenterlineProjection::RequestData( vtkInformation *vtkNotUsed(request), vtkInformationVector **inputVector, vtkInformationVector *outputVector) { vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); vtkInformation *outInfo = outputVector->GetInformationObject(0); vtkPolyData *input = vtkPolyData::SafeDownCast( inInfo->Get(vtkDataObject::DATA_OBJECT())); vtkPolyData *output = vtkPolyData::SafeDownCast( outInfo->Get(vtkDataObject::DATA_OBJECT())); if (!this->Centerlines) { vtkErrorMacro(<<"Centerlines not set"); return 1; } if (this->UseRadiusInformation) { if (!this->CenterlineRadiusArrayName) { vtkErrorMacro(<<"CenterlineRadiusArrayName not set."); return 1; } vtkDataArray* centerlineRadiusArray = this->Centerlines->GetPointData()->GetArray(this->CenterlineRadiusArrayName); if (!centerlineRadiusArray) { vtkErrorMacro(<<"CenterlineRadiusArrayName with name specified does not exist."); return 1; } } int numberOfInputPoints = input->GetNumberOfPoints(); output->DeepCopy(input); vtkPointData* outputPointData = output->GetPointData(); vtkPointData* referencePointData = this->Centerlines->GetPointData(); outputPointData->InterpolateAllocate(referencePointData,numberOfInputPoints); vtkvmtkPolyBallLine* tube = vtkvmtkPolyBallLine::New(); tube->SetInput(this->Centerlines); tube->SetUseRadiusInformation(this->UseRadiusInformation); if (this->UseRadiusInformation) { tube->SetPolyBallRadiusArrayName(this->CenterlineRadiusArrayName); } double point[3]; for (int i=0; i<numberOfInputPoints; i++) { input->GetPoint(i,point); tube->EvaluateFunction(point); vtkIdType cellId = tube->GetLastPolyBallCellId(); vtkIdType subId = tube->GetLastPolyBallCellSubId(); double pcoord = tube->GetLastPolyBallCellPCoord(); vtkCell* cell = this->Centerlines->GetCell(cellId); // FIXME: for some reason EvaluateLocation fails on the PolyLine - weights are funny. Copy from the closest subId for the moment. // double pcoords[3]; // pcoords[0] = pcoord; // pcoords[1] = pcoords[2] = 0.0; // double* weights = new double[cell->GetNumberOfPoints()]; // double locationPoint[3]; // cell->EvaluateLocation(subId,pcoords,locationPoint,weights); // outputPointData->InterpolatePoint(referencePointData,i,cell->GetPointIds(),weights); // delete[] weights; if (pcoord < 0.5) { outputPointData->CopyData(referencePointData,cell->GetPointId(subId),i); } else { outputPointData->CopyData(referencePointData,cell->GetPointId(subId+1),i); } } tube->Delete(); return 1; }
sra $4,$4,10 ori $1,$5,43569 nor $6,$5,$3 srl $4,$3,27 lw $1,16($0) sh $4,2($0) srlv $5,$5,$3 lh $3,10($0) lbu $4,15($0) or $1,$3,$3 andi $5,$0,50541 xori $0,$3,24154 sltiu $6,$6,14609 andi $6,$5,33818 subu $4,$4,$3 lb $0,7($0) sltiu $4,$1,-8645 ori $4,$0,44772 sll $1,$1,13 sb $4,6($0) subu $3,$3,$3 slt $0,$1,$3 slti $4,$4,1767 addiu $3,$4,22750 ori $3,$5,11209 slti $3,$4,21011 sb $1,10($0) addu $1,$3,$3 addiu $4,$3,-16339 addiu $4,$4,23312 sb $3,5($0) slti $6,$6,1654 lbu $1,3($0) srav $5,$5,$3 or $4,$4,$3 or $3,$3,$3 or $3,$4,$3 sll $4,$3,19 sltiu $6,$6,16839 or $4,$3,$3 sltiu $3,$3,-4110 srav $4,$4,$3 xor $4,$4,$3 slti $1,$6,28764 lb $5,6($0) xor $4,$4,$3 srav $4,$4,$3 lbu $3,1($0) lh $5,10($0) srav $1,$1,$3 sllv $3,$3,$3 sb $5,12($0) sllv $4,$4,$3 srl $5,$4,21 lhu $4,16($0) sra $3,$4,18 and $6,$6,$3 sra $5,$5,11 addu $1,$3,$3 xor $3,$0,$3 addu $3,$3,$3 andi $5,$6,35380 subu $1,$1,$3 xori $4,$4,46184 sh $1,0($0) lb $3,8($0) nor $3,$3,$3 slt $3,$2,$3 lh $6,10($0) sh $1,16($0) lb $4,5($0) or $4,$5,$3 andi $5,$5,62928 addu $4,$3,$3 slti $3,$3,28502 srl $5,$5,6 sll $4,$6,11 ori $1,$3,11131 addiu $1,$1,20186 ori $6,$6,18146 slti $3,$4,-5054 addiu $3,$2,31064 sltiu $1,$4,24012 lbu $6,15($0) xor $5,$5,$3 xori $3,$5,49999 addiu $4,$5,20480 subu $3,$4,$3 subu $5,$0,$3 sh $4,10($0) addu $1,$1,$3 and $3,$4,$3 srl $0,$3,4 subu $5,$5,$3 addiu $5,$5,-3952 xori $3,$1,54045 addu $4,$3,$3 slti $3,$3,10414 srl $1,$3,21 srav $3,$3,$3 slti $5,$1,-24237 andi $3,$4,9313 xori $4,$4,15543 addu $3,$4,$3 subu $5,$3,$3 slti $5,$0,26642 andi $4,$4,61838 xori $3,$4,61716 ori $5,$3,40752 sllv $4,$6,$3 addiu $5,$5,-571 subu $5,$1,$3 srav $0,$4,$3 xor $3,$2,$3 slti $5,$5,-16135 lbu $6,12($0) lw $3,12($0) andi $3,$6,34920 xor $2,$2,$3 or $4,$5,$3 srl $2,$2,5 sll $5,$1,3 subu $5,$4,$3 srav $3,$5,$3 addiu $6,$4,-31181 or $3,$3,$3 and $4,$5,$3 sllv $4,$4,$3 slti $3,$4,-23054 slt $1,$4,$3 slti $6,$6,-22464 ori $4,$4,62437 subu $4,$3,$3 addiu $3,$3,10242 subu $3,$3,$3 sw $6,4($0) sllv $1,$5,$3 lh $1,12($0) addu $4,$4,$3 lhu $3,6($0) ori $1,$3,8336 lw $6,0($0) addu $1,$0,$3 sw $5,4($0) lbu $1,4($0) addu $3,$3,$3 srav $3,$3,$3 ori $1,$3,3444 addu $5,$4,$3 addiu $3,$4,-20513 addu $4,$3,$3 sw $4,0($0) or $3,$4,$3 sh $4,8($0) xor $4,$4,$3 addiu $0,$4,-19149 sllv $4,$3,$3 andi $1,$3,50832 sh $3,14($0) lhu $5,14($0) lb $3,9($0) lw $0,4($0) sllv $3,$3,$3 lh $6,2($0) andi $1,$4,23266 sltiu $1,$3,15040 subu $4,$5,$3 sb $5,6($0) addiu $3,$6,-249 lb $4,12($0) addu $0,$1,$3 lh $0,8($0) lb $5,16($0) lbu $1,6($0) addu $3,$3,$3 sltiu $0,$3,17749 slti $0,$0,-20977 or $0,$0,$3 lw $1,8($0) subu $4,$4,$3 srl $3,$3,4 addiu $1,$1,1400 sh $1,12($0) sh $4,10($0) or $5,$5,$3 xori $4,$5,32897 sll $4,$1,7 sw $4,16($0) sb $1,6($0) and $1,$4,$3 sw $3,4($0) addu $3,$3,$3 lw $6,4($0) srlv $3,$5,$3 slti $5,$5,-21422 slt $3,$4,$3 addiu $4,$4,7564 srav $0,$5,$3 sh $4,16($0) and $6,$3,$3 subu $6,$5,$3 sltiu $4,$1,-16425 sw $0,12($0) lw $0,8($0) slti $4,$1,-9862 srav $5,$5,$3 and $4,$6,$3 sh $4,12($0) ori $3,$3,17732 srl $3,$6,31 lhu $5,6($0) srav $1,$5,$3 lh $5,0($0) sh $1,16($0) xor $2,$2,$3 addiu $0,$6,-22639 sw $1,12($0) lw $3,0($0) lhu $0,10($0) addiu $4,$4,27063 nor $3,$0,$3 sw $4,12($0) sllv $3,$3,$3 nor $3,$3,$3 xori $6,$6,33933 slt $4,$1,$3 slti $4,$4,-14973 andi $3,$0,42231 sh $1,0($0) lhu $1,8($0) sw $5,16($0) sll $3,$1,28 xor $3,$5,$3 lhu $1,16($0) and $6,$4,$3 lw $4,12($0) addu $4,$4,$3 lbu $4,15($0) lhu $1,16($0) slt $4,$4,$3 sll $4,$1,28 slt $3,$3,$3 lb $5,3($0) subu $5,$5,$3 sll $5,$5,1 lhu $5,8($0) lh $5,16($0) addiu $4,$4,-6695 addiu $5,$1,31262 xori $1,$2,9893 andi $5,$5,65513 sllv $5,$4,$3 sb $4,15($0) slt $3,$1,$3 lbu $0,10($0) lw $5,0($0) subu $5,$4,$3 sllv $3,$4,$3 or $5,$0,$3 lbu $0,15($0) sll $3,$1,27 addiu $0,$0,-26873 addu $3,$3,$3 sllv $3,$3,$3 lh $1,10($0) sltiu $3,$3,21976 ori $3,$3,2711 sllv $3,$1,$3 slt $1,$3,$3 sb $1,7($0) sll $4,$5,31 and $3,$1,$3 xori $1,$6,64015 or $4,$6,$3 srav $0,$3,$3 lh $3,10($0) slti $3,$6,11177 sltu $1,$1,$3 andi $6,$4,53369 or $6,$1,$3 lb $1,3($0) srlv $0,$0,$3 or $3,$4,$3 slti $0,$4,24046 lbu $1,5($0) lhu $4,4($0) sll $0,$2,29 lhu $3,0($0) srav $3,$4,$3 subu $1,$6,$3 sll $4,$1,3 and $3,$4,$3 lhu $6,8($0) sltiu $3,$6,25088 or $4,$5,$3 sllv $3,$3,$3 slti $5,$3,20148 sh $1,16($0) slt $5,$3,$3 xor $4,$4,$3 srlv $4,$3,$3 sh $1,10($0) and $1,$1,$3 xori $3,$3,53664 xori $0,$3,63508 lb $1,4($0) srav $4,$3,$3 ori $6,$1,6392 srlv $4,$4,$3 lb $1,9($0) lbu $1,8($0) xor $4,$0,$3 slt $1,$5,$3 sh $3,8($0) andi $3,$3,43109 slt $1,$1,$3 addiu $5,$0,-19478 addiu $3,$4,-16603 srav $4,$4,$3 xori $0,$0,8409 sltiu $3,$3,-15527 xori $4,$4,21546 xori $3,$4,30540 sltiu $0,$6,-30249 sh $4,2($0) sw $1,8($0) sltiu $3,$6,18540 or $4,$3,$3 sh $3,16($0) or $3,$3,$3 lb $3,9($0) sltiu $3,$3,-6607 addu $5,$3,$3 lhu $1,16($0) sw $1,8($0) lw $4,12($0) srav $6,$6,$3 ori $1,$1,2172 lhu $3,6($0) slt $3,$4,$3 sll $1,$5,22 slt $0,$0,$3 sra $6,$2,2 sb $6,2($0) lb $5,7($0) lb $5,12($0) sllv $3,$3,$3 sh $1,4($0) sw $4,8($0) xori $3,$1,18178 or $5,$6,$3 sra $3,$3,15 sltu $1,$3,$3 srlv $4,$4,$3 xori $5,$4,9650 sltu $1,$5,$3 and $0,$3,$3 srav $0,$4,$3 addiu $3,$4,29550 slti $3,$4,-18360 sltiu $3,$2,1022 srav $4,$0,$3 sh $3,12($0) xori $4,$4,62137 sll $3,$3,11 or $2,$2,$3 and $3,$1,$3 slt $3,$3,$3 sw $4,0($0) sra $3,$3,5 srav $6,$5,$3 slti $1,$1,19724 lh $0,2($0) srlv $6,$0,$3 srl $5,$3,4 sb $3,0($0) sb $5,16($0) ori $5,$5,38165 srav $3,$0,$3 sltu $3,$6,$3 addiu $5,$3,13297 and $3,$6,$3 andi $1,$5,64659 nor $3,$6,$3 subu $5,$1,$3 sb $4,5($0) sltiu $4,$0,-10099 subu $4,$4,$3 srav $5,$3,$3 subu $4,$3,$3 lb $4,4($0) sw $2,8($0) sltu $3,$3,$3 addiu $5,$0,3442 addu $5,$5,$3 subu $5,$2,$3 srav $3,$3,$3 nor $6,$6,$3 subu $0,$0,$3 slti $5,$0,18229 srlv $1,$5,$3 sll $3,$3,20 slt $3,$3,$3 andi $4,$6,21117 sw $3,16($0) slt $5,$5,$3 sra $3,$3,12 srl $3,$4,7 lbu $4,8($0) sh $1,4($0) sb $5,7($0) addiu $0,$3,-5560 ori $1,$4,19760 sra $1,$1,16 lb $5,7($0) xor $0,$3,$3 sllv $1,$1,$3 andi $4,$5,51475 lw $4,0($0) sllv $1,$3,$3 sb $1,10($0) sltiu $5,$4,-31417 lb $4,2($0) ori $4,$3,60465 slt $3,$4,$3 srl $4,$4,15 slti $6,$4,-2197 srlv $6,$6,$3 ori $3,$3,50779 lw $3,12($0) sltu $1,$3,$3 lb $5,4($0) addu $3,$1,$3 addu $4,$3,$3 sb $4,16($0) andi $4,$4,23815 lh $3,8($0) sb $1,15($0) srlv $5,$4,$3 lbu $0,15($0) srlv $1,$3,$3 or $1,$1,$3 sh $1,10($0) addu $1,$4,$3 ori $3,$0,29942 and $3,$3,$3 srlv $3,$1,$3 ori $0,$4,3008 xor $4,$4,$3 srl $3,$1,2 srlv $3,$5,$3 subu $4,$3,$3 lhu $1,4($0) sll $3,$1,10 addiu $4,$5,23578 addu $6,$4,$3 lw $3,0($0) addu $5,$6,$3 lhu $4,2($0) subu $3,$3,$3 lw $3,0($0) sh $1,4($0) lbu $5,15($0) sllv $3,$3,$3 srl $3,$3,13 lh $4,2($0) xori $6,$6,42328 andi $1,$3,16122 srl $5,$0,18 lhu $1,6($0) subu $1,$1,$3 sw $4,12($0) lw $0,4($0) sllv $4,$4,$3 slt $1,$1,$3 lhu $6,8($0) xori $2,$2,55896 sb $5,15($0) addiu $3,$5,-12897 sra $3,$4,26 xor $5,$6,$3 lbu $4,13($0) lb $6,14($0) sh $4,12($0) srl $4,$1,24 xor $6,$6,$3 addu $4,$4,$3 lh $3,2($0) xor $1,$5,$3 subu $4,$6,$3 addiu $3,$5,-6477 and $3,$3,$3 addu $5,$1,$3 sb $4,11($0) slt $3,$4,$3 sb $5,16($0) srl $4,$4,6 sltiu $5,$1,-13491 andi $3,$5,53025 sw $3,0($0) addiu $5,$5,-22054 addiu $5,$6,7320 sll $1,$4,18 srlv $1,$1,$3 lw $6,4($0) addu $5,$4,$3 andi $4,$1,29437 lw $1,12($0) sh $5,2($0) slt $0,$3,$3 sltiu $3,$3,-4952 ori $4,$1,5126 sb $3,13($0) sw $4,8($0) slt $1,$6,$3 addiu $1,$3,-23553 slti $0,$3,30618 addu $1,$4,$3 xori $4,$5,57460 sb $5,4($0) sra $1,$5,9 slti $1,$5,-21082 lhu $4,8($0) addu $5,$3,$3 addu $3,$2,$3 subu $3,$0,$3 sb $5,5($0) sh $0,2($0) addu $3,$3,$3 andi $3,$1,43306 srlv $5,$5,$3 sltu $5,$4,$3 andi $0,$5,29970 addu $5,$3,$3 srl $3,$3,27 sh $3,8($0) sllv $5,$5,$3 addu $6,$5,$3 xori $0,$4,4219 nor $3,$1,$3 slti $1,$3,-3320 xori $3,$1,40818 addu $1,$4,$3 ori $1,$3,51582 srav $3,$4,$3 lhu $1,10($0) sltu $1,$0,$3 sltiu $1,$4,-20794 addu $4,$4,$3 slt $6,$3,$3 sra $3,$3,20 nor $3,$2,$3 srav $3,$4,$3 sllv $3,$1,$3 lb $4,13($0) sw $3,16($0) subu $3,$4,$3 addu $3,$3,$3 nor $5,$3,$3 xor $3,$1,$3 or $3,$0,$3 slt $3,$1,$3 addu $1,$1,$3 sllv $3,$3,$3 sltu $4,$0,$3 and $5,$2,$3 slti $3,$5,-12030 sra $4,$4,16 srav $4,$4,$3 sllv $1,$6,$3 srlv $5,$5,$3 sh $4,6($0) addu $5,$4,$3 and $4,$6,$3 sh $3,2($0) subu $3,$3,$3 lw $3,16($0) srl $1,$3,13 addu $4,$5,$3 nor $4,$4,$3 xori $5,$5,57490 subu $5,$5,$3 addiu $0,$3,21450 sb $4,4($0) addiu $3,$3,4886 xori $5,$0,32105 slt $3,$3,$3 andi $3,$5,59278 srav $3,$3,$3 sltiu $4,$3,3332 sllv $0,$1,$3 subu $5,$1,$3 sltiu $0,$4,24930 sltu $4,$4,$3 or $1,$4,$3 srl $6,$4,19 lh $3,0($0) sw $3,8($0) or $3,$1,$3 addu $4,$4,$3 sb $3,9($0) sh $3,12($0) sllv $5,$5,$3 xor $1,$2,$3 ori $4,$5,15902 sw $0,0($0) addu $5,$3,$3 srl $0,$0,11 slti $5,$4,14729 nor $6,$3,$3 subu $5,$0,$3 slt $0,$1,$3 slti $5,$3,-30324 and $1,$4,$3 addiu $1,$2,23615 srav $5,$4,$3 sll $3,$1,23 sb $0,8($0) sb $4,8($0) srlv $4,$3,$3 addu $5,$3,$3 ori $3,$5,13002 subu $3,$5,$3 srl $3,$4,23 srav $3,$3,$3 sra $3,$3,26 slt $3,$2,$3 slt $4,$5,$3 sltu $0,$3,$3 addiu $5,$5,-18753 addu $4,$4,$3 nor $1,$4,$3 xor $3,$6,$3 srlv $6,$0,$3 sra $5,$5,27 sh $1,14($0) ori $4,$4,15511 addu $4,$6,$3 sw $3,8($0) xor $6,$3,$3 sll $4,$4,26 ori $4,$0,2063 lh $4,12($0) sb $0,12($0) ori $1,$3,20644 addu $3,$3,$3 sllv $3,$3,$3 sb $3,6($0) xori $5,$0,61683 sllv $5,$4,$3 xori $5,$3,18319 srl $1,$3,14 slt $1,$1,$3 ori $0,$5,11706 sh $4,4($0) lb $4,15($0) sltu $3,$4,$3 sltiu $1,$6,-17475 srav $3,$3,$3 slt $1,$4,$3 sltu $1,$3,$3 andi $5,$4,64408 subu $1,$4,$3 sll $3,$1,8 sra $3,$3,22 xor $5,$1,$3 sllv $3,$5,$3 lw $1,0($0) addiu $6,$3,-20658 lhu $4,14($0) ori $3,$1,13555 andi $4,$0,7952 sltu $0,$0,$3 and $0,$1,$3 srlv $4,$6,$3 srlv $1,$6,$3 slt $6,$6,$3 sra $3,$1,19 lbu $5,9($0) slt $3,$3,$3 subu $6,$3,$3 lhu $5,12($0) and $0,$5,$3 subu $3,$3,$3 sllv $3,$3,$3 and $1,$1,$3 addiu $3,$5,26631 lbu $5,6($0) sb $3,6($0) sll $3,$0,17 slti $3,$3,-17830 srlv $6,$3,$3 sltiu $1,$5,9407 xori $4,$4,17197 srlv $1,$3,$3 addu $1,$3,$3 sb $4,13($0) srl $6,$2,22 subu $4,$6,$3 srav $3,$1,$3 srlv $5,$3,$3 slt $3,$4,$3 sltu $1,$3,$3 or $1,$1,$3 lh $6,14($0) sh $1,6($0) addiu $3,$4,-18680 addu $3,$1,$3 sltu $3,$1,$3 and $1,$1,$3 nor $1,$4,$3 addiu $1,$4,-9265 srlv $1,$4,$3 addiu $0,$1,-16435 lh $4,12($0) srl $4,$1,12 sll $3,$0,24 lw $3,16($0) srav $3,$4,$3 subu $1,$6,$3 addiu $0,$1,-22020 lh $3,10($0) sra $3,$3,8 subu $4,$1,$3 addu $3,$3,$3 addiu $6,$2,32408 sll $1,$3,30 andi $3,$1,58492 or $0,$2,$3 srl $3,$1,27 sb $4,10($0) lhu $6,2($0) slti $6,$1,-8894 addiu $5,$3,-7446 addu $1,$1,$3 xor $3,$5,$3 or $3,$2,$3 sllv $3,$3,$3 sra $3,$5,10 sll $6,$2,19 addiu $3,$3,23953 srav $4,$3,$3 srav $1,$2,$3 subu $1,$3,$3 srlv $1,$1,$3 nor $1,$5,$3 and $4,$1,$3 slti $1,$1,8704 addiu $4,$4,659 addiu $4,$4,9386 srlv $4,$3,$3 subu $3,$2,$3 srav $1,$1,$3 addiu $6,$3,-420 srl $4,$3,26 sllv $1,$1,$3 sh $3,6($0) slt $4,$3,$3 sltiu $4,$2,-19148 srl $4,$4,18 xori $0,$0,9538 sltiu $4,$3,29183 lw $3,16($0) addiu $3,$1,20147 lw $3,4($0) xori $0,$3,29067 sw $4,4($0) sh $5,10($0) addiu $1,$1,4902 srlv $1,$1,$3 lbu $4,10($0) lw $3,4($0) sb $3,12($0) slt $4,$5,$3 addu $1,$5,$3 addu $1,$4,$3 or $5,$1,$3 sh $4,0($0) addiu $1,$4,-9904 slt $1,$1,$3 and $6,$1,$3 addu $1,$3,$3 sb $3,12($0) ori $3,$5,16095 sllv $3,$1,$3 xor $1,$4,$3 and $1,$2,$3 sll $4,$4,20 sltiu $6,$3,17451 sltiu $3,$1,-13002 sw $0,16($0) addu $0,$5,$3 sw $2,0($0) lb $3,12($0) lh $4,4($0) addu $5,$3,$3 ori $4,$4,13630 addu $4,$2,$3 or $3,$3,$3 lb $5,15($0) slti $1,$3,-22034 addiu $5,$2,-12501 addu $5,$5,$3 lb $3,6($0) slt $3,$6,$3 or $3,$3,$3 sltu $5,$4,$3 sw $3,16($0) srl $3,$4,22 sh $6,4($0) andi $4,$3,52464 or $3,$1,$3 subu $1,$3,$3 addu $3,$4,$3 xor $4,$4,$3 slt $4,$0,$3 xori $4,$4,28554 addu $3,$1,$3 sllv $1,$1,$3 addiu $0,$2,-29161 or $3,$5,$3 lbu $1,9($0) slti $3,$5,18399 lh $4,6($0) andi $3,$0,18729 addiu $4,$3,-27889 sw $6,16($0) sra $1,$1,25 slt $1,$5,$3 slt $5,$1,$3 sltu $1,$4,$3 xori $1,$3,44252 xor $1,$1,$3 lbu $3,2($0) addu $1,$3,$3 xori $6,$4,32091 nor $3,$4,$3 subu $1,$5,$3 srlv $3,$0,$3 andi $3,$3,5763 slt $0,$0,$3 addiu $3,$4,15457 addu $5,$5,$3 sltiu $1,$5,-20506 xor $1,$1,$3 nor $5,$3,$3 subu $1,$1,$3 lhu $5,4($0) sllv $5,$3,$3 sll $4,$0,9 sllv $1,$4,$3 sw $5,16($0) xor $6,$3,$3 subu $1,$6,$3 subu $3,$3,$3 lb $1,12($0) or $6,$3,$3 sb $5,1($0) and $3,$1,$3 xor $4,$4,$3 lw $3,16($0) sltu $5,$5,$3 xor $4,$5,$3 lw $6,12($0) nor $3,$5,$3 subu $0,$4,$3 sh $3,16($0) slt $5,$5,$3 nor $4,$1,$3 or $1,$1,$3 slti $5,$3,4559 lb $5,1($0) lbu $3,16($0) lw $3,4($0) slti $3,$4,-3723 lb $3,4($0) addu $6,$1,$3 or $1,$1,$3 slti $0,$0,-17059 ori $3,$2,12619 srlv $3,$3,$3 nor $0,$0,$3 addiu $3,$5,-14651 sllv $1,$4,$3 srl $4,$5,7 srav $3,$5,$3 sb $3,2($0) lh $5,8($0)
; A016226: Expansion of 1/((1-x)(1-4x)(1-11x)). ; 1,16,197,2252,25113,277608,3059149,33672484,370484705,4075681280,44833892181,493178406396,5424984839977,59674922718232,656424507814493,7220671017615188,79427386920390129,873701279030783664 lpb $0 mov $2,$0 sub $0,1 seq $2,16158 ; Expansion of 1/((1-4*x)(1-11*x)). add $1,$2 lpe add $1,1 mov $0,$1
; A303590: Floor(n*beta)-1, where 1/alpha+1/beta=1, alpha being the number with continued fraction expansion [1;1,2,3,4,5,...] (A247844). ; 1,3,6,8,11,13,16,18,20,23,25,28,30,33,35,37,40,42,45,47,50,52,54,57,59,62,64,67,69,71,74,76,79,81,84,86,89,91,93,96,98,101,103,106,108,110,113,115,118,120,123,125,127,130,132,135,137,140,142,144,147,149,152,154,157,159,162,164,166,169,171,174,176 mov $3,$0 add $0,6 mov $1,$0 mul $0,2 sub $1,6 add $1,$0 mov $4,6 lpb $0,1 sub $0,1 add $1,5 lpe lpb $4,1 sub $4,1 add $5,5 lpe div $1,$5 sub $1,1 mov $2,$3 mul $2,2 add $1,$2
; Copyright 2016 Phillip Oppermann, Calvin Lee and JJ Garzella. ; See the README.md file at the top-level directory of this ; distribution. ; ; Licensed under the MIT license <LICENSE or ; http://opensource.org/licenses/MIT>, at your option. ; This file may not be copied, modified, or distributed ; except according to those terms. ; Declare a multiboot header that marks the program as a kernel. These are magic ; values that are documented in the multiboot standard. The bootloader will ; search for this signature in the first 8 KiB of the kernel file, aligned at a ; 32-bit boundary. The signature is in its own section so the header can be ; forced to be within the first 8 KiB of the kernel file. section .multiboot_header ; Permissions are the same as .rodata by default align 4 header_start: dd 0xe85250d6 ;Multiboot2 magic number dd 0 ;Run in protected i386 mode dd header_end - header_start ;header length ;check sum dd 0x100000000 - (0xe85250d6 + 0 + (header_end - header_start)) ;optional tags ;end tags dw 0 ;type dw 0 ;flags dd 8 ;size header_end:
.ORIG x600 BRnzp STARTUP STARTUP ST R0,UPPERR0 ST R1,UPPERR1 ST R2,UPPERR2 ST R3,UPPERR3 LD R1,ADDR LEA R2,INTVEC AND R3,R3,#0 ADD R3,R3,#3 INTVECLOOP LDR R0,R2,#0 STR R0,R1,#0 ADD R1,R1,#1 ADD R2,R2,#1 ADD R3,R3,#-1 BRp INTVECLOOP LD R0,UPPERR0 LD R1,UPPERR1 LD R2,UPPERR2 LD R3,UPPERR3 RET UPPERR0 .BLKW 1 UPPERR1 .BLKW 1 UPPERR2 .BLKW 1 UPPERR3 .BLKW 1 ADDR .FILL x0100 INTVEC .FILL KERNEL_PANIC .FILL USER_RTI_AND_OPENFILE_ERROR .FILL USER_RTI_AND_OPENFILE_ERROR KPSAVER0 .BLKW 1 KPSAVER1 .BLKW 1 KPSAVER7 .BLKW 1 CLOCK .FILL xFFFE CLOCKVAR .FILL x7FFF KERNEL_PANIC ST R0,KPSAVER0 ST R1,KPSAVER1 AND R0,R0,#0 ADD R0,R0,#6 TRAP x0 LD R1,CLOCKVAR STI R1,CLOCK RTI URTISAVER0 .BLKW 1 USER_RTI_AND_OPENFILE_ERROR ST R0,URTISAVER0 AND R0,R0,#0 ADD R0,R0,#6 TRAP x0 RTI PROCTGETC .FILL x301 PROCTOUT .FILL x302 PROCTPUTS .FILL x303 .END
; 0400 - NOP .segment "VECTORS" .word $eaea .word init .word $eaea .code init: nop nop nop
TITLE data07 INCLUDE Irvine32.inc .data ;an array aw1 of words containing 99 elements. initialized with 12. aw1 WORD 99 DUP(12) ;an array aw2 of words containing 88 elements. aw2 WORD 88 DUP(?) ;create a pointer to aw2 called pAw2. pAw2 DWORD aw2 .code main PROC ;part a) Translate from Pesudomathojava : pAw2[lastElement]=aw1[1]/6 mov ecx, 0 ;clear ecx. mov edx, 0 ;clear edx. make room for remainder (for a later part) movzx eax, aw1[1 * TYPE aw1] ;eax = aw1[1] which is 12 mov ebx, 6 div ebx ;aw1[1]/6 = 2 (in EAX) mov esi, pAw2 add esi, (LENGTHOF aw2-1) * TYPE aw2 mov [esi], eax movzx ecx, aw2[87*2] ;let's check 2 is in ecx. 87 is the last element. call dumpRegs ;part b)Fill the aw1 with the number 21. Use a loop. mov edi, OFFSET aw1 mov ecx, LENGTHOF aw1 mov eax, 21 ;should display 15 in EAX L1: mov [edi], eax add edi, TYPE aw1 loop L1 movzx ebx, aw1[98*2] ;to check the last element: 21 (15h) in EBX. call dumpRegs ;part c)a loop that prints all the integers from 5 to 18 in ascending order. mov eax, 5-1 mov ecx, (18-5)+1 L2: inc eax call writeInt loop L2 ;part d)Fill the aw2 with the elements a0=1, an=2(an-1 + 3). mov edi, OFFSET aw2 mov ecx, LENGTHOF aw2 mov eax, 1 mov esi, 2 L3: mov [edi], eax add eax, 3 mul esi add edi, TYPE aw1 loop L3 movzx ebx, aw2[2*2] ;should show 16h ('22') in EBX call dumpRegs exit main ENDP END main
#include "supporting_libs.h" void pr(long int n) { while(n>0) { std::cout<<n+'\n'; n = n-1; } } int main( ) { pr(10); return 0; }
; A295737: a(n) = a(n-1) + 3*a(n-2) -2*a(n-3) - 2*a(n-4), where a(0) = 1, a(1) = -1, a(2) = -1, a(3) = 2. ; Submitted by Jon Maiga ; 1,-1,-1,2,-1,9,4,29,25,86,95,245,308,681,925,1862,2659,5033,7436,13493,20417,35958,55351,95405,148708,252305,396917,665606,1054331,1752705,2790652,4608893,7366777,12106742,19407983,31776869,51053780,83354937,134146573,218550086,352172371,572819609,923943404,1500957317,2422803569,3932149494,6350758759,10299685469,16642055620,26975295521,43600573925,70642978310,114209997803,184987193841,299130082780,484385712077,783381577129,1268304160118,2051417301791,3320795203733,5371675634612,8694618321993 mov $1,1 mov $2,1 lpb $0 sub $0,1 sub $3,1 add $1,$3 add $4,$5 sub $3,$4 mov $4,$2 mov $2,$3 mov $3,$5 add $4,$1 mul $1,2 add $4,1 add $4,$2 add $5,$2 lpe mov $0,$2
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Berkeley Softworks 1990 -- All Rights Reserved PROJECT: PC GEOS MODULE: LBP driver FILE: capsl3Info.asm AUTHOR: Dave Durran REVISION HISTORY: Name Date Description ---- ---- ----------- Dave 2/27/90 Initial revision Dave 6/22/92 Initial 2.0 revision DESCRIPTION: This file contains the device information for the Canon LBP Other Printers Supported by this resource: $Id: capsl3Info.asm,v 1.1 97/04/18 11:51:59 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ;---------------------------------------------------------------------------- ; Canon LBP font set common to all LBPs. ;---------------------------------------------------------------------------- capsl3Info segment resource ; info blocks PrinterInfo < ; ---- PrinterType ------------- < PT_RASTER, BMF_MONO >, ; ---- PrinterConnections ------ < IC_NO_IEEE488, CC_NO_CUSTOM, SC_NO_SCSI, RC_RS232C, CC_CENTRONICS, FC_FILE, AC_NO_APPLETALK >, ; ---- PrinterSmarts ----------- PS_DUMB_RASTER, ;-------Custom Entry Routine------- NULL, ;-------Custom Exit Routine------- NULL, ; ---- Mode Info Offsets ------- offset capsl3lowRes, offset capsl3medRes, offset capsl3hiRes, NULL, offset printerFontInfo:capsl3nlq, ; ---- Font Geometry ----------- NULL, ; ---- Symbol Set list ----------- NULL, ; ---- PaperMargins ------------ < PR_MARGIN_LEFT, ; Tractor Margins 0, PR_MARGIN_RIGHT, 0 >, < PR_MARGIN_LEFT, ; ASF Margins PR_MARGIN_TOP, PR_MARGIN_RIGHT, PR_MARGIN_BOTTOM >, ; ---- PaperInputOptions ------- < MF_MANUAL1, TF_NO_TRACTOR, ASF_TRAY3 >, ; ---- PaperOutputOptions ------ < OC_COPIES, PS_REVERSE, OD_SIMPLEX, SO_NO_STAPLER, OS_NO_SORTER, OB_NO_OUTPUTBIN >, ; 612, ; paper width (points). NULL, ; Main UI CapslOptionsDialogBox, ; Options UI PrintEvalSimplex ; UI eval routines. > ;---------------------------------------------------------------------------- ; Graphics modes info ;---------------------------------------------------------------------------- capsl3lowRes GraphicsProperties < LO_RES_X_RES, ; xres LO_RES_Y_RES, ; yres LO_RES_BAND_HEIGHT, ; band height LO_RES_BUFF_HEIGHT, ; buffer height LO_RES_INTERLEAVE_FACTOR, ;#interleaves BMF_MONO, ;color format NULL > ; color format capsl3medRes GraphicsProperties < MED_RES_X_RES, ; xres MED_RES_Y_RES, ; yres MED_RES_BAND_HEIGHT, ; band height MED_RES_BUFF_HEIGHT, ; buffer height MED_RES_INTERLEAVE_FACTOR, ;#interleaves BMF_MONO, ;color format NULL > ; color format capsl3hiRes GraphicsProperties < HI_RES_X_RES, ; xres HI_RES_Y_RES, ; yres HI_RES_BAND_HEIGHT, ; band height HI_RES_BUFF_HEIGHT, ; buffer height HI_RES_INTERLEAVE_FACTOR, ;#interleaves BMF_MONO, ;color format NULL > ; color format capsl3Info ends
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "wallet.h" #include "walletdb.h" #include "bitcoinrpc.h" #include "init.h" #include "base58.h" using namespace json_spirit; using namespace std; int64_t nWalletUnlockTime; static CCriticalSection cs_nWalletUnlockTime; extern void TxToJSON(const CTransaction& tx, const uint256 hashBlock, json_spirit::Object& entry); static void accountingDeprecationCheck() { if (!GetBoolArg("-enableaccounts", false)) throw runtime_error( "Accounting API is deprecated and will be removed in future.\n" "It can easily result in negative or odd balances if misused or misunderstood, which has happened in the field.\n" "If you still want to enable it, add to your config file enableaccounts=1\n"); if (GetBoolArg("-staking", true)) throw runtime_error("If you want to use accounting API, staking must be disabled, add to your config file staking=0\n"); } std::string HelpRequiringPassphrase() { return pwalletMain->IsCrypted() ? "\nrequires wallet passphrase to be set with walletpassphrase first" : ""; } void EnsureWalletIsUnlocked() { if (pwalletMain->IsLocked()) throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Error: Please enter the wallet passphrase with walletpassphrase first."); if (fWalletUnlockStakingOnly) throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Error: Wallet is unlocked for staking only."); } void WalletTxToJSON(const CWalletTx& wtx, Object& entry) { int confirms = wtx.GetDepthInMainChain(); entry.push_back(Pair("confirmations", confirms)); if (wtx.IsCoinBase() || wtx.IsCoinStake()) entry.push_back(Pair("generated", true)); if (confirms > 0) { entry.push_back(Pair("blockhash", wtx.hashBlock.GetHex())); entry.push_back(Pair("blockindex", wtx.nIndex)); entry.push_back(Pair("blocktime", (boost::int64_t)(mapBlockIndex[wtx.hashBlock]->nTime))); } entry.push_back(Pair("txid", wtx.GetHash().GetHex())); entry.push_back(Pair("time", (boost::int64_t)wtx.GetTxTime())); entry.push_back(Pair("timereceived", (boost::int64_t)wtx.nTimeReceived)); BOOST_FOREACH(const PAIRTYPE(string,string)& item, wtx.mapValue) entry.push_back(Pair(item.first, item.second)); } string AccountFromValue(const Value& value) { string strAccount = value.get_str(); if (strAccount == "*") throw JSONRPCError(RPC_WALLET_INVALID_ACCOUNT_NAME, "Invalid account name"); return strAccount; } Value getinfo(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( "getinfo\n" "Returns an object containing various state info."); proxyType proxy; GetProxy(NET_IPV4, proxy); Object obj, diff; obj.push_back(Pair("version", FormatFullVersion())); obj.push_back(Pair("protocolversion",(int)PROTOCOL_VERSION)); obj.push_back(Pair("walletversion", pwalletMain->GetVersion())); obj.push_back(Pair("balance", ValueFromAmount(pwalletMain->GetBalance()))); obj.push_back(Pair("newmint", ValueFromAmount(pwalletMain->GetNewMint()))); obj.push_back(Pair("stake", ValueFromAmount(pwalletMain->GetStake()))); obj.push_back(Pair("blocks", (int)nBestHeight)); obj.push_back(Pair("timeoffset", (boost::int64_t)GetTimeOffset())); obj.push_back(Pair("moneysupply", ValueFromAmount(pindexBest->nMoneySupply))); obj.push_back(Pair("connections", (int)vNodes.size())); obj.push_back(Pair("proxy", (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string()))); obj.push_back(Pair("ip", addrSeenByPeer.ToStringIP())); diff.push_back(Pair("proof-of-work", GetDifficulty())); diff.push_back(Pair("proof-of-stake", GetDifficulty(GetLastBlockIndex(pindexBest, true)))); obj.push_back(Pair("difficulty", diff)); obj.push_back(Pair("testnet", fTestNet)); obj.push_back(Pair("keypoololdest", (boost::int64_t)pwalletMain->GetOldestKeyPoolTime())); obj.push_back(Pair("keypoolsize", (int)pwalletMain->GetKeyPoolSize())); obj.push_back(Pair("paytxfee", ValueFromAmount(nTransactionFee))); obj.push_back(Pair("mininput", ValueFromAmount(nMinimumInputValue))); if (pwalletMain->IsCrypted()) obj.push_back(Pair("unlocked_until", (boost::int64_t)nWalletUnlockTime / 1000)); obj.push_back(Pair("errors", GetWarnings("statusbar"))); return obj; } Value getnewpubkey(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( "getnewpubkey [account]\n" "Returns new public key for coinbase generation."); // Parse the account first so we don't generate a key if there's an error string strAccount; if (params.size() > 0) strAccount = AccountFromValue(params[0]); if (!pwalletMain->IsLocked()) pwalletMain->TopUpKeyPool(); // Generate a new key that is added to wallet CPubKey newKey; if (!pwalletMain->GetKeyFromPool(newKey, false)) throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first"); CKeyID keyID = newKey.GetID(); pwalletMain->SetAddressBookName(keyID, strAccount); vector<unsigned char> vchPubKey = newKey.Raw(); return HexStr(vchPubKey.begin(), vchPubKey.end()); } Value getnewaddress(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( "getnewaddress [account]\n" "Returns a new MyGulfCoin address for receiving payments. " "If [account] is specified (recommended), it is added to the address book " "so payments received with the address will be credited to [account]."); // Parse the account first so we don't generate a key if there's an error string strAccount; if (params.size() > 0) strAccount = AccountFromValue(params[0]); if (!pwalletMain->IsLocked()) pwalletMain->TopUpKeyPool(); // Generate a new key that is added to wallet CPubKey newKey; if (!pwalletMain->GetKeyFromPool(newKey, false)) throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first"); CKeyID keyID = newKey.GetID(); pwalletMain->SetAddressBookName(keyID, strAccount); return CBitcoinAddress(keyID).ToString(); } CBitcoinAddress GetAccountAddress(string strAccount, bool bForceNew=false) { CWalletDB walletdb(pwalletMain->strWalletFile); CAccount account; walletdb.ReadAccount(strAccount, account); bool bKeyUsed = false; // Check if the current key has been used if (account.vchPubKey.IsValid()) { CScript scriptPubKey; scriptPubKey.SetDestination(account.vchPubKey.GetID()); for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end() && account.vchPubKey.IsValid(); ++it) { const CWalletTx& wtx = (*it).second; BOOST_FOREACH(const CTxOut& txout, wtx.vout) if (txout.scriptPubKey == scriptPubKey) bKeyUsed = true; } } // Generate a new key if (!account.vchPubKey.IsValid() || bForceNew || bKeyUsed) { if (!pwalletMain->GetKeyFromPool(account.vchPubKey, false)) throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first"); pwalletMain->SetAddressBookName(account.vchPubKey.GetID(), strAccount); walletdb.WriteAccount(strAccount, account); } return CBitcoinAddress(account.vchPubKey.GetID()); } Value getaccountaddress(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( "getaccountaddress <account>\n" "Returns the current MyGulfCoin address for receiving payments to this account."); // Parse the account first so we don't generate a key if there's an error string strAccount = AccountFromValue(params[0]); Value ret; ret = GetAccountAddress(strAccount).ToString(); return ret; } Value setaccount(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( "setaccount <mygulfcoinaddress> <account>\n" "Sets the account associated with the given address."); CBitcoinAddress address(params[0].get_str()); if (!address.IsValid()) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid MyGulfCoin address"); string strAccount; if (params.size() > 1) strAccount = AccountFromValue(params[1]); // Detect when changing the account of an address that is the 'unused current key' of another account: if (pwalletMain->mapAddressBook.count(address.Get())) { string strOldAccount = pwalletMain->mapAddressBook[address.Get()]; if (address == GetAccountAddress(strOldAccount)) GetAccountAddress(strOldAccount, true); } pwalletMain->SetAddressBookName(address.Get(), strAccount); return Value::null; } Value getaccount(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( "getaccount <mygulfcoinaddress>\n" "Returns the account associated with the given address."); CBitcoinAddress address(params[0].get_str()); if (!address.IsValid()) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid MyGulfCoin address"); string strAccount; map<CTxDestination, string>::iterator mi = pwalletMain->mapAddressBook.find(address.Get()); if (mi != pwalletMain->mapAddressBook.end() && !(*mi).second.empty()) strAccount = (*mi).second; return strAccount; } Value getaddressesbyaccount(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( "getaddressesbyaccount <account>\n" "Returns the list of addresses for the given account."); string strAccount = AccountFromValue(params[0]); // Find all addresses that have the given account Array ret; BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress, string)& item, pwalletMain->mapAddressBook) { const CBitcoinAddress& address = item.first; const string& strName = item.second; if (strName == strAccount) ret.push_back(address.ToString()); } return ret; } Value sendtoaddress(const Array& params, bool fHelp) { if (fHelp || params.size() < 2 || params.size() > 4) throw runtime_error( "sendtoaddress <mygulfcoinaddress> <amount> [comment] [comment-to]\n" "<amount> is a real and is rounded to the nearest 0.000001" + HelpRequiringPassphrase()); CBitcoinAddress address(params[0].get_str()); if (!address.IsValid()) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid MyGulfCoin address"); // Amount int64_t nAmount = AmountFromValue(params[1]); // Wallet comments CWalletTx wtx; if (params.size() > 2 && params[2].type() != null_type && !params[2].get_str().empty()) wtx.mapValue["comment"] = params[2].get_str(); if (params.size() > 3 && params[3].type() != null_type && !params[3].get_str().empty()) wtx.mapValue["to"] = params[3].get_str(); if (pwalletMain->IsLocked()) throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Error: Please enter the wallet passphrase with walletpassphrase first."); string strError = pwalletMain->SendMoneyToDestination(address.Get(), nAmount, wtx); if (strError != "") throw JSONRPCError(RPC_WALLET_ERROR, strError); return wtx.GetHash().GetHex(); } Value listaddressgroupings(const Array& params, bool fHelp) { if (fHelp) throw runtime_error( "listaddressgroupings\n" "Lists groups of addresses which have had their common ownership\n" "made public by common use as inputs or as the resulting change\n" "in past transactions"); Array jsonGroupings; map<CTxDestination, int64_t> balances = pwalletMain->GetAddressBalances(); BOOST_FOREACH(set<CTxDestination> grouping, pwalletMain->GetAddressGroupings()) { Array jsonGrouping; BOOST_FOREACH(CTxDestination address, grouping) { Array addressInfo; addressInfo.push_back(CBitcoinAddress(address).ToString()); addressInfo.push_back(ValueFromAmount(balances[address])); { LOCK(pwalletMain->cs_wallet); if (pwalletMain->mapAddressBook.find(CBitcoinAddress(address).Get()) != pwalletMain->mapAddressBook.end()) addressInfo.push_back(pwalletMain->mapAddressBook.find(CBitcoinAddress(address).Get())->second); } jsonGrouping.push_back(addressInfo); } jsonGroupings.push_back(jsonGrouping); } return jsonGroupings; } Value signmessage(const Array& params, bool fHelp) { if (fHelp || params.size() != 2) throw runtime_error( "signmessage <mygulfcoinaddress> <message>\n" "Sign a message with the private key of an address"); EnsureWalletIsUnlocked(); string strAddress = params[0].get_str(); string strMessage = params[1].get_str(); CBitcoinAddress addr(strAddress); if (!addr.IsValid()) throw JSONRPCError(RPC_TYPE_ERROR, "Invalid address"); CKeyID keyID; if (!addr.GetKeyID(keyID)) throw JSONRPCError(RPC_TYPE_ERROR, "Address does not refer to key"); CKey key; if (!pwalletMain->GetKey(keyID, key)) throw JSONRPCError(RPC_WALLET_ERROR, "Private key not available"); CDataStream ss(SER_GETHASH, 0); ss << strMessageMagic; ss << strMessage; vector<unsigned char> vchSig; if (!key.SignCompact(Hash(ss.begin(), ss.end()), vchSig)) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Sign failed"); return EncodeBase64(&vchSig[0], vchSig.size()); } Value verifymessage(const Array& params, bool fHelp) { if (fHelp || params.size() != 3) throw runtime_error( "verifymessage <mygulfcoinaddress> <signature> <message>\n" "Verify a signed message"); string strAddress = params[0].get_str(); string strSign = params[1].get_str(); string strMessage = params[2].get_str(); CBitcoinAddress addr(strAddress); if (!addr.IsValid()) throw JSONRPCError(RPC_TYPE_ERROR, "Invalid address"); CKeyID keyID; if (!addr.GetKeyID(keyID)) throw JSONRPCError(RPC_TYPE_ERROR, "Address does not refer to key"); bool fInvalid = false; vector<unsigned char> vchSig = DecodeBase64(strSign.c_str(), &fInvalid); if (fInvalid) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Malformed base64 encoding"); CDataStream ss(SER_GETHASH, 0); ss << strMessageMagic; ss << strMessage; CKey key; if (!key.SetCompactSignature(Hash(ss.begin(), ss.end()), vchSig)) return false; return (key.GetPubKey().GetID() == keyID); } Value getreceivedbyaddress(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( "getreceivedbyaddress <mygulfcoinaddress> [minconf=1]\n" "Returns the total amount received by <mygulfcoinaddress> in transactions with at least [minconf] confirmations."); // Bitcoin address CBitcoinAddress address = CBitcoinAddress(params[0].get_str()); CScript scriptPubKey; if (!address.IsValid()) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid MyGulfCoin address"); scriptPubKey.SetDestination(address.Get()); if (!IsMine(*pwalletMain,scriptPubKey)) return (double)0.0; // Minimum confirmations int nMinDepth = 1; if (params.size() > 1) nMinDepth = params[1].get_int(); // Tally int64_t nAmount = 0; for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) { const CWalletTx& wtx = (*it).second; if (wtx.IsCoinBase() || wtx.IsCoinStake() || !wtx.IsFinal()) continue; BOOST_FOREACH(const CTxOut& txout, wtx.vout) if (txout.scriptPubKey == scriptPubKey) if (wtx.GetDepthInMainChain() >= nMinDepth) nAmount += txout.nValue; } return ValueFromAmount(nAmount); } void GetAccountAddresses(string strAccount, set<CTxDestination>& setAddress) { BOOST_FOREACH(const PAIRTYPE(CTxDestination, string)& item, pwalletMain->mapAddressBook) { const CTxDestination& address = item.first; const string& strName = item.second; if (strName == strAccount) setAddress.insert(address); } } Value getreceivedbyaccount(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( "getreceivedbyaccount <account> [minconf=1]\n" "Returns the total amount received by addresses with <account> in transactions with at least [minconf] confirmations."); accountingDeprecationCheck(); // Minimum confirmations int nMinDepth = 1; if (params.size() > 1) nMinDepth = params[1].get_int(); // Get the set of pub keys assigned to account string strAccount = AccountFromValue(params[0]); set<CTxDestination> setAddress; GetAccountAddresses(strAccount, setAddress); // Tally int64_t nAmount = 0; for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) { const CWalletTx& wtx = (*it).second; if (wtx.IsCoinBase() || wtx.IsCoinStake() || !wtx.IsFinal()) continue; BOOST_FOREACH(const CTxOut& txout, wtx.vout) { CTxDestination address; if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*pwalletMain, address) && setAddress.count(address)) if (wtx.GetDepthInMainChain() >= nMinDepth) nAmount += txout.nValue; } } return (double)nAmount / (double)COIN; } int64_t GetAccountBalance(CWalletDB& walletdb, const string& strAccount, int nMinDepth) { int64_t nBalance = 0; // Tally wallet transactions for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) { const CWalletTx& wtx = (*it).second; if (!wtx.IsFinal() || wtx.GetDepthInMainChain() < 0) continue; int64_t nReceived, nSent, nFee; wtx.GetAccountAmounts(strAccount, nReceived, nSent, nFee); if (nReceived != 0 && wtx.GetDepthInMainChain() >= nMinDepth && wtx.GetBlocksToMaturity() == 0) nBalance += nReceived; nBalance -= nSent + nFee; } // Tally internal accounting entries nBalance += walletdb.GetAccountCreditDebit(strAccount); return nBalance; } int64_t GetAccountBalance(const string& strAccount, int nMinDepth) { CWalletDB walletdb(pwalletMain->strWalletFile); return GetAccountBalance(walletdb, strAccount, nMinDepth); } Value getbalance(const Array& params, bool fHelp) { if (fHelp || params.size() > 2) throw runtime_error( "getbalance [account] [minconf=1]\n" "If [account] is not specified, returns the server's total available balance.\n" "If [account] is specified, returns the balance in the account."); if (params.size() == 0) return ValueFromAmount(pwalletMain->GetBalance()); int nMinDepth = 1; if (params.size() > 1) nMinDepth = params[1].get_int(); if (params[0].get_str() == "*") { // Calculate total balance a different way from GetBalance() // (GetBalance() sums up all unspent TxOuts) // getbalance and getbalance '*' 0 should return the same number. int64_t nBalance = 0; for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) { const CWalletTx& wtx = (*it).second; if (!wtx.IsTrusted()) continue; int64_t allFee; string strSentAccount; list<pair<CTxDestination, int64_t> > listReceived; list<pair<CTxDestination, int64_t> > listSent; wtx.GetAmounts(listReceived, listSent, allFee, strSentAccount); if (wtx.GetDepthInMainChain() >= nMinDepth && wtx.GetBlocksToMaturity() == 0) { BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64_t)& r, listReceived) nBalance += r.second; } BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64_t)& r, listSent) nBalance -= r.second; nBalance -= allFee; } return ValueFromAmount(nBalance); } accountingDeprecationCheck(); string strAccount = AccountFromValue(params[0]); int64_t nBalance = GetAccountBalance(strAccount, nMinDepth); return ValueFromAmount(nBalance); } Value movecmd(const Array& params, bool fHelp) { if (fHelp || params.size() < 3 || params.size() > 5) throw runtime_error( "move <fromaccount> <toaccount> <amount> [minconf=1] [comment]\n" "Move from one account in your wallet to another."); accountingDeprecationCheck(); string strFrom = AccountFromValue(params[0]); string strTo = AccountFromValue(params[1]); int64_t nAmount = AmountFromValue(params[2]); if (params.size() > 3) // unused parameter, used to be nMinDepth, keep type-checking it though (void)params[3].get_int(); string strComment; if (params.size() > 4) strComment = params[4].get_str(); CWalletDB walletdb(pwalletMain->strWalletFile); if (!walletdb.TxnBegin()) throw JSONRPCError(RPC_DATABASE_ERROR, "database error"); int64_t nNow = GetAdjustedTime(); // Debit CAccountingEntry debit; debit.nOrderPos = pwalletMain->IncOrderPosNext(&walletdb); debit.strAccount = strFrom; debit.nCreditDebit = -nAmount; debit.nTime = nNow; debit.strOtherAccount = strTo; debit.strComment = strComment; walletdb.WriteAccountingEntry(debit); // Credit CAccountingEntry credit; credit.nOrderPos = pwalletMain->IncOrderPosNext(&walletdb); credit.strAccount = strTo; credit.nCreditDebit = nAmount; credit.nTime = nNow; credit.strOtherAccount = strFrom; credit.strComment = strComment; walletdb.WriteAccountingEntry(credit); if (!walletdb.TxnCommit()) throw JSONRPCError(RPC_DATABASE_ERROR, "database error"); return true; } Value sendfrom(const Array& params, bool fHelp) { if (fHelp || params.size() < 3 || params.size() > 6) throw runtime_error( "sendfrom <fromaccount> <tomygulfcoinaddress> <amount> [minconf=1] [comment] [comment-to]\n" "<amount> is a real and is rounded to the nearest 0.000001" + HelpRequiringPassphrase()); string strAccount = AccountFromValue(params[0]); CBitcoinAddress address(params[1].get_str()); if (!address.IsValid()) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid MyGulfCoin address"); int64_t nAmount = AmountFromValue(params[2]); int nMinDepth = 1; if (params.size() > 3) nMinDepth = params[3].get_int(); CWalletTx wtx; wtx.strFromAccount = strAccount; if (params.size() > 4 && params[4].type() != null_type && !params[4].get_str().empty()) wtx.mapValue["comment"] = params[4].get_str(); if (params.size() > 5 && params[5].type() != null_type && !params[5].get_str().empty()) wtx.mapValue["to"] = params[5].get_str(); EnsureWalletIsUnlocked(); // Check funds int64_t nBalance = GetAccountBalance(strAccount, nMinDepth); if (nAmount > nBalance) throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds"); // Send string strError = pwalletMain->SendMoneyToDestination(address.Get(), nAmount, wtx); if (strError != "") throw JSONRPCError(RPC_WALLET_ERROR, strError); return wtx.GetHash().GetHex(); } Value sendmany(const Array& params, bool fHelp) { if (fHelp || params.size() < 2 || params.size() > 4) throw runtime_error( "sendmany <fromaccount> {address:amount,...} [minconf=1] [comment]\n" "amounts are double-precision floating point numbers" + HelpRequiringPassphrase()); string strAccount = AccountFromValue(params[0]); Object sendTo = params[1].get_obj(); int nMinDepth = 1; if (params.size() > 2) nMinDepth = params[2].get_int(); CWalletTx wtx; wtx.strFromAccount = strAccount; if (params.size() > 3 && params[3].type() != null_type && !params[3].get_str().empty()) wtx.mapValue["comment"] = params[3].get_str(); set<CBitcoinAddress> setAddress; vector<pair<CScript, int64_t> > vecSend; int64_t totalAmount = 0; BOOST_FOREACH(const Pair& s, sendTo) { CBitcoinAddress address(s.name_); if (!address.IsValid()) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid MyGulfCoin address: ")+s.name_); if (setAddress.count(address)) throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+s.name_); setAddress.insert(address); CScript scriptPubKey; scriptPubKey.SetDestination(address.Get()); int64_t nAmount = AmountFromValue(s.value_); totalAmount += nAmount; vecSend.push_back(make_pair(scriptPubKey, nAmount)); } EnsureWalletIsUnlocked(); // Check funds int64_t nBalance = GetAccountBalance(strAccount, nMinDepth); if (totalAmount > nBalance) throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds"); // Send CReserveKey keyChange(pwalletMain); int64_t nFeeRequired = 0; bool fCreated = pwalletMain->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired); if (!fCreated) { if (totalAmount + nFeeRequired > pwalletMain->GetBalance()) throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Insufficient funds"); throw JSONRPCError(RPC_WALLET_ERROR, "Transaction creation failed"); } if (!pwalletMain->CommitTransaction(wtx, keyChange)) throw JSONRPCError(RPC_WALLET_ERROR, "Transaction commit failed"); return wtx.GetHash().GetHex(); } Value addmultisigaddress(const Array& params, bool fHelp) { if (fHelp || params.size() < 2 || params.size() > 3) { string msg = "addmultisigaddress <nrequired> <'[\"key\",\"key\"]'> [account]\n" "Add a nrequired-to-sign multisignature address to the wallet\"\n" "each key is a MyGulfCoin address or hex-encoded public key\n" "If [account] is specified, assign address to [account]."; throw runtime_error(msg); } int nRequired = params[0].get_int(); const Array& keys = params[1].get_array(); string strAccount; if (params.size() > 2) strAccount = AccountFromValue(params[2]); // Gather public keys if (nRequired < 1) throw runtime_error("a multisignature address must require at least one key to redeem"); if ((int)keys.size() < nRequired) throw runtime_error( strprintf("not enough keys supplied " "(got %"PRIszu" keys, but need at least %d to redeem)", keys.size(), nRequired)); std::vector<CKey> pubkeys; pubkeys.resize(keys.size()); for (unsigned int i = 0; i < keys.size(); i++) { const std::string& ks = keys[i].get_str(); // Case 1: Bitcoin address and we have full public key: CBitcoinAddress address(ks); if (address.IsValid()) { CKeyID keyID; if (!address.GetKeyID(keyID)) throw runtime_error( strprintf("%s does not refer to a key",ks.c_str())); CPubKey vchPubKey; if (!pwalletMain->GetPubKey(keyID, vchPubKey)) throw runtime_error( strprintf("no full public key for address %s",ks.c_str())); if (!vchPubKey.IsValid() || !pubkeys[i].SetPubKey(vchPubKey)) throw runtime_error(" Invalid public key: "+ks); } // Case 2: hex public key else if (IsHex(ks)) { CPubKey vchPubKey(ParseHex(ks)); if (!vchPubKey.IsValid() || !pubkeys[i].SetPubKey(vchPubKey)) throw runtime_error(" Invalid public key: "+ks); } else { throw runtime_error(" Invalid public key: "+ks); } } // Construct using pay-to-script-hash: CScript inner; inner.SetMultisig(nRequired, pubkeys); CScriptID innerID = inner.GetID(); pwalletMain->AddCScript(inner); pwalletMain->SetAddressBookName(innerID, strAccount); return CBitcoinAddress(innerID).ToString(); } Value addredeemscript(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) { string msg = "addredeemscript <redeemScript> [account]\n" "Add a P2SH address with a specified redeemScript to the wallet.\n" "If [account] is specified, assign address to [account]."; throw runtime_error(msg); } string strAccount; if (params.size() > 1) strAccount = AccountFromValue(params[1]); // Construct using pay-to-script-hash: vector<unsigned char> innerData = ParseHexV(params[0], "redeemScript"); CScript inner(innerData.begin(), innerData.end()); CScriptID innerID = inner.GetID(); pwalletMain->AddCScript(inner); pwalletMain->SetAddressBookName(innerID, strAccount); return CBitcoinAddress(innerID).ToString(); } struct tallyitem { int64_t nAmount; int nConf; tallyitem() { nAmount = 0; nConf = std::numeric_limits<int>::max(); } }; Value ListReceived(const Array& params, bool fByAccounts) { // Minimum confirmations int nMinDepth = 1; if (params.size() > 0) nMinDepth = params[0].get_int(); // Whether to include empty accounts bool fIncludeEmpty = false; if (params.size() > 1) fIncludeEmpty = params[1].get_bool(); // Tally map<CBitcoinAddress, tallyitem> mapTally; for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) { const CWalletTx& wtx = (*it).second; if (wtx.IsCoinBase() || wtx.IsCoinStake() || !wtx.IsFinal()) continue; int nDepth = wtx.GetDepthInMainChain(); if (nDepth < nMinDepth) continue; BOOST_FOREACH(const CTxOut& txout, wtx.vout) { CTxDestination address; if (!ExtractDestination(txout.scriptPubKey, address) || !IsMine(*pwalletMain, address)) continue; tallyitem& item = mapTally[address]; item.nAmount += txout.nValue; item.nConf = min(item.nConf, nDepth); } } // Reply Array ret; map<string, tallyitem> mapAccountTally; BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress, string)& item, pwalletMain->mapAddressBook) { const CBitcoinAddress& address = item.first; const string& strAccount = item.second; map<CBitcoinAddress, tallyitem>::iterator it = mapTally.find(address); if (it == mapTally.end() && !fIncludeEmpty) continue; int64_t nAmount = 0; int nConf = std::numeric_limits<int>::max(); if (it != mapTally.end()) { nAmount = (*it).second.nAmount; nConf = (*it).second.nConf; } if (fByAccounts) { tallyitem& item = mapAccountTally[strAccount]; item.nAmount += nAmount; item.nConf = min(item.nConf, nConf); } else { Object obj; obj.push_back(Pair("address", address.ToString())); obj.push_back(Pair("account", strAccount)); obj.push_back(Pair("amount", ValueFromAmount(nAmount))); obj.push_back(Pair("confirmations", (nConf == std::numeric_limits<int>::max() ? 0 : nConf))); ret.push_back(obj); } } if (fByAccounts) { for (map<string, tallyitem>::iterator it = mapAccountTally.begin(); it != mapAccountTally.end(); ++it) { int64_t nAmount = (*it).second.nAmount; int nConf = (*it).second.nConf; Object obj; obj.push_back(Pair("account", (*it).first)); obj.push_back(Pair("amount", ValueFromAmount(nAmount))); obj.push_back(Pair("confirmations", (nConf == std::numeric_limits<int>::max() ? 0 : nConf))); ret.push_back(obj); } } return ret; } Value listreceivedbyaddress(const Array& params, bool fHelp) { if (fHelp || params.size() > 2) throw runtime_error( "listreceivedbyaddress [minconf=1] [includeempty=false]\n" "[minconf] is the minimum number of confirmations before payments are included.\n" "[includeempty] whether to include addresses that haven't received any payments.\n" "Returns an array of objects containing:\n" " \"address\" : receiving address\n" " \"account\" : the account of the receiving address\n" " \"amount\" : total amount received by the address\n" " \"confirmations\" : number of confirmations of the most recent transaction included"); return ListReceived(params, false); } Value listreceivedbyaccount(const Array& params, bool fHelp) { if (fHelp || params.size() > 2) throw runtime_error( "listreceivedbyaccount [minconf=1] [includeempty=false]\n" "[minconf] is the minimum number of confirmations before payments are included.\n" "[includeempty] whether to include accounts that haven't received any payments.\n" "Returns an array of objects containing:\n" " \"account\" : the account of the receiving addresses\n" " \"amount\" : total amount received by addresses with this account\n" " \"confirmations\" : number of confirmations of the most recent transaction included"); accountingDeprecationCheck(); return ListReceived(params, true); } static void MaybePushAddress(Object & entry, const CTxDestination &dest) { CBitcoinAddress addr; if (addr.Set(dest)) entry.push_back(Pair("address", addr.ToString())); } void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDepth, bool fLong, Array& ret) { int64_t nFee; string strSentAccount; list<pair<CTxDestination, int64_t> > listReceived; list<pair<CTxDestination, int64_t> > listSent; wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount); bool fAllAccounts = (strAccount == string("*")); // Sent if ((!wtx.IsCoinStake()) && (!listSent.empty() || nFee != 0) && (fAllAccounts || strAccount == strSentAccount)) { BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& s, listSent) { Object entry; entry.push_back(Pair("account", strSentAccount)); MaybePushAddress(entry, s.first); entry.push_back(Pair("category", "send")); entry.push_back(Pair("amount", ValueFromAmount(-s.second))); entry.push_back(Pair("fee", ValueFromAmount(-nFee))); if (fLong) WalletTxToJSON(wtx, entry); ret.push_back(entry); } } // Received if (listReceived.size() > 0 && wtx.GetDepthInMainChain() >= nMinDepth) { bool stop = false; BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& r, listReceived) { string account; if (pwalletMain->mapAddressBook.count(r.first)) account = pwalletMain->mapAddressBook[r.first]; if (fAllAccounts || (account == strAccount)) { Object entry; entry.push_back(Pair("account", account)); MaybePushAddress(entry, r.first); if (wtx.IsCoinBase() || wtx.IsCoinStake()) { if (wtx.GetDepthInMainChain() < 1) entry.push_back(Pair("category", "orphan")); else if (wtx.GetBlocksToMaturity() > 0) entry.push_back(Pair("category", "immature")); else entry.push_back(Pair("category", "generate")); } else { entry.push_back(Pair("category", "receive")); } if (!wtx.IsCoinStake()) entry.push_back(Pair("amount", ValueFromAmount(r.second))); else { entry.push_back(Pair("amount", ValueFromAmount(-nFee))); stop = true; // only one coinstake output } if (fLong) WalletTxToJSON(wtx, entry); ret.push_back(entry); } if (stop) break; } } } void AcentryToJSON(const CAccountingEntry& acentry, const string& strAccount, Array& ret) { bool fAllAccounts = (strAccount == string("*")); if (fAllAccounts || acentry.strAccount == strAccount) { Object entry; entry.push_back(Pair("account", acentry.strAccount)); entry.push_back(Pair("category", "move")); entry.push_back(Pair("time", (boost::int64_t)acentry.nTime)); entry.push_back(Pair("amount", ValueFromAmount(acentry.nCreditDebit))); entry.push_back(Pair("otheraccount", acentry.strOtherAccount)); entry.push_back(Pair("comment", acentry.strComment)); ret.push_back(entry); } } Value listtransactions(const Array& params, bool fHelp) { if (fHelp || params.size() > 3) throw runtime_error( "listtransactions [account] [count=10] [from=0]\n" "Returns up to [count] most recent transactions skipping the first [from] transactions for account [account]."); string strAccount = "*"; if (params.size() > 0) strAccount = params[0].get_str(); int nCount = 10; if (params.size() > 1) nCount = params[1].get_int(); int nFrom = 0; if (params.size() > 2) nFrom = params[2].get_int(); if (nCount < 0) throw JSONRPCError(RPC_INVALID_PARAMETER, "Negative count"); if (nFrom < 0) throw JSONRPCError(RPC_INVALID_PARAMETER, "Negative from"); Array ret; std::list<CAccountingEntry> acentries; CWallet::TxItems txOrdered = pwalletMain->OrderedTxItems(acentries, strAccount); // iterate backwards until we have nCount items to return: for (CWallet::TxItems::reverse_iterator it = txOrdered.rbegin(); it != txOrdered.rend(); ++it) { CWalletTx *const pwtx = (*it).second.first; if (pwtx != 0) ListTransactions(*pwtx, strAccount, 0, true, ret); CAccountingEntry *const pacentry = (*it).second.second; if (pacentry != 0) AcentryToJSON(*pacentry, strAccount, ret); if ((int)ret.size() >= (nCount+nFrom)) break; } // ret is newest to oldest if (nFrom > (int)ret.size()) nFrom = ret.size(); if ((nFrom + nCount) > (int)ret.size()) nCount = ret.size() - nFrom; Array::iterator first = ret.begin(); std::advance(first, nFrom); Array::iterator last = ret.begin(); std::advance(last, nFrom+nCount); if (last != ret.end()) ret.erase(last, ret.end()); if (first != ret.begin()) ret.erase(ret.begin(), first); std::reverse(ret.begin(), ret.end()); // Return oldest to newest return ret; } Value listaccounts(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( "listaccounts [minconf=1]\n" "Returns Object that has account names as keys, account balances as values."); accountingDeprecationCheck(); int nMinDepth = 1; if (params.size() > 0) nMinDepth = params[0].get_int(); map<string, int64_t> mapAccountBalances; BOOST_FOREACH(const PAIRTYPE(CTxDestination, string)& entry, pwalletMain->mapAddressBook) { if (IsMine(*pwalletMain, entry.first)) // This address belongs to me mapAccountBalances[entry.second] = 0; } for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) { const CWalletTx& wtx = (*it).second; int64_t nFee; string strSentAccount; list<pair<CTxDestination, int64_t> > listReceived; list<pair<CTxDestination, int64_t> > listSent; int nDepth = wtx.GetDepthInMainChain(); if (nDepth < 0) continue; wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount); mapAccountBalances[strSentAccount] -= nFee; BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& s, listSent) mapAccountBalances[strSentAccount] -= s.second; if (nDepth >= nMinDepth && wtx.GetBlocksToMaturity() == 0) { BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& r, listReceived) if (pwalletMain->mapAddressBook.count(r.first)) mapAccountBalances[pwalletMain->mapAddressBook[r.first]] += r.second; else mapAccountBalances[""] += r.second; } } list<CAccountingEntry> acentries; CWalletDB(pwalletMain->strWalletFile).ListAccountCreditDebit("*", acentries); BOOST_FOREACH(const CAccountingEntry& entry, acentries) mapAccountBalances[entry.strAccount] += entry.nCreditDebit; Object ret; BOOST_FOREACH(const PAIRTYPE(string, int64_t)& accountBalance, mapAccountBalances) { ret.push_back(Pair(accountBalance.first, ValueFromAmount(accountBalance.second))); } return ret; } Value listsinceblock(const Array& params, bool fHelp) { if (fHelp) throw runtime_error( "listsinceblock [blockhash] [target-confirmations]\n" "Get all transactions in blocks since block [blockhash], or all transactions if omitted"); CBlockIndex *pindex = NULL; int target_confirms = 1; if (params.size() > 0) { uint256 blockId = 0; blockId.SetHex(params[0].get_str()); pindex = CBlockLocator(blockId).GetBlockIndex(); } if (params.size() > 1) { target_confirms = params[1].get_int(); if (target_confirms < 1) throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter"); } int depth = pindex ? (1 + nBestHeight - pindex->nHeight) : -1; Array transactions; for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); it++) { CWalletTx tx = (*it).second; if (depth == -1 || tx.GetDepthInMainChain() < depth) ListTransactions(tx, "*", 0, true, transactions); } uint256 lastblock; if (target_confirms == 1) { lastblock = hashBestChain; } else { int target_height = pindexBest->nHeight + 1 - target_confirms; CBlockIndex *block; for (block = pindexBest; block && block->nHeight > target_height; block = block->pprev) { } lastblock = block ? block->GetBlockHash() : 0; } Object ret; ret.push_back(Pair("transactions", transactions)); ret.push_back(Pair("lastblock", lastblock.GetHex())); return ret; } Value gettransaction(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( "gettransaction <txid>\n" "Get detailed information about <txid>"); uint256 hash; hash.SetHex(params[0].get_str()); Object entry; if (pwalletMain->mapWallet.count(hash)) { const CWalletTx& wtx = pwalletMain->mapWallet[hash]; TxToJSON(wtx, 0, entry); int64_t nCredit = wtx.GetCredit(); int64_t nDebit = wtx.GetDebit(); int64_t nNet = nCredit - nDebit; int64_t nFee = (wtx.IsFromMe() ? wtx.GetValueOut() - nDebit : 0); entry.push_back(Pair("amount", ValueFromAmount(nNet - nFee))); if (wtx.IsFromMe()) entry.push_back(Pair("fee", ValueFromAmount(nFee))); WalletTxToJSON(wtx, entry); Array details; ListTransactions(pwalletMain->mapWallet[hash], "*", 0, false, details); entry.push_back(Pair("details", details)); } else { CTransaction tx; uint256 hashBlock = 0; if (GetTransaction(hash, tx, hashBlock)) { TxToJSON(tx, 0, entry); if (hashBlock == 0) entry.push_back(Pair("confirmations", 0)); else { entry.push_back(Pair("blockhash", hashBlock.GetHex())); map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hashBlock); if (mi != mapBlockIndex.end() && (*mi).second) { CBlockIndex* pindex = (*mi).second; if (pindex->IsInMainChain()) entry.push_back(Pair("confirmations", 1 + nBestHeight - pindex->nHeight)); else entry.push_back(Pair("confirmations", 0)); } } } else throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "No information available about transaction"); } return entry; } Value backupwallet(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( "backupwallet <destination>\n" "Safely copies wallet.dat to destination, which can be a directory or a path with filename."); string strDest = params[0].get_str(); if (!BackupWallet(*pwalletMain, strDest)) throw JSONRPCError(RPC_WALLET_ERROR, "Error: Wallet backup failed!"); return Value::null; } Value keypoolrefill(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( "keypoolrefill [new-size]\n" "Fills the keypool." + HelpRequiringPassphrase()); unsigned int nSize = max(GetArg("-keypool", 100), (int64_t)0); if (params.size() > 0) { if (params[0].get_int() < 0) throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, expected valid size"); nSize = (unsigned int) params[0].get_int(); } EnsureWalletIsUnlocked(); pwalletMain->TopUpKeyPool(nSize); if (pwalletMain->GetKeyPoolSize() < nSize) throw JSONRPCError(RPC_WALLET_ERROR, "Error refreshing keypool."); return Value::null; } void ThreadTopUpKeyPool(void* parg) { // Make this thread recognisable as the key-topping-up thread RenameThread("MyGulfCoin-key-top"); pwalletMain->TopUpKeyPool(); } void ThreadCleanWalletPassphrase(void* parg) { // Make this thread recognisable as the wallet relocking thread RenameThread("MyGulfCoin-lock-wa"); int64_t nMyWakeTime = GetTimeMillis() + *((int64_t*)parg) * 1000; ENTER_CRITICAL_SECTION(cs_nWalletUnlockTime); if (nWalletUnlockTime == 0) { nWalletUnlockTime = nMyWakeTime; do { if (nWalletUnlockTime==0) break; int64_t nToSleep = nWalletUnlockTime - GetTimeMillis(); if (nToSleep <= 0) break; LEAVE_CRITICAL_SECTION(cs_nWalletUnlockTime); MilliSleep(nToSleep); ENTER_CRITICAL_SECTION(cs_nWalletUnlockTime); } while(1); if (nWalletUnlockTime) { nWalletUnlockTime = 0; pwalletMain->Lock(); } } else { if (nWalletUnlockTime < nMyWakeTime) nWalletUnlockTime = nMyWakeTime; } LEAVE_CRITICAL_SECTION(cs_nWalletUnlockTime); delete (int64_t*)parg; } Value walletpassphrase(const Array& params, bool fHelp) { if (pwalletMain->IsCrypted() && (fHelp || params.size() < 2 || params.size() > 3)) throw runtime_error( "walletpassphrase <passphrase> <timeout> [stakingonly]\n" "Stores the wallet decryption key in memory for <timeout> seconds.\n" "if [stakingonly] is true sending functions are disabled."); if (fHelp) return true; if (!pwalletMain->IsCrypted()) throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletpassphrase was called."); if (!pwalletMain->IsLocked()) throw JSONRPCError(RPC_WALLET_ALREADY_UNLOCKED, "Error: Wallet is already unlocked, use walletlock first if need to change unlock settings."); // Note that the walletpassphrase is stored in params[0] which is not mlock()ed SecureString strWalletPass; strWalletPass.reserve(100); // TODO: get rid of this .c_str() by implementing SecureString::operator=(std::string) // Alternately, find a way to make params[0] mlock()'d to begin with. strWalletPass = params[0].get_str().c_str(); if (strWalletPass.length() > 0) { if (!pwalletMain->Unlock(strWalletPass)) throw JSONRPCError(RPC_WALLET_PASSPHRASE_INCORRECT, "Error: The wallet passphrase entered was incorrect."); } else throw runtime_error( "walletpassphrase <passphrase> <timeout>\n" "Stores the wallet decryption key in memory for <timeout> seconds."); NewThread(ThreadTopUpKeyPool, NULL); int64_t* pnSleepTime = new int64_t(params[1].get_int64()); NewThread(ThreadCleanWalletPassphrase, pnSleepTime); // ppcoin: if user OS account compromised prevent trivial sendmoney commands if (params.size() > 2) fWalletUnlockStakingOnly = params[2].get_bool(); else fWalletUnlockStakingOnly = false; return Value::null; } Value walletpassphrasechange(const Array& params, bool fHelp) { if (pwalletMain->IsCrypted() && (fHelp || params.size() != 2)) throw runtime_error( "walletpassphrasechange <oldpassphrase> <newpassphrase>\n" "Changes the wallet passphrase from <oldpassphrase> to <newpassphrase>."); if (fHelp) return true; if (!pwalletMain->IsCrypted()) throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletpassphrasechange was called."); // TODO: get rid of these .c_str() calls by implementing SecureString::operator=(std::string) // Alternately, find a way to make params[0] mlock()'d to begin with. SecureString strOldWalletPass; strOldWalletPass.reserve(100); strOldWalletPass = params[0].get_str().c_str(); SecureString strNewWalletPass; strNewWalletPass.reserve(100); strNewWalletPass = params[1].get_str().c_str(); if (strOldWalletPass.length() < 1 || strNewWalletPass.length() < 1) throw runtime_error( "walletpassphrasechange <oldpassphrase> <newpassphrase>\n" "Changes the wallet passphrase from <oldpassphrase> to <newpassphrase>."); if (!pwalletMain->ChangeWalletPassphrase(strOldWalletPass, strNewWalletPass)) throw JSONRPCError(RPC_WALLET_PASSPHRASE_INCORRECT, "Error: The wallet passphrase entered was incorrect."); return Value::null; } Value walletlock(const Array& params, bool fHelp) { if (pwalletMain->IsCrypted() && (fHelp || params.size() != 0)) throw runtime_error( "walletlock\n" "Removes the wallet encryption key from memory, locking the wallet.\n" "After calling this method, you will need to call walletpassphrase again\n" "before being able to call any methods which require the wallet to be unlocked."); if (fHelp) return true; if (!pwalletMain->IsCrypted()) throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletlock was called."); { LOCK(cs_nWalletUnlockTime); pwalletMain->Lock(); nWalletUnlockTime = 0; } return Value::null; } Value encryptwallet(const Array& params, bool fHelp) { if (!pwalletMain->IsCrypted() && (fHelp || params.size() != 1)) throw runtime_error( "encryptwallet <passphrase>\n" "Encrypts the wallet with <passphrase>."); if (fHelp) return true; if (pwalletMain->IsCrypted()) throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an encrypted wallet, but encryptwallet was called."); // TODO: get rid of this .c_str() by implementing SecureString::operator=(std::string) // Alternately, find a way to make params[0] mlock()'d to begin with. SecureString strWalletPass; strWalletPass.reserve(100); strWalletPass = params[0].get_str().c_str(); if (strWalletPass.length() < 1) throw runtime_error( "encryptwallet <passphrase>\n" "Encrypts the wallet with <passphrase>."); if (!pwalletMain->EncryptWallet(strWalletPass)) throw JSONRPCError(RPC_WALLET_ENCRYPTION_FAILED, "Error: Failed to encrypt the wallet."); // BDB seems to have a bad habit of writing old data into // slack space in .dat files; that is bad if the old data is // unencrypted private keys. So: StartShutdown(); return "wallet encrypted; MyGulfCoin server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup."; } class DescribeAddressVisitor : public boost::static_visitor<Object> { public: Object operator()(const CNoDestination &dest) const { return Object(); } Object operator()(const CKeyID &keyID) const { Object obj; CPubKey vchPubKey; pwalletMain->GetPubKey(keyID, vchPubKey); obj.push_back(Pair("isscript", false)); obj.push_back(Pair("pubkey", HexStr(vchPubKey.Raw()))); obj.push_back(Pair("iscompressed", vchPubKey.IsCompressed())); return obj; } Object operator()(const CScriptID &scriptID) const { Object obj; obj.push_back(Pair("isscript", true)); CScript subscript; pwalletMain->GetCScript(scriptID, subscript); std::vector<CTxDestination> addresses; txnouttype whichType; int nRequired; ExtractDestinations(subscript, whichType, addresses, nRequired); obj.push_back(Pair("script", GetTxnOutputType(whichType))); obj.push_back(Pair("hex", HexStr(subscript.begin(), subscript.end()))); Array a; BOOST_FOREACH(const CTxDestination& addr, addresses) a.push_back(CBitcoinAddress(addr).ToString()); obj.push_back(Pair("addresses", a)); if (whichType == TX_MULTISIG) obj.push_back(Pair("sigsrequired", nRequired)); return obj; } }; Value validateaddress(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( "validateaddress <mygulfcoinaddress>\n" "Return information about <mygulfcoinaddress>."); CBitcoinAddress address(params[0].get_str()); bool isValid = address.IsValid(); Object ret; ret.push_back(Pair("isvalid", isValid)); if (isValid) { CTxDestination dest = address.Get(); string currentAddress = address.ToString(); ret.push_back(Pair("address", currentAddress)); bool fMine = IsMine(*pwalletMain, dest); ret.push_back(Pair("ismine", fMine)); if (fMine) { Object detail = boost::apply_visitor(DescribeAddressVisitor(), dest); ret.insert(ret.end(), detail.begin(), detail.end()); } if (pwalletMain->mapAddressBook.count(dest)) ret.push_back(Pair("account", pwalletMain->mapAddressBook[dest])); } return ret; } Value validatepubkey(const Array& params, bool fHelp) { if (fHelp || !params.size() || params.size() > 2) throw runtime_error( "validatepubkey <mygulfcoinpubkey>\n" "Return information about <mygulfcoinpubkey>."); std::vector<unsigned char> vchPubKey = ParseHex(params[0].get_str()); CPubKey pubKey(vchPubKey); bool isValid = pubKey.IsValid(); bool isCompressed = pubKey.IsCompressed(); CKeyID keyID = pubKey.GetID(); CBitcoinAddress address; address.Set(keyID); Object ret; ret.push_back(Pair("isvalid", isValid)); if (isValid) { CTxDestination dest = address.Get(); string currentAddress = address.ToString(); ret.push_back(Pair("address", currentAddress)); bool fMine = IsMine(*pwalletMain, dest); ret.push_back(Pair("ismine", fMine)); ret.push_back(Pair("iscompressed", isCompressed)); if (fMine) { Object detail = boost::apply_visitor(DescribeAddressVisitor(), dest); ret.insert(ret.end(), detail.begin(), detail.end()); } if (pwalletMain->mapAddressBook.count(dest)) ret.push_back(Pair("account", pwalletMain->mapAddressBook[dest])); } return ret; } // ppcoin: reserve balance from being staked for network protection Value reservebalance(const Array& params, bool fHelp) { if (fHelp || params.size() > 2) throw runtime_error( "reservebalance [<reserve> [amount]]\n" "<reserve> is true or false to turn balance reserve on or off.\n" "<amount> is a real and rounded to cent.\n" "Set reserve amount not participating in network protection.\n" "If no parameters provided current setting is printed.\n"); if (params.size() > 0) { bool fReserve = params[0].get_bool(); if (fReserve) { if (params.size() == 1) throw runtime_error("must provide amount to reserve balance.\n"); int64_t nAmount = AmountFromValue(params[1]); nAmount = (nAmount / CENT) * CENT; // round to cent if (nAmount < 0) throw runtime_error("amount cannot be negative.\n"); nReserveBalance = nAmount; } else { if (params.size() > 1) throw runtime_error("cannot specify amount to turn off reserve.\n"); nReserveBalance = 0; } } Object result; result.push_back(Pair("reserve", (nReserveBalance > 0))); result.push_back(Pair("amount", ValueFromAmount(nReserveBalance))); return result; } // ppcoin: check wallet integrity Value checkwallet(const Array& params, bool fHelp) { if (fHelp || params.size() > 0) throw runtime_error( "checkwallet\n" "Check wallet for integrity.\n"); int nMismatchSpent; int64_t nBalanceInQuestion; pwalletMain->FixSpentCoins(nMismatchSpent, nBalanceInQuestion, true); Object result; if (nMismatchSpent == 0) result.push_back(Pair("wallet check passed", true)); else { result.push_back(Pair("mismatched spent coins", nMismatchSpent)); result.push_back(Pair("amount in question", ValueFromAmount(nBalanceInQuestion))); } return result; } // ppcoin: repair wallet Value repairwallet(const Array& params, bool fHelp) { if (fHelp || params.size() > 0) throw runtime_error( "repairwallet\n" "Repair wallet if checkwallet reports any problem.\n"); int nMismatchSpent; int64_t nBalanceInQuestion; pwalletMain->FixSpentCoins(nMismatchSpent, nBalanceInQuestion); Object result; if (nMismatchSpent == 0) result.push_back(Pair("wallet check passed", true)); else { result.push_back(Pair("mismatched spent coins", nMismatchSpent)); result.push_back(Pair("amount affected by repair", ValueFromAmount(nBalanceInQuestion))); } return result; } // NovaCoin: resend unconfirmed wallet transactions Value resendtx(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( "resendtx\n" "Re-send unconfirmed transactions.\n" ); ResendWalletTransactions(true); return Value::null; } // ppcoin: make a public-private key pair Value makekeypair(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( "makekeypair [prefix]\n" "Make a public/private key pair.\n" "[prefix] is optional preferred prefix for the public key.\n"); string strPrefix = ""; if (params.size() > 0) strPrefix = params[0].get_str(); CKey key; key.MakeNewKey(false); CPrivKey vchPrivKey = key.GetPrivKey(); Object result; result.push_back(Pair("PrivateKey", HexStr<CPrivKey::iterator>(vchPrivKey.begin(), vchPrivKey.end()))); result.push_back(Pair("PublicKey", HexStr(key.GetPubKey().Raw()))); return result; }
; void in_mouse_kempston(uint8_t *buttons, uint16_t *x, uint16_t *y) SECTION code_clib SECTION code_input PUBLIC in_mouse_kempston EXTERN asm_in_mouse_kempston in_mouse_kempston: call asm_in_mouse_kempston pop ix pop hl ld (hl),c inc hl ld (hl),b pop hl ld (hl),e inc hl ld (hl),d pop hl ld (hl),a push hl push hl push hl jp (ix)
// --------------------------------------------------------------------------- .mx 0x30 IO__Error: rtl // --------------------------------------------------------------------------- // PPUCTRL $2000 VPHB SINN NMI enable (V), PPU master/slave (P), sprite height (H), background tile select (B), sprite tile select (S), increment mode (I), nametable select (NN) // PPUMASK $2001 BGRs bMmG color emphasis (BGR), sprite enable (s), background enable (b), sprite left column enable (M), background left column enable (m), greyscale (G) // PPUSTATUS $2002 VSO- ---- vblank (V), sprite 0 hit (S), sprite overflow (O), read resets write pair for $2005/2006 // OAMADDR $2003 aaaa aaaa OAM read/write address // OAMDATA $2004 dddd dddd OAM data read/write // PPUSCROLL $2005 xxxx xxxx fine scroll position (two writes: X, Y) // PPUADDR $2006 aaaa aaaa PPU read/write address (two writes: MSB, LSB) // PPUDATA $2007 dddd dddd PPU data read/write // OAMDMA $4014 aaaa aaaa OAM DMA high address .mx 0x30 IO__r2000_a: IO__r2000_a_i: IO__r2000_x: IO__r2000_y: rtl IO__w2000_a: CoreCall_Begin CoreCall_Lock CoreCall_Push CoreCall_Call IO__w2000_a_i CoreCall_Pull CoreCall_End IO__w2000_x: CoreCall_Begin CoreCall_Lock CoreCall_Push CoreCall_CopyUpTo +b_1 stx $_IO_2000 b_1: CoreCall_Call IO__w2000_in CoreCall_Pull CoreCall_End IO__w2000_y: CoreCall_Begin CoreCall_Lock CoreCall_Push CoreCall_CopyUpTo +b_1 sty $_IO_2000 b_1: CoreCall_Call IO__w2000_in CoreCall_Pull CoreCall_End IO__w2000_a_i: sta $_IO_2000 IO__w2000_in: php lock xba IO__w2000_in2: lda $_IO_2000 bit #0x04 bne $+IO__w2000_a_inc32 // Change name tables and #0x03 sta $_PPU_SCROLL_X+1 lsr a sta $_PPU_SCROLL_Y+1 // Inc 1 lda #.VramQ_PpuAddrInc sta $0x2180 lda #0x01 sta $0x2180 sta $_IO_PPUADDR_INC xba plp rtl IO__w2000_a_inc32: // Change name tables and #0x03 sta $_PPU_SCROLL_X+1 lsr a sta $_PPU_SCROLL_Y+1 // Inc 32 lda #.VramQ_PpuAddrInc sta $0x2180 lda #0x20 sta $0x2180 sta $_IO_PPUADDR_INC xba plp rtl IO__r2001_a: IO__r2001_a_i: IO__r2001_x: IO__r2001_y: rtl IO__w2001_a_i: sta $_IO_2001 rtl IO__w2001_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_IO_2001 b_1: CoreCall_End IO__w2001_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_IO_2001 b_1: CoreCall_End IO__w2001_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_IO_2001 b_1: CoreCall_End IO__r2002_a: IO__r2002_a_i: IO__r2002_x: IO__r2002_y: php pha stz $_IO_HILO // Did we hit sprite 0? lda $3,s cmp $_IO_2002_LastReturn bne $+IO__r2002_NewCall lda $4,s sbc $_IO_2002_LastReturn+1 bne $+IO__r2002_NewCall // Increment and compare with 3 to set bit 6, assuming A==0 and carry set from cmp+!bne inc $_IO_2002_CallCount adc $_IO_2002_CallCount adc #0x3c and #0x40 beq $+IO__r2002_NoSprite0 stz $_IO_2002_CallCount ora $_IO_2002 eor #0x80 sta $_IO_2002 sta $_IO_Temp // Change scanline to sprite 0 lda $_Sprite0Line sta $_Scanline // Add new HDMA coordinates phx phy rep #0x10 .mx 0x20 .vstack _VSTACK_START call Hdma__UpdateScrolling // Change mode back sep #0x30 .mx 0x30 ply plx pla plp rtl IO__r2002_NoSprite0: ora $_IO_2002 and #0xbf eor #0x80 sta $_IO_2002 sta $_IO_Temp pla plp rtl IO__r2002_NewCall: lda $3,s sta $_IO_2002_LastReturn lda $4,s sta $_IO_2002_LastReturn+1 stz $_IO_2002_CallCount lda $_IO_2002 and #0xbf eor #0x80 sta $_IO_2002 sta $_IO_Temp pla plp rtl IO__w2002_a: IO__w2002_a_i: rtl IO__w2002_x: rtl IO__w2002_y: rtl IO__r2003_a: IO__r2003_a_i: IO__r2003_x: IO__r2003_y: rtl IO__w2003_a: IO__w2003_a_i: rtl IO__w2003_x: rtl IO__w2003_y: rtl IO__r2004_a: IO__r2004_a_i: IO__r2004_x: IO__r2004_y: rtl IO__w2004_a: IO__w2004_a_i: rtl IO__w2004_x: rtl IO__w2004_y: rtl IO__r2005_a: IO__r2005_a_i: IO__r2005_x: IO__r2005_y: rtl .macro IO__w2005_Mac reg php bit $_IO_HILO bmi $+b_high b_low: sec ror $_IO_HILO st{0} $_PPU_SCROLL_X plp rtl b_high: stz $_IO_HILO st{0} $_PPU_SCROLL_Y plp rtl .endm IO__w2005_a: IO__w2005_a_i: IO__w2005_Mac a IO__w2005_x: IO__w2005_Mac x IO__w2005_y: IO__w2005_Mac y IO__r2006_a: IO__r2006_a_i: IO__r2006_x: IO__r2006_y: rtl // Note: Value is in X rather than IO_Temp .macro IO__w2006_Low_Mac // Write 2 stz $_IO_HILO lda #.VramQ_PpuAddrLow sta $0x2180 stx $_IO_PPUADDR+0 stx $0x2180 // Change scroll values (also transfer new scroll values) lda $_PPU_SCROLL_Y and #0xc7 ora $=IO__w2006_SR2AND38,x sta $_PPU_SCROLL_Y sta $_IO_SCROLL_Y lda $_PPU_SCROLL_X and #0x07 ora $=IO__w2006_SL3,x sta $_PPU_SCROLL_X sta $_IO_SCROLL_X lda $_PPU_SCROLL_X+1 sta $_IO_SCROLL_X+1 lsr a sta $_IO_SCROLL_Y+1 .endm .macro IO__w2006_High_Mac // Write 1 ora #0x80 sta $_IO_HILO lda #.VramQ_PpuAddrHigh sta $0x2180 txa and #0x3f sta $_IO_PPUADDR+1 sta $0x2180 // Change scroll values lda $_PPU_SCROLL_Y and #0x38 ora $=IO__w2006_SR4AND03_OR_SL6,x sta $_PPU_SCROLL_Y lda $=IO__w2006_SR2AND03,x sta $_PPU_SCROLL_X+1 lsr a sta $_PPU_SCROLL_Y+1 .endm IO__w2006_y: php phx xba tyx lock lda $_IO_HILO bpl $+b_high IO__w2006_Low_Mac xba plx plp rtl b_high: IO__w2006_High_Mac xba plx plp rtl IO__w2006_x: php xba lock lda $_IO_HILO bpl $+b_high IO__w2006_Low_Mac xba plp rtl b_high: IO__w2006_High_Mac xba plp rtl IO__w2006_a: IO__w2006_a_i: php phx tax lock lda $_IO_HILO bpl $+b_high IO__w2006_Low_Mac txa plx plp rtl b_high: IO__w2006_High_Mac txa plx plp rtl //IO__w2006_SR4AND03: // .fill 0x10, 0 // .fill 0x10, 1 // .fill 0x10, 2 // .fill 0x10, 3 // .fill 0x10, 0 // .fill 0x10, 1 // .fill 0x10, 2 // .fill 0x10, 3 // .fill 0x10, 0 // .fill 0x10, 1 // .fill 0x10, 2 // .fill 0x10, 3 // .fill 0x10, 0 // .fill 0x10, 1 // .fill 0x10, 2 // .fill 0x10, 3 //IO__w2006_SL6: // .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 // .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 // .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 // .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 // .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 // .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 // .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 // .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 // .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 // .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 // .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 // .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 // .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 // .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 // .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 // .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 IO__w2006_SR4AND03_OR_SL6: .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 .data8 0x01, 0x41, 0x81, 0xc1, 0x01, 0x41, 0x81, 0xc1, 0x01, 0x41, 0x81, 0xc1, 0x01, 0x41, 0x81, 0xc1 .data8 0x02, 0x42, 0x82, 0xc2, 0x02, 0x42, 0x82, 0xc2, 0x02, 0x42, 0x82, 0xc2, 0x02, 0x42, 0x82, 0xc2 .data8 0x03, 0x43, 0x83, 0xc3, 0x03, 0x43, 0x83, 0xc3, 0x03, 0x43, 0x83, 0xc3, 0x03, 0x43, 0x83, 0xc3 .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 .data8 0x01, 0x41, 0x81, 0xc1, 0x01, 0x41, 0x81, 0xc1, 0x01, 0x41, 0x81, 0xc1, 0x01, 0x41, 0x81, 0xc1 .data8 0x02, 0x42, 0x82, 0xc2, 0x02, 0x42, 0x82, 0xc2, 0x02, 0x42, 0x82, 0xc2, 0x02, 0x42, 0x82, 0xc2 .data8 0x03, 0x43, 0x83, 0xc3, 0x03, 0x43, 0x83, 0xc3, 0x03, 0x43, 0x83, 0xc3, 0x03, 0x43, 0x83, 0xc3 .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 .data8 0x01, 0x41, 0x81, 0xc1, 0x01, 0x41, 0x81, 0xc1, 0x01, 0x41, 0x81, 0xc1, 0x01, 0x41, 0x81, 0xc1 .data8 0x02, 0x42, 0x82, 0xc2, 0x02, 0x42, 0x82, 0xc2, 0x02, 0x42, 0x82, 0xc2, 0x02, 0x42, 0x82, 0xc2 .data8 0x03, 0x43, 0x83, 0xc3, 0x03, 0x43, 0x83, 0xc3, 0x03, 0x43, 0x83, 0xc3, 0x03, 0x43, 0x83, 0xc3 .data8 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0, 0x00, 0x40, 0x80, 0xc0 .data8 0x01, 0x41, 0x81, 0xc1, 0x01, 0x41, 0x81, 0xc1, 0x01, 0x41, 0x81, 0xc1, 0x01, 0x41, 0x81, 0xc1 .data8 0x02, 0x42, 0x82, 0xc2, 0x02, 0x42, 0x82, 0xc2, 0x02, 0x42, 0x82, 0xc2, 0x02, 0x42, 0x82, 0xc2 .data8 0x03, 0x43, 0x83, 0xc3, 0x03, 0x43, 0x83, 0xc3, 0x03, 0x43, 0x83, 0xc3, 0x03, 0x43, 0x83, 0xc3 IO__w2006_SR2AND03: .data8 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3 .data8 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3 .data8 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3 .data8 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3 .data8 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3 .data8 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3 .data8 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3 .data8 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3 IO__w2006_SL3: .data8 0x00, 0x08, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38, 0x40, 0x48, 0x50, 0x58, 0x60, 0x68, 0x70, 0x78, 0x80, 0x88, 0x90, 0x98, 0xa0, 0xa8, 0xb0, 0xb8, 0xc0, 0xc8, 0xd0, 0xd8, 0xe0, 0xe8, 0xf0, 0xf8 .data8 0x00, 0x08, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38, 0x40, 0x48, 0x50, 0x58, 0x60, 0x68, 0x70, 0x78, 0x80, 0x88, 0x90, 0x98, 0xa0, 0xa8, 0xb0, 0xb8, 0xc0, 0xc8, 0xd0, 0xd8, 0xe0, 0xe8, 0xf0, 0xf8 .data8 0x00, 0x08, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38, 0x40, 0x48, 0x50, 0x58, 0x60, 0x68, 0x70, 0x78, 0x80, 0x88, 0x90, 0x98, 0xa0, 0xa8, 0xb0, 0xb8, 0xc0, 0xc8, 0xd0, 0xd8, 0xe0, 0xe8, 0xf0, 0xf8 .data8 0x00, 0x08, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38, 0x40, 0x48, 0x50, 0x58, 0x60, 0x68, 0x70, 0x78, 0x80, 0x88, 0x90, 0x98, 0xa0, 0xa8, 0xb0, 0xb8, 0xc0, 0xc8, 0xd0, 0xd8, 0xe0, 0xe8, 0xf0, 0xf8 .data8 0x00, 0x08, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38, 0x40, 0x48, 0x50, 0x58, 0x60, 0x68, 0x70, 0x78, 0x80, 0x88, 0x90, 0x98, 0xa0, 0xa8, 0xb0, 0xb8, 0xc0, 0xc8, 0xd0, 0xd8, 0xe0, 0xe8, 0xf0, 0xf8 .data8 0x00, 0x08, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38, 0x40, 0x48, 0x50, 0x58, 0x60, 0x68, 0x70, 0x78, 0x80, 0x88, 0x90, 0x98, 0xa0, 0xa8, 0xb0, 0xb8, 0xc0, 0xc8, 0xd0, 0xd8, 0xe0, 0xe8, 0xf0, 0xf8 .data8 0x00, 0x08, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38, 0x40, 0x48, 0x50, 0x58, 0x60, 0x68, 0x70, 0x78, 0x80, 0x88, 0x90, 0x98, 0xa0, 0xa8, 0xb0, 0xb8, 0xc0, 0xc8, 0xd0, 0xd8, 0xe0, 0xe8, 0xf0, 0xf8 .data8 0x00, 0x08, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38, 0x40, 0x48, 0x50, 0x58, 0x60, 0x68, 0x70, 0x78, 0x80, 0x88, 0x90, 0x98, 0xa0, 0xa8, 0xb0, 0xb8, 0xc0, 0xc8, 0xd0, 0xd8, 0xe0, 0xe8, 0xf0, 0xf8 IO__w2006_SR2AND38: .fill 0x20, 0x00 .fill 0x20, 0x08 .fill 0x20, 0x10 .fill 0x20, 0x18 .fill 0x20, 0x20 .fill 0x20, 0x28 .fill 0x20, 0x30 .fill 0x20, 0x38 IO__r2007_ChrRamReadCode: // This code is copied to RAM at "ChrRam_Read" lda $=ChrRam_CONSTBANK jmp $_IO__r2007_ChrRamCallBack IO__r2007_ChrRamWriteCode: // This code is copied to RAM at "ChrRam_Write" sta $=ChrRam_CONSTBANK pla plp rtl IO__r2007_a: IO__r2007_a_i: IO__r2007_x: IO__r2007_y: php pha // Queue a dummy read lda #.VramQ_Read sta $0x2180 // Return last byte read lda $_IO_2007r sta $_IO_Temp // Load higher bits of address lda $_IO_PPUADDR+1 // Is it CHR banks? cmp #0x20 bcs $+b_1 phx // Is this game using CHR RAM? ldx $_CHR_0_PageLength bne $+b_2 // Read from CHR RAM clone lda $_ChrRam_Page trapeq Exception "Reading CHR RAM{}{}{}CPU attempted to read CHR RAM.{}{}CHR RAM clone must be turned on for this game." // Calculate destination address, assume carry clear from BCS //clc adc $_IO_PPUADDR+1 sta $_ChrRam_Read+2 lda $_IO_PPUADDR+0 sta $_ChrRam_Read+1 // Increment PPU address, assume carry clear because ADC shouldn't wrap the bank //clc adc $_IO_PPUADDR_INC sta $_IO_PPUADDR+0 bcc $+b_3 inc $_IO_PPUADDR+1 b_3: // Call plx jmp $_ChrRam_Read IO__r2007_ChrRamCallBack: // "Return" value sta $_IO_2007r pla plp rtl b_2: phy // Apply pattern swap tay lda $_IO_MapperChrBankSwap lsr a tya bcc $+b_2 eor #0x10 b_2: // Push bank only for CHR ROM phb // Which page are we in? Keep carry set during the loop ldy #0xff sec b_loop: iny sbc $_CHR_0_PageLength,y bcs $-b_loop // Go back by 1 index, assume carry clear from BCS adc $_CHR_0_PageLength,y // Push incomplete address to stack pha lda $_IO_PPUADDR pha // Load CHR page and bank lda $_CHR_0_NesBank,y tax lda $=RomInfo_ChrBankLut_hi,x pha plb lda $=RomInfo_ChrBankLut_lo,x clc adc $2,s sta $2,s // Read byte ldy #0 lda ($1,s),y // Clear pointer and restore DB ply ply plb sta $_IO_2007r // Increment address lda $_IO_PPUADDR clc adc $_IO_PPUADDR_INC sta $_IO_PPUADDR bcc $+b_2 inc $_IO_PPUADDR+1 b_2: ply plx pla plp rtl b_1: // Is it name tables? cmp #0x30 bcs $+IO__r2007_skip20 phx tax lda $_NameTable_Remap_Main-0x20,x xba lda $_IO_PPUADDR rep #0x11 .mx 0x20 tax lda $=Nes_Nametables-0x2000,x sta $_IO_2007r // Increment address lda $_IO_PPUADDR adc $_IO_PPUADDR_INC sta $_IO_PPUADDR sep #0x30 .mx 0x30 plx pla plp rtl IO__r2007_skip20: // Is it palette? cmp #0x3f bne $+IO__r2007_skip3f phx ldx $_IO_PPUADDR lda $=IO__w2007_PaletteMirror,x tax lda $_PaletteNes,x // Immediate return instead of next read sta $_IO_Temp // Increment address lda $_IO_PPUADDR clc adc $_IO_PPUADDR_INC sta $_IO_PPUADDR plx pla plp rtl IO__r2007_skip3f: pla plp rtl IO__w2007_y: sty $_IO_Temp bra $+IO__w2007_In IO__w2007_x: stx $_IO_Temp bra $+IO__w2007_In IO__w2007_a: IO__w2007_a_i: sta $_IO_Temp //bra $+IO__w2007_In IO__w2007_In: php pha // TODO: Properly fix port 2002 shortcut stz $_IO_2002_LastReturn+1 // Load higher bits of address lda $_IO_PPUADDR+1 and #0x3f // Is it CHR banks? cmp #0x20 bcs $+IO__w2007_skip00 // Is this game using CHR RAM? lda $_CHR_0_PageLength bne $+IO__w2007_skip00 // Write to CHR banks lda #.VramQ_Tile lock sta $0x2180 lda $_IO_Temp sta $0x2180 // Write to CHR RAM clone lda $_ChrRam_Page beq $+b_2 // Calculate destination address, assume carry clear from BCS //clc adc $_IO_PPUADDR+1 sta $_ChrRam_Write+2 lda $_IO_PPUADDR+0 sta $_ChrRam_Write+1 // Increment PPU address, assume carry clear because ADC shouldn't wrap the bank //clc adc $_IO_PPUADDR_INC sta $_IO_PPUADDR+0 bcc $+b_3 inc $_IO_PPUADDR+1 b_3: // Call jmp $_ChrRam_Write b_2: pla plp rtl IO__w2007_skip00: // Is it name tables? cmp #0x30 jcs $_IO__w2007_skip20 phx tax lda $_NameTable_Remap_Main-0x20,x xba lda $_IO_PPUADDR rep #0x11 .mx 0x20 tax rep #0x10 .mx 0x20 lda $_IO_Temp cmp $=Nes_Nametables-0x2000,x beq $+IO__w2007_NoChanges_16bit sta $=Nes_Nametables-0x2000,x rep #0x31 .mx 0x00 // Is it attribute? txa and #0x03c0 eor #0x03c0 bne $+IO__w2007_skipAttribute lda $_IO_PPUADDR adc $_IO_PPUADDR_INC sta $_IO_PPUADDR sep #0x34 .mx 0x30 // Write to queue lda #.VramQ_TileAttribute //lock sta $0x2180 lda $_IO_Temp sta $0x2180 plx pla plp rtl IO__w2007_skipAttribute: .mx 0x00 lda $_IO_PPUADDR adc $_IO_PPUADDR_INC sta $_IO_PPUADDR sep #0x34 .mx 0x30 // Write to queue lda #.VramQ_Tile //lock sta $0x2180 lda $_IO_Temp sta $0x2180 plx pla plp rtl IO__w2007_NoChanges_16bit: rep #0x31 .mx 0x00 lda $_IO_PPUADDR adc $_IO_PPUADDR_INC sta $_IO_PPUADDR sep #0x30 .mx 0x30 // Value written is unchanged, queue a dummy read instead lda #.VramQ_Read sta $0x2180 plx pla plp rtl IO__w2007_NoChanges: // Value written is unchanged, queue a dummy read instead lda #.VramQ_Read sta $0x2180 // Increment address lda $_IO_PPUADDR clc adc $_IO_PPUADDR_INC sta $_IO_PPUADDR plx pla plp rtl IO__w2007_skip20: // Is it palette? cmp #0x3f bne $+IO__w2007_skip3f phx ldx $_IO_PPUADDR lda $=IO__w2007_PaletteMirror,x tax lda $_IO_Temp cmp $_PaletteNes,x beq $-IO__w2007_NoChanges sta $_PaletteNes,x rep #0x31 .mx 0x00 lda $_IO_PPUADDR adc $_IO_PPUADDR_INC sta $_IO_PPUADDR sep #0x34 .mx 0x30 // Write to queue lda #.VramQ_Palette //lock sta $0x2180 lda $_IO_Temp asl a sta $0x2180 plx pla plp rtl IO__w2007_skip3f: // Return pla plp rtl IO__w2007_PaletteMirror: .repeat 8, ".data8 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, 0x11, 0x12, 0x13, 0x04, 0x15, 0x16, 0x17, 0x08, 0x19, 0x1a, 0x1b, 0x0c, 0x1d, 0x1e, 0x1f" .macro IO__w4014_mac8x8 addr //ldy #0xef cpy $.Zero+0+{0} bcc $+b_next // A ldx $.Zero+2+{0} lda $_IO__SpriteAttributeLUT,x eor $_IO_Temp pha // Y, T pei ($.Zero+0+{0}) // X ldx $.Zero+3+{0} phx b_next: .endm .macro IO__w4014_mac8x16 addr {1}stz $_Sprite0Line cmp $.Zero+0+{0} bcc $+b_end b_in: ldy $.Zero+2+{0} bpl $+b_NoYFlip // With Y flip // Prepare T1 and A1, keep A1/A2 in A and T1/T2 in X lda $.Zero+1+{0} ora #0x01 tax eor $.Zero+1+{0} eor $_IO__SpriteAttributeLUT2,y eor $_IO_Temp // A1 pha // T1 phx // Y1 ldy $.Zero+0+{0} phy // X1 ldy $.Zero+3+{0} phy // A2 pha // T2 dex phx // Y2, assume carry set from BCC lda $.Zero+0+{0} tay adc #7 {1}sta $_Sprite0Line pha // Mark scanline for potentially hitting the 8 sprites limit ldx $_IO__SR3,y dec $_Sprites_CountdownPer8Lines+0,x dec $_Sprites_CountdownPer8Lines+1,x dec $_Sprites_CountdownPer8Lines+2,x // X2 ldy $.Zero+3+{0} phy // Compare next (TODO: Compare and jump directly into the next macro) lda #0xef bra $+b_end // Else b_NoYFlip: // Without Y flip // Prepare T1 and A1, keep A1/A2 in A and T1/T2 in X lda $.Zero+1+{0} and #0xfe tax eor $.Zero+1+{0} eor $_IO__SpriteAttributeLUT,y eor $_IO_Temp // A1 pha // T1 phx // Y1 ldy $.Zero+0+{0} phy // X1 ldy $.Zero+3+{0} phy // A2 pha // T2 inx phx // Y2, assume carry set from BCC lda $.Zero+0+{0} tay adc #7 {1}sta $_Sprite0Line pha // Mark scanline for potentially hitting the 8 sprites limit ldx $_IO__SR3,y dec $_Sprites_CountdownPer8Lines+0,x dec $_Sprites_CountdownPer8Lines+1,x dec $_Sprites_CountdownPer8Lines+2,x // X2 ldy $.Zero+3+{0} phy // Compare next lda #0xef b_end: .endm .macro IO__w4014_mac8x16_nolimit addr cmp $.Zero+0+{0} bcc $+b_end b_in: ldy $.Zero+2+{0} bpl $+b_NoYFlip // With Y flip // Prepare T1 and A1, keep A1/A2 in A and T1/T2 in X lda $.Zero+1+{0} ora #0x01 tax eor $.Zero+1+{0} eor $_IO__SpriteAttributeLUT2,y eor $_IO_Temp // A1 pha // T1 phx // Y1 ldy $.Zero+0+{0} phy // X1 ldy $.Zero+3+{0} phy // A2 pha // T2 dex phx // Y2, assume carry set from BCC lda $.Zero+0+{0} adc #7 pha // X2 phy // Compare next (TODO: Compare and jump directly into the next macro) lda #0xef bra $+b_end // Else b_NoYFlip: // Without Y flip // Prepare T1 and A1, keep A1/A2 in A and T1/T2 in X lda $.Zero+1+{0} and #0xfe tax eor $.Zero+1+{0} eor $_IO__SpriteAttributeLUT,y eor $_IO_Temp // A1 pha // T1 phx // Y1 ldy $.Zero+0+{0} phy // X1 ldy $.Zero+3+{0} phy // A2 pha // T2 inx phx // Y2, assume carry set from BCC lda $.Zero+0+{0} adc #7 pha // X2 phy // Compare next lda #0xef b_end: .endm .mx 0x30 IO__r4014_RangeFix: // Is it between 0x08-0x1f? cmp #0x20 bcs $+b_1 and #0x07 sta $_IO_Temp bra $+IO__w4014_RangeFixExit b_1: // Is it between 0x20-0x5f? (TODO: Support mappers using this range?) cmp #0x60 trapcc Exception "DMA Transfer Failed{}{}{}IO.w4014 attempted to copy bytes from page 0x{a:X}" // Is between 0x60-0xff // Load correct bank and #0xe0 tax lda $_Program_Bank+2,x pha plb // Prepare countdown before changing to 16-bit mode ldy #0x10 smx 0x00 // Copy sprite data ldx $_IO_Temp-1 b_loop: lda $0x0000,x sta $_NesSpriteRemap+0x00,x lda $0x0020,x sta $_NesSpriteRemap+0x20,x lda $0x0040,x sta $_NesSpriteRemap+0x40,x lda $0x0060,x sta $_NesSpriteRemap+0x60,x lda $0x0080,x sta $_NesSpriteRemap+0x80,x lda $0x00a0,x sta $_NesSpriteRemap+0xa0,x lda $0x00c0,x sta $_NesSpriteRemap+0xc0,x lda $0x00e0,x sta $_NesSpriteRemap+0xe0,x inx inx dey bne $-b_loop smx 0x30 // Change page lda #.NesSpriteRemap/0x100 sta $_IO_Temp bra $+IO__w4014_RangeFixExit .mx 0x30 IO__r4014_a: IO__r4014_a_i: IO__r4014_x: IO__r4014_y: stz $_IO_Temp rtl IO__w4014_x: stx $_IO_Temp bra $+IO__w4014_In IO__w4014_y: sty $_IO_Temp bra $+IO__w4014_In IO__w4014_a: IO__w4014_a_i: sta $_IO_Temp //bra $+IO__w4014_In IO__w4014_In: php phb pha phx phy lock // Do we need to fix the page number? lda $_IO_Temp cmp #0x08 bcs $-IO__r4014_RangeFix IO__w4014_RangeFixExit: phk plb // Nes: Y, T, A, X // Snes: X, Y, T, A // What size are sprites? lda $_IO_2000_EarlyValue and #0x20 beq $+IO__w4014_8x8 jmp $_IO__w4014_8x16 IO__w4014_8x8: // Sprite limit? lda $=RomInfo_SpriteLimit bpl $+IO__w4014_8x8_nolimit jmp $_IO__w4014_8x8_limit IO__w4014_8x8_nolimit: // Change mode .mx 0x00 rep #0x31 // Change DP to point to Nes sprite lda $_IO_Temp-1 tcd // Keep stack pointer and replace it to the sprite buffer tsc sta $_IO_Temp16 // Replace stack pointer to the sprite buffer lda #_Sprites_Buffer+0x0ff tcs // Change mode .mx 0x30 sep #0x30 // Nes: Y, T, A, X // Snes: X, Y, T, A // Update sprite 0 hit, assume carry clear from REP lda $0x00 adc $=RomInfo_SpriteZeroOffset bcc $+b_1 lda #0xf0 b_1: sta $_Sprite0Line // Which sprite bank to use? lda $_IO_2000_EarlyValue lsr a lsr a lsr a eor $_IO_MapperChrBankSwap and #0x01 sta $_IO_Temp // Convert all sprites ldy #0xef IO__w4014_mac8x8 0xfc IO__w4014_mac8x8 0xf8 IO__w4014_mac8x8 0xf4 IO__w4014_mac8x8 0xf0 IO__w4014_mac8x8 0xec IO__w4014_mac8x8 0xe8 IO__w4014_mac8x8 0xe4 IO__w4014_mac8x8 0xe0 IO__w4014_mac8x8 0xdc IO__w4014_mac8x8 0xd8 IO__w4014_mac8x8 0xd4 IO__w4014_mac8x8 0xd0 IO__w4014_mac8x8 0xcc IO__w4014_mac8x8 0xc8 IO__w4014_mac8x8 0xc4 IO__w4014_mac8x8 0xc0 IO__w4014_mac8x8 0xbc IO__w4014_mac8x8 0xb8 IO__w4014_mac8x8 0xb4 IO__w4014_mac8x8 0xb0 IO__w4014_mac8x8 0xac IO__w4014_mac8x8 0xa8 IO__w4014_mac8x8 0xa4 IO__w4014_mac8x8 0xa0 IO__w4014_mac8x8 0x9c IO__w4014_mac8x8 0x98 IO__w4014_mac8x8 0x94 IO__w4014_mac8x8 0x90 IO__w4014_mac8x8 0x8c IO__w4014_mac8x8 0x88 IO__w4014_mac8x8 0x84 IO__w4014_mac8x8 0x80 IO__w4014_mac8x8 0x7c IO__w4014_mac8x8 0x78 IO__w4014_mac8x8 0x74 IO__w4014_mac8x8 0x70 IO__w4014_mac8x8 0x6c IO__w4014_mac8x8 0x68 IO__w4014_mac8x8 0x64 IO__w4014_mac8x8 0x60 IO__w4014_mac8x8 0x5c IO__w4014_mac8x8 0x58 IO__w4014_mac8x8 0x54 IO__w4014_mac8x8 0x50 IO__w4014_mac8x8 0x4c IO__w4014_mac8x8 0x48 IO__w4014_mac8x8 0x44 IO__w4014_mac8x8 0x40 IO__w4014_mac8x8 0x3c IO__w4014_mac8x8 0x38 IO__w4014_mac8x8 0x34 IO__w4014_mac8x8 0x30 IO__w4014_mac8x8 0x2c IO__w4014_mac8x8 0x28 IO__w4014_mac8x8 0x24 IO__w4014_mac8x8 0x20 IO__w4014_mac8x8 0x1c IO__w4014_mac8x8 0x18 IO__w4014_mac8x8 0x14 IO__w4014_mac8x8 0x10 IO__w4014_mac8x8 0x0c IO__w4014_mac8x8 0x08 IO__w4014_mac8x8 0x04 IO__w4014_mac8x8 0x00 // Are extra sprites already loaded? bit $_IO_4014_SpriteSize bpl $+b_1 // Change mode .mx 0x00 rep #0x30 // Clear the second half of sprite memory and extra bits lda #0xf000 ldx #0x001c b_loop: sta $_Sprites_Buffer+0x100,x sta $_Sprites_Buffer+0x120,x sta $_Sprites_Buffer+0x140,x sta $_Sprites_Buffer+0x160,x sta $_Sprites_Buffer+0x180,x sta $_Sprites_Buffer+0x1a0,x sta $_Sprites_Buffer+0x1c0,x sta $_Sprites_Buffer+0x1e0,x stz $_Sprites_Buffer+0x200,x dex dex dex dex bpl $-b_loop // Change mode .mx 0x30 sep #0x30 b_1: // Queue sprite DMA (TODO: No priority transfer) lda #.VramQ_SpriteXfer8x8 sta $0x2180 tsc inc a lsr a sta $0x2180 // Change mode .mx 0x20 rep #0x10 // Save sprite size stz $_IO_4014_SpriteSize // Fill remaining space in the sprite buffer tsx lda #0xf0 jmp ($_IO__w4014_FillSwitch+1-Sprites_Buffer,x) IO__w4014_8x8_limit: // Change mode .mx 0x00 rep #0x31 // Change DP to point to Nes sprite lda $_IO_Temp-1 tcd // Keep stack pointer and replace it to the sprite buffer tsc sta $_IO_Temp16 // Replace stack pointer to the sprite buffer lda #_Sprites_Buffer+0x0ff tcs // Change mode .mx 0x30 sep #0x30 // Nes: Y, T, A, X // Snes: X, Y, T, A // Update sprite 0 hit, assume carry clear from REP lda $0x00 adc $=RomInfo_SpriteZeroOffset bcc $+b_1 lda #0xf0 b_1: sta $_Sprite0Line // Which sprite bank to use? lda $_IO_2000_EarlyValue lsr a lsr a lsr a eor $_IO_MapperChrBankSwap and #0x01 sta $_IO_Temp // Convert all sprites ldy #0xef IO__w4014_mac8x8 0x00 IO__w4014_mac8x8 0x04 IO__w4014_mac8x8 0x08 IO__w4014_mac8x8 0x0c IO__w4014_mac8x8 0x10 IO__w4014_mac8x8 0x14 IO__w4014_mac8x8 0x18 IO__w4014_mac8x8 0x1c IO__w4014_mac8x8 0x20 IO__w4014_mac8x8 0x24 IO__w4014_mac8x8 0x28 IO__w4014_mac8x8 0x2c IO__w4014_mac8x8 0x30 IO__w4014_mac8x8 0x34 IO__w4014_mac8x8 0x38 IO__w4014_mac8x8 0x3c IO__w4014_mac8x8 0x40 IO__w4014_mac8x8 0x44 IO__w4014_mac8x8 0x48 IO__w4014_mac8x8 0x4c IO__w4014_mac8x8 0x50 IO__w4014_mac8x8 0x54 IO__w4014_mac8x8 0x58 IO__w4014_mac8x8 0x5c IO__w4014_mac8x8 0x60 IO__w4014_mac8x8 0x64 IO__w4014_mac8x8 0x68 IO__w4014_mac8x8 0x6c IO__w4014_mac8x8 0x70 IO__w4014_mac8x8 0x74 IO__w4014_mac8x8 0x78 IO__w4014_mac8x8 0x7c IO__w4014_mac8x8 0x80 IO__w4014_mac8x8 0x84 IO__w4014_mac8x8 0x88 IO__w4014_mac8x8 0x8c IO__w4014_mac8x8 0x90 IO__w4014_mac8x8 0x94 IO__w4014_mac8x8 0x98 IO__w4014_mac8x8 0x9c IO__w4014_mac8x8 0xa0 IO__w4014_mac8x8 0xa4 IO__w4014_mac8x8 0xa8 IO__w4014_mac8x8 0xac IO__w4014_mac8x8 0xb0 IO__w4014_mac8x8 0xb4 IO__w4014_mac8x8 0xb8 IO__w4014_mac8x8 0xbc IO__w4014_mac8x8 0xc0 IO__w4014_mac8x8 0xc4 IO__w4014_mac8x8 0xc8 IO__w4014_mac8x8 0xcc IO__w4014_mac8x8 0xd0 IO__w4014_mac8x8 0xd4 IO__w4014_mac8x8 0xd8 IO__w4014_mac8x8 0xdc IO__w4014_mac8x8 0xe0 IO__w4014_mac8x8 0xe4 IO__w4014_mac8x8 0xe8 IO__w4014_mac8x8 0xec IO__w4014_mac8x8 0xf0 IO__w4014_mac8x8 0xf4 IO__w4014_mac8x8 0xf8 IO__w4014_mac8x8 0xfc // Are extra sprites already loaded? bit $_IO_4014_SpriteSize bpl $+b_1 // Change mode .mx 0x00 rep #0x30 // Adjust sprite size ldx #0xffff stx $_Sprites_Buffer+0x210 ldx #0x55ff stx $_Sprites_Buffer+0x212 ldx #0x5555 stx $_Sprites_Buffer+0x214 stx $_Sprites_Buffer+0x216 stx $_Sprites_Buffer+0x218 stx $_Sprites_Buffer+0x21a stx $_Sprites_Buffer+0x21c stx $_Sprites_Buffer+0x21e // Write 60 8x8 sprites, 2 for each 8 lines (some of which are overwritten after this loop) lda #0xf000 ldx #0x0074 sec b_loop: sbc #0x0800 sta $_Sprites_Buffer+0x110,x sta $_Sprites_Buffer+0x188,x dex dex dex dex bpl $-b_loop // Write big sprites stz $_Sprites_Buffer+0x100 stz $_Sprites_Buffer+0x110 stz $_Sprites_Buffer+0x120 lda #0xc000 sta $_Sprites_Buffer+0x104 sta $_Sprites_Buffer+0x114 sta $_Sprites_Buffer+0x124 asl a sta $_Sprites_Buffer+0x108 sta $_Sprites_Buffer+0x118 sta $_Sprites_Buffer+0x128 lsr a sta $_Sprites_Buffer+0x10c sta $_Sprites_Buffer+0x11c sta $_Sprites_Buffer+0x12c // Change mode .mx 0x30 sep #0x30 b_1: // Change mode .mx 0x20 rep #0x10 // Queue sprite DMA lda #.VramQ_SpriteXfer8x8 sta $0x2180 tsc inc a lsr a sta $0x2180 // Do we have 8 free sprites? tsx cpx #_Sprites_Buffer+0x021 bcc $+b_1 // Are these 8 sprites already written? lda #0x01 and $_IO_4014_SpriteSize bne $+b_2 // Move our 8 sprites offscreen ldy #0x5555 sty $_Sprites_Buffer+0x200 // Write our 8 sprites ldy #0x0000 sty $_Sprites_Buffer+0x000 ldy #0x0800 sty $_Sprites_Buffer+0x004 ldy #0x1000 sty $_Sprites_Buffer+0x008 ldy #0x1800 sty $_Sprites_Buffer+0x00c ldy #0x2000 sty $_Sprites_Buffer+0x010 ldy #0x2800 sty $_Sprites_Buffer+0x014 ldy #0x3000 sty $_Sprites_Buffer+0x018 ldy #0x3800 sty $_Sprites_Buffer+0x01c // Save sprite size lda #0x01 sta $_IO_4014_SpriteSize b_2: // Fill remaining space in the sprite buffer (Except first 8 sprites) //tsx lda #0xf0 jmp ($_IO__w4014_FillSwitch2+1-Sprites_Buffer,x) b_1: // Move sprites on screen stz $_Sprites_Buffer+0x200 stz $_Sprites_Buffer+0x201 // Save sprite size stz $_IO_4014_SpriteSize // Fill remaining space in the sprite buffer //tsx lda #0xf0 jmp ($_IO__w4014_FillSwitch+1-Sprites_Buffer,x) .mx 0x30 IO__w4014_8x16: // Sprite limit? lda $=RomInfo_SpriteLimit bpl $+IO__w4014_8x16_nolimit jmp $_IO__w4014_8x16_limit IO__w4014_8x16_nolimit: // Change mode and clear carry for sprite 0 math .mx 0x10 rep #0x21 // Change DP to point to Nes sprite lda $_IO_Temp-1 tcd // Keep stack pointer tsc sta $_IO_Temp16 // Replace stack pointer to the sprite buffer lda #_Sprites_Buffer+0x1ff tcs // Change mode .mx 0x30 sep #0x30 // Which sprite bank to use? lda $_IO_MapperChrBankSwap and #0x01 sta $_IO_Temp // Nes: Y, T, A, X // Snes: X, Y, T, A // Update sprite 0 hit, assume carry clear from REP lda $0x00 adc $=RomInfo_SpriteZeroOffset bcc $+b_1 lda #0xf0 b_1: sta $_Sprite0Line lda #0xef IO__w4014_mac8x16_nolimit 0xfc IO__w4014_mac8x16_nolimit 0xf8 IO__w4014_mac8x16_nolimit 0xf4 IO__w4014_mac8x16_nolimit 0xf0 IO__w4014_mac8x16_nolimit 0xec IO__w4014_mac8x16_nolimit 0xe8 IO__w4014_mac8x16_nolimit 0xe4 IO__w4014_mac8x16_nolimit 0xe0 IO__w4014_mac8x16_nolimit 0xdc IO__w4014_mac8x16_nolimit 0xd8 IO__w4014_mac8x16_nolimit 0xd4 IO__w4014_mac8x16_nolimit 0xd0 IO__w4014_mac8x16_nolimit 0xcc IO__w4014_mac8x16_nolimit 0xc8 IO__w4014_mac8x16_nolimit 0xc4 IO__w4014_mac8x16_nolimit 0xc0 IO__w4014_mac8x16_nolimit 0xbc IO__w4014_mac8x16_nolimit 0xb8 IO__w4014_mac8x16_nolimit 0xb4 IO__w4014_mac8x16_nolimit 0xb0 IO__w4014_mac8x16_nolimit 0xac IO__w4014_mac8x16_nolimit 0xa8 IO__w4014_mac8x16_nolimit 0xa4 IO__w4014_mac8x16_nolimit 0xa0 IO__w4014_mac8x16_nolimit 0x9c IO__w4014_mac8x16_nolimit 0x98 IO__w4014_mac8x16_nolimit 0x94 IO__w4014_mac8x16_nolimit 0x90 IO__w4014_mac8x16_nolimit 0x8c IO__w4014_mac8x16_nolimit 0x88 IO__w4014_mac8x16_nolimit 0x84 IO__w4014_mac8x16_nolimit 0x80 IO__w4014_mac8x16_nolimit 0x7c IO__w4014_mac8x16_nolimit 0x78 IO__w4014_mac8x16_nolimit 0x74 IO__w4014_mac8x16_nolimit 0x70 IO__w4014_mac8x16_nolimit 0x6c IO__w4014_mac8x16_nolimit 0x68 IO__w4014_mac8x16_nolimit 0x64 IO__w4014_mac8x16_nolimit 0x60 IO__w4014_mac8x16_nolimit 0x5c IO__w4014_mac8x16_nolimit 0x58 IO__w4014_mac8x16_nolimit 0x54 IO__w4014_mac8x16_nolimit 0x50 IO__w4014_mac8x16_nolimit 0x4c IO__w4014_mac8x16_nolimit 0x48 IO__w4014_mac8x16_nolimit 0x44 IO__w4014_mac8x16_nolimit 0x40 IO__w4014_mac8x16_nolimit 0x3c IO__w4014_mac8x16_nolimit 0x38 IO__w4014_mac8x16_nolimit 0x34 IO__w4014_mac8x16_nolimit 0x30 IO__w4014_mac8x16_nolimit 0x2c IO__w4014_mac8x16_nolimit 0x28 IO__w4014_mac8x16_nolimit 0x24 IO__w4014_mac8x16_nolimit 0x20 IO__w4014_mac8x16_nolimit 0x1c IO__w4014_mac8x16_nolimit 0x18 IO__w4014_mac8x16_nolimit 0x14 IO__w4014_mac8x16_nolimit 0x10 IO__w4014_mac8x16_nolimit 0x0c IO__w4014_mac8x16_nolimit 0x08 IO__w4014_mac8x16_nolimit 0x04 IO__w4014_mac8x16_nolimit 0x00 // Queue sprite DMA (TODO: No priority transfer) lda #.VramQ_SpriteXfer8x8 sta $0x2180 tsc inc a lsr a sta $0x2180 // Change mode .mx 0x20 rep #0x10 // Save sprite size and fill remaining space in the sprite buffer tsx lda #0xf0 sta $_IO_4014_SpriteSize jmp ($_IO__w4014_FillSwitch+1-Sprites_Buffer,x) IO__w4014_8x16_limit: // Change mode and clear carry for sprite 0 math .mx 0x10 rep #0x21 // Change DP to point to Nes sprite lda $_IO_Temp-1 tcd // Keep stack pointer tsc sta $_IO_Temp16 // Reset sprite count per scanline lda #_Sprites_CountdownPer8Lines+0x1d tcs lda #0x0808 pha pha pha pha pha pha pha pha pha pha pha pha pha pha pha // Replace stack pointer to the sprite buffer (Already done from overriding extra attribute bits) //lda #_Sprites_Buffer+0x1ff //tcs // Change mode .mx 0x30 sep #0x30 // Which sprite bank to use? lda $_IO_MapperChrBankSwap and #0x01 sta $_IO_Temp // Nes: Y, T, A, X // Snes: X, Y, T, A // Update sprite 0 hit, assume carry clear from REP lda $0x00 adc $=RomInfo_SpriteZeroOffset bcc $+b_1 lda #0xf0 b_1: sta $_Sprite0Line lda #0xef IO__w4014_mac8x16 0x00, "//" IO__w4014_mac8x16 0x04, "//" IO__w4014_mac8x16 0x08, "//" IO__w4014_mac8x16 0x0c, "//" IO__w4014_mac8x16 0x10, "//" IO__w4014_mac8x16 0x14, "//" IO__w4014_mac8x16 0x18, "//" IO__w4014_mac8x16 0x1c, "//" IO__w4014_mac8x16 0x20, "//" IO__w4014_mac8x16 0x24, "//" IO__w4014_mac8x16 0x28, "//" IO__w4014_mac8x16 0x2c, "//" IO__w4014_mac8x16 0x30, "//" IO__w4014_mac8x16 0x34, "//" IO__w4014_mac8x16 0x38, "//" IO__w4014_mac8x16 0x3c, "//" IO__w4014_mac8x16 0x40, "//" IO__w4014_mac8x16 0x44, "//" IO__w4014_mac8x16 0x48, "//" IO__w4014_mac8x16 0x4c, "//" IO__w4014_mac8x16 0x50, "//" IO__w4014_mac8x16 0x54, "//" IO__w4014_mac8x16 0x58, "//" IO__w4014_mac8x16 0x5c, "//" IO__w4014_mac8x16 0x60, "//" IO__w4014_mac8x16 0x64, "//" IO__w4014_mac8x16 0x68, "//" IO__w4014_mac8x16 0x6c, "//" IO__w4014_mac8x16 0x70, "//" IO__w4014_mac8x16 0x74, "//" IO__w4014_mac8x16 0x78, "//" IO__w4014_mac8x16 0x7c, "//" IO__w4014_mac8x16 0x80, "//" IO__w4014_mac8x16 0x84, "//" IO__w4014_mac8x16 0x88, "//" IO__w4014_mac8x16 0x8c, "//" IO__w4014_mac8x16 0x90, "//" IO__w4014_mac8x16 0x94, "//" IO__w4014_mac8x16 0x98, "//" IO__w4014_mac8x16 0x9c, "//" IO__w4014_mac8x16 0xa0, "//" IO__w4014_mac8x16 0xa4, "//" IO__w4014_mac8x16 0xa8, "//" IO__w4014_mac8x16 0xac, "//" IO__w4014_mac8x16 0xb0, "//" IO__w4014_mac8x16 0xb4, "//" IO__w4014_mac8x16 0xb8, "//" IO__w4014_mac8x16 0xbc, "//" IO__w4014_mac8x16 0xc0, "//" IO__w4014_mac8x16 0xc4, "//" IO__w4014_mac8x16 0xc8, "//" IO__w4014_mac8x16 0xcc, "//" IO__w4014_mac8x16 0xd0, "//" IO__w4014_mac8x16 0xd4, "//" IO__w4014_mac8x16 0xd8, "//" IO__w4014_mac8x16 0xdc, "//" IO__w4014_mac8x16 0xe0, "//" IO__w4014_mac8x16 0xe4, "//" IO__w4014_mac8x16 0xe8, "//" IO__w4014_mac8x16 0xec, "//" IO__w4014_mac8x16 0xf0, "//" IO__w4014_mac8x16 0xf4, "//" IO__w4014_mac8x16 0xf8, "//" IO__w4014_mac8x16 0xfc, "//" // Queue sprite transfer with sprite priority .mx 0x10 rep #0x20 tsc lsr a inc a tax cmp #_Sprites_Buffer/2+0x100 bne $+b_1 // No sprite on screen ldy #.VramQ_SpriteXferEmpty sty $0x2180 bra $+b_2 b_1: ldy #.VramQ_SpriteXfer8x16 sty $0x2180 stx $0x2180 b_2: // Adjust our pointer from 1-byte empty address to 4-byte full offset .mx 0x00 rep #0x30 txa asl a tax // Add 12 big sprites sbc #_Zero-1+0x30 // Do we have enough free space? jmi $_IO__w4014_8x16_exit tax // Add big sprites regardless of need, at least in this version stz $_Sprites_Buffer+0x00,x stz $_Sprites_Buffer+0x10,x stz $_Sprites_Buffer+0x20,x lda #0xc000 sta $_Sprites_Buffer+0x04,x sta $_Sprites_Buffer+0x14,x sta $_Sprites_Buffer+0x24,x asl a sta $_Sprites_Buffer+0x08,x sta $_Sprites_Buffer+0x18,x sta $_Sprites_Buffer+0x28,x lsr a sta $_Sprites_Buffer+0x0c,x sta $_Sprites_Buffer+0x1c,x sta $_Sprites_Buffer+0x2c,x .macro IO__w4014_SpriteLimit_mac8x16 linePair //lda #0x0080 bit $_Sprites_CountdownPer8Lines+{0} bmi $+b_both beq $+b_none b_even: // 00f0 // Reserve 2 sprites txa sec sbc #8 jmi $_IO__w4014_8x16_exit tax // Add 2 sprites lda #_Zero+{0}*0x800 sta $_Sprites_Buffer+0x00,x sta $_Sprites_Buffer+0x04,x // Next lda #0x0080 bra $+b_none b_both: // f0f0 beq $+b_odd // Reserve 4 sprites txa sec sbc #16 jmi $_IO__w4014_8x16_exit tax // Add 4 sprites lda #_Zero+{0}*0x800 sta $_Sprites_Buffer+0x00,x sta $_Sprites_Buffer+0x04,x lda #_Zero+{0}*0x800+0x800 sta $_Sprites_Buffer+0x08,x sta $_Sprites_Buffer+0x0c,x // Next lda #0x0080 bra $+b_none b_odd: // f000 // Reserve 2 sprites txa sec sbc #8 jmi $_IO__w4014_8x16_exit tax // Add 2 sprites lda #_Zero+{0}*0x800+0x800 sta $_Sprites_Buffer+0x00,x sta $_Sprites_Buffer+0x04,x // Next lda #0x0080 //bra $+b_none b_none: // 0000 .endm lda #0x0080 IO__w4014_SpriteLimit_mac8x16 0x00 IO__w4014_SpriteLimit_mac8x16 0x02 IO__w4014_SpriteLimit_mac8x16 0x04 IO__w4014_SpriteLimit_mac8x16 0x06 IO__w4014_SpriteLimit_mac8x16 0x08 IO__w4014_SpriteLimit_mac8x16 0x0a IO__w4014_SpriteLimit_mac8x16 0x0c IO__w4014_SpriteLimit_mac8x16 0x0e IO__w4014_SpriteLimit_mac8x16 0x10 IO__w4014_SpriteLimit_mac8x16 0x12 IO__w4014_SpriteLimit_mac8x16 0x14 IO__w4014_SpriteLimit_mac8x16 0x16 IO__w4014_SpriteLimit_mac8x16 0x18 IO__w4014_SpriteLimit_mac8x16 0x1a IO__w4014_SpriteLimit_mac8x16 0x1c //IO__w4014_SpriteLimit_mac8x16 0x1e IO__w4014_8x16_exit: sep #0x20 .mx 0x20 // Save sprite size, write any non-zero value for 8x16 lda #0xf0 sta $_IO_4014_SpriteSize // Fill remaining space in the sprite buffer //lda #0xf0 jmp ($_IO__w4014_FillSwitch,x) IO__w4014_FillSwitch: switch 0x200, IO__w4014_FillSwitch_End, IO__w4014_FillSwitch_End .macro IO__w4014_FillSwitch_mac case {0} sta $_Sprites_Buffer+1+{0}*2-4 .endm .macro IO__w4014_FillSwitch_mac2 IO__w4014_FillSwitch_mac {0}e IO__w4014_FillSwitch_mac {0}c IO__w4014_FillSwitch_mac {0}a IO__w4014_FillSwitch_mac {0}8 IO__w4014_FillSwitch_mac {0}6 IO__w4014_FillSwitch_mac {0}4 IO__w4014_FillSwitch_mac {0}2 {1}IO__w4014_FillSwitch_mac {0}0 .endm IO__w4014_FillSwitch_mac2 0x1f, "" IO__w4014_FillSwitch_mac2 0x1e, "" IO__w4014_FillSwitch_mac2 0x1d, "" IO__w4014_FillSwitch_mac2 0x1c, "" IO__w4014_FillSwitch_mac2 0x1b, "" IO__w4014_FillSwitch_mac2 0x1a, "" IO__w4014_FillSwitch_mac2 0x19, "" IO__w4014_FillSwitch_mac2 0x18, "" IO__w4014_FillSwitch_mac2 0x17, "" IO__w4014_FillSwitch_mac2 0x16, "" IO__w4014_FillSwitch_mac2 0x15, "" IO__w4014_FillSwitch_mac2 0x14, "" IO__w4014_FillSwitch_mac2 0x13, "" IO__w4014_FillSwitch_mac2 0x12, "" IO__w4014_FillSwitch_mac2 0x11, "" IO__w4014_FillSwitch_mac2 0x10, "" IO__w4014_FillSwitch_mac2 0x0f, "" IO__w4014_FillSwitch_mac2 0x0e, "" IO__w4014_FillSwitch_mac2 0x0d, "" IO__w4014_FillSwitch_mac2 0x0c, "" IO__w4014_FillSwitch_mac2 0x0b, "" IO__w4014_FillSwitch_mac2 0x0a, "" IO__w4014_FillSwitch_mac2 0x09, "" IO__w4014_FillSwitch_mac2 0x08, "" IO__w4014_FillSwitch_mac2 0x07, "" IO__w4014_FillSwitch_mac2 0x06, "" IO__w4014_FillSwitch_mac2 0x05, "" IO__w4014_FillSwitch_mac2 0x04, "" IO__w4014_FillSwitch_mac2 0x03, "" IO__w4014_FillSwitch_mac2 0x02, "" IO__w4014_FillSwitch_mac2 0x01, "" IO__w4014_FillSwitch_mac2 0x00, "//" IO__w4014_FillSwitch_End: // Fix DP rep #0x20 .mx 0x00 lda #0x0000 tcd // Fix stack pointer lda $_IO_Temp16 tcs // Change mode back sep #0x30 .mx 0x30 ply plx pla plb plp rtl IO__w4014_FillSwitch2: switch 0x200, IO__w4014_FillSwitch2_End, IO__w4014_FillSwitch2_End IO__w4014_FillSwitch_mac2 0x1f, "" IO__w4014_FillSwitch_mac2 0x1e, "" IO__w4014_FillSwitch_mac2 0x1d, "" IO__w4014_FillSwitch_mac2 0x1c, "" IO__w4014_FillSwitch_mac2 0x1b, "" IO__w4014_FillSwitch_mac2 0x1a, "" IO__w4014_FillSwitch_mac2 0x19, "" IO__w4014_FillSwitch_mac2 0x18, "" IO__w4014_FillSwitch_mac2 0x17, "" IO__w4014_FillSwitch_mac2 0x16, "" IO__w4014_FillSwitch_mac2 0x15, "" IO__w4014_FillSwitch_mac2 0x14, "" IO__w4014_FillSwitch_mac2 0x13, "" IO__w4014_FillSwitch_mac2 0x12, "" IO__w4014_FillSwitch_mac2 0x11, "" IO__w4014_FillSwitch_mac2 0x10, "" IO__w4014_FillSwitch_mac2 0x0f, "" IO__w4014_FillSwitch_mac2 0x0e, "" IO__w4014_FillSwitch_mac2 0x0d, "" IO__w4014_FillSwitch_mac2 0x0c, "" IO__w4014_FillSwitch_mac2 0x0b, "" IO__w4014_FillSwitch_mac2 0x0a, "" IO__w4014_FillSwitch_mac2 0x09, "" IO__w4014_FillSwitch_mac2 0x08, "" IO__w4014_FillSwitch_mac2 0x07, "" IO__w4014_FillSwitch_mac2 0x06, "" IO__w4014_FillSwitch_mac2 0x05, "" IO__w4014_FillSwitch_mac2 0x04, "" IO__w4014_FillSwitch_mac2 0x03, "" IO__w4014_FillSwitch_mac2 0x02, "" IO__w4014_FillSwitch_mac2 0x01, "//" IO__w4014_FillSwitch2_End: // Fix DP rep #0x20 .mx 0x00 lda #0x0000 tcd // Fix stack pointer lda $_IO_Temp16 tcs // Change mode back sep #0x30 .mx 0x30 ply plx pla plb plp rtl // Align to avoid page boundary crossing penalty (TODO: Move this to a better place within the bank) .align 0x100 IO__SpriteAttributeLUT: .data8 0x20, 0x22, 0x24, 0x26, 0x20, 0x22, 0x24, 0x26, 0x20, 0x22, 0x24, 0x26, 0x20, 0x22, 0x24, 0x26 .data8 0x20, 0x22, 0x24, 0x26, 0x20, 0x22, 0x24, 0x26, 0x20, 0x22, 0x24, 0x26, 0x20, 0x22, 0x24, 0x26 .data8 0x00, 0x02, 0x04, 0x06, 0x00, 0x02, 0x04, 0x06, 0x00, 0x02, 0x04, 0x06, 0x00, 0x02, 0x04, 0x06 .data8 0x00, 0x02, 0x04, 0x06, 0x00, 0x02, 0x04, 0x06, 0x00, 0x02, 0x04, 0x06, 0x00, 0x02, 0x04, 0x06 .data8 0x60, 0x62, 0x64, 0x66, 0x60, 0x62, 0x64, 0x66, 0x60, 0x62, 0x64, 0x66, 0x60, 0x62, 0x64, 0x66 .data8 0x60, 0x62, 0x64, 0x66, 0x60, 0x62, 0x64, 0x66, 0x60, 0x62, 0x64, 0x66, 0x60, 0x62, 0x64, 0x66 .data8 0x40, 0x42, 0x44, 0x46, 0x40, 0x42, 0x44, 0x46, 0x40, 0x42, 0x44, 0x46, 0x40, 0x42, 0x44, 0x46 .data8 0x40, 0x42, 0x44, 0x46, 0x40, 0x42, 0x44, 0x46, 0x40, 0x42, 0x44, 0x46, 0x40, 0x42, 0x44, 0x46 .data8 0xa0, 0xa2, 0xa4, 0xa6, 0xa0, 0xa2, 0xa4, 0xa6, 0xa0, 0xa2, 0xa4, 0xa6, 0xa0, 0xa2, 0xa4, 0xa6 .data8 0xa0, 0xa2, 0xa4, 0xa6, 0xa0, 0xa2, 0xa4, 0xa6, 0xa0, 0xa2, 0xa4, 0xa6, 0xa0, 0xa2, 0xa4, 0xa6 .data8 0x80, 0x82, 0x84, 0x86, 0x80, 0x82, 0x84, 0x86, 0x80, 0x82, 0x84, 0x86, 0x80, 0x82, 0x84, 0x86 .data8 0x80, 0x82, 0x84, 0x86, 0x80, 0x82, 0x84, 0x86, 0x80, 0x82, 0x84, 0x86, 0x80, 0x82, 0x84, 0x86 .data8 0xe0, 0xe2, 0xe4, 0xe6, 0xe0, 0xe2, 0xe4, 0xe6, 0xe0, 0xe2, 0xe4, 0xe6, 0xe0, 0xe2, 0xe4, 0xe6 .data8 0xe0, 0xe2, 0xe4, 0xe6, 0xe0, 0xe2, 0xe4, 0xe6, 0xe0, 0xe2, 0xe4, 0xe6, 0xe0, 0xe2, 0xe4, 0xe6 .data8 0xc0, 0xc2, 0xc4, 0xc6, 0xc0, 0xc2, 0xc4, 0xc6, 0xc0, 0xc2, 0xc4, 0xc6, 0xc0, 0xc2, 0xc4, 0xc6 .data8 0xc0, 0xc2, 0xc4, 0xc6, 0xc0, 0xc2, 0xc4, 0xc6, 0xc0, 0xc2, 0xc4, 0xc6, 0xc0, 0xc2, 0xc4, 0xc6 IO__SpriteAttributeLUT2: .data8 0x21, 0x23, 0x25, 0x27, 0x21, 0x23, 0x25, 0x27, 0x21, 0x23, 0x25, 0x27, 0x21, 0x23, 0x25, 0x27 .data8 0x21, 0x23, 0x25, 0x27, 0x21, 0x23, 0x25, 0x27, 0x21, 0x23, 0x25, 0x27, 0x21, 0x23, 0x25, 0x27 .data8 0x01, 0x03, 0x05, 0x07, 0x01, 0x03, 0x05, 0x07, 0x01, 0x03, 0x05, 0x07, 0x01, 0x03, 0x05, 0x07 .data8 0x01, 0x03, 0x05, 0x07, 0x01, 0x03, 0x05, 0x07, 0x01, 0x03, 0x05, 0x07, 0x01, 0x03, 0x05, 0x07 .data8 0x61, 0x63, 0x65, 0x67, 0x61, 0x63, 0x65, 0x67, 0x61, 0x63, 0x65, 0x67, 0x61, 0x63, 0x65, 0x67 .data8 0x61, 0x63, 0x65, 0x67, 0x61, 0x63, 0x65, 0x67, 0x61, 0x63, 0x65, 0x67, 0x61, 0x63, 0x65, 0x67 .data8 0x41, 0x43, 0x45, 0x47, 0x41, 0x43, 0x45, 0x47, 0x41, 0x43, 0x45, 0x47, 0x41, 0x43, 0x45, 0x47 .data8 0x41, 0x43, 0x45, 0x47, 0x41, 0x43, 0x45, 0x47, 0x41, 0x43, 0x45, 0x47, 0x41, 0x43, 0x45, 0x47 .data8 0xa1, 0xa3, 0xa5, 0xa7, 0xa1, 0xa3, 0xa5, 0xa7, 0xa1, 0xa3, 0xa5, 0xa7, 0xa1, 0xa3, 0xa5, 0xa7 .data8 0xa1, 0xa3, 0xa5, 0xa7, 0xa1, 0xa3, 0xa5, 0xa7, 0xa1, 0xa3, 0xa5, 0xa7, 0xa1, 0xa3, 0xa5, 0xa7 .data8 0x81, 0x83, 0x85, 0x87, 0x81, 0x83, 0x85, 0x87, 0x81, 0x83, 0x85, 0x87, 0x81, 0x83, 0x85, 0x87 .data8 0x81, 0x83, 0x85, 0x87, 0x81, 0x83, 0x85, 0x87, 0x81, 0x83, 0x85, 0x87, 0x81, 0x83, 0x85, 0x87 .data8 0xe1, 0xe3, 0xe5, 0xe7, 0xe1, 0xe3, 0xe5, 0xe7, 0xe1, 0xe3, 0xe5, 0xe7, 0xe1, 0xe3, 0xe5, 0xe7 .data8 0xe1, 0xe3, 0xe5, 0xe7, 0xe1, 0xe3, 0xe5, 0xe7, 0xe1, 0xe3, 0xe5, 0xe7, 0xe1, 0xe3, 0xe5, 0xe7 .data8 0xc1, 0xc3, 0xc5, 0xc7, 0xc1, 0xc3, 0xc5, 0xc7, 0xc1, 0xc3, 0xc5, 0xc7, 0xc1, 0xc3, 0xc5, 0xc7 .data8 0xc1, 0xc3, 0xc5, 0xc7, 0xc1, 0xc3, 0xc5, 0xc7, 0xc1, 0xc3, 0xc5, 0xc7, 0xc1, 0xc3, 0xc5, 0xc7 IO__SR3: .fill 8, 0x00 .fill 8, 0x01 .fill 8, 0x02 .fill 8, 0x03 .fill 8, 0x04 .fill 8, 0x05 .fill 8, 0x06 .fill 8, 0x07 .fill 8, 0x08 .fill 8, 0x09 .fill 8, 0x0a .fill 8, 0x0b .fill 8, 0x0c .fill 8, 0x0d .fill 8, 0x0e .fill 8, 0x0f .fill 8, 0x10 .fill 8, 0x11 .fill 8, 0x12 .fill 8, 0x13 .fill 8, 0x14 .fill 8, 0x15 .fill 8, 0x16 .fill 8, 0x17 .fill 8, 0x18 .fill 8, 0x19 .fill 8, 0x1a .fill 8, 0x1b .fill 8, 0x1c .fill 8, 0x1d .fill 8, 0x1e .fill 8, 0x1f // --------------------------------------------------------------------------- // Sound registers IO__w4000_Switch_Trap: trap Exception "IO Index Failed{}{}{}A direct indexed IO access in page 0x40 failed." IO__w4000_Switch: switch 0x80, IO__w4000_Switch_Trap, IO__w4000_Switch_Trap caseat 0x00, IO__w4000_ind caseat 0x01, IO__w4001_ind caseat 0x02, IO__w4002_ind caseat 0x03, IO__w4003_ind caseat 0x04, IO__w4004_ind caseat 0x05, IO__w4005_ind caseat 0x06, IO__w4006_ind caseat 0x07, IO__w4007_ind caseat 0x08, IO__w4008_ind caseat 0x09, IO__w4009_ind caseat 0x0a, IO__w400a_ind caseat 0x0b, IO__w400b_ind caseat 0x0c, IO__w400c_ind caseat 0x0d, IO__w400d_ind caseat 0x0e, IO__w400e_ind caseat 0x0f, IO__w400f_ind caseat 0x10, IO__w4010_ind caseat 0x11, IO__w4011_ind caseat 0x12, IO__w4012_ind caseat 0x13, IO__w4013_ind caseat 0x15, IO__w4015_ind .macro IO_w40xx offset, indexReg php phx xba //lda $_Addition+{0},{1} t{1}a asl a tax jmp ($_IO__w4000_Switch+{0}*2,x) .endm .macro IO_w40xx_Return plx plp rtl .endm IO__w4000_a_x: IO_w40xx 0x00, x IO__w4000_a_y: IO_w40xx 0x00, y IO__w4001_a_x: IO_w40xx 0x01, x IO__w4001_a_y: IO_w40xx 0x01, y IO__w4002_a_x: IO_w40xx 0x02, x IO__w4002_a_y: IO_w40xx 0x02, y IO__w4003_a_x: IO_w40xx 0x03, x IO__w4003_a_y: IO_w40xx 0x03, y IO__w4004_a_x: IO_w40xx 0x04, x IO__w4004_a_y: IO_w40xx 0x04, y IO__w4005_a_x: IO_w40xx 0x05, x IO__w4005_a_y: IO_w40xx 0x05, y IO__w4006_a_x: IO_w40xx 0x06, x IO__w4006_a_y: IO_w40xx 0x06, y IO__w4007_a_x: IO_w40xx 0x07, x IO__w4007_a_y: IO_w40xx 0x07, y IO__w4008_a_x: IO_w40xx 0x08, x IO__w4008_a_y: IO_w40xx 0x08, y IO__w4009_a_x: IO_w40xx 0x09, x IO__w4009_a_y: IO_w40xx 0x09, y IO__w400a_a_x: IO_w40xx 0x0a, x IO__w400a_a_y: IO_w40xx 0x0a, y IO__w400b_a_x: IO_w40xx 0x0b, x IO__w400b_a_y: IO_w40xx 0x0b, y IO__w400c_a_x: IO_w40xx 0x0c, x IO__w400c_a_y: IO_w40xx 0x0c, y IO__w400d_a_x: IO_w40xx 0x0d, x IO__w400d_a_y: IO_w40xx 0x0d, y IO__w400e_a_x: IO_w40xx 0x0e, x IO__w400e_a_y: IO_w40xx 0x0e, y IO__w400f_a_x: IO_w40xx 0x0f, x IO__w400f_a_y: IO_w40xx 0x0f, y IO__w4010_a_x: IO_w40xx 0x10, x IO__w4010_a_y: IO_w40xx 0x10, y IO__w4011_a_x: IO_w40xx 0x11, x IO__w4011_a_y: IO_w40xx 0x11, y IO__w4012_a_x: IO_w40xx 0x12, x IO__w4012_a_y: IO_w40xx 0x12, y IO__w4013_a_x: IO_w40xx 0x13, x IO__w4013_a_y: IO_w40xx 0x13, y IO__r4000_a: IO__r4000_a_i: IO__r4000_x: IO__r4000_y: rtl IO__w4000_ind: xba sta $_Sound_NesRegs+0x0 IO_w40xx_Return IO__w4000_a_i: sta $_Sound_NesRegs+0x0 rtl IO__w4000_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0x0 b_1: CoreCall_End IO__w4000_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0x0 b_1: CoreCall_End IO__w4000_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0x0 b_1: CoreCall_End IO__r4001_a: IO__r4001_a_i: IO__r4001_x: IO__r4001_y: rtl IO__w4001_ind: lda #0x40 tsb $_Sound_ExtraControl xba sta $_Sound_NesRegs+0x1 IO_w40xx_Return IO__w4001_a_i: sta $_Sound_NesRegs+0x1 php xba lda #0x40 tsb $_Sound_ExtraControl xba plp rtl IO__w4001_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0x1 b_1: CoreCall_UseA8 CoreCall_UseN CoreCall_UseZ CoreCall_Push CoreCall_CopyUpTo +b_1 lda #0x40 tsb $_Sound_ExtraControl b_1: CoreCall_Pull CoreCall_End IO__w4001_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0x1 b_1: CoreCall_UseA8 CoreCall_UseN CoreCall_UseZ CoreCall_Push CoreCall_CopyUpTo +b_1 lda #0x40 tsb $_Sound_ExtraControl b_1: CoreCall_Pull CoreCall_End IO__w4001_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0x1 b_1: CoreCall_UseA8 CoreCall_UseN CoreCall_UseZ CoreCall_Push CoreCall_CopyUpTo +b_1 lda #0x40 tsb $_Sound_ExtraControl b_1: CoreCall_Pull CoreCall_End IO__r4002_a: IO__r4002_a_i: IO__r4002_x: IO__r4002_y: rtl IO__w4002_ind: xba sta $_Sound_NesRegs+0x2 IO_w40xx_Return IO__w4002_a_i: sta $_Sound_NesRegs+0x2 rtl IO__w4002_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0x2 b_1: CoreCall_End IO__w4002_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0x2 b_1: CoreCall_End IO__w4002_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0x2 b_1: CoreCall_End IO__r4003_a: IO__r4003_a_i: IO__r4003_x: IO__r4003_y: rtl .macro IO__w4003_Mac lda $=Sound__EmulateLengthCounter_length_d3_mixed,x sta $_Sound_square0_length lda #0x01 tsb $_Sound_NesRegs+0x15 tsb $_Sound_ExtraControl .endm IO__w4003_ind: xba sta $_Sound_NesRegs+0x3 tax IO__w4003_Mac txa IO_w40xx_Return IO__w4003_a_i: sta $_Sound_NesRegs+0x3 php phx tax IO__w4003_Mac txa plx plp rtl IO__w4003_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0x3 b_1: CoreCall_UseA8 CoreCall_UseN CoreCall_UseZ CoreCall_Push CoreCall_CopyUpTo +b_1 IO__w4003_Mac b_1: CoreCall_Pull CoreCall_End IO__w4003_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0x3 b_1: CoreCall_UseA8 CoreCall_UseX CoreCall_UseN CoreCall_UseZ CoreCall_Push CoreCall_CopyUpTo +b_1 tyx IO__w4003_Mac b_1: CoreCall_Pull CoreCall_End IO__w4003_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0x3 b_1: CoreCall_UseX CoreCall_UseN CoreCall_UseZ CoreCall_Push CoreCall_CopyUpTo +b_1 tax IO__w4003_Mac txa // Removed when A is unused b_1: CoreCall_IfNotFreeA +b_1 CoreCall_Remove 1 b_1: CoreCall_Pull CoreCall_End IO__r4004_a: IO__r4004_a_i: IO__r4004_x: IO__r4004_y: rtl IO__w4004_ind: xba sta $_Sound_NesRegs+0x4 IO_w40xx_Return IO__w4004_a_i: sta $_Sound_NesRegs+0x4 rtl IO__w4004_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0x4 b_1: CoreCall_End IO__w4004_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0x4 b_1: CoreCall_End IO__w4004_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0x4 b_1: CoreCall_End IO__r4005_a: IO__r4005_a_i: IO__r4005_x: IO__r4005_y: rtl IO__w4005_ind: lda #0x80 tsb $_Sound_ExtraControl xba sta $_Sound_NesRegs+0x5 IO_w40xx_Return IO__w4005_a_i: sta $_Sound_NesRegs+0x5 php xba lda #0x80 tsb $_Sound_ExtraControl xba plp rtl IO__w4005_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0x5 b_1: CoreCall_UseA8 CoreCall_UseN CoreCall_UseZ CoreCall_Push CoreCall_CopyUpTo +b_1 lda #0x80 tsb $_Sound_ExtraControl b_1: CoreCall_Pull CoreCall_End IO__w4005_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0x5 b_1: CoreCall_UseA8 CoreCall_UseN CoreCall_UseZ CoreCall_Push CoreCall_CopyUpTo +b_1 lda #0x80 tsb $_Sound_ExtraControl b_1: CoreCall_Pull CoreCall_End IO__w4005_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0x5 b_1: CoreCall_UseA8 CoreCall_UseN CoreCall_UseZ CoreCall_Push CoreCall_CopyUpTo +b_1 lda #0x80 tsb $_Sound_ExtraControl b_1: CoreCall_Pull CoreCall_End IO__r4006_a: IO__r4006_a_i: IO__r4006_x: IO__r4006_y: rtl IO__w4006_ind: xba sta $_Sound_NesRegs+0x6 IO_w40xx_Return IO__w4006_a_i: sta $_Sound_NesRegs+0x6 rtl IO__w4006_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0x6 b_1: CoreCall_End IO__w4006_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0x6 b_1: CoreCall_End IO__w4006_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0x6 b_1: CoreCall_End IO__r4007_a: IO__r4007_a_i: IO__r4007_x: IO__r4007_y: rtl .macro IO__w4007_Mac lda $=Sound__EmulateLengthCounter_length_d3_mixed,x sta $_Sound_square1_length lda #0x02 tsb $_Sound_NesRegs+0x15 tsb $_Sound_ExtraControl .endm IO__w4007_ind: xba sta $_Sound_NesRegs+0x7 tax IO__w4007_Mac txa IO_w40xx_Return IO__w4007_a_i: sta $_Sound_NesRegs+0x7 php phx tax IO__w4007_Mac txa plx plp rtl IO__w4007_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0x7 b_1: CoreCall_UseA8 CoreCall_UseN CoreCall_UseZ CoreCall_Push CoreCall_CopyUpTo +b_1 IO__w4007_Mac b_1: CoreCall_Pull CoreCall_End IO__w4007_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0x7 b_1: CoreCall_UseA8 CoreCall_UseX CoreCall_UseN CoreCall_UseZ CoreCall_Push CoreCall_CopyUpTo +b_1 tyx IO__w4007_Mac b_1: CoreCall_Pull CoreCall_End IO__w4007_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0x7 b_1: CoreCall_UseX CoreCall_UseN CoreCall_UseZ CoreCall_Push CoreCall_CopyUpTo +b_1 tax IO__w4007_Mac txa // Removed when A is unused b_1: CoreCall_IfNotFreeA +b_1 CoreCall_Remove 1 b_1: CoreCall_Pull CoreCall_End IO__r4008_a: IO__r4008_a_i: IO__r4008_x: IO__r4008_y: rtl IO__w4008_ind: xba sta $_Sound_NesRegs+0x8 IO_w40xx_Return IO__w4008_a_i: sta $_Sound_NesRegs+0x8 rtl IO__w4008_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0x8 b_1: CoreCall_End IO__w4008_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0x8 b_1: CoreCall_End IO__w4008_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0x8 b_1: CoreCall_End IO__r4009_a: IO__r4009_a_i: IO__r4009_x: IO__r4009_y: rtl IO__w4009_ind: xba sta $_Sound_NesRegs+0x9 IO_w40xx_Return IO__w4009_a_i: sta $_Sound_NesRegs+0x9 rtl IO__w4009_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0x9 b_1: CoreCall_End IO__w4009_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0x9 b_1: CoreCall_End IO__w4009_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0x9 b_1: CoreCall_End IO__r400a_a: IO__r400a_a_i: IO__r400a_x: IO__r400a_y: rtl IO__w400a_ind: xba sta $_Sound_NesRegs+0xa IO_w40xx_Return IO__w400a_a_i: sta $_Sound_NesRegs+0xa rtl IO__w400a_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0xa b_1: CoreCall_End IO__w400a_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0xa b_1: CoreCall_End IO__w400a_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0xa b_1: CoreCall_End IO__r400b_a: IO__r400b_a_i: IO__r400b_x: IO__r400b_y: rtl .macro IO__w400b_Mac lda #0x04 tsb $_Sound_ExtraControl tsb $_Sound_NesRegs+0x15 lda $=Sound__EmulateLengthCounter_length_d3_mixed,x sta $_Sound_triangle_length .endm IO__w400b_ind: xba sta $_Sound_NesRegs+0xb tax IO__w400b_Mac txa IO_w40xx_Return IO__w400b_a_i: sta $_Sound_NesRegs+0xb php phx tax IO__w400b_Mac txa plx plp rtl IO__w400b_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0xb b_1: CoreCall_UseA8 CoreCall_UseN CoreCall_UseZ CoreCall_Push CoreCall_CopyUpTo +b_1 IO__w400b_Mac b_1: CoreCall_Pull CoreCall_End IO__w400b_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0xb b_1: CoreCall_UseA8 CoreCall_UseX CoreCall_UseN CoreCall_UseZ CoreCall_Push CoreCall_CopyUpTo +b_1 tyx IO__w400b_Mac b_1: CoreCall_Pull CoreCall_End IO__w400b_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0xb b_1: CoreCall_UseX CoreCall_UseN CoreCall_UseZ CoreCall_Push CoreCall_CopyUpTo +b_1 tax IO__w400b_Mac txa // Removed when A is unused b_1: CoreCall_IfNotFreeA +b_1 CoreCall_Remove 1 b_1: CoreCall_Pull CoreCall_End IO__r400c_a: IO__r400c_a_i: IO__r400c_x: IO__r400c_y: rtl IO__w400c_ind: xba sta $_Sound_NesRegs+0xc IO_w40xx_Return IO__w400c_a_i: sta $_Sound_NesRegs+0xc rtl IO__w400c_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0xc b_1: CoreCall_End IO__w400c_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0xc b_1: CoreCall_End IO__w400c_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0xc b_1: CoreCall_End IO__r400d_a: IO__r400d_a_i: IO__r400d_x: IO__r400d_y: rtl IO__w400d_ind: xba sta $_Sound_NesRegs+0xd IO_w40xx_Return IO__w400d_a_i: sta $_Sound_NesRegs+0xd rtl IO__w400d_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0xd b_1: CoreCall_End IO__w400d_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0xd b_1: CoreCall_End IO__w400d_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0xd b_1: CoreCall_End IO__r400e_a: IO__r400e_a_i: IO__r400e_x: IO__r400e_y: rtl IO__w400e_ind: xba sta $_Sound_NesRegs+0xe IO_w40xx_Return IO__w400e_a_i: sta $_Sound_NesRegs+0xe rtl IO__w400e_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0xe b_1: CoreCall_End IO__w400e_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0xe b_1: CoreCall_End IO__w400e_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0xe b_1: CoreCall_End IO__r400f_a: IO__r400f_a_i: IO__r400f_x: IO__r400f_y: rtl .macro IO__w400f_Mac // Update length lda $=Sound__EmulateLengthCounter_length_d3_mixed,x sta $_Sound_noise_length // Enable noise lda #0x08 tsb $_Sound_NesRegs+0x15 tsb $_Sound_ExtraControl .endm IO__w400f_ind: xba sta $_Sound_NesRegs+0xf tax IO__w400f_Mac txa IO_w40xx_Return IO__w400f_a_i: sta $_Sound_NesRegs+0xf php phx tax IO__w400f_Mac txa plx plp rtl IO__w400f_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0xf b_1: CoreCall_UseA8 CoreCall_UseN CoreCall_UseZ CoreCall_Push CoreCall_CopyUpTo +b_1 IO__w400f_Mac b_1: CoreCall_Pull CoreCall_End IO__w400f_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0xf b_1: CoreCall_UseA8 CoreCall_UseX CoreCall_UseN CoreCall_UseZ CoreCall_Push CoreCall_CopyUpTo +b_1 tyx IO__w400f_Mac b_1: CoreCall_Pull CoreCall_End IO__w400f_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0xf b_1: CoreCall_UseX CoreCall_UseN CoreCall_UseZ CoreCall_Push CoreCall_CopyUpTo +b_1 tax IO__w400f_Mac txa // Removed when A is unused b_1: CoreCall_IfNotFreeA +b_1 CoreCall_Remove 1 b_1: CoreCall_Pull CoreCall_End IO__r4010_a: IO__r4010_a_i: IO__r4010_x: IO__r4010_y: rtl IO__w4010_ind: xba sta $_Sound_NesRegs+0x10 IO_w40xx_Return IO__w4010_a_i: sta $_Sound_NesRegs+0x10 rtl IO__w4010_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0x10 b_1: CoreCall_End IO__w4010_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0x10 b_1: CoreCall_End IO__w4010_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0x10 b_1: CoreCall_End IO__r4011_a: IO__r4011_a_i: IO__r4011_x: IO__r4011_y: rtl IO__w4011_ind: xba sta $_Sound_NesRegs+0x11 IO_w40xx_Return IO__w4011_a_i: sta $_Sound_NesRegs+0x11 rtl IO__w4011_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0x11 b_1: CoreCall_End IO__w4011_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0x11 b_1: CoreCall_End IO__w4011_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0x11 b_1: CoreCall_End IO__r4012_a: IO__r4012_a_i: IO__r4012_x: IO__r4012_y: rtl IO__w4012_ind: xba sta $_Sound_NesRegs+0x12 IO_w40xx_Return IO__w4012_a_i: sta $_Sound_NesRegs+0x12 rtl IO__w4012_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0x12 b_1: CoreCall_End IO__w4012_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0x12 b_1: CoreCall_End IO__w4012_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0x12 b_1: CoreCall_End IO__r4013_a: IO__r4013_a_i: IO__r4013_x: IO__r4013_y: rtl IO__w4013_ind: xba sta $_Sound_NesRegs+0x13 IO_w40xx_Return IO__w4013_a_i: sta $_Sound_NesRegs+0x13 rtl IO__w4013_a: CoreCall_Begin CoreCall_CopyUpTo +b_1 sta $_Sound_NesRegs+0x13 b_1: CoreCall_End IO__w4013_x: CoreCall_Begin CoreCall_CopyUpTo +b_1 stx $_Sound_NesRegs+0x13 b_1: CoreCall_End IO__w4013_y: CoreCall_Begin CoreCall_CopyUpTo +b_1 sty $_Sound_NesRegs+0x13 b_1: CoreCall_End IO__r4015_a: IO__r4015_a_i: IO__r4015_x: IO__r4015_y: php xba lda $_Sound_NesRegs+0x15 and #0x1f sta $_IO_Temp xba plp rtl IO__w4015_ind: plx xba sta $_IO_Temp bra $+IO__w4015_in2 IO__w4015_x: stx $_IO_Temp bra $+IO__w4015_in IO__w4015_y: sty $_IO_Temp bra $+IO__w4015_in IO__w4015_a: IO__w4015_a_i: sta $_IO_Temp //bra $+IO__w4015_in IO__w4015_in: php xba lda $_IO_Temp IO__w4015_in2: eor #0xff and #0x1f trb $_Sound_NesRegs+0x15 trb $_Sound_ExtraControl lsr $_IO_Temp bcs $+b_1 // Channel 0 //lda #0x20 //tsb $_Sound_NesRegs+0x0 stz $_Sound_NesRegs+0x3 stz $_Sound_square0_length b_1: lsr $_IO_Temp bcs $+b_1 // Channel 1 //lda #0x20 //tsb $_Sound_NesRegs+0x4 stz $_Sound_NesRegs+0x7 stz $_Sound_square1_length b_1: lsr $_IO_Temp bcs $+b_1 // Channel 2 //stz $_Sound_NesRegs+0x8 stz $_Sound_triangle_length b_1: lsr $_IO_Temp bcs $+b_1 // Channel 3 stz $_Sound_NesRegs+0xc stz $_Sound_noise_length b_1: xba plp rtl // --------------------------------------------------------------------------- // Input registers IO__r4016_a: IO__r4016_a_i: xba lda $0x4016 sta $_IO_Temp xba rtl IO__r4016_a_x: lda $0x4016,x rtl IO__r4016_a_y: lda $0x4016,y rtl IO__w4016_x: stx $0x4016 rtl IO__w4016_y: sty $0x4016 rtl IO__w4016_a: IO__w4016_a_i: sta $0x4016 rtl IO__r4017_a: IO__r4017_a_i: xba lda $0x4017 sta $_IO_Temp xba rtl IO__r4017_a_x: lda $0x4017,x rtl IO__r4017_a_y: lda $0x4017,y rtl IO__w4017_x: stx $0x4017 rtl IO__w4017_y: sty $0x4017 rtl IO__w4017_a: IO__w4017_a_i: sta $0x4017 rtl
; A257934: Expansion of 1/(1-x-x^2-x^3-x^4+x^5+x^6+x^7). ; 1,1,2,4,8,14,26,48,89,163,300,552,1016,1868,3436,6320,11625,21381,39326,72332,133040,244698,450070,827808,1522577,2800455,5150840,9473872,17425168,32049880,58948920,108423968,199422769,366795657,674642394,1240860820,2282298872,4197802086,7720961778 trn $0,1 seq $0,27084 ; G.f.: x^2*(x^2 + x + 1)/(x^4 - 2*x + 1). div $0,2 add $0,1
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/fis/model/Action.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace FIS { namespace Model { Action::Action() : m_idHasBeenSet(false), m_descriptionHasBeenSet(false), m_parametersHasBeenSet(false), m_targetsHasBeenSet(false), m_tagsHasBeenSet(false) { } Action::Action(JsonView jsonValue) : m_idHasBeenSet(false), m_descriptionHasBeenSet(false), m_parametersHasBeenSet(false), m_targetsHasBeenSet(false), m_tagsHasBeenSet(false) { *this = jsonValue; } Action& Action::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("id")) { m_id = jsonValue.GetString("id"); m_idHasBeenSet = true; } if(jsonValue.ValueExists("description")) { m_description = jsonValue.GetString("description"); m_descriptionHasBeenSet = true; } if(jsonValue.ValueExists("parameters")) { Aws::Map<Aws::String, JsonView> parametersJsonMap = jsonValue.GetObject("parameters").GetAllObjects(); for(auto& parametersItem : parametersJsonMap) { m_parameters[parametersItem.first] = parametersItem.second.AsObject(); } m_parametersHasBeenSet = true; } if(jsonValue.ValueExists("targets")) { Aws::Map<Aws::String, JsonView> targetsJsonMap = jsonValue.GetObject("targets").GetAllObjects(); for(auto& targetsItem : targetsJsonMap) { m_targets[targetsItem.first] = targetsItem.second.AsObject(); } m_targetsHasBeenSet = true; } if(jsonValue.ValueExists("tags")) { Aws::Map<Aws::String, JsonView> tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects(); for(auto& tagsItem : tagsJsonMap) { m_tags[tagsItem.first] = tagsItem.second.AsString(); } m_tagsHasBeenSet = true; } return *this; } JsonValue Action::Jsonize() const { JsonValue payload; if(m_idHasBeenSet) { payload.WithString("id", m_id); } if(m_descriptionHasBeenSet) { payload.WithString("description", m_description); } if(m_parametersHasBeenSet) { JsonValue parametersJsonMap; for(auto& parametersItem : m_parameters) { parametersJsonMap.WithObject(parametersItem.first, parametersItem.second.Jsonize()); } payload.WithObject("parameters", std::move(parametersJsonMap)); } if(m_targetsHasBeenSet) { JsonValue targetsJsonMap; for(auto& targetsItem : m_targets) { targetsJsonMap.WithObject(targetsItem.first, targetsItem.second.Jsonize()); } payload.WithObject("targets", std::move(targetsJsonMap)); } if(m_tagsHasBeenSet) { JsonValue tagsJsonMap; for(auto& tagsItem : m_tags) { tagsJsonMap.WithString(tagsItem.first, tagsItem.second); } payload.WithObject("tags", std::move(tagsJsonMap)); } return payload; } } // namespace Model } // namespace FIS } // namespace Aws
lc r4, 0x00000000 lc r5, 0x0000101f lc r6, 0x00000000 tlbse r6, r4 lc r8, 0x40000000 lc r9, 0x0000101f lc r10, 0x00000001 tlbse r10, r8 lc r11, 0xdeadbeef lc r12, 0x40000000 lc r13, 0x40000000 st4 r11, r12, 0 ex4 r30, r12, 0 halt #@expected values #r4 = 0x00000000 #r5 = 0x0000101f #r6 = 0x00000000 #tlb 0: # vpn = 0x00000 # os = 0x000 # ppn = 0x00001 # at = 0x01f #r8 = 0x40000000 #r9 = 0x0000101f #r10 = 0x00000001 #tlb 1: # vpn = 0x40000 # os = 0x000 # ppn = 0x00001 # at = 0x01f #r11 = 0xdeadbeef #r12 = 0x40000000 #r13 = 0x40000000 #r30 = 0xdeadbeef #pc = 0x80000048
; A065165: Permutation t->t+2 of Z, folded to N. ; 4,6,2,8,1,10,3,12,5,14,7,16,9,18,11,20,13,22,15,24,17,26,19,28,21,30,23,32,25,34,27,36,29,38,31,40,33,42,35,44,37,46,39,48,41,50,43,52,45,54,47,56,49,58,51,60,53,62,55,64,57,66,59,68,61,70,63,72,65,74,67,76,69,78,71,80,73,82,75,84,77,86,79,88,81,90,83,92,85,94,87,96,89,98,91,100,93,102,95,104 mov $1,1 mov $8,$0 add $0,1 mul $0,2 lpb $0 sub $2,4 mov $3,8 mov $4,6 add $5,$0 div $5,2 mod $5,2 mov $0,$5 mul $0,9 add $1,$5 mul $2,2 add $6,3 pow $6,2 add $3,$6 sub $7,1 sub $1,$7 sub $2,$7 sub $4,$3 sub $2,$4 add $1,$2 sub $1,6 lpe sub $1,$0 add $1,5 add $1,$8 mov $0,$1
/* Copyright © 2017-2020, orcaer@yeah.net All rights reserved. Author: orcaer@yeah.net Last modified: 2019-10-20 Description: https://github.com/wlgq2/uv-cpp */ #include <iostream> #include "EchoServer.hpp" #include "Clinet.hpp" #include <chrono> using namespace uv; #define TEST_SIGNAL 1 #define TEST_SERVER 1 #define TEST_CLIENT 1 #define TEST_ASYNC 1 #define TEST_TIMER 1 #define TEST_LOG 1 #define TEST_UDP 1 #define TEST_IPV6 0 int main(int argc, char** args) { //定义事件分发器类 EventLoop* loop = new EventLoop(); //or //EventLoop* loop = EventLoop::DefaultLoop(); #if TEST_SIGNAL //接管SIGPIPE信号。 Signal signal(loop,13,[](int sig) { //SIGPIPE }); #endif //server对象 #if TEST_SERVER #if TEST_IPV6 SocketAddr addr1("0:0:0:0:0:0:0:0", 10002); #else SocketAddr addr1("0.0.0.0", 10002); #endif EchoServer server(loop); //心跳超时 server.setTimeout(40); server.bindAndListen(addr1); #endif //client对象 #if TEST_CLIENT #if TEST_IPV6 SocketAddr addr2("0:0:0:0:0:0:0:1", 10002); #else SocketAddr addr2("127.0.0.1", 10002); #endif Client client(loop); client.connectToServer(addr2); #if 1 //跨线程发送数据 std::thread thread([&client]() { std::this_thread::sleep_for(std::chrono::milliseconds(2000)); char* data = new char[4] {'t','e','s','t'}; //线程安全; client.writeInLoop(data,sizeof(data), [](uv::WriteInfo& info) { //数据需要在发生完成回调中释放 //write message error. if (0 != info.status) { //打印错误信息 std::cout << "Write error :" << EventLoop::GetErrorMessage(info.status) << std::endl; } delete[] info.buf; }); }); #endif #endif //loop线程中异步执行函数,用于跨线程操作。 //相对于原生libuv async接口,修复了调用多次可能只运行一次的问题。 #if TEST_ASYNC loop->runInThisLoop( []() { std::cout << "run function in loop thread one." << std::endl; }); loop->runInThisLoop( []() { std::cout << "run function in loop thread two." << std::endl; }); #endif //定时器测试 #if TEST_TIMER Timer timer(loop, 1000, 1000, [](Timer*) { std::cout << "timer callback test..." << std::endl; }); timer.start(); //定时器只运行一次及释放,可用于tcp重连,单次消息超时等。 Timer* pTimer =new Timer(loop, 1000, 0, [](Timer* handle) { std::cout << "timer callback run onice."<< std::endl; handle->close([](Timer* ptr) { std::cout << "release timer ptr."<< std::endl; //释放定时器对象。 delete ptr; }); }); pTimer->start(); #endif //log接口绑定 #if TEST_LOG auto log = uv::LogWriter::Instance(); log->registerInterface( [](int level, const std::string& info) { std::cout <<uv::LogWriter::Instance()->getLevelName( level) << " :" << info << std::endl; }); log->setLevel(uv::LogWriter::Debug); log->debug("debug message"); log->info("info message"); log->warn("warn message"); log->error("error message"); log->fatal("fatal message"); #endif #if TEST_UDP SocketAddr addr3("127.0.0.1", 10003); uv::Udp udpReceive(loop); udpReceive.setMessageCallback( [&udpReceive](SocketAddr& from,const char* data,unsigned size) { std::string msg(data, size); std::cout << "udp receive message from "<< from.toStr()<<" :" << msg << std::endl; udpReceive.send(from, data, size); }); udpReceive.bindAndRead(addr3); SocketAddr addr4("127.0.0.1", 10004); uv::Udp udpSend(loop ); udpSend.setMessageCallback( [](SocketAddr& from, const char* data, unsigned size) { std::string msg(data, size); std::cout << "udp call message :" << msg << std::endl;; }); udpSend.bindAndRead(addr4); char udpmsg[] = "udp test..."; udpSend.send(addr3, udpmsg, sizeof(udpmsg)); #endif loop->run(); delete loop; }
; name: XOR, AND and OR ; code: "30C820C008C831C821D109D16631C86621D16609D13501002501000D010081F1010081E1010081C9010030C820C008C86631C86621D16609D131C821D109D16635010066250100660D01006681F101006681E101006681C9010030C820C008C86631C86621D16609D131C821D109D14831C84821D14809D16635010066250100660D01006681F101006681E101006681C90100" [bits 16] xor al,cl and al,al or al,cl xor ax,cx and cx,dx or cx,dx xor eax,ecx and ecx,edx or ecx,edx xor ax,0x1 and ax,0x1 or ax,0x1 xor cx,0x1 and cx,0x1 or cx,0x1 [bits 32] xor al,cl and al,al or al,cl xor ax,cx and cx,dx or cx,dx xor eax,ecx and ecx,edx or ecx,edx xor ax,0x1 and ax,0x1 or ax,0x1 xor cx,0x1 and cx,0x1 or cx,0x1 [bits 64] xor al,cl and al,al or al,cl xor ax,cx and cx,dx or cx,dx xor eax,ecx and ecx,edx or ecx,edx xor rax,rcx and rcx,rdx or rcx,rdx xor ax,0x1 and ax,0x1 or ax,0x1 xor cx,0x1 and cx,0x1 or cx,0x1
// This file is part of www.nand2tetris.org // and the book "The Elements of Computing Systems" // by Nisan and Schocken, MIT Press. // File name: projects/04/Fill.asm // Runs an infinite loop that listens to the keyboard input. // When a key is pressed (any key), the program blackens the screen, // i.e. writes "black" in every pixel; // the screen should remain fully black as long as the key is pressed. // When no key is pressed, the program clears the screen, i.e. writes // "white" in every pixel; // the screen should remain fully clear as long as no key is pressed. // Load numcols to 8191 (32*256)-1 = 8191 @8191 D=A @numcols M=D (LOOP) // set i=0 @i M=0 // Save screen address @SCREEN D=A @address M=D @KBD D=M @WHITE D;JEQ @BLACK 0;JMP (WHITE) @color M=0 @DRAW 0;JMP (BLACK) @color M=-1 @DRAW 0;JMP (DRAW) @i D=M @numcols D=D-M @LOOP D;JGT @color D=M @address A=M M=D @i M=M+1 @1 D=A @address M=D+M @DRAW 0;JMP
// Copyright (c) 2017-2018 The BitRub Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <wallet/coinselection.h> #include <optional.h> #include <util/system.h> #include <util/moneystr.h> // Descending order comparator struct { bool operator()(const OutputGroup& a, const OutputGroup& b) const { return a.effective_value > b.effective_value; } } descending; /* * This is the Branch and Bound Coin Selection algorithm designed by Murch. It searches for an input * set that can pay for the spending target and does not exceed the spending target by more than the * cost of creating and spending a change output. The algorithm uses a depth-first search on a binary * tree. In the binary tree, each node corresponds to the inclusion or the omission of a UTXO. UTXOs * are sorted by their effective values and the trees is explored deterministically per the inclusion * branch first. At each node, the algorithm checks whether the selection is within the target range. * While the selection has not reached the target range, more UTXOs are included. When a selection's * value exceeds the target range, the complete subtree deriving from this selection can be omitted. * At that point, the last included UTXO is deselected and the corresponding omission branch explored * instead. The search ends after the complete tree has been searched or after a limited number of tries. * * The search continues to search for better solutions after one solution has been found. The best * solution is chosen by minimizing the waste metric. The waste metric is defined as the cost to * spend the current inputs at the given fee rate minus the long term expected cost to spend the * inputs, plus the amount the selection exceeds the spending target: * * waste = selectionTotal - target + inputs × (currentFeeRate - longTermFeeRate) * * The algorithm uses two additional optimizations. A lookahead keeps track of the total value of * the unexplored UTXOs. A subtree is not explored if the lookahead indicates that the target range * cannot be reached. Further, it is unnecessary to test equivalent combinations. This allows us * to skip testing the inclusion of UTXOs that match the effective value and waste of an omitted * predecessor. * * The Branch and Bound algorithm is described in detail in Murch's Master Thesis: * https://murch.one/wp-content/uploads/2016/11/erhardt2016coinselection.pdf * * @param const std::vector<CInputCoin>& utxo_pool The set of UTXOs that we are choosing from. * These UTXOs will be sorted in descending order by effective value and the CInputCoins' * values are their effective values. * @param const CAmount& target_value This is the value that we want to select. It is the lower * bound of the range. * @param const CAmount& cost_of_change This is the cost of creating and spending a change output. * This plus target_value is the upper bound of the range. * @param std::set<CInputCoin>& out_set -> This is an output parameter for the set of CInputCoins * that have been selected. * @param CAmount& value_ret -> This is an output parameter for the total value of the CInputCoins * that were selected. * @param CAmount not_input_fees -> The fees that need to be paid for the outputs and fixed size * overhead (version, locktime, marker and flag) */ static const size_t TOTAL_TRIES = 100000; bool SelectCoinsBnB(std::vector<OutputGroup>& utxo_pool, const CAmount& target_value, const CAmount& cost_of_change, std::set<CInputCoin>& out_set, CAmount& value_ret, CAmount not_input_fees) { out_set.clear(); CAmount curr_value = 0; std::vector<bool> curr_selection; // select the utxo at this index curr_selection.reserve(utxo_pool.size()); CAmount actual_target = not_input_fees + target_value; // Calculate curr_available_value CAmount curr_available_value = 0; for (const OutputGroup& utxo : utxo_pool) { // Assert that this utxo is not negative. It should never be negative, effective value calculation should have removed it assert(utxo.effective_value > 0); curr_available_value += utxo.effective_value; } if (curr_available_value < actual_target) { return false; } // Sort the utxo_pool std::sort(utxo_pool.begin(), utxo_pool.end(), descending); CAmount curr_waste = 0; std::vector<bool> best_selection; CAmount best_waste = MAX_MONEY; // Depth First search loop for choosing the UTXOs for (size_t i = 0; i < TOTAL_TRIES; ++i) { // Conditions for starting a backtrack bool backtrack = false; if (curr_value + curr_available_value < actual_target || // Cannot possibly reach target with the amount remaining in the curr_available_value. curr_value > actual_target + cost_of_change || // Selected value is out of range, go back and try other branch (curr_waste > best_waste && (utxo_pool.at(0).fee - utxo_pool.at(0).long_term_fee) > 0)) { // Don't select things which we know will be more wasteful if the waste is increasing backtrack = true; } else if (curr_value >= actual_target) { // Selected value is within range curr_waste += (curr_value - actual_target); // This is the excess value which is added to the waste for the below comparison // Adding another UTXO after this check could bring the waste down if the long term fee is higher than the current fee. // However we are not going to explore that because this optimization for the waste is only done when we have hit our target // value. Adding any more UTXOs will be just burning the UTXO; it will go entirely to fees. Thus we aren't going to // explore any more UTXOs to avoid burning money like that. if (curr_waste <= best_waste) { best_selection = curr_selection; best_selection.resize(utxo_pool.size()); best_waste = curr_waste; } curr_waste -= (curr_value - actual_target); // Remove the excess value as we will be selecting different coins now backtrack = true; } // Backtracking, moving backwards if (backtrack) { // Walk backwards to find the last included UTXO that still needs to have its omission branch traversed. while (!curr_selection.empty() && !curr_selection.back()) { curr_selection.pop_back(); curr_available_value += utxo_pool.at(curr_selection.size()).effective_value; } if (curr_selection.empty()) { // We have walked back to the first utxo and no branch is untraversed. All solutions searched break; } // Output was included on previous iterations, try excluding now. curr_selection.back() = false; OutputGroup& utxo = utxo_pool.at(curr_selection.size() - 1); curr_value -= utxo.effective_value; curr_waste -= utxo.fee - utxo.long_term_fee; } else { // Moving forwards, continuing down this branch OutputGroup& utxo = utxo_pool.at(curr_selection.size()); // Remove this utxo from the curr_available_value utxo amount curr_available_value -= utxo.effective_value; // Avoid searching a branch if the previous UTXO has the same value and same waste and was excluded. Since the ratio of fee to // long term fee is the same, we only need to check if one of those values match in order to know that the waste is the same. if (!curr_selection.empty() && !curr_selection.back() && utxo.effective_value == utxo_pool.at(curr_selection.size() - 1).effective_value && utxo.fee == utxo_pool.at(curr_selection.size() - 1).fee) { curr_selection.push_back(false); } else { // Inclusion branch first (Largest First Exploration) curr_selection.push_back(true); curr_value += utxo.effective_value; curr_waste += utxo.fee - utxo.long_term_fee; } } } // Check for solution if (best_selection.empty()) { return false; } // Set output set value_ret = 0; for (size_t i = 0; i < best_selection.size(); ++i) { if (best_selection.at(i)) { util::insert(out_set, utxo_pool.at(i).m_outputs); value_ret += utxo_pool.at(i).m_value; } } return true; } static void ApproximateBestSubset(const std::vector<OutputGroup>& groups, const CAmount& nTotalLower, const CAmount& nTargetValue, std::vector<char>& vfBest, CAmount& nBest, int iterations = 1000) { std::vector<char> vfIncluded; vfBest.assign(groups.size(), true); nBest = nTotalLower; FastRandomContext insecure_rand; for (int nRep = 0; nRep < iterations && nBest != nTargetValue; nRep++) { vfIncluded.assign(groups.size(), false); CAmount nTotal = 0; bool fReachedTarget = false; for (int nPass = 0; nPass < 2 && !fReachedTarget; nPass++) { for (unsigned int i = 0; i < groups.size(); i++) { //The solver here uses a randomized algorithm, //the randomness serves no real security purpose but is just //needed to prevent degenerate behavior and it is important //that the rng is fast. We do not use a constant random sequence, //because there may be some privacy improvement by making //the selection random. if (nPass == 0 ? insecure_rand.randbool() : !vfIncluded[i]) { nTotal += groups[i].m_value; vfIncluded[i] = true; if (nTotal >= nTargetValue) { fReachedTarget = true; if (nTotal < nBest) { nBest = nTotal; vfBest = vfIncluded; } nTotal -= groups[i].m_value; vfIncluded[i] = false; } } } } } } bool KnapsackSolver(const CAmount& nTargetValue, std::vector<OutputGroup>& groups, std::set<CInputCoin>& setCoinsRet, CAmount& nValueRet) { setCoinsRet.clear(); nValueRet = 0; // List of values less than target Optional<OutputGroup> lowest_larger; std::vector<OutputGroup> applicable_groups; CAmount nTotalLower = 0; Shuffle(groups.begin(), groups.end(), FastRandomContext()); for (const OutputGroup& group : groups) { if (group.m_value == nTargetValue) { util::insert(setCoinsRet, group.m_outputs); nValueRet += group.m_value; return true; } else if (group.m_value < nTargetValue + MIN_CHANGE) { applicable_groups.push_back(group); nTotalLower += group.m_value; } else if (!lowest_larger || group.m_value < lowest_larger->m_value) { lowest_larger = group; } } if (nTotalLower == nTargetValue) { for (const auto& group : applicable_groups) { util::insert(setCoinsRet, group.m_outputs); nValueRet += group.m_value; } return true; } if (nTotalLower < nTargetValue) { if (!lowest_larger) return false; util::insert(setCoinsRet, lowest_larger->m_outputs); nValueRet += lowest_larger->m_value; return true; } // Solve subset sum by stochastic approximation std::sort(applicable_groups.begin(), applicable_groups.end(), descending); std::vector<char> vfBest; CAmount nBest; ApproximateBestSubset(applicable_groups, nTotalLower, nTargetValue, vfBest, nBest); if (nBest != nTargetValue && nTotalLower >= nTargetValue + MIN_CHANGE) { ApproximateBestSubset(applicable_groups, nTotalLower, nTargetValue + MIN_CHANGE, vfBest, nBest); } // If we have a bigger coin and (either the stochastic approximation didn't find a good solution, // or the next bigger coin is closer), return the bigger coin if (lowest_larger && ((nBest != nTargetValue && nBest < nTargetValue + MIN_CHANGE) || lowest_larger->m_value <= nBest)) { util::insert(setCoinsRet, lowest_larger->m_outputs); nValueRet += lowest_larger->m_value; } else { for (unsigned int i = 0; i < applicable_groups.size(); i++) { if (vfBest[i]) { util::insert(setCoinsRet, applicable_groups[i].m_outputs); nValueRet += applicable_groups[i].m_value; } } if (LogAcceptCategory(BCLog::SELECTCOINS)) { LogPrint(BCLog::SELECTCOINS, "SelectCoins() best subset: "); /* Continued */ for (unsigned int i = 0; i < applicable_groups.size(); i++) { if (vfBest[i]) { LogPrint(BCLog::SELECTCOINS, "%s ", FormatMoney(applicable_groups[i].m_value)); /* Continued */ } } LogPrint(BCLog::SELECTCOINS, "total %s\n", FormatMoney(nBest)); } } return true; } /****************************************************************************** OutputGroup ******************************************************************************/ void OutputGroup::Insert(const CInputCoin& output, int depth, bool from_me, size_t ancestors, size_t descendants) { m_outputs.push_back(output); m_from_me &= from_me; m_value += output.effective_value; m_depth = std::min(m_depth, depth); // ancestors here express the number of ancestors the new coin will end up having, which is // the sum, rather than the max; this will overestimate in the cases where multiple inputs // have common ancestors m_ancestors += ancestors; // descendants is the count as seen from the top ancestor, not the descendants as seen from the // coin itself; thus, this value is counted as the max, not the sum m_descendants = std::max(m_descendants, descendants); effective_value = m_value; } std::vector<CInputCoin>::iterator OutputGroup::Discard(const CInputCoin& output) { auto it = m_outputs.begin(); while (it != m_outputs.end() && it->outpoint != output.outpoint) ++it; if (it == m_outputs.end()) return it; m_value -= output.effective_value; effective_value -= output.effective_value; return m_outputs.erase(it); } bool OutputGroup::EligibleForSpending(const CoinEligibilityFilter& eligibility_filter) const { return m_depth >= (m_from_me ? eligibility_filter.conf_mine : eligibility_filter.conf_theirs) && m_ancestors <= eligibility_filter.max_ancestors && m_descendants <= eligibility_filter.max_descendants; }
or $t0, $0, $0 ori $t1, $0, 32 ori $t4, $0, 0xcaca ori $t5, $0, 0xcafe LOOP: sb $t5, 0($t0) sb $t5, 1($t0) sb $t4, 2($t0) sb $t4, 3($t0) addi $t0, $t0, 4 slt $t2, $t0, $t1 bne $t2, $0, LOOP or $at, $0, $0 or $v0, $0, $0 or $v1, $0, $0 or $a0, $0, $0 or $a1, $0, $0 or $a2, $0, $0 or $a3, $0, $0 or $t0, $0, $0 or $t1, $0, $0 or $t2, $0, $0 or $t3, $0, $0 or $t4, $0, $0 or $t5, $0, $0 or $t6, $0, $0 or $t7, $0, $0 or $s0, $0, $0 or $s1, $0, $0 or $s2, $0, $0 or $s3, $0, $0 or $s4, $0, $0 or $s5, $0, $0 or $s6, $0, $0 or $s7, $0, $0 or $t8, $0, $0 or $t9, $0, $0 or $k0, $0, $0 or $k1, $0, $0 or $gp, $0, $0 or $sp, $0, $0 or $fp, $0, $0 or $ra, $0, $0 hlt
; A229526: The c coefficients of the transform ax^2 + (4a/k - b)x + 4a/k^2 + 2b/k + c= 0 for a,b,c = 1,-1,-1, k = 1,2,3... ; 5,1,1,-1,-11,-5,-31,-11,-59,-19,-95,-29,-139,-41,-191,-55,-251,-71,-319,-89,-395,-109,-479,-131,-571,-155,-671,-181,-779,-209,-895,-239,-1019,-271,-1151,-305,-1291,-341,-1439,-379,-1595,-419,-1759,-461,-1931,-505,-2111,-551,-2299,-599,-2495,-649,-2699,-701,-2911,-755,-3131,-811,-3359,-869,-3595,-929,-3839,-991,-4091,-1055,-4351,-1121,-4619,-1189,-4895,-1259,-5179,-1331,-5471,-1405,-5771,-1481,-6079,-1559,-6395,-1639,-6719,-1721,-7051,-1805,-7391,-1891,-7739,-1979,-8095,-2069,-8459,-2161,-8831,-2255,-9211,-2351,-9599,-2449,-9995,-2549,-10399,-2651,-10811,-2755,-11231,-2861,-11659,-2969,-12095,-3079,-12539,-3191,-12991,-3305,-13451,-3421,-13919,-3539,-14395,-3659,-14879,-3781,-15371,-3905,-15871,-4031,-16379,-4159,-16895,-4289,-17419,-4421,-17951,-4555,-18491,-4691,-19039,-4829,-19595,-4969,-20159,-5111,-20731,-5255,-21311,-5401,-21899,-5549,-22495,-5699,-23099,-5851,-23711,-6005,-24331,-6161,-24959,-6319,-25595,-6479,-26239,-6641,-26891,-6805,-27551,-6971,-28219,-7139,-28895,-7309,-29579,-7481,-30271,-7655,-30971,-7831,-31679,-8009,-32395,-8189,-33119,-8371,-33851,-8555,-34591,-8741,-35339,-8929,-36095,-9119,-36859,-9311,-37631,-9505,-38411,-9701,-39199,-9899,-39995,-10099,-40799,-10301,-41611,-10505,-42431,-10711,-43259,-10919,-44095,-11129,-44939,-11341,-45791,-11555,-46651,-11771,-47519,-11989,-48395,-12209,-49279,-12431,-50171,-12655,-51071,-12881,-51979,-13109,-52895,-13339,-53819,-13571,-54751,-13805,-55691,-14041,-56639,-14279,-57595,-14519,-58559,-14761,-59531,-15005,-60511,-15251,-61499,-15499 pow $0,2 mov $1,5 sub $1,$0 mul $1,2 mov $7,4 gcd $7,$0 mov $0,1 pow $7,3 lpb $0,1 mul $1,4 mov $10,6 clr $3,$7 div $0,2 add $4,$10 sub $0,$4 lpe sub $1,8 div $1,16 mul $1,2 add $1,1
/*************************************************************************************************** LICENSE: Licensed under the Apache License, Version 2.0 (the "License"); 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. Author:liu.hao(33852613@163.com) Time:2018-6 info: ***************************************************************************************************/ #include <mkheaders.h> #include <gtest/gtest.h> #include <cctype>//for std::toupper //将一个函数应用于某一范围的元素 TEST(MSQ, transform) { std::string s("hello"); std::transform(s.begin(), s.end(), s.begin(), [](unsigned char c) -> unsigned char { return std::toupper(c); }); for (auto elem : s) { MK_PRINT_MSG("n = %c", elem); } std::vector<std::size_t> ordinals; std::transform(s.begin(), s.end(), std::back_inserter(ordinals), [](unsigned char c) -> std::size_t { return c; }); for (auto elem : ordinals) { MK_PRINT_MSG("n = %d", elem); } std::vector<int> vRet; std::transform(s.begin(), s.end(), ordinals.begin(), std::back_inserter(vRet),[](unsigned char c, size_t n) { return c + int(n); } ); for (auto elem : vRet) { MK_PRINT_MSG("n = %d", elem); } }
; libsrc/graphics/ts2068hr/w_pixladdr.asm ; posted by rdk77, 11/11/2010 SECTION code_graphics PUBLIC w_pixeladdress INCLUDE "graphics/grafix.inc" ; ; $Id: w_pixladdr.asm,v 1.3 2016-10-14 06:40:26 stefano Exp $ ; ; ****************************************************************** ; Get absolute pixel address in map of virtual (x,y) coordinate. ; in: (x,y) coordinate of pixel (hl,de) ; ; CAVEAT ; CAVEAT Input coordinates valid in terms of 1024x256 mode! ; CAVEAT For other modes, scale coordinates to match in advance. ; CAVEAT ; ; out: de = hl = address of pixel byte ; a = bit number of byte where pixel is to be placed ; fz = 1 if bit number is 0 of pixel position ; ; registers changed after return: ; ..bc..../ixiy same ; af..dehl/.... different .w_pixeladdress ld a,l rr h rr l rr h rr l srl e rr l ld h,e ld d,e ld e,l and @00000111 ret
#include "Galaxy.h" int main(int argc, void* argv[]) { Galaxy gal; gal.ParseSettings(argc, (char ** )(argv)); gal.Generate(); };
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "db.h" #include "net.h" #include "init.h" #include "addrman.h" #include "ui_interface.h" #include "script.h" #ifdef WIN32 #include <string.h> #endif #ifdef USE_UPNP #include <miniupnpc/miniwget.h> #include <miniupnpc/miniupnpc.h> #include <miniupnpc/upnpcommands.h> #include <miniupnpc/upnperrors.h> #endif // Dump addresses to peers.dat every 15 minutes (900s) #define DUMP_ADDRESSES_INTERVAL 900 using namespace std; using namespace boost; static const int MAX_OUTBOUND_CONNECTIONS = 8; bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false); struct LocalServiceInfo { int nScore; int nPort; }; // // Global state variables // bool fDiscover = true; uint64 nLocalServices = NODE_NETWORK; static CCriticalSection cs_mapLocalHost; static map<CNetAddr, LocalServiceInfo> mapLocalHost; static bool vfReachable[NET_MAX] = {}; static bool vfLimited[NET_MAX] = {}; static CNode* pnodeLocalHost = NULL; static CNode* pnodeSync = NULL; uint64 nLocalHostNonce = 0; static std::vector<SOCKET> vhListenSocket; CAddrMan addrman; int nMaxConnections = 125; vector<CNode*> vNodes; CCriticalSection cs_vNodes; map<CInv, CDataStream> mapRelay; deque<pair<int64, CInv> > vRelayExpiration; CCriticalSection cs_mapRelay; limitedmap<CInv, int64> mapAlreadyAskedFor(MAX_INV_SZ); static deque<string> vOneShots; CCriticalSection cs_vOneShots; set<CNetAddr> setservAddNodeAddresses; CCriticalSection cs_setservAddNodeAddresses; vector<std::string> vAddedNodes; CCriticalSection cs_vAddedNodes; static CSemaphore *semOutbound = NULL; void AddOneShot(string strDest) { LOCK(cs_vOneShots); vOneShots.push_back(strDest); } unsigned short GetListenPort() { return (unsigned short)(GetArg("-port", GetDefaultPort())); } void CNode::PushGetBlocks(CBlockIndex* pindexBegin, uint256 hashEnd) { // Filter out duplicate requests if (pindexBegin == pindexLastGetBlocksBegin && hashEnd == hashLastGetBlocksEnd) return; pindexLastGetBlocksBegin = pindexBegin; hashLastGetBlocksEnd = hashEnd; PushMessage("getblocks", CBlockLocator(pindexBegin), hashEnd); } // find 'best' local address for a particular peer bool GetLocal(CService& addr, const CNetAddr *paddrPeer) { if (fNoListen) return false; int nBestScore = -1; int nBestReachability = -1; { LOCK(cs_mapLocalHost); for (map<CNetAddr, LocalServiceInfo>::iterator it = mapLocalHost.begin(); it != mapLocalHost.end(); it++) { int nScore = (*it).second.nScore; int nReachability = (*it).first.GetReachabilityFrom(paddrPeer); if (nReachability > nBestReachability || (nReachability == nBestReachability && nScore > nBestScore)) { addr = CService((*it).first, (*it).second.nPort); nBestReachability = nReachability; nBestScore = nScore; } } } return nBestScore >= 0; } // get best local address for a particular peer as a CAddress CAddress GetLocalAddress(const CNetAddr *paddrPeer) { CAddress ret(CService("0.0.0.0",0),0); CService addr; if (GetLocal(addr, paddrPeer)) { ret = CAddress(addr); ret.nServices = nLocalServices; ret.nTime = GetAdjustedTime(); } return ret; } bool RecvLine(SOCKET hSocket, string& strLine) { strLine = ""; loop { char c; int nBytes = recv(hSocket, &c, 1, 0); if (nBytes > 0) { if (c == '\n') continue; if (c == '\r') return true; strLine += c; if (strLine.size() >= 9000) return true; } else if (nBytes <= 0) { boost::this_thread::interruption_point(); if (nBytes < 0) { int nErr = WSAGetLastError(); if (nErr == WSAEMSGSIZE) continue; if (nErr == WSAEWOULDBLOCK || nErr == WSAEINTR || nErr == WSAEINPROGRESS) { MilliSleep(10); continue; } } if (!strLine.empty()) return true; if (nBytes == 0) { // socket closed printf("socket closed\n"); return false; } else { // socket error int nErr = WSAGetLastError(); printf("recv failed: %d\n", nErr); return false; } } } } // used when scores of local addresses may have changed // pushes better local address to peers void static AdvertizeLocal() { LOCK(cs_vNodes); BOOST_FOREACH(CNode* pnode, vNodes) { if (pnode->fSuccessfullyConnected) { CAddress addrLocal = GetLocalAddress(&pnode->addr); if (addrLocal.IsRoutable() && (CService)addrLocal != (CService)pnode->addrLocal) { pnode->PushAddress(addrLocal); pnode->addrLocal = addrLocal; } } } } void SetReachable(enum Network net, bool fFlag) { LOCK(cs_mapLocalHost); vfReachable[net] = fFlag; if (net == NET_IPV6 && fFlag) vfReachable[NET_IPV4] = true; } // learn a new local address bool AddLocal(const CService& addr, int nScore) { if (!addr.IsRoutable()) return false; if (!fDiscover && nScore < LOCAL_MANUAL) return false; if (IsLimited(addr)) return false; printf("AddLocal(%s,%i)\n", addr.ToString().c_str(), nScore); { LOCK(cs_mapLocalHost); bool fAlready = mapLocalHost.count(addr) > 0; LocalServiceInfo &info = mapLocalHost[addr]; if (!fAlready || nScore >= info.nScore) { info.nScore = nScore + (fAlready ? 1 : 0); info.nPort = addr.GetPort(); } SetReachable(addr.GetNetwork()); } AdvertizeLocal(); return true; } bool AddLocal(const CNetAddr &addr, int nScore) { return AddLocal(CService(addr, GetListenPort()), nScore); } /** Make a particular network entirely off-limits (no automatic connects to it) */ void SetLimited(enum Network net, bool fLimited) { if (net == NET_UNROUTABLE) return; LOCK(cs_mapLocalHost); vfLimited[net] = fLimited; } bool IsLimited(enum Network net) { LOCK(cs_mapLocalHost); return vfLimited[net]; } bool IsLimited(const CNetAddr &addr) { return IsLimited(addr.GetNetwork()); } /** vote for a local address */ bool SeenLocal(const CService& addr) { { LOCK(cs_mapLocalHost); if (mapLocalHost.count(addr) == 0) return false; mapLocalHost[addr].nScore++; } AdvertizeLocal(); return true; } /** check whether a given address is potentially local */ bool IsLocal(const CService& addr) { LOCK(cs_mapLocalHost); return mapLocalHost.count(addr) > 0; } /** check whether a given address is in a network we can probably connect to */ bool IsReachable(const CNetAddr& addr) { LOCK(cs_mapLocalHost); enum Network net = addr.GetNetwork(); return vfReachable[net] && !vfLimited[net]; } bool GetMyExternalIP2(const CService& addrConnect, const char* pszGet, const char* pszKeyword, CNetAddr& ipRet) { SOCKET hSocket; if (!ConnectSocket(addrConnect, hSocket)) return error("GetMyExternalIP() : connection to %s failed", addrConnect.ToString().c_str()); send(hSocket, pszGet, strlen(pszGet), MSG_NOSIGNAL); string strLine; while (RecvLine(hSocket, strLine)) { if (strLine.empty()) // HTTP response is separated from headers by blank line { loop { if (!RecvLine(hSocket, strLine)) { closesocket(hSocket); return false; } if (pszKeyword == NULL) break; if (strLine.find(pszKeyword) != string::npos) { strLine = strLine.substr(strLine.find(pszKeyword) + strlen(pszKeyword)); break; } } closesocket(hSocket); if (strLine.find("<") != string::npos) strLine = strLine.substr(0, strLine.find("<")); strLine = strLine.substr(strspn(strLine.c_str(), " \t\n\r")); while (strLine.size() > 0 && isspace(strLine[strLine.size()-1])) strLine.resize(strLine.size()-1); CService addr(strLine,0,true); printf("GetMyExternalIP() received [%s] %s\n", strLine.c_str(), addr.ToString().c_str()); if (!addr.IsValid() || !addr.IsRoutable()) return false; ipRet.SetIP(addr); return true; } } closesocket(hSocket); return error("GetMyExternalIP() : connection closed"); } bool GetMyExternalIP(CNetAddr& ipRet) { CService addrConnect; const char* pszGet; const char* pszKeyword; for (int nLookup = 0; nLookup <= 1; nLookup++) for (int nHost = 1; nHost <= 1; nHost++) { // We should be phasing out our use of sites like these. If we need // replacements, we should ask for volunteers to put this simple // php file on their web server that prints the client IP: // <?php echo $_SERVER["REMOTE_ADDR"]; ?> if (nHost == 1) { addrConnect = CService("91.198.22.70", 80); // checkip.dyndns.org if (nLookup == 1) { CService addrIP("checkip.dyndns.org", 80, true); if (addrIP.IsValid()) addrConnect = addrIP; } pszGet = "GET / HTTP/1.1\r\n" "Host: checkip.dyndns.org\r\n" "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n" "Connection: close\r\n" "\r\n"; pszKeyword = "Address:"; } if (GetMyExternalIP2(addrConnect, pszGet, pszKeyword, ipRet)) return true; } return false; } void ThreadGetMyExternalIP(void* parg) { // Make this thread recognisable as the external IP detection thread RenameThread("bitcoin-ext-ip"); CNetAddr addrLocalHost; if (GetMyExternalIP(addrLocalHost)) { printf("GetMyExternalIP() returned %s\n", addrLocalHost.ToStringIP().c_str()); AddLocal(addrLocalHost, LOCAL_HTTP); } } void AddressCurrentlyConnected(const CService& addr) { addrman.Connected(addr); } CNode* FindNode(const CNetAddr& ip) { LOCK(cs_vNodes); BOOST_FOREACH(CNode* pnode, vNodes) if ((CNetAddr)pnode->addr == ip) return (pnode); return NULL; } CNode* FindNode(std::string addrName) { LOCK(cs_vNodes); BOOST_FOREACH(CNode* pnode, vNodes) if (pnode->addrName == addrName) return (pnode); return NULL; } CNode* FindNode(const CService& addr) { LOCK(cs_vNodes); BOOST_FOREACH(CNode* pnode, vNodes) if ((CService)pnode->addr == addr) return (pnode); return NULL; } CNode* ConnectNode(CAddress addrConnect, const char *pszDest) { if (pszDest == NULL) { if (IsLocal(addrConnect)) return NULL; // Look for an existing connection CNode* pnode = FindNode((CService)addrConnect); if (pnode) { pnode->AddRef(); return pnode; } } /// debug print printf("trying connection %s lastseen=%.1fhrs\n", pszDest ? pszDest : addrConnect.ToString().c_str(), pszDest ? 0 : (double)(GetAdjustedTime() - addrConnect.nTime)/3600.0); // Connect SOCKET hSocket; if (pszDest ? ConnectSocketByName(addrConnect, hSocket, pszDest, GetDefaultPort()) : ConnectSocket(addrConnect, hSocket)) { addrman.Attempt(addrConnect); /// debug print printf("connected %s\n", pszDest ? pszDest : addrConnect.ToString().c_str()); // Set to non-blocking #ifdef WIN32 u_long nOne = 1; if (ioctlsocket(hSocket, FIONBIO, &nOne) == SOCKET_ERROR) printf("ConnectSocket() : ioctlsocket non-blocking setting failed, error %d\n", WSAGetLastError()); #else if (fcntl(hSocket, F_SETFL, O_NONBLOCK) == SOCKET_ERROR) printf("ConnectSocket() : fcntl non-blocking setting failed, error %d\n", errno); #endif // Add node CNode* pnode = new CNode(hSocket, addrConnect, pszDest ? pszDest : "", false); pnode->AddRef(); { LOCK(cs_vNodes); vNodes.push_back(pnode); } pnode->nTimeConnected = GetTime(); return pnode; } else { return NULL; } } void CNode::CloseSocketDisconnect() { fDisconnect = true; if (hSocket != INVALID_SOCKET) { printf("disconnecting node %s\n", addrName.c_str()); closesocket(hSocket); hSocket = INVALID_SOCKET; } // in case this fails, we'll empty the recv buffer when the CNode is deleted TRY_LOCK(cs_vRecvMsg, lockRecv); if (lockRecv) vRecvMsg.clear(); // if this was the sync node, we'll need a new one if (this == pnodeSync) pnodeSync = NULL; } void CNode::Cleanup() { } void CNode::PushVersion() { /// when NTP implemented, change to just nTime = GetAdjustedTime() int64 nTime = (fInbound ? GetAdjustedTime() : GetTime()); CAddress addrYou = (addr.IsRoutable() && !IsProxy(addr) ? addr : CAddress(CService("0.0.0.0",0))); CAddress addrMe = GetLocalAddress(&addr); RAND_bytes((unsigned char*)&nLocalHostNonce, sizeof(nLocalHostNonce)); printf("send version message: version %d, blocks=%d, us=%s, them=%s, peer=%s\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString().c_str(), addrYou.ToString().c_str(), addr.ToString().c_str()); PushMessage("version", PROTOCOL_VERSION, nLocalServices, nTime, addrYou, addrMe, nLocalHostNonce, FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector<string>()), nBestHeight); } std::map<CNetAddr, int64> CNode::setBanned; CCriticalSection CNode::cs_setBanned; void CNode::ClearBanned() { setBanned.clear(); } bool CNode::IsBanned(CNetAddr ip) { bool fResult = false; { LOCK(cs_setBanned); std::map<CNetAddr, int64>::iterator i = setBanned.find(ip); if (i != setBanned.end()) { int64 t = (*i).second; if (GetTime() < t) fResult = true; } } return fResult; } bool CNode::Misbehaving(int howmuch) { if (addr.IsLocal()) { printf("Warning: Local node %s misbehaving (delta: %d)!\n", addrName.c_str(), howmuch); return false; } nMisbehavior += howmuch; if (nMisbehavior >= GetArg("-banscore", 100)) { int64 banTime = GetTime()+GetArg("-bantime", 60*60*24); // Default 24-hour ban printf("Misbehaving: %s (%d -> %d) DISCONNECTING\n", addr.ToString().c_str(), nMisbehavior-howmuch, nMisbehavior); { LOCK(cs_setBanned); if (setBanned[addr] < banTime) setBanned[addr] = banTime; } CloseSocketDisconnect(); return true; } else printf("Misbehaving: %s (%d -> %d)\n", addr.ToString().c_str(), nMisbehavior-howmuch, nMisbehavior); return false; } #undef X #define X(name) stats.name = name void CNode::copyStats(CNodeStats &stats) { X(nServices); X(nLastSend); X(nLastRecv); X(nTimeConnected); X(addrName); X(nVersion); X(cleanSubVer); X(fInbound); X(nStartingHeight); X(nMisbehavior); X(nSendBytes); X(nRecvBytes); X(nBlocksRequested); stats.fSyncNode = (this == pnodeSync); } #undef X // requires LOCK(cs_vRecvMsg) bool CNode::ReceiveMsgBytes(const char *pch, unsigned int nBytes) { while (nBytes > 0) { // get current incomplete message, or create a new one if (vRecvMsg.empty() || vRecvMsg.back().complete()) vRecvMsg.push_back(CNetMessage(SER_NETWORK, nRecvVersion)); CNetMessage& msg = vRecvMsg.back(); // absorb network data int handled; if (!msg.in_data) handled = msg.readHeader(pch, nBytes); else handled = msg.readData(pch, nBytes); if (handled < 0) return false; pch += handled; nBytes -= handled; } return true; } int CNetMessage::readHeader(const char *pch, unsigned int nBytes) { // copy data to temporary parsing buffer unsigned int nRemaining = 24 - nHdrPos; unsigned int nCopy = std::min(nRemaining, nBytes); memcpy(&hdrbuf[nHdrPos], pch, nCopy); nHdrPos += nCopy; // if header incomplete, exit if (nHdrPos < 24) return nCopy; // deserialize to CMessageHeader try { hdrbuf >> hdr; } catch (std::exception &e) { return -1; } // reject messages larger than MAX_SIZE if (hdr.nMessageSize > MAX_SIZE) return -1; // switch state to reading message data in_data = true; vRecv.resize(hdr.nMessageSize); return nCopy; } int CNetMessage::readData(const char *pch, unsigned int nBytes) { unsigned int nRemaining = hdr.nMessageSize - nDataPos; unsigned int nCopy = std::min(nRemaining, nBytes); memcpy(&vRecv[nDataPos], pch, nCopy); nDataPos += nCopy; return nCopy; } // requires LOCK(cs_vSend) void SocketSendData(CNode *pnode) { std::deque<CSerializeData>::iterator it = pnode->vSendMsg.begin(); while (it != pnode->vSendMsg.end()) { const CSerializeData &data = *it; assert(data.size() > pnode->nSendOffset); int nBytes = send(pnode->hSocket, &data[pnode->nSendOffset], data.size() - pnode->nSendOffset, MSG_NOSIGNAL | MSG_DONTWAIT); if (nBytes > 0) { pnode->nLastSend = GetTime(); pnode->nSendBytes += nBytes; pnode->nSendOffset += nBytes; if (pnode->nSendOffset == data.size()) { pnode->nSendOffset = 0; pnode->nSendSize -= data.size(); it++; } else { // could not send full message; stop sending more break; } } else { if (nBytes < 0) { // error int nErr = WSAGetLastError(); if (nErr != WSAEWOULDBLOCK && nErr != WSAEMSGSIZE && nErr != WSAEINTR && nErr != WSAEINPROGRESS) { printf("socket send error %d\n", nErr); pnode->CloseSocketDisconnect(); } } // couldn't send anything at all break; } } if (it == pnode->vSendMsg.end()) { assert(pnode->nSendOffset == 0); assert(pnode->nSendSize == 0); } pnode->vSendMsg.erase(pnode->vSendMsg.begin(), it); } static list<CNode*> vNodesDisconnected; void ThreadSocketHandler() { unsigned int nPrevNodeCount = 0; loop { // // Disconnect nodes // { LOCK(cs_vNodes); // Disconnect unused nodes vector<CNode*> vNodesCopy = vNodes; BOOST_FOREACH(CNode* pnode, vNodesCopy) { if (pnode->fDisconnect || (pnode->GetRefCount() <= 0 && pnode->vRecvMsg.empty() && pnode->nSendSize == 0 && pnode->ssSend.empty())) { // remove from vNodes vNodes.erase(remove(vNodes.begin(), vNodes.end(), pnode), vNodes.end()); // release outbound grant (if any) pnode->grantOutbound.Release(); // close socket and cleanup pnode->CloseSocketDisconnect(); pnode->Cleanup(); // hold in disconnected pool until all refs are released if (pnode->fNetworkNode || pnode->fInbound) pnode->Release(); vNodesDisconnected.push_back(pnode); } } // Delete disconnected nodes list<CNode*> vNodesDisconnectedCopy = vNodesDisconnected; BOOST_FOREACH(CNode* pnode, vNodesDisconnectedCopy) { // wait until threads are done using it if (pnode->GetRefCount() <= 0) { bool fDelete = false; { TRY_LOCK(pnode->cs_vSend, lockSend); if (lockSend) { TRY_LOCK(pnode->cs_vRecvMsg, lockRecv); if (lockRecv) { TRY_LOCK(pnode->cs_inventory, lockInv); if (lockInv) fDelete = true; } } } if (fDelete) { vNodesDisconnected.remove(pnode); delete pnode; } } } } if (vNodes.size() != nPrevNodeCount) { nPrevNodeCount = vNodes.size(); uiInterface.NotifyNumConnectionsChanged(vNodes.size()); } // // Find which sockets have data to receive // struct timeval timeout; timeout.tv_sec = 0; timeout.tv_usec = 50000; // frequency to poll pnode->vSend fd_set fdsetRecv; fd_set fdsetSend; fd_set fdsetError; FD_ZERO(&fdsetRecv); FD_ZERO(&fdsetSend); FD_ZERO(&fdsetError); SOCKET hSocketMax = 0; bool have_fds = false; BOOST_FOREACH(SOCKET hListenSocket, vhListenSocket) { FD_SET(hListenSocket, &fdsetRecv); hSocketMax = max(hSocketMax, hListenSocket); have_fds = true; } { LOCK(cs_vNodes); BOOST_FOREACH(CNode* pnode, vNodes) { if (pnode->hSocket == INVALID_SOCKET) continue; FD_SET(pnode->hSocket, &fdsetError); hSocketMax = max(hSocketMax, pnode->hSocket); have_fds = true; // Implement the following logic: // * If there is data to send, select() for sending data. As this only // happens when optimistic write failed, we choose to first drain the // write buffer in this case before receiving more. This avoids // needlessly queueing received data, if the remote peer is not themselves // receiving data. This means properly utilizing TCP flow control signalling. // * Otherwise, if there is no (complete) message in the receive buffer, // or there is space left in the buffer, select() for receiving data. // * (if neither of the above applies, there is certainly one message // in the receiver buffer ready to be processed). // Together, that means that at least one of the following is always possible, // so we don't deadlock: // * We send some data. // * We wait for data to be received (and disconnect after timeout). // * We process a message in the buffer (message handler thread). { TRY_LOCK(pnode->cs_vSend, lockSend); if (lockSend && !pnode->vSendMsg.empty()) { FD_SET(pnode->hSocket, &fdsetSend); continue; } } { TRY_LOCK(pnode->cs_vRecvMsg, lockRecv); if (lockRecv && ( pnode->vRecvMsg.empty() || !pnode->vRecvMsg.front().complete() || pnode->GetTotalRecvSize() <= ReceiveFloodSize())) FD_SET(pnode->hSocket, &fdsetRecv); } } } int nSelect = select(have_fds ? hSocketMax + 1 : 0, &fdsetRecv, &fdsetSend, &fdsetError, &timeout); boost::this_thread::interruption_point(); if (nSelect == SOCKET_ERROR) { if (have_fds) { int nErr = WSAGetLastError(); printf("socket select error %d\n", nErr); for (unsigned int i = 0; i <= hSocketMax; i++) FD_SET(i, &fdsetRecv); } FD_ZERO(&fdsetSend); FD_ZERO(&fdsetError); MilliSleep(timeout.tv_usec/1000); } // // Accept new connections // BOOST_FOREACH(SOCKET hListenSocket, vhListenSocket) if (hListenSocket != INVALID_SOCKET && FD_ISSET(hListenSocket, &fdsetRecv)) { #ifdef USE_IPV6 struct sockaddr_storage sockaddr; #else struct sockaddr sockaddr; #endif socklen_t len = sizeof(sockaddr); SOCKET hSocket = accept(hListenSocket, (struct sockaddr*)&sockaddr, &len); CAddress addr; int nInbound = 0; if (hSocket != INVALID_SOCKET) if (!addr.SetSockAddr((const struct sockaddr*)&sockaddr)) printf("Warning: Unknown socket family\n"); { LOCK(cs_vNodes); BOOST_FOREACH(CNode* pnode, vNodes) if (pnode->fInbound) nInbound++; } if (hSocket == INVALID_SOCKET) { int nErr = WSAGetLastError(); if (nErr != WSAEWOULDBLOCK) printf("socket error accept failed: %d\n", nErr); } else if (nInbound >= nMaxConnections - MAX_OUTBOUND_CONNECTIONS) { { LOCK(cs_setservAddNodeAddresses); if (!setservAddNodeAddresses.count(addr)) closesocket(hSocket); } } else if (CNode::IsBanned(addr)) { printf("connection from %s dropped (banned)\n", addr.ToString().c_str()); closesocket(hSocket); } else { printf("accepted connection %s\n", addr.ToString().c_str()); CNode* pnode = new CNode(hSocket, addr, "", true); pnode->AddRef(); { LOCK(cs_vNodes); vNodes.push_back(pnode); } } } // // Service each socket // vector<CNode*> vNodesCopy; { LOCK(cs_vNodes); vNodesCopy = vNodes; BOOST_FOREACH(CNode* pnode, vNodesCopy) pnode->AddRef(); } BOOST_FOREACH(CNode* pnode, vNodesCopy) { boost::this_thread::interruption_point(); // // Receive // if (pnode->hSocket == INVALID_SOCKET) continue; if (FD_ISSET(pnode->hSocket, &fdsetRecv) || FD_ISSET(pnode->hSocket, &fdsetError)) { TRY_LOCK(pnode->cs_vRecvMsg, lockRecv); if (lockRecv) { { // typical socket buffer is 8K-64K char pchBuf[0x10000]; int nBytes = recv(pnode->hSocket, pchBuf, sizeof(pchBuf), MSG_DONTWAIT); if (nBytes > 0) { if (!pnode->ReceiveMsgBytes(pchBuf, nBytes)) pnode->CloseSocketDisconnect(); pnode->nLastRecv = GetTime(); pnode->nRecvBytes += nBytes; } else if (nBytes == 0) { // socket closed gracefully if (!pnode->fDisconnect) printf("socket closed\n"); pnode->CloseSocketDisconnect(); } else if (nBytes < 0) { // error int nErr = WSAGetLastError(); if (nErr != WSAEWOULDBLOCK && nErr != WSAEMSGSIZE && nErr != WSAEINTR && nErr != WSAEINPROGRESS) { if (!pnode->fDisconnect) printf("socket recv error %d\n", nErr); pnode->CloseSocketDisconnect(); } } } } } // // Send // if (pnode->hSocket == INVALID_SOCKET) continue; if (FD_ISSET(pnode->hSocket, &fdsetSend)) { TRY_LOCK(pnode->cs_vSend, lockSend); if (lockSend) SocketSendData(pnode); } // // Inactivity checking // if (pnode->vSendMsg.empty()) pnode->nLastSendEmpty = GetTime(); if (GetTime() - pnode->nTimeConnected > 60) { if (pnode->nLastRecv == 0 || pnode->nLastSend == 0) { printf("socket no message in first 60 seconds, %d %d\n", pnode->nLastRecv != 0, pnode->nLastSend != 0); pnode->fDisconnect = true; } else if (GetTime() - pnode->nLastSend > 90*60 && GetTime() - pnode->nLastSendEmpty > 90*60) { printf("socket not sending\n"); pnode->fDisconnect = true; } else if (GetTime() - pnode->nLastRecv > 90*60) { printf("socket inactivity timeout\n"); pnode->fDisconnect = true; } } } { LOCK(cs_vNodes); BOOST_FOREACH(CNode* pnode, vNodesCopy) pnode->Release(); } MilliSleep(10); } } #ifdef USE_UPNP void ThreadMapPort() { std::string port = strprintf("%u", GetListenPort()); const char * multicastif = 0; const char * minissdpdpath = 0; struct UPNPDev * devlist = 0; char lanaddr[64]; #ifndef UPNPDISCOVER_SUCCESS /* miniupnpc 1.5 */ devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0); #else /* miniupnpc 1.6 */ int error = 0; devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error); #endif struct UPNPUrls urls; struct IGDdatas data; int r; r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr)); if (r == 1) { if (fDiscover) { char externalIPAddress[40]; r = UPNP_GetExternalIPAddress(urls.controlURL, data.first.servicetype, externalIPAddress); if(r != UPNPCOMMAND_SUCCESS) printf("UPnP: GetExternalIPAddress() returned %d\n", r); else { if(externalIPAddress[0]) { printf("UPnP: ExternalIPAddress = %s\n", externalIPAddress); AddLocal(CNetAddr(externalIPAddress), LOCAL_UPNP); } else printf("UPnP: GetExternalIPAddress failed.\n"); } } string strDesc = "Gtaccoin " + FormatFullVersion(); try { loop { #ifndef UPNPDISCOVER_SUCCESS /* miniupnpc 1.5 */ r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, port.c_str(), port.c_str(), lanaddr, strDesc.c_str(), "TCP", 0); #else /* miniupnpc 1.6 */ r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, port.c_str(), port.c_str(), lanaddr, strDesc.c_str(), "TCP", 0, "0"); #endif if(r!=UPNPCOMMAND_SUCCESS) printf("AddPortMapping(%s, %s, %s) failed with code %d (%s)\n", port.c_str(), port.c_str(), lanaddr, r, strupnperror(r)); else printf("UPnP Port Mapping successful.\n");; MilliSleep(20*60*1000); // Refresh every 20 minutes } } catch (boost::thread_interrupted) { r = UPNP_DeletePortMapping(urls.controlURL, data.first.servicetype, port.c_str(), "TCP", 0); printf("UPNP_DeletePortMapping() returned : %d\n", r); freeUPNPDevlist(devlist); devlist = 0; FreeUPNPUrls(&urls); throw; } } else { printf("No valid UPnP IGDs found\n"); freeUPNPDevlist(devlist); devlist = 0; if (r != 0) FreeUPNPUrls(&urls); } } void MapPort(bool fUseUPnP) { static boost::thread* upnp_thread = NULL; if (fUseUPnP) { if (upnp_thread) { upnp_thread->interrupt(); upnp_thread->join(); delete upnp_thread; } upnp_thread = new boost::thread(boost::bind(&TraceThread<boost::function<void()> >, "upnp", &ThreadMapPort)); } else if (upnp_thread) { upnp_thread->interrupt(); upnp_thread->join(); delete upnp_thread; upnp_thread = NULL; } } #else void MapPort(bool) { // Intentionally left blank. } #endif // DNS seeds // Each pair gives a source name and a seed name. // The first name is used as information source for addrman. // The second name should resolve to a list of seed addresses. static const char *strMainNetDNSSeed[][2] = { {"gtaccointools.com", "106.240.242.154"}, {NULL, NULL} }; static const char *strTestNetDNSSeed[][2] = { {"gtaccointools.com", "testnet-seed.gtaccointools.com"}, {"xurious.com", "testnet-seed.ltc.xurious.com"}, {"wemine-testnet.com", "dnsseed.wemine-testnet.com"}, {NULL, NULL} }; void ThreadDNSAddressSeed() { static const char *(*strDNSSeed)[2] = fTestNet ? strTestNetDNSSeed : strMainNetDNSSeed; int found = 0; printf("Loading addresses from DNS seeds (could take a while)\n"); for (unsigned int seed_idx = 0; strDNSSeed[seed_idx][0] != NULL; seed_idx++) { if (HaveNameProxy()) { AddOneShot(strDNSSeed[seed_idx][1]); } else { vector<CNetAddr> vaddr; vector<CAddress> vAdd; if (LookupHost(strDNSSeed[seed_idx][1], vaddr)) { BOOST_FOREACH(CNetAddr& ip, vaddr) { int nOneDay = 24*3600; CAddress addr = CAddress(CService(ip, GetDefaultPort())); addr.nTime = GetTime() - 3*nOneDay - GetRand(4*nOneDay); // use a random age between 3 and 7 days old vAdd.push_back(addr); found++; } } addrman.Add(vAdd, CNetAddr(strDNSSeed[seed_idx][0], true)); } } printf("%d addresses found from DNS seeds\n", found); } unsigned int pnSeed[] = { 0x38a9b992, 0x73d4f3a2, 0x43eda52e, 0xa1c4a2b2, 0x73c41955, 0x6992f3a2, 0x729cb992, 0x8b53b205, 0xb651ec36, 0x8b422e4e, 0x0fe421b2, 0x83c1a2b2, 0xbd432705, 0x2e11b018, 0x281544c1, 0x8b72f3a2, 0xb934555f, 0x2ba02e4e, 0x6ab7c936, 0x8728555f, 0x03bfd143, 0x0a73df5b, 0xcd2b5a50, 0x746df3a2, 0x7481bb25, 0x6f4d4550, 0x78582f4e, 0xa03a0f46, 0xe8b0e2bc, 0xa2d17042, 0x718a09b0, 0xdaffd4a2, 0xbb1a175e, 0xb21f09b0, 0xb5549bc0, 0xe404c755, 0x95d882c3, 0xfff3692e, 0x3777d9c7, 0x425b2746, 0x497990c6, 0xb2782dcc, 0xf9352225, 0xa75cd443, 0x4c05fb94, 0x44c91c2e, 0x47c6a5bc, 0xd606fb94, 0xc1b9e2bc, 0x32acd23e, 0x89560da2, 0x5bebdad8, 0x3a210e08, 0xbdc5795b, 0xcc86bb25, 0xbe9f28bc, 0xef3ff3a2, 0xca29df59, 0xe4fd175e, 0x1f3eaa6b, 0xacdbaa6b, 0xb05f042e, 0x81ed6cd8, 0x9a3c0cc3, 0x4200175e, 0x5a017ebc, 0x42ef4c90, 0x8abfd143, 0x24fbf3a2, 0x140846a6, 0x4f7d9553, 0xeea5d151, 0xe67c0905, 0x52d8048e, 0xcabd2e4e, 0xe276692e, 0x07dea445, 0xdde3f3a2, 0x6c47bb25, 0xae0efb94, 0xf5e15a51, 0xaebdd25b, 0xf341175e, 0x46532705, 0xc47728bc, 0xe4e14c90, 0x9dc8f752, 0x050c042e, 0x1c84bb25, 0x4f163b25, 0x1a017ebc, 0xa5282e4e, 0x8c667e60, 0xc7113b25, 0xf0b44832, 0xf1a134d0, 0x973212d4, 0xd35cbb25, 0xd5123b25, 0x68220254, 0x7ad43e32, 0x9268e32e, 0xdf143b25, 0xaf04c436, 0xaded0051, 0xfa86d454, 0x09db048e, 0x26003b25, 0x58764c90, 0x9a2f555f, 0x0c24ec97, 0x92123b25, 0x0526d35f, 0x17db048e, 0xd2e42f4e, 0x38cca5bc, 0xc6320ab9, 0xe28ac836, 0xc560aa6b, 0xa5c16041, 0x70a6f1c0, 0x011ec8c1, 0xd6e9c332, 0x131263c0, 0xa15a4450, 0xef218abc, 0x2729f948, 0x02835443, 0x5614336c, 0xb12aacb2, 0xe368aa6b, 0x3cc6ffad, 0x36206494, 0x2c90e9c1, 0x32bb53d4, 0xca03de5c, 0x775c1955, 0x19ef1ba3, 0x0b00dc1f, 0x244d0f40, 0x54d9e2bc, 0x25ced152, 0x967b03ad, 0x951c555f, 0x4c3f3b25, 0x13f6f3a2, 0x17fca5bc, 0x0e2d306c, 0xacd8764b, 0xca230bcc, 0x8569d3c6, 0x3264d8a2, 0xe8630905, 0x25e02a64, 0x3aba1fb0, 0x6bbdd25b, 0xee9a4c90, 0xcda25982, 0x8b3e804e, 0xf043fb94, 0x4b05fb94, 0x0c44c052, 0xf403f45c, 0x4333aa6b, 0xc193484d, 0x3fbf5d4c, 0x0bd7f74d, 0x150e3fb2, 0x8e2eddb0, 0x09daf150, 0x8a67c7c6, 0x22a9e52e, 0x05cff476, 0xc99b2f4e, 0x0f183b25, 0xd0358953, 0x20f232c6, 0x0ce9e217, 0x09f55d18, 0x0555795b, 0x5ed2fa59, 0x2ec85917, 0x2bf61fb0, 0x024ef54d, 0x3c53b859, 0x441cbb25, 0x50c8aa6b, 0x1b79175e, 0x3125795b, 0x27fc1fb0, 0xbcd53e32, 0xfc781718, 0x7a8ec345, 0x1da6985d, 0x34bd1f32, 0xcb00edcf, 0xf9a5fdce, 0x21ccdbac, 0xb7730118, 0x6a43f6cc, 0x6e65e262, 0x21ca1f3d, 0x10143b25, 0xc8dea132, 0xaf076693, 0x7e431bc6, 0xaa3df5c6, 0x44f0c536, 0xeea80925, 0x262371d4, 0xc85c895b, 0xa6611bc6, 0x1844e47a, 0x49084c90, 0xf3d95157, 0x63a4a844, 0x00477c70, 0x2934d35f, 0xe8d24465, 0x13df88b7, 0x8fcb7557, 0xa591bd5d, 0xc39453d4, 0xd5c49452, 0xc8de1a56, 0x3cdd0608, 0x3c147a55, 0x49e6cf4a, 0xb38c8705, 0x0bef3479, 0x01540f48, 0xd9c3ec57, 0xed6d4c90, 0xa529fb94, 0xe1c81955, 0xfde617c6, 0x72d18932, 0x9d61bb6a, 0x6d5cb258, 0x27c7d655, 0xc5644c90, 0x31fae3bc, 0x3afaf25e, 0x98efe2bc, 0x91020905, 0xb566795b, 0xaf91bd5d, 0xb164d655, 0x72eb47d4, 0xae62f3a2, 0xb4193b25, 0x0613fb94, 0xa6db048e, 0xf002464b, 0xc15ebb6a, 0x8a51f3a2, 0x485e2ed5, 0x119675a3, 0x1f3f555f, 0x39dbc082, 0x09dea445, 0x74382446, 0x3e836c4e, 0x6e43f6cc, 0x134dd9a2, 0x5876f945, 0x3516f725, 0x670c81d4, 0xaf7f170c, 0xb0e31155, 0xe271894e, 0x615e175e, 0xb3446fd0, 0x13d58ac1, 0x07cff476, 0xe601e405, 0x8321277d, 0x0997548d, 0xdb55336c, 0xa1271d73, 0x582463c0, 0xc2543025, 0xf6851c73, 0xe75d32ae, 0xf916b4dd, 0xf558fb94, 0x52111d73, 0x2bc8615d, 0xd4dcaf42, 0x65e30979, 0x2e1b2360, 0x0da01d73, 0x3f1263c0, 0xd15c735d, 0x9cf2134c, 0x20d0048e, 0x48cf0125, 0xf585bf5d, 0x12d7645e, 0xd5ace2bc, 0x0c6220b2, 0xbe13bb25, 0x88d0a52e, 0x559425b0, 0x24079e3d, 0xfaa37557, 0xf219b96a, 0x07e61e4c, 0x3ea1d295, 0x24e0d852, 0xdde212df, 0x44c37758, 0x55c243a4, 0xe77dd35f, 0x10c19a5f, 0x14d1048e, 0x1d50fbc6, 0x1570456c, 0x567c692e, 0x641d6d5b, 0xab0c0cc6, 0xab6803c0, 0x136f21b2, 0x6a72545d, 0x21d031b2, 0xff8b5fad, 0xfd0096b2, 0x5f469ac3, 0x3f6ffa62, 0x7501f863, 0x48471f60, 0xcccff3a2, 0x7f772e44, 0xc1de7757, 0x0c94c3cb, 0x620ac658, 0x520f1d25, 0x37366c5f, 0x7594b159, 0x3804f23c, 0xb81ff054, 0x96dd32c6, 0x928228bc, 0xf4006e41, 0x0241c244, 0x8dbdf243, 0x26d1b247, 0xd5381c73, 0xf3136e41, 0x4afa9bc0, 0xa3abf8ce, 0x464ce718, 0xbd9d017b, 0xf4f26132, 0x141b32d4, 0x2ec50c18, 0x4df119d9, 0x93f81772, 0xd9607c70, 0x3522b648, 0xf2006e41, 0x761fe550, 0x40104836, 0x55dffe96, 0xc45db158, 0xe75e4836, 0x8dfab7ad, 0xe3eff3a2, 0x6a6eaa6b, 0x2177d9c7, 0x724ce953, 0xafe918b9, 0xf9368a55, 0xdc0a555f, 0xa4b2d35f, 0x4d87b0b8, 0x93496a54, 0x5a5c967b, 0xd47028bc, 0x3c44e47a, 0x11c363c0, 0x28107c70, 0xb756a558, 0xb82bbb6a, 0x285d49ad, 0x3b0ce85c, 0xe53eb45f, 0xa836e23c, 0x409f63c0, 0xc80fbd44, 0x3447f677, 0xe4ca983b, 0x20673774, 0x96471ed9, 0x4c1d09b0, 0x91d5685d, 0x55beec4d, 0x1008be48, 0x660455d0, 0xf8170fda, 0x3c21dd3a, 0x8239bb36, 0x9fe7e2bc, 0x900c47ae, 0x6a355643, 0x03dcb318, 0xefca123d, 0x6af8c4d9, 0x5195e1a5, 0x32e89925, 0x0adc51c0, 0x45d7164c, 0x02495177, 0x8131175e, 0x681b5177, 0x41b6aa6b, 0x55a9603a, 0x1a0c1c1f, 0xdb4da043, 0x3b9b1632, 0x37e08368, 0x8b54e260, 0xcd14d459, 0x82a663c0, 0x05adc7dd, 0xe683f3a2, 0x4cddb150, 0x67a1a62e, 0x8c0acd25, 0x07f01f3e, 0x3111296c, 0x2d0fda2e, 0xa4f163c0, 0xca6db982, 0x78ed2359, 0x7eaa21c1, 0x62e4f3a2, 0x50b81d73, 0xcd074a3a, 0xcb2d904b, 0x9b3735ce, 0xab67f25c, 0xa0eb5036, 0x62ae5344, 0xe2569bb2, 0xc4422e4e, 0xab5ec8d5, 0xaa81e8dd, 0xa39264c6, 0xf391563d, 0xb79bbb25, 0x174a7857, 0x0fd4aa43, 0x3e158c32, 0x3ae8b982, 0xea342225, 0x48d1a842, 0xa52bf0da, 0x4bcb4a4c, 0xa6d3c15b, 0x49a0d35f, 0x97131b4c, 0xf197e252, 0xfe3ebd18, 0x156dacb8, 0xf63328bc, 0x8e95b84c, 0x560455d0, 0xee918c4e, 0x1d3e435f, 0xe1292f50, 0x0f1ec018, 0x7d70c60e, 0x6a29d5be, 0xf5fecb18, 0xd6da1f63, 0xccce1c2e, 0x7a289f5e, 0x2775ae47, 0x696df560, 0x4dbe00ae, 0x474e6c5c, 0x604141d5, 0xaed0c718, 0x8acfd23e, 0x7ff4b84c, 0x4b44fc60, 0xdf58aa4f, 0x9b7440c0, 0xb811c854, 0xd90ec24e, 0xcff75c46, 0xa5a9cc57, 0xb3d21e4c, 0x794779d9, 0xe5613d46, 0x9478be43, 0xc5d11152, 0xe85fbb6a, 0x3e1ed052, 0xf747e418, 0x3b9c61c2, 0xb2532949, 0x43077432, 0xa3db0b68, 0xb3b6e35a, 0x70361b6c, 0x3a8bad3e, 0x23079e3d, 0x09314c32, 0x92f90053, 0x4fc31955, 0xa59b0905, 0x924128bc, 0x4e63c444, 0x344dc236, 0x43055fcb, 0xdc1a1c73, 0x38aaaa6b, 0xa61cf554, 0x6d8f63c0, 0x24800a4c, 0x2406f953, 0x9558bb6a, 0x1d281660, 0x054c4954, 0x2de4d418, 0x5fdaf043, 0xb681356c, 0xf8c3febc, 0x8854f950, 0x55b45d32, 0xde07bcd1, 0x156e4bda, 0x924cf718, 0xc34a0d47, 0xdd5e1c45, 0x4a0d63c0, 0xaf4b88d5, 0x7852b958, 0x6f205fc0, 0x838af043, 0x45ac795b, 0x43bbaa6b, 0x998d1c73, 0x11c1d558, 0x749ec444, 0x9a38c232, 0xad2f8c32, 0x3446c658, 0x8fe7a52e, 0x4e846b61, 0x064b2d05, 0x0fd09740, 0x7a81a743, 0xf1f08e3f, 0x35ca1967, 0x24bdb17d, 0x144c2d05, 0x5505bb46, 0x13fd1bb9, 0x25de2618, 0xc80a8b4b, 0xcec0fd6c, 0xdc30ad4c, 0x4009f3a2, 0x472f3fb2, 0x5e69c936, 0x0380796d, 0xa463f8a2, 0xa46fbdc7, 0x3b0cc547, 0xb6644f46, 0x4b90fc47, 0x39e3f563, 0x72d81e56, 0xe177d9c7, 0x95bff743, 0xea985542, 0xc210ec55, 0xeef70b67, 0xc9eb175e, 0x844d38ad, 0x65afa247, 0x72da6d26, 0xed165dbc, 0xe8c83ad0, 0x9a8f37d8, 0x925adf50, 0x6b6ac162, 0x4b969e32, 0x735e1c45, 0x4423ff60, 0xfa57ec6d, 0xcde2fb65, 0x11093257, 0x4748cd5b, 0x720c03dd, 0x8c7b0905, 0xba8b2e48 }; void DumpAddresses() { int64 nStart = GetTimeMillis(); CAddrDB adb; adb.Write(addrman); printf("Flushed %d addresses to peers.dat %"PRI64d"ms\n", addrman.size(), GetTimeMillis() - nStart); } void static ProcessOneShot() { string strDest; { LOCK(cs_vOneShots); if (vOneShots.empty()) return; strDest = vOneShots.front(); vOneShots.pop_front(); } CAddress addr; CSemaphoreGrant grant(*semOutbound, true); if (grant) { if (!OpenNetworkConnection(addr, &grant, strDest.c_str(), true)) AddOneShot(strDest); } } void ThreadOpenConnections() { // Connect to specific addresses if (mapArgs.count("-connect") && mapMultiArgs["-connect"].size() > 0) { for (int64 nLoop = 0;; nLoop++) { ProcessOneShot(); BOOST_FOREACH(string strAddr, mapMultiArgs["-connect"]) { CAddress addr; OpenNetworkConnection(addr, NULL, strAddr.c_str()); for (int i = 0; i < 10 && i < nLoop; i++) { MilliSleep(500); } } MilliSleep(500); } } // Initiate network connections int64 nStart = GetTime(); loop { ProcessOneShot(); MilliSleep(500); CSemaphoreGrant grant(*semOutbound); boost::this_thread::interruption_point(); // Add seed nodes if IRC isn't working if (addrman.size()==0 && (GetTime() - nStart > 60) && !fTestNet) { std::vector<CAddress> vAdd; for (unsigned int i = 0; i < ARRAYLEN(pnSeed); i++) { // It'll only connect to one or two seed nodes because once it connects, // it'll get a pile of addresses with newer timestamps. // Seed nodes are given a random 'last seen time' of between one and two // weeks ago. const int64 nOneWeek = 7*24*60*60; struct in_addr ip; memcpy(&ip, &pnSeed[i], sizeof(ip)); CAddress addr(CService(ip, GetDefaultPort())); addr.nTime = GetTime()-GetRand(nOneWeek)-nOneWeek; vAdd.push_back(addr); } addrman.Add(vAdd, CNetAddr("127.0.0.1")); } // // Choose an address to connect to based on most recently seen // CAddress addrConnect; // Only connect out to one peer per network group (/16 for IPv4). // Do this here so we don't have to critsect vNodes inside mapAddresses critsect. int nOutbound = 0; set<vector<unsigned char> > setConnected; { LOCK(cs_vNodes); BOOST_FOREACH(CNode* pnode, vNodes) { if (!pnode->fInbound) { setConnected.insert(pnode->addr.GetGroup()); nOutbound++; } } } int64 nANow = GetAdjustedTime(); int nTries = 0; loop { // use an nUnkBias between 10 (no outgoing connections) and 90 (8 outgoing connections) CAddress addr = addrman.Select(10 + min(nOutbound,8)*10); // if we selected an invalid address, restart if (!addr.IsValid() || setConnected.count(addr.GetGroup()) || IsLocal(addr)) break; // If we didn't find an appropriate destination after trying 100 addresses fetched from addrman, // stop this loop, and let the outer loop run again (which sleeps, adds seed nodes, recalculates // already-connected network ranges, ...) before trying new addrman addresses. nTries++; if (nTries > 100) break; if (IsLimited(addr)) continue; // only consider very recently tried nodes after 30 failed attempts if (nANow - addr.nLastTry < 600 && nTries < 30) continue; // do not allow non-default ports, unless after 50 invalid addresses selected already if (addr.GetPort() != GetDefaultPort() && nTries < 50) continue; addrConnect = addr; break; } if (addrConnect.IsValid()) OpenNetworkConnection(addrConnect, &grant); } } void ThreadOpenAddedConnections() { { LOCK(cs_vAddedNodes); vAddedNodes = mapMultiArgs["-addnode"]; } if (HaveNameProxy()) { while(true) { list<string> lAddresses(0); { LOCK(cs_vAddedNodes); BOOST_FOREACH(string& strAddNode, vAddedNodes) lAddresses.push_back(strAddNode); } BOOST_FOREACH(string& strAddNode, lAddresses) { CAddress addr; CSemaphoreGrant grant(*semOutbound); OpenNetworkConnection(addr, &grant, strAddNode.c_str()); MilliSleep(500); } MilliSleep(120000); // Retry every 2 minutes } } for (unsigned int i = 0; true; i++) { list<string> lAddresses(0); { LOCK(cs_vAddedNodes); BOOST_FOREACH(string& strAddNode, vAddedNodes) lAddresses.push_back(strAddNode); } list<vector<CService> > lservAddressesToAdd(0); BOOST_FOREACH(string& strAddNode, lAddresses) { vector<CService> vservNode(0); if(Lookup(strAddNode.c_str(), vservNode, GetDefaultPort(), fNameLookup, 0)) { lservAddressesToAdd.push_back(vservNode); { LOCK(cs_setservAddNodeAddresses); BOOST_FOREACH(CService& serv, vservNode) setservAddNodeAddresses.insert(serv); } } } // Attempt to connect to each IP for each addnode entry until at least one is successful per addnode entry // (keeping in mind that addnode entries can have many IPs if fNameLookup) { LOCK(cs_vNodes); BOOST_FOREACH(CNode* pnode, vNodes) for (list<vector<CService> >::iterator it = lservAddressesToAdd.begin(); it != lservAddressesToAdd.end(); it++) BOOST_FOREACH(CService& addrNode, *(it)) if (pnode->addr == addrNode) { it = lservAddressesToAdd.erase(it); it--; break; } } BOOST_FOREACH(vector<CService>& vserv, lservAddressesToAdd) { CSemaphoreGrant grant(*semOutbound); OpenNetworkConnection(CAddress(vserv[i % vserv.size()]), &grant); MilliSleep(500); } MilliSleep(120000); // Retry every 2 minutes } } // if successful, this moves the passed grant to the constructed node bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound, const char *strDest, bool fOneShot) { // // Initiate outbound network connection // boost::this_thread::interruption_point(); if (!strDest) if (IsLocal(addrConnect) || FindNode((CNetAddr)addrConnect) || CNode::IsBanned(addrConnect) || FindNode(addrConnect.ToStringIPPort().c_str())) return false; if (strDest && FindNode(strDest)) return false; CNode* pnode = ConnectNode(addrConnect, strDest); boost::this_thread::interruption_point(); if (!pnode) return false; if (grantOutbound) grantOutbound->MoveTo(pnode->grantOutbound); pnode->fNetworkNode = true; if (fOneShot) pnode->fOneShot = true; return true; } // for now, use a very simple selection metric: the node from which we received // most recently double static NodeSyncScore(const CNode *pnode) { return -pnode->nLastRecv; } void static StartSync(const vector<CNode*> &vNodes) { CNode *pnodeNewSync = NULL; double dBestScore = 0; // fImporting and fReindex are accessed out of cs_main here, but only // as an optimization - they are checked again in SendMessages. if (fImporting || fReindex) return; // Iterate over all nodes BOOST_FOREACH(CNode* pnode, vNodes) { // check preconditions for allowing a sync if (!pnode->fClient && !pnode->fOneShot && !pnode->fDisconnect && pnode->fSuccessfullyConnected && (pnode->nStartingHeight > (nBestHeight - 144)) && (pnode->nVersion < NOBLKS_VERSION_START || pnode->nVersion >= NOBLKS_VERSION_END)) { // if ok, compare node's score with the best so far double dScore = NodeSyncScore(pnode); if (pnodeNewSync == NULL || dScore > dBestScore) { pnodeNewSync = pnode; dBestScore = dScore; } } } // if a new sync candidate was found, start sync! if (pnodeNewSync) { pnodeNewSync->fStartSync = true; pnodeSync = pnodeNewSync; } } void ThreadMessageHandler() { SetThreadPriority(THREAD_PRIORITY_BELOW_NORMAL); while (true) { bool fHaveSyncNode = false; vector<CNode*> vNodesCopy; { LOCK(cs_vNodes); vNodesCopy = vNodes; BOOST_FOREACH(CNode* pnode, vNodesCopy) { pnode->AddRef(); if (pnode == pnodeSync) fHaveSyncNode = true; } } if (!fHaveSyncNode) StartSync(vNodesCopy); // Poll the connected nodes for messages CNode* pnodeTrickle = NULL; if (!vNodesCopy.empty()) pnodeTrickle = vNodesCopy[GetRand(vNodesCopy.size())]; bool fSleep = true; BOOST_FOREACH(CNode* pnode, vNodesCopy) { if (pnode->fDisconnect) continue; // Receive messages { TRY_LOCK(pnode->cs_vRecvMsg, lockRecv); if (lockRecv) { if (!ProcessMessages(pnode)) pnode->CloseSocketDisconnect(); if (pnode->nSendSize < SendBufferSize()) { if (!pnode->vRecvGetData.empty() || (!pnode->vRecvMsg.empty() && pnode->vRecvMsg[0].complete())) { fSleep = false; } } } } boost::this_thread::interruption_point(); // Send messages { TRY_LOCK(pnode->cs_vSend, lockSend); if (lockSend) SendMessages(pnode, pnode == pnodeTrickle); } boost::this_thread::interruption_point(); } { LOCK(cs_vNodes); BOOST_FOREACH(CNode* pnode, vNodesCopy) pnode->Release(); } if (fSleep) MilliSleep(100); } } bool BindListenPort(const CService &addrBind, string& strError) { strError = ""; int nOne = 1; // Create socket for listening for incoming connections #ifdef USE_IPV6 struct sockaddr_storage sockaddr; #else struct sockaddr sockaddr; #endif socklen_t len = sizeof(sockaddr); if (!addrBind.GetSockAddr((struct sockaddr*)&sockaddr, &len)) { strError = strprintf("Error: bind address family for %s not supported", addrBind.ToString().c_str()); printf("%s\n", strError.c_str()); return false; } SOCKET hListenSocket = socket(((struct sockaddr*)&sockaddr)->sa_family, SOCK_STREAM, IPPROTO_TCP); if (hListenSocket == INVALID_SOCKET) { strError = strprintf("Error: Couldn't open socket for incoming connections (socket returned error %d)", WSAGetLastError()); printf("%s\n", strError.c_str()); return false; } #ifdef SO_NOSIGPIPE // Different way of disabling SIGPIPE on BSD setsockopt(hListenSocket, SOL_SOCKET, SO_NOSIGPIPE, (void*)&nOne, sizeof(int)); #endif #ifndef WIN32 // Allow binding if the port is still in TIME_WAIT state after // the program was closed and restarted. Not an issue on windows. setsockopt(hListenSocket, SOL_SOCKET, SO_REUSEADDR, (void*)&nOne, sizeof(int)); #endif #ifdef WIN32 // Set to non-blocking, incoming connections will also inherit this if (ioctlsocket(hListenSocket, FIONBIO, (u_long*)&nOne) == SOCKET_ERROR) #else if (fcntl(hListenSocket, F_SETFL, O_NONBLOCK) == SOCKET_ERROR) #endif { strError = strprintf("Error: Couldn't set properties on socket for incoming connections (error %d)", WSAGetLastError()); printf("%s\n", strError.c_str()); return false; } #ifdef USE_IPV6 // some systems don't have IPV6_V6ONLY but are always v6only; others do have the option // and enable it by default or not. Try to enable it, if possible. if (addrBind.IsIPv6()) { #ifdef IPV6_V6ONLY #ifdef WIN32 setsockopt(hListenSocket, IPPROTO_IPV6, IPV6_V6ONLY, (const char*)&nOne, sizeof(int)); #else setsockopt(hListenSocket, IPPROTO_IPV6, IPV6_V6ONLY, (void*)&nOne, sizeof(int)); #endif #endif #ifdef WIN32 int nProtLevel = 10 /* PROTECTION_LEVEL_UNRESTRICTED */; int nParameterId = 23 /* IPV6_PROTECTION_LEVEl */; // this call is allowed to fail setsockopt(hListenSocket, IPPROTO_IPV6, nParameterId, (const char*)&nProtLevel, sizeof(int)); #endif } #endif if (::bind(hListenSocket, (struct sockaddr*)&sockaddr, len) == SOCKET_ERROR) { int nErr = WSAGetLastError(); if (nErr == WSAEADDRINUSE) strError = strprintf(_("Unable to bind to %s on this computer. Gtaccoin is probably already running."), addrBind.ToString().c_str()); else strError = strprintf(_("Unable to bind to %s on this computer (bind returned error %d, %s)"), addrBind.ToString().c_str(), nErr, strerror(nErr)); printf("%s\n", strError.c_str()); return false; } printf("Bound to %s\n", addrBind.ToString().c_str()); // Listen for incoming connections if (listen(hListenSocket, SOMAXCONN) == SOCKET_ERROR) { strError = strprintf("Error: Listening for incoming connections failed (listen returned error %d)", WSAGetLastError()); printf("%s\n", strError.c_str()); return false; } vhListenSocket.push_back(hListenSocket); if (addrBind.IsRoutable() && fDiscover) AddLocal(addrBind, LOCAL_BIND); return true; } void static Discover() { if (!fDiscover) return; #ifdef WIN32 // Get local host IP char pszHostName[1000] = ""; if (gethostname(pszHostName, sizeof(pszHostName)) != SOCKET_ERROR) { vector<CNetAddr> vaddr; if (LookupHost(pszHostName, vaddr)) { BOOST_FOREACH (const CNetAddr &addr, vaddr) { AddLocal(addr, LOCAL_IF); } } } #else // Get local host ip struct ifaddrs* myaddrs; if (getifaddrs(&myaddrs) == 0) { for (struct ifaddrs* ifa = myaddrs; ifa != NULL; ifa = ifa->ifa_next) { if (ifa->ifa_addr == NULL) continue; if ((ifa->ifa_flags & IFF_UP) == 0) continue; if (strcmp(ifa->ifa_name, "lo") == 0) continue; if (strcmp(ifa->ifa_name, "lo0") == 0) continue; if (ifa->ifa_addr->sa_family == AF_INET) { struct sockaddr_in* s4 = (struct sockaddr_in*)(ifa->ifa_addr); CNetAddr addr(s4->sin_addr); if (AddLocal(addr, LOCAL_IF)) printf("IPv4 %s: %s\n", ifa->ifa_name, addr.ToString().c_str()); } #ifdef USE_IPV6 else if (ifa->ifa_addr->sa_family == AF_INET6) { struct sockaddr_in6* s6 = (struct sockaddr_in6*)(ifa->ifa_addr); CNetAddr addr(s6->sin6_addr); if (AddLocal(addr, LOCAL_IF)) printf("IPv6 %s: %s\n", ifa->ifa_name, addr.ToString().c_str()); } #endif } freeifaddrs(myaddrs); } #endif // Don't use external IPv4 discovery, when -onlynet="IPv6" if (!IsLimited(NET_IPV4)) NewThread(ThreadGetMyExternalIP, NULL); } void StartNode(boost::thread_group& threadGroup) { if (semOutbound == NULL) { // initialize semaphore int nMaxOutbound = min(MAX_OUTBOUND_CONNECTIONS, nMaxConnections); semOutbound = new CSemaphore(nMaxOutbound); } if (pnodeLocalHost == NULL) pnodeLocalHost = new CNode(INVALID_SOCKET, CAddress(CService("127.0.0.1", 0), nLocalServices)); Discover(); // // Start threads // if (!GetBoolArg("-dnsseed", true)) printf("DNS seeding disabled\n"); else threadGroup.create_thread(boost::bind(&TraceThread<boost::function<void()> >, "dnsseed", &ThreadDNSAddressSeed)); #ifdef USE_UPNP // Map ports with UPnP MapPort(GetBoolArg("-upnp", USE_UPNP)); #endif // Send and receive from sockets, accept connections threadGroup.create_thread(boost::bind(&TraceThread<void (*)()>, "net", &ThreadSocketHandler)); // Initiate outbound connections from -addnode threadGroup.create_thread(boost::bind(&TraceThread<void (*)()>, "addcon", &ThreadOpenAddedConnections)); // Initiate outbound connections threadGroup.create_thread(boost::bind(&TraceThread<void (*)()>, "opencon", &ThreadOpenConnections)); // Process messages threadGroup.create_thread(boost::bind(&TraceThread<void (*)()>, "msghand", &ThreadMessageHandler)); // Dump network addresses threadGroup.create_thread(boost::bind(&LoopForever<void (*)()>, "dumpaddr", &DumpAddresses, DUMP_ADDRESSES_INTERVAL * 1000)); } bool StopNode() { printf("StopNode()\n"); GenerateBitcoins(false, NULL); MapPort(false); nTransactionsUpdated++; if (semOutbound) for (int i=0; i<MAX_OUTBOUND_CONNECTIONS; i++) semOutbound->post(); MilliSleep(50); DumpAddresses(); return true; } class CNetCleanup { public: CNetCleanup() { } ~CNetCleanup() { // Close sockets BOOST_FOREACH(CNode* pnode, vNodes) if (pnode->hSocket != INVALID_SOCKET) closesocket(pnode->hSocket); BOOST_FOREACH(SOCKET hListenSocket, vhListenSocket) if (hListenSocket != INVALID_SOCKET) if (closesocket(hListenSocket) == SOCKET_ERROR) printf("closesocket(hListenSocket) failed with error %d\n", WSAGetLastError()); // clean up some globals (to help leak detection) BOOST_FOREACH(CNode *pnode, vNodes) delete pnode; BOOST_FOREACH(CNode *pnode, vNodesDisconnected) delete pnode; vNodes.clear(); vNodesDisconnected.clear(); delete semOutbound; semOutbound = NULL; delete pnodeLocalHost; pnodeLocalHost = NULL; #ifdef WIN32 // Shutdown Windows Sockets WSACleanup(); #endif } } instance_of_cnetcleanup; void RelayTransaction(const CTransaction& tx, const uint256& hash) { CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); ss.reserve(10000); ss << tx; RelayTransaction(tx, hash, ss); } void RelayTransaction(const CTransaction& tx, const uint256& hash, const CDataStream& ss) { CInv inv(MSG_TX, hash); { LOCK(cs_mapRelay); // Expire old relay messages while (!vRelayExpiration.empty() && vRelayExpiration.front().first < GetTime()) { mapRelay.erase(vRelayExpiration.front().second); vRelayExpiration.pop_front(); } // Save original serialized message so newer versions are preserved mapRelay.insert(std::make_pair(inv, ss)); vRelayExpiration.push_back(std::make_pair(GetTime() + 15 * 60, inv)); } LOCK(cs_vNodes); BOOST_FOREACH(CNode* pnode, vNodes) { if(!pnode->fRelayTxes) continue; LOCK(pnode->cs_filter); if (pnode->pfilter) { if (pnode->pfilter->IsRelevantAndUpdate(tx, hash)) pnode->PushInventory(inv); } else pnode->PushInventory(inv); } }
; A116576: Number of distinct squares D(n) in the n-th iterate of the tribonacci morphism (a -> ab, b -> ac, c -> a) on the letter a. ; Submitted by Jon Maiga ; 2,7,17,35,69,132,248,462,856,1581,2915,5369,9883,18186,33458,61548,113214,208243,383029,704511,1295809,2383376,4383724,8062938,14830068,27276761,50169799,92276661,169723255,312169750,574169702,1056062744 add $0,2 lpb $0 sub $0,1 mov $3,2 add $4,2 add $5,$1 add $1,2 sub $3,$4 add $5,$4 add $3,$5 add $3,2 mov $4,$2 mov $2,$3 add $5,$4 lpe mov $0,$2 div $0,2 sub $0,2
; A122552: a(0)=a(1)=a(2)=1, a(n) = a(n-1) + a(n-2) + 2*a(n-3) for n > 2. ; 1,1,1,4,7,13,28,55,109,220,439,877,1756,3511,7021,14044,28087,56173,112348,224695,449389,898780,1797559,3595117,7190236,14380471,28760941,57521884,115043767,230087533,460175068,920350135,1840700269,3681400540,7362801079,14725602157,29451204316,58902408631,117804817261,235609634524,471219269047,942438538093,1884877076188,3769754152375,7539508304749,15079016609500,30158033218999,60316066437997,120632132875996,241264265751991,482528531503981,965057063007964,1930114126015927,3860228252031853,7720456504063708,15440913008127415,30881826016254829,61763652032509660,123527304065019319,247054608130038637,494109216260077276,988218432520154551,1976436865040309101,3952873730080618204,7905747460161236407,15811494920322472813,31622989840644945628,63245979681289891255,126491959362579782509,252983918725159565020,505967837450319130039,1011935674900638260077,2023871349801276520156,4047742699602553040311,8095485399205106080621,16190970798410212161244,32381941596820424322487,64763883193640848644973,129527766387281697289948,259055532774563394579895,518111065549126789159789,1036222131098253578319580,2072444262196507156639159,4144888524393014313278317,8289777048786028626556636,16579554097572057253113271,33159108195144114506226541,66318216390288229012453084,132636432780576458024906167,265272865561152916049812333,530545731122305832099624668,1061091462244611664199249335,2122182924489223328398498669,4244365848978446656796997340,8488731697956893313593994679,16977463395913786627187989357,33954926791827573254375978716,67909853583655146508751957431,135819707167310293017503914861,271639414334620586035007829724 mov $1,2 pow $1,$0 div $1,7 mul $1,3 add $1,1 mov $0,$1
#include "display.h" #include "settings.h" // #define ENG_LANG #define RUS_LANG namespace letter { #if defined(RUS_LANG) static const uint8_t CAPITAL_PEH = 168; static const uint8_t CAPITAL_VEH = 66; static const uint8_t CAPITAL_ESS = 67; static const uint8_t CAPITAL_CH = 171; static const uint8_t ESS = 99; static const uint8_t TEH = 191; static const uint8_t REH = 112; static const uint8_t BEH = 178; static const uint8_t ENN = 189; static const uint8_t *RUS_DAY_NAME[7][3] = { {CAPITAL_VEH, ESS}, {CAPITAL_PEH, ENN}, {CAPITAL_VEH, TEH}, {CAPITAL_ESS, REH}, {CAPITAL_CH, TEH}, {CAPITAL_PEH, TEH}, {CAPITAL_ESS, BEH} }; static const uint8_t RUS_SHORT_DAY_NAME_ON[7] = { CAPITAL_VEH, CAPITAL_PEH, CAPITAL_VEH, CAPITAL_ESS, CAPITAL_CH, CAPITAL_PEH, CAPITAL_ESS }; static const uint8_t RUS_SHORT_DAY_NAME_OFF[7] = { 179, //VEH, 190, //PEH, 179, //VEH, 'c', //ESS, 193, //CH, 190, //PEH, 'c' //ESS }; #elif defined(ENG_LANG) static const char *DAY_NAME[7] = { "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" }; static const char SHORT_DAY_NAME_ON[7] = { 'S', 'M', 'T', 'W', 'T', 'F', 'S' }; static const char SHORT_DAY_NAME_OFF[7] = { 's', 'm', 't', 'w', 't', 'f', 's' }; #endif char * long_day_name(uint8_t day_no) { static char buff[3]; buff[0] = buff[1] = buff[2] = 0; #if defined(RUS_LANG) sprintf(buff, "%c%c", RUS_DAY_NAME[day_no][0], RUS_DAY_NAME[day_no][1]); #elif defined(ENG_LANG) sprintf(buff, "%c%c", DAY_NAME[day_no][0], DAY_NAME[day_no][1]); #endif return buff; } uint8_t day_char_name(uint8_t day_no, int armed) { #if defined(RUS_LANG) return (armed ? letter::RUS_SHORT_DAY_NAME_ON[day_no] : letter::RUS_SHORT_DAY_NAME_OFF[day_no]); #elif defined(ENG_LANG) return (armed ? letter::SHORT_DAY_NAME_ON[day_no] : letter::SHORT_DAY_NAME_OFF[day_no]); #endif } }; Display::Display() : _lcd(Pin::Display::RS, Pin::Display::ENABLE, Pin::Display::D0, Pin::Display::D1, Pin::Display::D2, Pin::Display::D3) { } void Display::print_edit_clock_tuning(uint32_t timeshift) { char buff[17]; memset(buff, 0, sizeof(buff)); print_text(0, 0, "TU "); sprintf(buff, "%11d uS/S", timeshift); print_text(1, 0, buff); // _blink_char(); } void Display::setup(uint8_t contrast_pin, uint8_t brightness_pin) { _contrast_pin = contrast_pin; _brightness_pin = brightness_pin; pinMode(_contrast_pin, OUTPUT); pinMode(_brightness_pin, OUTPUT); _lcd.begin(16, 2); } void Display::print_text(uint8_t row, uint8_t column, char *s) { _lcd.setCursor(column, row); _lcd.print(s); } void Display::print_clock_state(const Clock &clock) { switch (clock.state()) { case Clock::S_CLOCK1: print_text(0, 0, "CL1"); break; case Clock::S_CLOCK2: print_text(0, 0, "CL2"); break; case Clock::S_ALARM1: print_text(0, 0, "AL1"); break; case Clock::S_ALARM2: print_text(0, 0, "AL2"); break; case Clock::S_ALARM3: print_text(0, 0, "AL3"); break; case Clock::S_SIGNAL: print_text(0, 0, "SG "); break; case Clock::S_TIMER1: print_text(0, 0, "T1 "); break; case Clock::S_TIMER2: print_text(0, 0, "T2 "); break; case Clock::S_TIMER3: print_text(0, 0, "T3 "); break; case Clock::S_STOPWATCH: print_text(0, 0, "SW "); break; } print_text(1, 0, " "); } void Display::_blink_char() { static uint8_t c = 238; _lcd.setCursor(0, 1); _lcd.print((char)c); (c == 239 ? c = 238 : ++c); // static uint8_t c = 180; // _lcd.setCursor(0, 0); // _lcd.print((char)c); // (c == 255 ? c = 0 : ++c); // _lcd.setCursor(0, 1); // _lcd.print(c); } void Display::print_clock_time(const DateTime &dt) { char buff[17]; memset(buff, 0, sizeof(buff)); sprintf(buff, " %2u:%02u:%02u ", dt.hour, dt.minute, dt.second); print_text(0, 3, buff); _blink_char(); } void Display::print_clock_date(const DateTime &dt) { char buff[17]; memset(buff, 0, sizeof(buff)); sprintf(buff, "%2u.%02u.%04u %s", dt.day, dt.month, dt.year, letter::long_day_name(dt.day_of_week)); print_text(1, 3, buff); } void Display::print_clock_datetime(const DateTime &dt) { print_clock_time(dt); print_clock_date(dt); } void Display::print_alarm_type1(const AlarmDateTime &dt) { char buff[17]; memset(buff, 0, sizeof(buff)); sprintf(buff, "%2u:%02u %s", dt.hour, dt.minute, (dt.on ? "on " : "off")); print_text(0, 4, buff); memset(buff, ' ', sizeof(buff) - 1); print_text(1, 0, buff); _blink_char(); } void Display::print_alarm_type2(const AlarmDateTime &dt) { print_alarm_type1(dt); } char * Display::_fill_str_with_day_names(const AlarmDateTime &dt, char *buff, uint8_t buff_offset) { buff[buff_offset++] = letter::day_char_name(1, dt.days[1]); buff[buff_offset++] = letter::day_char_name(2, dt.days[2]); buff[buff_offset++] = letter::day_char_name(3, dt.days[3]); buff[buff_offset++] = letter::day_char_name(4, dt.days[4]); buff[buff_offset++] = letter::day_char_name(5, dt.days[5]); buff[buff_offset++] = letter::day_char_name(6, dt.days[6]); buff[buff_offset++] = letter::day_char_name(0, dt.days[0]); return buff; } char * Display::_fill_str_with_day_names_blink(const AlarmDateTime &dt, char *buff, uint8_t buff_offset) { buff[buff_offset++] = (dt.day_pointer == 1 ? ' ' : letter::day_char_name(1, dt.days[1])); buff[buff_offset++] = (dt.day_pointer == 2 ? ' ' : letter::day_char_name(2, dt.days[2])); buff[buff_offset++] = (dt.day_pointer == 3 ? ' ' : letter::day_char_name(3, dt.days[3])); buff[buff_offset++] = (dt.day_pointer == 4 ? ' ' : letter::day_char_name(4, dt.days[4])); buff[buff_offset++] = (dt.day_pointer == 5 ? ' ' : letter::day_char_name(5, dt.days[5])); buff[buff_offset++] = (dt.day_pointer == 6 ? ' ' : letter::day_char_name(6, dt.days[6])); buff[buff_offset++] = (dt.day_pointer == 0 ? ' ' : letter::day_char_name(0, dt.days[0])); return buff; } void Display::print_alarm_type3(const AlarmDateTime &dt) { char buff[17]; memset(buff, 0, sizeof(buff)); sprintf(buff, "%2u:%02u %s", dt.hour, dt.minute, (dt.on ? "on " : "off")); print_text(0, 4, buff); memset(buff, ' ', 16); print_text(1, 0, _fill_str_with_day_names(dt, buff, 5)); _blink_char(); } void Display::print_signal(bool on) { char buff[17]; memset(buff, 0, sizeof(buff)); sprintf(buff, "%s ", (on ? "on " : "off")); print_text(0, 4, buff); memset(buff, ' ', sizeof(buff) - 1); print_text(1, 0, buff); _blink_char(); } void Display::print_timer_type1(const TimerDateTime &dt) { char buff[16]; memset(buff, 0, sizeof(buff)); sprintf(buff, "%2u:%02u:%02u %s", dt.origin_hour, dt.origin_minute, dt.origin_second, (dt.stoppped ? "off" : "on ")); print_text(0, 4, buff); memset(buff, 0, sizeof(buff)); sprintf(buff, "%2u:%02u:%02u ", dt.hour, dt.minute, dt.second); print_text(1, 4, buff); _blink_char(); } void Display::print_timer_type2(const TimerDateTime &dt) { print_timer_type1(dt); } void Display::print_timer_type3(const TimerDateTime &dt) { char buff[16]; memset(buff, 0, 16); sprintf(buff, "%2u.%02u.%02u %s", dt.origin_day, dt.origin_month, dt.origin_year % 100, (dt.stoppped ? "off" : "on ")); print_text(0, 4, buff); memset(buff, 0, 16); if (dt.day < 1000) { sprintf(buff, "%3u %2u:%02u:%02u", dt.day, dt.hour, dt.minute, dt.second); print_text(1, 0, buff); } else { _lcd.setCursor(0, 1); _lcd.write((char)123); sprintf(buff, "%2u %2u:%02u:%02u", dt.day % 100, dt.hour, dt.minute, dt.second); print_text(2, 1, buff); } _blink_char(); } void Display::print_stopwatch(const StopwatchTime &t) { char buff[17]; memset(buff, 0, 17); sprintf(buff, "%02u:%02u:%02u.%01u ", t.counter().hour(), t.counter().minute(), t.counter().second(), t.counter().ms() / 100); print_text(0, 3, buff); memset(buff, 0, 17); if (!t.current_stamp().ready) { sprintf(buff, " --:--:--.- "); } else { sprintf(buff, "%2u %02u:%02u:%02u.%01u ", t.current_stamp_index() + 1, t.current_stamp().lap_counter.hour(), t.current_stamp().lap_counter.minute(), t.current_stamp().lap_counter.second(), t.current_stamp().lap_counter.ms() / 100); } print_text(1, 0, buff); } void Display::set_contrast(uint8_t contrast) { _contrast = contrast; analogWrite(_contrast_pin, _contrast); } void Display::set_brightness(uint8_t brightness) { _brightness = brightness; analogWrite(_brightness_pin, _brightness); } void Display::clear() { _lcd.clear(); } bool Display::_blink() const { return ((millis() % 1000) < 250); } void Display::print_edit_clock(const DateTime &dt, Clock::CLOCK_SUBSTATES state) { if (_blink()) { char buff[2][17]; memset(buff, 0, sizeof(buff)); if (state == Clock::S_CLOCK_EDIT_SECONDS) { sprintf(buff[0], " %2u:%02u: ", dt.hour, dt.minute); sprintf(buff[1], "%2u.%02u.%04u %s", dt.day, dt.month, dt.year, letter::long_day_name(dt.day_of_week)); } else if (state == Clock::S_CLOCK_EDIT_MINUTES) { sprintf(buff[0], " %2u: :%02u", dt.hour, dt.second); sprintf(buff[1], "%2u.%02u.%04u %s", dt.day, dt.month, dt.year, letter::long_day_name(dt.day_of_week)); } else if (state == Clock::S_CLOCK_EDIT_HOURS) { sprintf(buff[0], " :%02u:%02u", dt.minute, dt.second); sprintf(buff[1], "%2u.%02u.%04u %s", dt.day, dt.month, dt.year, letter::long_day_name(dt.day_of_week)); } else if (state == Clock::S_CLOCK_EDIT_DAYS) { sprintf(buff[0], " %2u:%02u:%02u", dt.hour, dt.minute, dt.second); sprintf(buff[1], " .%02u.%04u %s", dt.month, dt.year, letter::long_day_name(dt.day_of_week)); } else if (state == Clock::S_CLOCK_EDIT_MONTHS) { sprintf(buff[0], " %2u:%02u:%02u", dt.hour, dt.minute, dt.second); sprintf(buff[1], "%2u. .%04u %s", dt.day, dt.year, letter::long_day_name(dt.day_of_week)); } else if (state == Clock::S_CLOCK_EDIT_YEARS) { sprintf(buff[0], " %2u:%02u:%02u", dt.hour, dt.minute, dt.second); sprintf(buff[1], "%2u.%02u. %s", dt.day, dt.month, letter::long_day_name(dt.day_of_week)); } print_text(0, 3, buff[0]); print_text(1, 3, buff[1]); } else { print_clock_datetime(dt); } } void Display::print_edit_alarm_type1(const AlarmDateTime &dt, Clock::CLOCK_SUBSTATES state) { if (_blink()) { char buff[17]; memset(buff, 0, sizeof(buff)); if (state == Clock::S_ALARM_TYPE1_EDIT_MINUTES) sprintf(buff, "%2u: %s", dt.hour, (dt.on ? "on " : "off")); else if (state == Clock::S_ALARM_TYPE1_EDIT_HOURS) sprintf(buff, " :%02u %s", dt.minute, (dt.on ? "on " : "off")); print_text(0, 4, buff); } else { print_alarm_type1(dt); } } void Display::print_edit_alarm_type2(const AlarmDateTime &dt, Clock::CLOCK_SUBSTATES state) { print_edit_alarm_type1(dt, state); } void Display::print_edit_alarm_type3(const AlarmDateTime &dt, Clock::CLOCK_SUBSTATES state) { char buff[17]; memset(buff, 0, sizeof(buff)); bool blink = _blink(); if (blink) { if (state == Clock::S_ALARM_TYPE2_EDIT_MINUTES) sprintf(buff, "%2u: %s", dt.hour, // dt.minute, (dt.on ? "on" : "off")); else if (state == Clock::S_ALARM_TYPE2_EDIT_HOURS) sprintf(buff, " :%02u %s", // dt.hour, dt.minute, (dt.on ? "on " : "off")); else sprintf(buff, "%2u:%02u %s", dt.hour, dt.minute, (dt.on ? "on " : "off")); } else { sprintf(buff, "%2u:%02u %s", dt.hour, dt.minute, (dt.on ? "on " : "off")); } print_text(0, 4, buff); memset(buff, ' ', 16); if (state == Clock::S_ALARM_TYPE2_EDIT_DAYS_OF_WEEK) { if (blink) _fill_str_with_day_names_blink(dt, buff, 5); else _fill_str_with_day_names(dt, buff, 5); } else { _fill_str_with_day_names(dt, buff, 5); } print_text(1, 0, buff); } void Display::print_edit_timer_type1(const TimerDateTime &dt, Clock::CLOCK_SUBSTATES state) { if (_blink()) { char buff[17]; memset(buff, 0, sizeof(buff)); if (state == Clock::S_TIMER_TYPE1_EDIT_SECONDS) sprintf(buff, "%2u:%02u: %s", dt.origin_hour, dt.origin_minute, //dt.origin_second, (dt.stoppped ? "off" : "on ")); else if (state == Clock::S_TIMER_TYPE1_EDIT_MINUTES) sprintf(buff, "%2u: :%02u %s", dt.origin_hour, // dt.origin_minute, dt.origin_second, (dt.stoppped ? "off" : "on ")); else if (state == Clock::S_TIMER_TYPE1_EDIT_HOURS) sprintf(buff, " :%02u:%02u %s", // dt.origin_hour, dt.origin_minute, dt.origin_second, (dt.stoppped ? "off" : "on ")); print_text(0, 4, buff); } else { print_timer_type1(dt); } } void Display::print_edit_timer_type2(const TimerDateTime &dt, Clock::CLOCK_SUBSTATES state) { print_edit_timer_type1(dt, state); } void Display::print_edit_timer_type3(const TimerDateTime &dt, Clock::CLOCK_SUBSTATES state) { if (_blink()) { char buff[17]; memset(buff, 0, sizeof(buff)); if (state == Clock::S_TIMER_TYPE2_EDIT_DAYS) sprintf(buff, " .%02u.%02u %s", // dt.origin_day, dt.origin_month, dt.origin_year % 100, (dt.on ? "on " : "off")); else if (state == Clock::S_TIMER_TYPE2_EDIT_MONTHS) sprintf(buff, "%2u. .%02u %s", dt.origin_day, // dt.origin_month, dt.origin_year % 100, (dt.on ? "on " : "off")); else if (state == Clock::S_TIMER_TYPE2_EDIT_YEARS) sprintf(buff, "%2u.%02u. %s", dt.origin_day, dt.origin_month, // dt.origin_year, (dt.on ? "on " : "off")); print_text(0, 4, buff); } else { print_timer_type3(dt); } } uint8_t Display::contrast() const { return _contrast; } uint8_t Display::brightness() const { return _brightness; }
; A126420: a(n) = n^3 - n - 1. ; -1,5,23,59,119,209,335,503,719,989,1319,1715,2183,2729,3359,4079,4895,5813,6839,7979,9239,10625,12143,13799,15599,17549,19655,21923,24359,26969,29759,32735,35903,39269,42839,46619,50615,54833,59279,63959,68879,74045,79463,85139,91079,97289,103775,110543,117599,124949,132599,140555,148823,157409,166319,175559,185135,195053,205319,215939,226919,238265,249983,262079,274559,287429,300695,314363,328439,342929,357839,373175,388943,405149,421799,438899,456455,474473,492959,511919,531359,551285,571703,592619,614039,635969,658415,681383,704879,728909,753479,778595,804263,830489,857279,884639,912575,941093,970199,999899 add $0,2 bin $0,3 mul $0,6 sub $0,1
; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. #include "ksarm.h" #include "asmconstants.h" #include "asmmacros.h" TEXTAREA ; ------------------------------------------------------------------ ; Start of the writeable code region LEAF_ENTRY JIT_PatchedCodeStart bx lr LEAF_END ; ------------------------------------------------------------------ ; GC write barrier support. ; ; GC Write barriers are defined in asmhelpers.asm. The following functions are used to define ; patchable location where the write-barriers are copied over at runtime LEAF_ENTRY JIT_PatchedWriteBarrierStart ; Cannot be empty function to prevent LNK1223 bx lr LEAF_END ; These write barriers are overwritten on the fly ; See ValidateWriteBarriers on how the sizes of these should be calculated ALIGN 4 LEAF_ENTRY JIT_WriteBarrier SPACE (0x84) LEAF_END_MARKED JIT_WriteBarrier ALIGN 4 LEAF_ENTRY JIT_CheckedWriteBarrier SPACE (0x9C) LEAF_END_MARKED JIT_CheckedWriteBarrier ALIGN 4 LEAF_ENTRY JIT_ByRefWriteBarrier SPACE (0xA0) LEAF_END_MARKED JIT_ByRefWriteBarrier LEAF_ENTRY JIT_PatchedWriteBarrierLast ; Cannot be empty function to prevent LNK1223 bx lr LEAF_END ; ------------------------------------------------------------------ ; End of the writeable code region LEAF_ENTRY JIT_PatchedCodeLast bx lr LEAF_END ; Must be at very end of file END
.globl Tela24 Tela24: addi $10, $0, 0xcff8cf sw $10, 268500992($0) addi $10, $0, 0x00d800 sw $10, 268500996($0) addi $10, $0, 0x00d800 sw $10, 268501000($0) addi $10, $0, 0x00d800 sw $10, 268501004($0) addi $10, $0, 0x00d800 sw $10, 268501008($0) addi $10, $0, 0x00d800 sw $10, 268501012($0) addi $10, $0, 0x00d800 sw $10, 268501016($0) addi $10, $0, 0x00d800 sw $10, 268501020($0) addi $10, $0, 0x00d800 sw $10, 268501024($0) addi $10, $0, 0x00d800 sw $10, 268501028($0) addi $10, $0, 0x00d800 sw $10, 268501032($0) addi $10, $0, 0x00d800 sw $10, 268501036($0) addi $10, $0, 0x00d800 sw $10, 268501040($0) addi $10, $0, 0x00d800 sw $10, 268501044($0) addi $10, $0, 0x00d800 sw $10, 268501048($0) addi $10, $0, 0x00d800 sw $10, 268501052($0) addi $10, $0, 0x00d800 sw $10, 268501056($0) addi $10, $0, 0x00d800 sw $10, 268501060($0) addi $10, $0, 0x00d800 sw $10, 268501064($0) addi $10, $0, 0x00d800 sw $10, 268501068($0) addi $10, $0, 0x00d800 sw $10, 268501072($0) addi $10, $0, 0x00d800 sw $10, 268501076($0) addi $10, $0, 0x00d800 sw $10, 268501080($0) addi $10, $0, 0x00d800 sw $10, 268501084($0) addi $10, $0, 0x00d800 sw $10, 268501088($0) addi $10, $0, 0x00d800 sw $10, 268501092($0) addi $10, $0, 0x00d800 sw $10, 268501096($0) addi $10, $0, 0x00d800 sw $10, 268501100($0) addi $10, $0, 0x00d800 sw $10, 268501104($0) addi $10, $0, 0x00d800 sw $10, 268501108($0) addi $10, $0, 0x00d800 sw $10, 268501112($0) addi $10, $0, 0x00d800 sw $10, 268501116($0) addi $10, $0, 0x00d800 sw $10, 268501120($0) addi $10, $0, 0x00d800 sw $10, 268501124($0) addi $10, $0, 0x00d800 sw $10, 268501128($0) addi $10, $0, 0x00d800 sw $10, 268501132($0) addi $10, $0, 0x00d800 sw $10, 268501136($0) addi $10, $0, 0x00d800 sw $10, 268501140($0) addi $10, $0, 0x00d800 sw $10, 268501144($0) addi $10, $0, 0x00d800 sw $10, 268501148($0) addi $10, $0, 0x00d800 sw $10, 268501152($0) addi $10, $0, 0x00d800 sw $10, 268501156($0) addi $10, $0, 0x00d800 sw $10, 268501160($0) addi $10, $0, 0x00d800 sw $10, 268501164($0) addi $10, $0, 0x00d800 sw $10, 268501168($0) addi $10, $0, 0x00d800 sw $10, 268501172($0) addi $10, $0, 0x00d800 sw $10, 268501176($0) addi $10, $0, 0x00d800 sw $10, 268501180($0) addi $10, $0, 0x00d800 sw $10, 268501184($0) addi $10, $0, 0x00d800 sw $10, 268501188($0) addi $10, $0, 0x00d800 sw $10, 268501192($0) addi $10, $0, 0x00d800 sw $10, 268501196($0) addi $10, $0, 0x00d800 sw $10, 268501200($0) addi $10, $0, 0x00d800 sw $10, 268501204($0) addi $10, $0, 0x00d800 sw $10, 268501208($0) addi $10, $0, 0x00d800 sw $10, 268501212($0) addi $10, $0, 0x00d800 sw $10, 268501216($0) addi $10, $0, 0x00d800 sw $10, 268501220($0) addi $10, $0, 0x00d800 sw $10, 268501224($0) addi $10, $0, 0x00d800 sw $10, 268501228($0) addi $10, $0, 0x00d800 sw $10, 268501232($0) addi $10, $0, 0x00d800 sw $10, 268501236($0) addi $10, $0, 0x00d800 sw $10, 268501240($0) addi $10, $0, 0x00d800 sw $10, 268501244($0) addi $10, $0, 0x00d800 sw $10, 268501248($0) addi $10, $0, 0xffffff sw $10, 268501252($0) addi $10, $0, 0xffffff sw $10, 268501256($0) addi $10, $0, 0xffffff sw $10, 268501260($0) addi $10, $0, 0xffffff sw $10, 268501264($0) addi $10, $0, 0xffffff sw $10, 268501268($0) addi $10, $0, 0xffffff sw $10, 268501272($0) addi $10, $0, 0xffffff sw $10, 268501276($0) addi $10, $0, 0xffffff sw $10, 268501280($0) addi $10, $0, 0xffffff sw $10, 268501284($0) addi $10, $0, 0xffffff sw $10, 268501288($0) addi $10, $0, 0xffffff sw $10, 268501292($0) addi $10, $0, 0xffffff sw $10, 268501296($0) addi $10, $0, 0xffffff sw $10, 268501300($0) addi $10, $0, 0xffffff sw $10, 268501304($0) addi $10, $0, 0xffffff sw $10, 268501308($0) addi $10, $0, 0xffffff sw $10, 268501312($0) addi $10, $0, 0xffffff sw $10, 268501316($0) addi $10, $0, 0xffffff sw $10, 268501320($0) addi $10, $0, 0xffffff sw $10, 268501324($0) addi $10, $0, 0xffffff sw $10, 268501328($0) addi $10, $0, 0xffffff sw $10, 268501332($0) addi $10, $0, 0xffffff sw $10, 268501336($0) addi $10, $0, 0xffffff sw $10, 268501340($0) addi $10, $0, 0xffffff sw $10, 268501344($0) addi $10, $0, 0xffffff sw $10, 268501348($0) addi $10, $0, 0xffffff sw $10, 268501352($0) addi $10, $0, 0xffffff sw $10, 268501356($0) addi $10, $0, 0xffffff sw $10, 268501360($0) addi $10, $0, 0xffffff sw $10, 268501364($0) addi $10, $0, 0xffffff sw $10, 268501368($0) addi $10, $0, 0xffffff sw $10, 268501372($0) addi $10, $0, 0xffffff sw $10, 268501376($0) addi $10, $0, 0xffffff sw $10, 268501380($0) addi $10, $0, 0xffffff sw $10, 268501384($0) addi $10, $0, 0xffffff sw $10, 268501388($0) addi $10, $0, 0xffffff sw $10, 268501392($0) addi $10, $0, 0xffffff sw $10, 268501396($0) addi $10, $0, 0xffffff sw $10, 268501400($0) addi $10, $0, 0xffffff sw $10, 268501404($0) addi $10, $0, 0xffffff sw $10, 268501408($0) addi $10, $0, 0xffffff sw $10, 268501412($0) addi $10, $0, 0xffffff sw $10, 268501416($0) addi $10, $0, 0xffffff sw $10, 268501420($0) addi $10, $0, 0xffffff sw $10, 268501424($0) addi $10, $0, 0xffffff sw $10, 268501428($0) addi $10, $0, 0xffffff sw $10, 268501432($0) addi $10, $0, 0xffffff sw $10, 268501436($0) addi $10, $0, 0xffffff sw $10, 268501440($0) addi $10, $0, 0xffffff sw $10, 268501444($0) addi $10, $0, 0xffffff sw $10, 268501448($0) addi $10, $0, 0xffffff sw $10, 268501452($0) addi $10, $0, 0xffffff sw $10, 268501456($0) addi $10, $0, 0xffffff sw $10, 268501460($0) addi $10, $0, 0xffffff sw $10, 268501464($0) addi $10, $0, 0xffffff sw $10, 268501468($0) addi $10, $0, 0xffffff sw $10, 268501472($0) addi $10, $0, 0xffffff sw $10, 268501476($0) addi $10, $0, 0xffffff sw $10, 268501480($0) addi $10, $0, 0xffffff sw $10, 268501484($0) addi $10, $0, 0xffffff sw $10, 268501488($0) addi $10, $0, 0xffffff sw $10, 268501492($0) addi $10, $0, 0xffffff sw $10, 268501496($0) addi $10, $0, 0x00d800 sw $10, 268501500($0) addi $10, $0, 0x00d800 sw $10, 268501504($0) addi $10, $0, 0xffffff sw $10, 268501508($0) addi $10, $0, 0xfefefe sw $10, 268501512($0) addi $10, $0, 0xfdfdfd sw $10, 268501516($0) addi $10, $0, 0xfcfcfc sw $10, 268501520($0) addi $10, $0, 0xfcfcfc sw $10, 268501524($0) addi $10, $0, 0xfcfcfc sw $10, 268501528($0) addi $10, $0, 0xfcfcfc sw $10, 268501532($0) addi $10, $0, 0xfcfcfc sw $10, 268501536($0) addi $10, $0, 0xfcfcfc sw $10, 268501540($0) addi $10, $0, 0xfcfcfc sw $10, 268501544($0) addi $10, $0, 0xfcfcfc sw $10, 268501548($0) addi $10, $0, 0xfcfcfc sw $10, 268501552($0) addi $10, $0, 0xfcfcfc sw $10, 268501556($0) addi $10, $0, 0xfcfcfc sw $10, 268501560($0) addi $10, $0, 0xfcfcfc sw $10, 268501564($0) addi $10, $0, 0xfcfcfc sw $10, 268501568($0) addi $10, $0, 0xfcfcfc sw $10, 268501572($0) addi $10, $0, 0xfcfcfc sw $10, 268501576($0) addi $10, $0, 0xfcfcfc sw $10, 268501580($0) addi $10, $0, 0xfcfcfc sw $10, 268501584($0) addi $10, $0, 0xfcfcfc sw $10, 268501588($0) addi $10, $0, 0xfcfcfc sw $10, 268501592($0) addi $10, $0, 0xfcfcfc sw $10, 268501596($0) addi $10, $0, 0xfcfcfc sw $10, 268501600($0) addi $10, $0, 0xfcfcfc sw $10, 268501604($0) addi $10, $0, 0xfcfcfc sw $10, 268501608($0) addi $10, $0, 0xfcfcfc sw $10, 268501612($0) addi $10, $0, 0xfcfcfc sw $10, 268501616($0) addi $10, $0, 0xfcfcfc sw $10, 268501620($0) addi $10, $0, 0xfdfdfd sw $10, 268501624($0) addi $10, $0, 0xfdfdfd sw $10, 268501628($0) addi $10, $0, 0xffffff sw $10, 268501632($0) addi $10, $0, 0xffffff sw $10, 268501636($0) addi $10, $0, 0xffffff sw $10, 268501640($0) addi $10, $0, 0xffffff sw $10, 268501644($0) addi $10, $0, 0xffffff sw $10, 268501648($0) addi $10, $0, 0xffffff sw $10, 268501652($0) addi $10, $0, 0xffffff sw $10, 268501656($0) addi $10, $0, 0xffffff sw $10, 268501660($0) addi $10, $0, 0xffffff sw $10, 268501664($0) addi $10, $0, 0xffffff sw $10, 268501668($0) addi $10, $0, 0xffffff sw $10, 268501672($0) addi $10, $0, 0xffffff sw $10, 268501676($0) addi $10, $0, 0xffffff sw $10, 268501680($0) addi $10, $0, 0xffffff sw $10, 268501684($0) addi $10, $0, 0xffffff sw $10, 268501688($0) addi $10, $0, 0xffffff sw $10, 268501692($0) addi $10, $0, 0xffffff sw $10, 268501696($0) addi $10, $0, 0xffffff sw $10, 268501700($0) addi $10, $0, 0xffffff sw $10, 268501704($0) addi $10, $0, 0xffffff sw $10, 268501708($0) addi $10, $0, 0xffffff sw $10, 268501712($0) addi $10, $0, 0xffffff sw $10, 268501716($0) addi $10, $0, 0xffffff sw $10, 268501720($0) addi $10, $0, 0xffffff sw $10, 268501724($0) addi $10, $0, 0xffffff sw $10, 268501728($0) addi $10, $0, 0xffffff sw $10, 268501732($0) addi $10, $0, 0xffffff sw $10, 268501736($0) addi $10, $0, 0xffffff sw $10, 268501740($0) addi $10, $0, 0xffffff sw $10, 268501744($0) addi $10, $0, 0xffffff sw $10, 268501748($0) addi $10, $0, 0xffffff sw $10, 268501752($0) addi $10, $0, 0x00d800 sw $10, 268501756($0) addi $10, $0, 0x00d800 sw $10, 268501760($0) addi $10, $0, 0xfbfbfb sw $10, 268501764($0) addi $10, $0, 0xffb000 sw $10, 268501768($0) addi $10, $0, 0xffb000 sw $10, 268501772($0) addi $10, $0, 0xffb000 sw $10, 268501776($0) addi $10, $0, 0xffb000 sw $10, 268501780($0) addi $10, $0, 0xffb000 sw $10, 268501784($0) addi $10, $0, 0xffb000 sw $10, 268501788($0) addi $10, $0, 0xffb000 sw $10, 268501792($0) addi $10, $0, 0xffb000 sw $10, 268501796($0) addi $10, $0, 0xffb000 sw $10, 268501800($0) addi $10, $0, 0xffb000 sw $10, 268501804($0) addi $10, $0, 0xffb000 sw $10, 268501808($0) addi $10, $0, 0xffb000 sw $10, 268501812($0) addi $10, $0, 0xffb000 sw $10, 268501816($0) addi $10, $0, 0xffb000 sw $10, 268501820($0) addi $10, $0, 0xffb000 sw $10, 268501824($0) addi $10, $0, 0xffb000 sw $10, 268501828($0) addi $10, $0, 0xffb000 sw $10, 268501832($0) addi $10, $0, 0xffb000 sw $10, 268501836($0) addi $10, $0, 0xffb000 sw $10, 268501840($0) addi $10, $0, 0xffb000 sw $10, 268501844($0) addi $10, $0, 0xffb000 sw $10, 268501848($0) addi $10, $0, 0xffb000 sw $10, 268501852($0) addi $10, $0, 0xffb000 sw $10, 268501856($0) addi $10, $0, 0xffb000 sw $10, 268501860($0) addi $10, $0, 0xffb000 sw $10, 268501864($0) addi $10, $0, 0xffb000 sw $10, 268501868($0) addi $10, $0, 0xffb000 sw $10, 268501872($0) addi $10, $0, 0xffb000 sw $10, 268501876($0) addi $10, $0, 0xffb000 sw $10, 268501880($0) addi $10, $0, 0xffb000 sw $10, 268501884($0) addi $10, $0, 0xfbfbfb sw $10, 268501888($0) addi $10, $0, 0xffffff sw $10, 268501892($0) addi $10, $0, 0xffffff sw $10, 268501896($0) addi $10, $0, 0xffffff sw $10, 268501900($0) addi $10, $0, 0xffffff sw $10, 268501904($0) addi $10, $0, 0xffffff sw $10, 268501908($0) addi $10, $0, 0xffffff sw $10, 268501912($0) addi $10, $0, 0xffffff sw $10, 268501916($0) addi $10, $0, 0xffffff sw $10, 268501920($0) addi $10, $0, 0xffffff sw $10, 268501924($0) addi $10, $0, 0xffffff sw $10, 268501928($0) addi $10, $0, 0xffffff sw $10, 268501932($0) addi $10, $0, 0xffffff sw $10, 268501936($0) addi $10, $0, 0xffffff sw $10, 268501940($0) addi $10, $0, 0xffffff sw $10, 268501944($0) addi $10, $0, 0xffffff sw $10, 268501948($0) addi $10, $0, 0xffffff sw $10, 268501952($0) addi $10, $0, 0xffffff sw $10, 268501956($0) addi $10, $0, 0xffffff sw $10, 268501960($0) addi $10, $0, 0xffffff sw $10, 268501964($0) addi $10, $0, 0xffffff sw $10, 268501968($0) addi $10, $0, 0xffffff sw $10, 268501972($0) addi $10, $0, 0xffffff sw $10, 268501976($0) addi $10, $0, 0xffffff sw $10, 268501980($0) addi $10, $0, 0xffffff sw $10, 268501984($0) addi $10, $0, 0xffffff sw $10, 268501988($0) addi $10, $0, 0xffffff sw $10, 268501992($0) addi $10, $0, 0xffffff sw $10, 268501996($0) addi $10, $0, 0xffffff sw $10, 268502000($0) addi $10, $0, 0xffffff sw $10, 268502004($0) addi $10, $0, 0xffffff sw $10, 268502008($0) addi $10, $0, 0x00d800 sw $10, 268502012($0) addi $10, $0, 0x00d800 sw $10, 268502016($0) addi $10, $0, 0xf6f6f6 sw $10, 268502020($0) addi $10, $0, 0xffb000 sw $10, 268502024($0) addi $10, $0, 0xffb000 sw $10, 268502028($0) addi $10, $0, 0xffb000 sw $10, 268502032($0) addi $10, $0, 0xffb000 sw $10, 268502036($0) addi $10, $0, 0xffb000 sw $10, 268502040($0) addi $10, $0, 0xffb000 sw $10, 268502044($0) addi $10, $0, 0xffb000 sw $10, 268502048($0) addi $10, $0, 0xffb000 sw $10, 268502052($0) addi $10, $0, 0xffb000 sw $10, 268502056($0) addi $10, $0, 0xffb000 sw $10, 268502060($0) addi $10, $0, 0xffb000 sw $10, 268502064($0) addi $10, $0, 0xffb000 sw $10, 268502068($0) addi $10, $0, 0xffb000 sw $10, 268502072($0) addi $10, $0, 0xffb000 sw $10, 268502076($0) addi $10, $0, 0xffb000 sw $10, 268502080($0) addi $10, $0, 0xffb000 sw $10, 268502084($0) addi $10, $0, 0xffb000 sw $10, 268502088($0) addi $10, $0, 0xffb000 sw $10, 268502092($0) addi $10, $0, 0xffb000 sw $10, 268502096($0) addi $10, $0, 0xffb000 sw $10, 268502100($0) addi $10, $0, 0xffb000 sw $10, 268502104($0) addi $10, $0, 0xffb000 sw $10, 268502108($0) addi $10, $0, 0xffb000 sw $10, 268502112($0) addi $10, $0, 0xffb000 sw $10, 268502116($0) addi $10, $0, 0xffb000 sw $10, 268502120($0) addi $10, $0, 0xffb000 sw $10, 268502124($0) addi $10, $0, 0xffb000 sw $10, 268502128($0) addi $10, $0, 0xffb000 sw $10, 268502132($0) addi $10, $0, 0xffb000 sw $10, 268502136($0) addi $10, $0, 0xffb000 sw $10, 268502140($0) addi $10, $0, 0xf5f5f5 sw $10, 268502144($0) addi $10, $0, 0xfefefe sw $10, 268502148($0) addi $10, $0, 0xffffff sw $10, 268502152($0) addi $10, $0, 0x3d85c6 sw $10, 268502156($0) addi $10, $0, 0x3d85c6 sw $10, 268502160($0) addi $10, $0, 0x000000 sw $10, 268502164($0) addi $10, $0, 0x081119 sw $10, 268502168($0) addi $10, $0, 0xffffff sw $10, 268502172($0) addi $10, $0, 0xffffff sw $10, 268502176($0) addi $10, $0, 0xffffff sw $10, 268502180($0) addi $10, $0, 0xb7b7b7 sw $10, 268502184($0) addi $10, $0, 0xb7b7b7 sw $10, 268502188($0) addi $10, $0, 0x171717 sw $10, 268502192($0) addi $10, $0, 0x171717 sw $10, 268502196($0) addi $10, $0, 0x171717 sw $10, 268502200($0) addi $10, $0, 0x171717 sw $10, 268502204($0) addi $10, $0, 0xb7b7b7 sw $10, 268502208($0) addi $10, $0, 0xb7b7b7 sw $10, 268502212($0) addi $10, $0, 0xb7b7b7 sw $10, 268502216($0) addi $10, $0, 0xb7b7b7 sw $10, 268502220($0) addi $10, $0, 0xb7b7b7 sw $10, 268502224($0) addi $10, $0, 0x000000 sw $10, 268502228($0) addi $10, $0, 0x000000 sw $10, 268502232($0) addi $10, $0, 0xb7b7b7 sw $10, 268502236($0) addi $10, $0, 0xb7b7b7 sw $10, 268502240($0) addi $10, $0, 0xb7b7b7 sw $10, 268502244($0) addi $10, $0, 0xb7b7b7 sw $10, 268502248($0) addi $10, $0, 0xb7b7b7 sw $10, 268502252($0) addi $10, $0, 0xb7b7b7 sw $10, 268502256($0) addi $10, $0, 0xffffff sw $10, 268502260($0) addi $10, $0, 0xffffff sw $10, 268502264($0) addi $10, $0, 0x00d800 sw $10, 268502268($0) addi $10, $0, 0x00d700 sw $10, 268502272($0) addi $10, $0, 0xf3f3f3 sw $10, 268502276($0) addi $10, $0, 0xffb000 sw $10, 268502280($0) addi $10, $0, 0xffb000 sw $10, 268502284($0) addi $10, $0, 0xffb000 sw $10, 268502288($0) addi $10, $0, 0xffb000 sw $10, 268502292($0) addi $10, $0, 0x000000 sw $10, 268502296($0) addi $10, $0, 0xffb000 sw $10, 268502300($0) addi $10, $0, 0xffb000 sw $10, 268502304($0) addi $10, $0, 0xffb000 sw $10, 268502308($0) addi $10, $0, 0xffb000 sw $10, 268502312($0) addi $10, $0, 0xffb000 sw $10, 268502316($0) addi $10, $0, 0xffb000 sw $10, 268502320($0) addi $10, $0, 0x3c2900 sw $10, 268502324($0) addi $10, $0, 0x000000 sw $10, 268502328($0) addi $10, $0, 0xffb000 sw $10, 268502332($0) addi $10, $0, 0xffb000 sw $10, 268502336($0) addi $10, $0, 0xffb000 sw $10, 268502340($0) addi $10, $0, 0xffb000 sw $10, 268502344($0) addi $10, $0, 0xffb000 sw $10, 268502348($0) addi $10, $0, 0xffb000 sw $10, 268502352($0) addi $10, $0, 0xffb000 sw $10, 268502356($0) addi $10, $0, 0xffb000 sw $10, 268502360($0) addi $10, $0, 0xffb000 sw $10, 268502364($0) addi $10, $0, 0xffb000 sw $10, 268502368($0) addi $10, $0, 0x000000 sw $10, 268502372($0) addi $10, $0, 0xffb000 sw $10, 268502376($0) addi $10, $0, 0xffb000 sw $10, 268502380($0) addi $10, $0, 0xffb000 sw $10, 268502384($0) addi $10, $0, 0xffb000 sw $10, 268502388($0) addi $10, $0, 0xffb000 sw $10, 268502392($0) addi $10, $0, 0xffb000 sw $10, 268502396($0) addi $10, $0, 0xf1f1f1 sw $10, 268502400($0) addi $10, $0, 0xfdfdfd sw $10, 268502404($0) addi $10, $0, 0x3d85c6 sw $10, 268502408($0) addi $10, $0, 0x3d85c6 sw $10, 268502412($0) addi $10, $0, 0x000000 sw $10, 268502416($0) addi $10, $0, 0x3d85c6 sw $10, 268502420($0) addi $10, $0, 0x000000 sw $10, 268502424($0) addi $10, $0, 0x050a10 sw $10, 268502428($0) addi $10, $0, 0xffffff sw $10, 268502432($0) addi $10, $0, 0xffffff sw $10, 268502436($0) addi $10, $0, 0xb7b7b7 sw $10, 268502440($0) addi $10, $0, 0xb7b7b7 sw $10, 268502444($0) addi $10, $0, 0x000000 sw $10, 268502448($0) addi $10, $0, 0x171717 sw $10, 268502452($0) addi $10, $0, 0x171717 sw $10, 268502456($0) addi $10, $0, 0x171717 sw $10, 268502460($0) addi $10, $0, 0xb7b7b7 sw $10, 268502464($0) addi $10, $0, 0xb7b7b7 sw $10, 268502468($0) addi $10, $0, 0xb7b7b7 sw $10, 268502472($0) addi $10, $0, 0xb7b7b7 sw $10, 268502476($0) addi $10, $0, 0xb7b7b7 sw $10, 268502480($0) addi $10, $0, 0xb7b7b7 sw $10, 268502484($0) addi $10, $0, 0xb7b7b7 sw $10, 268502488($0) addi $10, $0, 0xb7b7b7 sw $10, 268502492($0) addi $10, $0, 0x000000 sw $10, 268502496($0) addi $10, $0, 0xb7b7b7 sw $10, 268502500($0) addi $10, $0, 0xb7b7b7 sw $10, 268502504($0) addi $10, $0, 0xb7b7b7 sw $10, 268502508($0) addi $10, $0, 0xb7b7b7 sw $10, 268502512($0) addi $10, $0, 0xffffff sw $10, 268502516($0) addi $10, $0, 0xffffff sw $10, 268502520($0) addi $10, $0, 0x00d800 sw $10, 268502524($0) addi $10, $0, 0x00d700 sw $10, 268502528($0) addi $10, $0, 0xf3f3f3 sw $10, 268502532($0) addi $10, $0, 0xffb000 sw $10, 268502536($0) addi $10, $0, 0xffb000 sw $10, 268502540($0) addi $10, $0, 0xffb000 sw $10, 268502544($0) addi $10, $0, 0xffb000 sw $10, 268502548($0) addi $10, $0, 0x000000 sw $10, 268502552($0) addi $10, $0, 0x000000 sw $10, 268502556($0) addi $10, $0, 0xffb000 sw $10, 268502560($0) addi $10, $0, 0xffb000 sw $10, 268502564($0) addi $10, $0, 0x000000 sw $10, 268502568($0) addi $10, $0, 0x000000 sw $10, 268502572($0) addi $10, $0, 0xffb000 sw $10, 268502576($0) addi $10, $0, 0xdf9a00 sw $10, 268502580($0) addi $10, $0, 0x402c00 sw $10, 268502584($0) addi $10, $0, 0x402c00 sw $10, 268502588($0) addi $10, $0, 0x000000 sw $10, 268502592($0) addi $10, $0, 0x000000 sw $10, 268502596($0) addi $10, $0, 0x000000 sw $10, 268502600($0) addi $10, $0, 0x000000 sw $10, 268502604($0) addi $10, $0, 0xffb000 sw $10, 268502608($0) addi $10, $0, 0x000000 sw $10, 268502612($0) addi $10, $0, 0x000000 sw $10, 268502616($0) addi $10, $0, 0x4c3400 sw $10, 268502620($0) addi $10, $0, 0xffb000 sw $10, 268502624($0) addi $10, $0, 0x000000 sw $10, 268502628($0) addi $10, $0, 0xffb000 sw $10, 268502632($0) addi $10, $0, 0x000000 sw $10, 268502636($0) addi $10, $0, 0x000000 sw $10, 268502640($0) addi $10, $0, 0xffb000 sw $10, 268502644($0) addi $10, $0, 0xffb000 sw $10, 268502648($0) addi $10, $0, 0xffb000 sw $10, 268502652($0) addi $10, $0, 0xf1f1f1 sw $10, 268502656($0) addi $10, $0, 0x3d85c6 sw $10, 268502660($0) addi $10, $0, 0x3d85c6 sw $10, 268502664($0) addi $10, $0, 0x3d85c6 sw $10, 268502668($0) addi $10, $0, 0x000000 sw $10, 268502672($0) addi $10, $0, 0x3d85c6 sw $10, 268502676($0) addi $10, $0, 0x2c608f sw $10, 268502680($0) addi $10, $0, 0x000000 sw $10, 268502684($0) addi $10, $0, 0x3d85c6 sw $10, 268502688($0) addi $10, $0, 0xffffff sw $10, 268502692($0) addi $10, $0, 0xb7b7b7 sw $10, 268502696($0) addi $10, $0, 0xb7b7b7 sw $10, 268502700($0) addi $10, $0, 0x000000 sw $10, 268502704($0) addi $10, $0, 0xb7b7b7 sw $10, 268502708($0) addi $10, $0, 0xb7b7b7 sw $10, 268502712($0) addi $10, $0, 0xb7b7b7 sw $10, 268502716($0) addi $10, $0, 0xb7b7b7 sw $10, 268502720($0) addi $10, $0, 0x000000 sw $10, 268502724($0) addi $10, $0, 0xb7b7b7 sw $10, 268502728($0) addi $10, $0, 0x000000 sw $10, 268502732($0) addi $10, $0, 0xb7b7b7 sw $10, 268502736($0) addi $10, $0, 0x454545 sw $10, 268502740($0) addi $10, $0, 0x000000 sw $10, 268502744($0) addi $10, $0, 0xb7b7b7 sw $10, 268502748($0) addi $10, $0, 0x000000 sw $10, 268502752($0) addi $10, $0, 0x000000 sw $10, 268502756($0) addi $10, $0, 0x000000 sw $10, 268502760($0) addi $10, $0, 0xb7b7b7 sw $10, 268502764($0) addi $10, $0, 0xb7b7b7 sw $10, 268502768($0) addi $10, $0, 0xffffff sw $10, 268502772($0) addi $10, $0, 0xffffff sw $10, 268502776($0) addi $10, $0, 0x00d800 sw $10, 268502780($0) addi $10, $0, 0x00d700 sw $10, 268502784($0) addi $10, $0, 0xf3f3f3 sw $10, 268502788($0) addi $10, $0, 0xffb000 sw $10, 268502792($0) addi $10, $0, 0xffb000 sw $10, 268502796($0) addi $10, $0, 0xffb000 sw $10, 268502800($0) addi $10, $0, 0x000000 sw $10, 268502804($0) addi $10, $0, 0xffb000 sw $10, 268502808($0) addi $10, $0, 0x000000 sw $10, 268502812($0) addi $10, $0, 0xffb000 sw $10, 268502816($0) addi $10, $0, 0xffb000 sw $10, 268502820($0) addi $10, $0, 0x000000 sw $10, 268502824($0) addi $10, $0, 0xffb000 sw $10, 268502828($0) addi $10, $0, 0x000000 sw $10, 268502832($0) addi $10, $0, 0xdf9a00 sw $10, 268502836($0) addi $10, $0, 0x402c00 sw $10, 268502840($0) addi $10, $0, 0x402c00 sw $10, 268502844($0) addi $10, $0, 0xdf9a00 sw $10, 268502848($0) addi $10, $0, 0x000000 sw $10, 268502852($0) addi $10, $0, 0xffb000 sw $10, 268502856($0) addi $10, $0, 0x000000 sw $10, 268502860($0) addi $10, $0, 0xffb000 sw $10, 268502864($0) addi $10, $0, 0xffb000 sw $10, 268502868($0) addi $10, $0, 0xffb000 sw $10, 268502872($0) addi $10, $0, 0x000000 sw $10, 268502876($0) addi $10, $0, 0xffb000 sw $10, 268502880($0) addi $10, $0, 0x000000 sw $10, 268502884($0) addi $10, $0, 0xffb000 sw $10, 268502888($0) addi $10, $0, 0x000000 sw $10, 268502892($0) addi $10, $0, 0xffb000 sw $10, 268502896($0) addi $10, $0, 0xffb000 sw $10, 268502900($0) addi $10, $0, 0xffb000 sw $10, 268502904($0) addi $10, $0, 0xffb000 sw $10, 268502908($0) addi $10, $0, 0xf1f1f1 sw $10, 268502912($0) addi $10, $0, 0x3d85c6 sw $10, 268502916($0) addi $10, $0, 0x3d85c6 sw $10, 268502920($0) addi $10, $0, 0x3d85c6 sw $10, 268502924($0) addi $10, $0, 0x000000 sw $10, 268502928($0) addi $10, $0, 0x000000 sw $10, 268502932($0) addi $10, $0, 0x000000 sw $10, 268502936($0) addi $10, $0, 0x000000 sw $10, 268502940($0) addi $10, $0, 0x3d85c6 sw $10, 268502944($0) addi $10, $0, 0xffffff sw $10, 268502948($0) addi $10, $0, 0xb7b7b7 sw $10, 268502952($0) addi $10, $0, 0xb7b7b7 sw $10, 268502956($0) addi $10, $0, 0x000000 sw $10, 268502960($0) addi $10, $0, 0x000000 sw $10, 268502964($0) addi $10, $0, 0x000000 sw $10, 268502968($0) addi $10, $0, 0x454545 sw $10, 268502972($0) addi $10, $0, 0xb7b7b7 sw $10, 268502976($0) addi $10, $0, 0xa9a9a9 sw $10, 268502980($0) addi $10, $0, 0x000000 sw $10, 268502984($0) addi $10, $0, 0x030303 sw $10, 268502988($0) addi $10, $0, 0xb7b7b7 sw $10, 268502992($0) addi $10, $0, 0x454545 sw $10, 268502996($0) addi $10, $0, 0x000000 sw $10, 268503000($0) addi $10, $0, 0xb7b7b7 sw $10, 268503004($0) addi $10, $0, 0x000000 sw $10, 268503008($0) addi $10, $0, 0xb7b7b7 sw $10, 268503012($0) addi $10, $0, 0xb7b7b7 sw $10, 268503016($0) addi $10, $0, 0xb7b7b7 sw $10, 268503020($0) addi $10, $0, 0xb7b7b7 sw $10, 268503024($0) addi $10, $0, 0xffffff sw $10, 268503028($0) addi $10, $0, 0xffffff sw $10, 268503032($0) addi $10, $0, 0x00d800 sw $10, 268503036($0) addi $10, $0, 0x00d700 sw $10, 268503040($0) addi $10, $0, 0xf3f3f3 sw $10, 268503044($0) addi $10, $0, 0xffb000 sw $10, 268503048($0) addi $10, $0, 0xffb000 sw $10, 268503052($0) addi $10, $0, 0xffb000 sw $10, 268503056($0) addi $10, $0, 0x000000 sw $10, 268503060($0) addi $10, $0, 0x000000 sw $10, 268503064($0) addi $10, $0, 0x000000 sw $10, 268503068($0) addi $10, $0, 0x000000 sw $10, 268503072($0) addi $10, $0, 0xffb000 sw $10, 268503076($0) addi $10, $0, 0x000000 sw $10, 268503080($0) addi $10, $0, 0xffb000 sw $10, 268503084($0) addi $10, $0, 0x000000 sw $10, 268503088($0) addi $10, $0, 0xdf9a00 sw $10, 268503092($0) addi $10, $0, 0x402c00 sw $10, 268503096($0) addi $10, $0, 0x402c00 sw $10, 268503100($0) addi $10, $0, 0xdf9a00 sw $10, 268503104($0) addi $10, $0, 0x000000 sw $10, 268503108($0) addi $10, $0, 0xffb000 sw $10, 268503112($0) addi $10, $0, 0x000000 sw $10, 268503116($0) addi $10, $0, 0xffb000 sw $10, 268503120($0) addi $10, $0, 0x000000 sw $10, 268503124($0) addi $10, $0, 0xffb000 sw $10, 268503128($0) addi $10, $0, 0x000000 sw $10, 268503132($0) addi $10, $0, 0xffb000 sw $10, 268503136($0) addi $10, $0, 0x000000 sw $10, 268503140($0) addi $10, $0, 0xffb000 sw $10, 268503144($0) addi $10, $0, 0xffb000 sw $10, 268503148($0) addi $10, $0, 0x000000 sw $10, 268503152($0) addi $10, $0, 0xe39d00 sw $10, 268503156($0) addi $10, $0, 0xffb000 sw $10, 268503160($0) addi $10, $0, 0xffb000 sw $10, 268503164($0) addi $10, $0, 0xf1f1f1 sw $10, 268503168($0) addi $10, $0, 0x498dca sw $10, 268503172($0) addi $10, $0, 0x3d85c6 sw $10, 268503176($0) addi $10, $0, 0x3d85c6 sw $10, 268503180($0) addi $10, $0, 0x3d85c6 sw $10, 268503184($0) addi $10, $0, 0x3d85c6 sw $10, 268503188($0) addi $10, $0, 0x000000 sw $10, 268503192($0) addi $10, $0, 0x193651 sw $10, 268503196($0) addi $10, $0, 0x3d85c6 sw $10, 268503200($0) addi $10, $0, 0xffffff sw $10, 268503204($0) addi $10, $0, 0xb7b7b7 sw $10, 268503208($0) addi $10, $0, 0xb7b7b7 sw $10, 268503212($0) addi $10, $0, 0x000000 sw $10, 268503216($0) addi $10, $0, 0xb7b7b7 sw $10, 268503220($0) addi $10, $0, 0xb7b7b7 sw $10, 268503224($0) addi $10, $0, 0xb7b7b7 sw $10, 268503228($0) addi $10, $0, 0xb7b7b7 sw $10, 268503232($0) addi $10, $0, 0x4b4b4b sw $10, 268503236($0) addi $10, $0, 0x000000 sw $10, 268503240($0) addi $10, $0, 0x000000 sw $10, 268503244($0) addi $10, $0, 0xb7b7b7 sw $10, 268503248($0) addi $10, $0, 0x454545 sw $10, 268503252($0) addi $10, $0, 0x000000 sw $10, 268503256($0) addi $10, $0, 0xb7b7b7 sw $10, 268503260($0) addi $10, $0, 0x000000 sw $10, 268503264($0) addi $10, $0, 0xb7b7b7 sw $10, 268503268($0) addi $10, $0, 0xb7b7b7 sw $10, 268503272($0) addi $10, $0, 0xb7b7b7 sw $10, 268503276($0) addi $10, $0, 0xb7b7b7 sw $10, 268503280($0) addi $10, $0, 0xffffff sw $10, 268503284($0) addi $10, $0, 0xffffff sw $10, 268503288($0) addi $10, $0, 0x00d800 sw $10, 268503292($0) addi $10, $0, 0x00d700 sw $10, 268503296($0) addi $10, $0, 0xf3f3f3 sw $10, 268503300($0) addi $10, $0, 0xffb000 sw $10, 268503304($0) addi $10, $0, 0xffb000 sw $10, 268503308($0) addi $10, $0, 0xb07900 sw $10, 268503312($0) addi $10, $0, 0x000000 sw $10, 268503316($0) addi $10, $0, 0xffb000 sw $10, 268503320($0) addi $10, $0, 0xffb000 sw $10, 268503324($0) addi $10, $0, 0x000000 sw $10, 268503328($0) addi $10, $0, 0xffb000 sw $10, 268503332($0) addi $10, $0, 0x000000 sw $10, 268503336($0) addi $10, $0, 0xffb000 sw $10, 268503340($0) addi $10, $0, 0x000000 sw $10, 268503344($0) addi $10, $0, 0xdf9a00 sw $10, 268503348($0) addi $10, $0, 0x402c00 sw $10, 268503352($0) addi $10, $0, 0x402c00 sw $10, 268503356($0) addi $10, $0, 0xdf9a00 sw $10, 268503360($0) addi $10, $0, 0x000000 sw $10, 268503364($0) addi $10, $0, 0xffb000 sw $10, 268503368($0) addi $10, $0, 0x000000 sw $10, 268503372($0) addi $10, $0, 0xffb000 sw $10, 268503376($0) addi $10, $0, 0x000000 sw $10, 268503380($0) addi $10, $0, 0x000000 sw $10, 268503384($0) addi $10, $0, 0x000000 sw $10, 268503388($0) addi $10, $0, 0xffb000 sw $10, 268503392($0) addi $10, $0, 0x000000 sw $10, 268503396($0) addi $10, $0, 0xffb000 sw $10, 268503400($0) addi $10, $0, 0x000000 sw $10, 268503404($0) addi $10, $0, 0x000000 sw $10, 268503408($0) addi $10, $0, 0xffb000 sw $10, 268503412($0) addi $10, $0, 0xffb000 sw $10, 268503416($0) addi $10, $0, 0xffb000 sw $10, 268503420($0) addi $10, $0, 0xf1f1f1 sw $10, 268503424($0) addi $10, $0, 0xfdfdfd sw $10, 268503428($0) addi $10, $0, 0x3d85c6 sw $10, 268503432($0) addi $10, $0, 0x3d85c6 sw $10, 268503436($0) addi $10, $0, 0x000000 sw $10, 268503440($0) addi $10, $0, 0x000000 sw $10, 268503444($0) addi $10, $0, 0x000000 sw $10, 268503448($0) addi $10, $0, 0x3d85c6 sw $10, 268503452($0) addi $10, $0, 0xffffff sw $10, 268503456($0) addi $10, $0, 0xffffff sw $10, 268503460($0) addi $10, $0, 0xb7b7b7 sw $10, 268503464($0) addi $10, $0, 0xb7b7b7 sw $10, 268503468($0) addi $10, $0, 0x000000 sw $10, 268503472($0) addi $10, $0, 0x000000 sw $10, 268503476($0) addi $10, $0, 0x000000 sw $10, 268503480($0) addi $10, $0, 0x000000 sw $10, 268503484($0) addi $10, $0, 0xb7b7b7 sw $10, 268503488($0) addi $10, $0, 0x000000 sw $10, 268503492($0) addi $10, $0, 0xb7b7b7 sw $10, 268503496($0) addi $10, $0, 0x000000 sw $10, 268503500($0) addi $10, $0, 0xb7b7b7 sw $10, 268503504($0) addi $10, $0, 0x454545 sw $10, 268503508($0) addi $10, $0, 0x000000 sw $10, 268503512($0) addi $10, $0, 0xb7b7b7 sw $10, 268503516($0) addi $10, $0, 0x000000 sw $10, 268503520($0) addi $10, $0, 0x000000 sw $10, 268503524($0) addi $10, $0, 0x000000 sw $10, 268503528($0) addi $10, $0, 0xb7b7b7 sw $10, 268503532($0) addi $10, $0, 0xb7b7b7 sw $10, 268503536($0) addi $10, $0, 0xffffff sw $10, 268503540($0) addi $10, $0, 0xffffff sw $10, 268503544($0) addi $10, $0, 0x00d800 sw $10, 268503548($0) addi $10, $0, 0x00d700 sw $10, 268503552($0) addi $10, $0, 0xf3f3f3 sw $10, 268503556($0) addi $10, $0, 0xffb000 sw $10, 268503560($0) addi $10, $0, 0xffb000 sw $10, 268503564($0) addi $10, $0, 0xffb000 sw $10, 268503568($0) addi $10, $0, 0xffb000 sw $10, 268503572($0) addi $10, $0, 0xffb000 sw $10, 268503576($0) addi $10, $0, 0xffb000 sw $10, 268503580($0) addi $10, $0, 0xffb000 sw $10, 268503584($0) addi $10, $0, 0xffb000 sw $10, 268503588($0) addi $10, $0, 0xffb000 sw $10, 268503592($0) addi $10, $0, 0xffb000 sw $10, 268503596($0) addi $10, $0, 0xffb000 sw $10, 268503600($0) addi $10, $0, 0xffb000 sw $10, 268503604($0) addi $10, $0, 0xffb000 sw $10, 268503608($0) addi $10, $0, 0xffb000 sw $10, 268503612($0) addi $10, $0, 0xffb000 sw $10, 268503616($0) addi $10, $0, 0xffb000 sw $10, 268503620($0) addi $10, $0, 0xffb000 sw $10, 268503624($0) addi $10, $0, 0xffb000 sw $10, 268503628($0) addi $10, $0, 0xffb000 sw $10, 268503632($0) addi $10, $0, 0xffb000 sw $10, 268503636($0) addi $10, $0, 0xffb000 sw $10, 268503640($0) addi $10, $0, 0xffb000 sw $10, 268503644($0) addi $10, $0, 0xffb000 sw $10, 268503648($0) addi $10, $0, 0xffb000 sw $10, 268503652($0) addi $10, $0, 0xffb000 sw $10, 268503656($0) addi $10, $0, 0xffb000 sw $10, 268503660($0) addi $10, $0, 0xffb000 sw $10, 268503664($0) addi $10, $0, 0xffb000 sw $10, 268503668($0) addi $10, $0, 0xffb000 sw $10, 268503672($0) addi $10, $0, 0xffb000 sw $10, 268503676($0) addi $10, $0, 0xf1f1f1 sw $10, 268503680($0) addi $10, $0, 0xfdfdfd sw $10, 268503684($0) addi $10, $0, 0xffffff sw $10, 268503688($0) addi $10, $0, 0xffffff sw $10, 268503692($0) addi $10, $0, 0x5594cd sw $10, 268503696($0) addi $10, $0, 0x3d85c6 sw $10, 268503700($0) addi $10, $0, 0xffffff sw $10, 268503704($0) addi $10, $0, 0xffffff sw $10, 268503708($0) addi $10, $0, 0xffffff sw $10, 268503712($0) addi $10, $0, 0xffffff sw $10, 268503716($0) addi $10, $0, 0xb7b7b7 sw $10, 268503720($0) addi $10, $0, 0xb7b7b7 sw $10, 268503724($0) addi $10, $0, 0xb7b7b7 sw $10, 268503728($0) addi $10, $0, 0xb7b7b7 sw $10, 268503732($0) addi $10, $0, 0xb7b7b7 sw $10, 268503736($0) addi $10, $0, 0xb7b7b7 sw $10, 268503740($0) addi $10, $0, 0xb7b7b7 sw $10, 268503744($0) addi $10, $0, 0xb7b7b7 sw $10, 268503748($0) addi $10, $0, 0xb7b7b7 sw $10, 268503752($0) addi $10, $0, 0xb7b7b7 sw $10, 268503756($0) addi $10, $0, 0xb7b7b7 sw $10, 268503760($0) addi $10, $0, 0xb7b7b7 sw $10, 268503764($0) addi $10, $0, 0xb7b7b7 sw $10, 268503768($0) addi $10, $0, 0xb7b7b7 sw $10, 268503772($0) addi $10, $0, 0xb7b7b7 sw $10, 268503776($0) addi $10, $0, 0xb7b7b7 sw $10, 268503780($0) addi $10, $0, 0xb7b7b7 sw $10, 268503784($0) addi $10, $0, 0xb7b7b7 sw $10, 268503788($0) addi $10, $0, 0xb7b7b7 sw $10, 268503792($0) addi $10, $0, 0xffffff sw $10, 268503796($0) addi $10, $0, 0xffffff sw $10, 268503800($0) addi $10, $0, 0x00d800 sw $10, 268503804($0) addi $10, $0, 0x00d700 sw $10, 268503808($0) addi $10, $0, 0xf6f6f6 sw $10, 268503812($0) addi $10, $0, 0xffb000 sw $10, 268503816($0) addi $10, $0, 0xffb000 sw $10, 268503820($0) addi $10, $0, 0xffb000 sw $10, 268503824($0) addi $10, $0, 0xffb000 sw $10, 268503828($0) addi $10, $0, 0xffb000 sw $10, 268503832($0) addi $10, $0, 0xffb000 sw $10, 268503836($0) addi $10, $0, 0xffb000 sw $10, 268503840($0) addi $10, $0, 0xffb000 sw $10, 268503844($0) addi $10, $0, 0xffb000 sw $10, 268503848($0) addi $10, $0, 0xffb000 sw $10, 268503852($0) addi $10, $0, 0xffb000 sw $10, 268503856($0) addi $10, $0, 0xffb000 sw $10, 268503860($0) addi $10, $0, 0xffb000 sw $10, 268503864($0) addi $10, $0, 0xffb000 sw $10, 268503868($0) addi $10, $0, 0xffb000 sw $10, 268503872($0) addi $10, $0, 0xffb000 sw $10, 268503876($0) addi $10, $0, 0xffb000 sw $10, 268503880($0) addi $10, $0, 0xffb000 sw $10, 268503884($0) addi $10, $0, 0xffb000 sw $10, 268503888($0) addi $10, $0, 0xffb000 sw $10, 268503892($0) addi $10, $0, 0xffb000 sw $10, 268503896($0) addi $10, $0, 0xffb000 sw $10, 268503900($0) addi $10, $0, 0xffb000 sw $10, 268503904($0) addi $10, $0, 0xffb000 sw $10, 268503908($0) addi $10, $0, 0xffb000 sw $10, 268503912($0) addi $10, $0, 0xffb000 sw $10, 268503916($0) addi $10, $0, 0xffb000 sw $10, 268503920($0) addi $10, $0, 0xffb000 sw $10, 268503924($0) addi $10, $0, 0xffb000 sw $10, 268503928($0) addi $10, $0, 0xffb000 sw $10, 268503932($0) addi $10, $0, 0xf4f4f4 sw $10, 268503936($0) addi $10, $0, 0xfefefe sw $10, 268503940($0) addi $10, $0, 0xffffff sw $10, 268503944($0) addi $10, $0, 0xffffff sw $10, 268503948($0) addi $10, $0, 0xffffff sw $10, 268503952($0) addi $10, $0, 0xffffff sw $10, 268503956($0) addi $10, $0, 0xffffff sw $10, 268503960($0) addi $10, $0, 0xffffff sw $10, 268503964($0) addi $10, $0, 0xffffff sw $10, 268503968($0) addi $10, $0, 0xffffff sw $10, 268503972($0) addi $10, $0, 0xffffff sw $10, 268503976($0) addi $10, $0, 0xffffff sw $10, 268503980($0) addi $10, $0, 0xffffff sw $10, 268503984($0) addi $10, $0, 0xffffff sw $10, 268503988($0) addi $10, $0, 0xffffff sw $10, 268503992($0) addi $10, $0, 0xffffff sw $10, 268503996($0) addi $10, $0, 0xffffff sw $10, 268504000($0) addi $10, $0, 0xffffff sw $10, 268504004($0) addi $10, $0, 0xffffff sw $10, 268504008($0) addi $10, $0, 0xffffff sw $10, 268504012($0) addi $10, $0, 0xffffff sw $10, 268504016($0) addi $10, $0, 0xffffff sw $10, 268504020($0) addi $10, $0, 0xffffff sw $10, 268504024($0) addi $10, $0, 0xffffff sw $10, 268504028($0) addi $10, $0, 0xffffff sw $10, 268504032($0) addi $10, $0, 0xffffff sw $10, 268504036($0) addi $10, $0, 0xffffff sw $10, 268504040($0) addi $10, $0, 0xffffff sw $10, 268504044($0) addi $10, $0, 0xffffff sw $10, 268504048($0) addi $10, $0, 0xffffff sw $10, 268504052($0) addi $10, $0, 0xffffff sw $10, 268504056($0) addi $10, $0, 0x00d800 sw $10, 268504060($0) addi $10, $0, 0x00d800 sw $10, 268504064($0) addi $10, $0, 0xfbfbfb sw $10, 268504068($0) addi $10, $0, 0xf3f3f3 sw $10, 268504072($0) addi $10, $0, 0xededed sw $10, 268504076($0) addi $10, $0, 0xececec sw $10, 268504080($0) addi $10, $0, 0xececec sw $10, 268504084($0) addi $10, $0, 0xececec sw $10, 268504088($0) addi $10, $0, 0xececec sw $10, 268504092($0) addi $10, $0, 0xececec sw $10, 268504096($0) addi $10, $0, 0xececec sw $10, 268504100($0) addi $10, $0, 0xececec sw $10, 268504104($0) addi $10, $0, 0xececec sw $10, 268504108($0) addi $10, $0, 0xececec sw $10, 268504112($0) addi $10, $0, 0xececec sw $10, 268504116($0) addi $10, $0, 0xececec sw $10, 268504120($0) addi $10, $0, 0xececec sw $10, 268504124($0) addi $10, $0, 0xececec sw $10, 268504128($0) addi $10, $0, 0xececec sw $10, 268504132($0) addi $10, $0, 0xececec sw $10, 268504136($0) addi $10, $0, 0xececec sw $10, 268504140($0) addi $10, $0, 0xececec sw $10, 268504144($0) addi $10, $0, 0xececec sw $10, 268504148($0) addi $10, $0, 0xececec sw $10, 268504152($0) addi $10, $0, 0xececec sw $10, 268504156($0) addi $10, $0, 0xececec sw $10, 268504160($0) addi $10, $0, 0xececec sw $10, 268504164($0) addi $10, $0, 0xececec sw $10, 268504168($0) addi $10, $0, 0xececec sw $10, 268504172($0) addi $10, $0, 0xececec sw $10, 268504176($0) addi $10, $0, 0xececec sw $10, 268504180($0) addi $10, $0, 0xededed sw $10, 268504184($0) addi $10, $0, 0xf3f3f3 sw $10, 268504188($0) addi $10, $0, 0xfafafa sw $10, 268504192($0) addi $10, $0, 0xffffff sw $10, 268504196($0) addi $10, $0, 0xffffff sw $10, 268504200($0) addi $10, $0, 0xffffff sw $10, 268504204($0) addi $10, $0, 0xffffff sw $10, 268504208($0) addi $10, $0, 0xffffff sw $10, 268504212($0) addi $10, $0, 0xffffff sw $10, 268504216($0) addi $10, $0, 0xffffff sw $10, 268504220($0) addi $10, $0, 0xffffff sw $10, 268504224($0) addi $10, $0, 0xffffff sw $10, 268504228($0) addi $10, $0, 0xffffff sw $10, 268504232($0) addi $10, $0, 0xffffff sw $10, 268504236($0) addi $10, $0, 0xffffff sw $10, 268504240($0) addi $10, $0, 0xffffff sw $10, 268504244($0) addi $10, $0, 0xffffff sw $10, 268504248($0) addi $10, $0, 0xffffff sw $10, 268504252($0) addi $10, $0, 0xffffff sw $10, 268504256($0) addi $10, $0, 0xffffff sw $10, 268504260($0) addi $10, $0, 0xffffff sw $10, 268504264($0) addi $10, $0, 0xffffff sw $10, 268504268($0) addi $10, $0, 0xffffff sw $10, 268504272($0) addi $10, $0, 0xffffff sw $10, 268504276($0) addi $10, $0, 0xffffff sw $10, 268504280($0) addi $10, $0, 0xffffff sw $10, 268504284($0) addi $10, $0, 0xffffff sw $10, 268504288($0) addi $10, $0, 0xffffff sw $10, 268504292($0) addi $10, $0, 0xffffff sw $10, 268504296($0) addi $10, $0, 0xffffff sw $10, 268504300($0) addi $10, $0, 0xffffff sw $10, 268504304($0) addi $10, $0, 0xffffff sw $10, 268504308($0) addi $10, $0, 0xffffff sw $10, 268504312($0) addi $10, $0, 0x00d800 sw $10, 268504316($0) addi $10, $0, 0x00d800 sw $10, 268504320($0) addi $10, $0, 0xffffff sw $10, 268504324($0) addi $10, $0, 0xfdfdfd sw $10, 268504328($0) addi $10, $0, 0xfcfcfc sw $10, 268504332($0) addi $10, $0, 0xfbfbfb sw $10, 268504336($0) addi $10, $0, 0xfbfbfb sw $10, 268504340($0) addi $10, $0, 0xfbfbfb sw $10, 268504344($0) addi $10, $0, 0xfbfbfb sw $10, 268504348($0) addi $10, $0, 0xfbfbfb sw $10, 268504352($0) addi $10, $0, 0xfbfbfb sw $10, 268504356($0) addi $10, $0, 0xfbfbfb sw $10, 268504360($0) addi $10, $0, 0xfbfbfb sw $10, 268504364($0) addi $10, $0, 0xfbfbfb sw $10, 268504368($0) addi $10, $0, 0xfbfbfb sw $10, 268504372($0) addi $10, $0, 0xfbfbfb sw $10, 268504376($0) addi $10, $0, 0xfbfbfb sw $10, 268504380($0) addi $10, $0, 0xfbfbfb sw $10, 268504384($0) addi $10, $0, 0xfbfbfb sw $10, 268504388($0) addi $10, $0, 0xfbfbfb sw $10, 268504392($0) addi $10, $0, 0xfbfbfb sw $10, 268504396($0) addi $10, $0, 0xfbfbfb sw $10, 268504400($0) addi $10, $0, 0xfbfbfb sw $10, 268504404($0) addi $10, $0, 0xfbfbfb sw $10, 268504408($0) addi $10, $0, 0xfbfbfb sw $10, 268504412($0) addi $10, $0, 0xfbfbfb sw $10, 268504416($0) addi $10, $0, 0xfbfbfb sw $10, 268504420($0) addi $10, $0, 0xfbfbfb sw $10, 268504424($0) addi $10, $0, 0xfbfbfb sw $10, 268504428($0) addi $10, $0, 0xfbfbfb sw $10, 268504432($0) addi $10, $0, 0xfbfbfb sw $10, 268504436($0) addi $10, $0, 0xfbfbfb sw $10, 268504440($0) addi $10, $0, 0xfdfdfd sw $10, 268504444($0) addi $10, $0, 0xfefefe sw $10, 268504448($0) addi $10, $0, 0xffffff sw $10, 268504452($0) addi $10, $0, 0xffffff sw $10, 268504456($0) addi $10, $0, 0xffffff sw $10, 268504460($0) addi $10, $0, 0xffffff sw $10, 268504464($0) addi $10, $0, 0xffffff sw $10, 268504468($0) addi $10, $0, 0xffffff sw $10, 268504472($0) addi $10, $0, 0xffffff sw $10, 268504476($0) addi $10, $0, 0xffffff sw $10, 268504480($0) addi $10, $0, 0xffffff sw $10, 268504484($0) addi $10, $0, 0xffffff sw $10, 268504488($0) addi $10, $0, 0xffffff sw $10, 268504492($0) addi $10, $0, 0xffffff sw $10, 268504496($0) addi $10, $0, 0xffffff sw $10, 268504500($0) addi $10, $0, 0xffffff sw $10, 268504504($0) addi $10, $0, 0xffffff sw $10, 268504508($0) addi $10, $0, 0xffffff sw $10, 268504512($0) addi $10, $0, 0xffffff sw $10, 268504516($0) addi $10, $0, 0xffffff sw $10, 268504520($0) addi $10, $0, 0xffffff sw $10, 268504524($0) addi $10, $0, 0xffffff sw $10, 268504528($0) addi $10, $0, 0xffffff sw $10, 268504532($0) addi $10, $0, 0xffffff sw $10, 268504536($0) addi $10, $0, 0xffffff sw $10, 268504540($0) addi $10, $0, 0xffffff sw $10, 268504544($0) addi $10, $0, 0xffffff sw $10, 268504548($0) addi $10, $0, 0xffffff sw $10, 268504552($0) addi $10, $0, 0xffffff sw $10, 268504556($0) addi $10, $0, 0xffffff sw $10, 268504560($0) addi $10, $0, 0xffffff sw $10, 268504564($0) addi $10, $0, 0xffffff sw $10, 268504568($0) addi $10, $0, 0x00d800 sw $10, 268504572($0) addi $10, $0, 0x00d800 sw $10, 268504576($0) addi $10, $0, 0xffffff sw $10, 268504580($0) addi $10, $0, 0xffffff sw $10, 268504584($0) addi $10, $0, 0xffffff sw $10, 268504588($0) addi $10, $0, 0xffffff sw $10, 268504592($0) addi $10, $0, 0xffffff sw $10, 268504596($0) addi $10, $0, 0xffffff sw $10, 268504600($0) addi $10, $0, 0xffffff sw $10, 268504604($0) addi $10, $0, 0xffffff sw $10, 268504608($0) addi $10, $0, 0xffffff sw $10, 268504612($0) addi $10, $0, 0xffffff sw $10, 268504616($0) addi $10, $0, 0xffffff sw $10, 268504620($0) addi $10, $0, 0xffffff sw $10, 268504624($0) addi $10, $0, 0xffffff sw $10, 268504628($0) addi $10, $0, 0xffffff sw $10, 268504632($0) addi $10, $0, 0xffffff sw $10, 268504636($0) addi $10, $0, 0xffffff sw $10, 268504640($0) addi $10, $0, 0xffffff sw $10, 268504644($0) addi $10, $0, 0xffffff sw $10, 268504648($0) addi $10, $0, 0xffffff sw $10, 268504652($0) addi $10, $0, 0xffffff sw $10, 268504656($0) addi $10, $0, 0xffffff sw $10, 268504660($0) addi $10, $0, 0xffffff sw $10, 268504664($0) addi $10, $0, 0xffffff sw $10, 268504668($0) addi $10, $0, 0xffffff sw $10, 268504672($0) addi $10, $0, 0xffffff sw $10, 268504676($0) addi $10, $0, 0xffffff sw $10, 268504680($0) addi $10, $0, 0xffffff sw $10, 268504684($0) addi $10, $0, 0xffffff sw $10, 268504688($0) addi $10, $0, 0xffffff sw $10, 268504692($0) addi $10, $0, 0xffffff sw $10, 268504696($0) addi $10, $0, 0xffffff sw $10, 268504700($0) addi $10, $0, 0xffffff sw $10, 268504704($0) addi $10, $0, 0xffffff sw $10, 268504708($0) addi $10, $0, 0xffffff sw $10, 268504712($0) addi $10, $0, 0xffffff sw $10, 268504716($0) addi $10, $0, 0xffffff sw $10, 268504720($0) addi $10, $0, 0xffffff sw $10, 268504724($0) addi $10, $0, 0xffffff sw $10, 268504728($0) addi $10, $0, 0xffffff sw $10, 268504732($0) addi $10, $0, 0xffffff sw $10, 268504736($0) addi $10, $0, 0xffffff sw $10, 268504740($0) addi $10, $0, 0xffffff sw $10, 268504744($0) addi $10, $0, 0xffffff sw $10, 268504748($0) addi $10, $0, 0xffffff sw $10, 268504752($0) addi $10, $0, 0xffffff sw $10, 268504756($0) addi $10, $0, 0xffffff sw $10, 268504760($0) addi $10, $0, 0xffffff sw $10, 268504764($0) addi $10, $0, 0xffffff sw $10, 268504768($0) addi $10, $0, 0xffffff sw $10, 268504772($0) addi $10, $0, 0xffffff sw $10, 268504776($0) addi $10, $0, 0xffffff sw $10, 268504780($0) addi $10, $0, 0xffffff sw $10, 268504784($0) addi $10, $0, 0xffffff sw $10, 268504788($0) addi $10, $0, 0xffffff sw $10, 268504792($0) addi $10, $0, 0xffffff sw $10, 268504796($0) addi $10, $0, 0xffffff sw $10, 268504800($0) addi $10, $0, 0xffffff sw $10, 268504804($0) addi $10, $0, 0xffffff sw $10, 268504808($0) addi $10, $0, 0xffffff sw $10, 268504812($0) addi $10, $0, 0xffffff sw $10, 268504816($0) addi $10, $0, 0xffffff sw $10, 268504820($0) addi $10, $0, 0xffffff sw $10, 268504824($0) addi $10, $0, 0x00d800 sw $10, 268504828($0) addi $10, $0, 0x00d800 sw $10, 268504832($0) addi $10, $0, 0xffffff sw $10, 268504836($0) addi $10, $0, 0xffffff sw $10, 268504840($0) addi $10, $0, 0xffffff sw $10, 268504844($0) addi $10, $0, 0xffffff sw $10, 268504848($0) addi $10, $0, 0xffffff sw $10, 268504852($0) addi $10, $0, 0xffffff sw $10, 268504856($0) addi $10, $0, 0xffffff sw $10, 268504860($0) addi $10, $0, 0xffffff sw $10, 268504864($0) addi $10, $0, 0xffffff sw $10, 268504868($0) addi $10, $0, 0xffffff sw $10, 268504872($0) addi $10, $0, 0xffffff sw $10, 268504876($0) addi $10, $0, 0xffffff sw $10, 268504880($0) addi $10, $0, 0xffffff sw $10, 268504884($0) addi $10, $0, 0xffffff sw $10, 268504888($0) addi $10, $0, 0xffffff sw $10, 268504892($0) addi $10, $0, 0xffffff sw $10, 268504896($0) addi $10, $0, 0xffffff sw $10, 268504900($0) addi $10, $0, 0xffffff sw $10, 268504904($0) addi $10, $0, 0xffffff sw $10, 268504908($0) addi $10, $0, 0xffffff sw $10, 268504912($0) addi $10, $0, 0xffffff sw $10, 268504916($0) addi $10, $0, 0xffffff sw $10, 268504920($0) addi $10, $0, 0xffffff sw $10, 268504924($0) addi $10, $0, 0xffffff sw $10, 268504928($0) addi $10, $0, 0xffffff sw $10, 268504932($0) addi $10, $0, 0xffffff sw $10, 268504936($0) addi $10, $0, 0xffffff sw $10, 268504940($0) addi $10, $0, 0xffffff sw $10, 268504944($0) addi $10, $0, 0xffffff sw $10, 268504948($0) addi $10, $0, 0xffffff sw $10, 268504952($0) addi $10, $0, 0xffffff sw $10, 268504956($0) addi $10, $0, 0xffffff sw $10, 268504960($0) addi $10, $0, 0xffffff sw $10, 268504964($0) addi $10, $0, 0xffffff sw $10, 268504968($0) addi $10, $0, 0xffffff sw $10, 268504972($0) addi $10, $0, 0xffffff sw $10, 268504976($0) addi $10, $0, 0xffffff sw $10, 268504980($0) addi $10, $0, 0xffffff sw $10, 268504984($0) addi $10, $0, 0xffffff sw $10, 268504988($0) addi $10, $0, 0xffffff sw $10, 268504992($0) addi $10, $0, 0xffffff sw $10, 268504996($0) addi $10, $0, 0xffffff sw $10, 268505000($0) addi $10, $0, 0xffffff sw $10, 268505004($0) addi $10, $0, 0xffffff sw $10, 268505008($0) addi $10, $0, 0xffffff sw $10, 268505012($0) addi $10, $0, 0xffffff sw $10, 268505016($0) addi $10, $0, 0xffffff sw $10, 268505020($0) addi $10, $0, 0xffffff sw $10, 268505024($0) addi $10, $0, 0xffffff sw $10, 268505028($0) addi $10, $0, 0xffffff sw $10, 268505032($0) addi $10, $0, 0xffffff sw $10, 268505036($0) addi $10, $0, 0xffffff sw $10, 268505040($0) addi $10, $0, 0xffffff sw $10, 268505044($0) addi $10, $0, 0xffffff sw $10, 268505048($0) addi $10, $0, 0xffffff sw $10, 268505052($0) addi $10, $0, 0xffffff sw $10, 268505056($0) addi $10, $0, 0xffffff sw $10, 268505060($0) addi $10, $0, 0xffffff sw $10, 268505064($0) addi $10, $0, 0xffffff sw $10, 268505068($0) addi $10, $0, 0xffffff sw $10, 268505072($0) addi $10, $0, 0xffffff sw $10, 268505076($0) addi $10, $0, 0xffffff sw $10, 268505080($0) addi $10, $0, 0x00d800 sw $10, 268505084($0) addi $10, $0, 0x00d800 sw $10, 268505088($0) addi $10, $0, 0xffffff sw $10, 268505092($0) addi $10, $0, 0xffffff sw $10, 268505096($0) addi $10, $0, 0xffffff sw $10, 268505100($0) addi $10, $0, 0xffffff sw $10, 268505104($0) addi $10, $0, 0xffffff sw $10, 268505108($0) addi $10, $0, 0xffffff sw $10, 268505112($0) addi $10, $0, 0xffffff sw $10, 268505116($0) addi $10, $0, 0xffffff sw $10, 268505120($0) addi $10, $0, 0xffffff sw $10, 268505124($0) addi $10, $0, 0xffffff sw $10, 268505128($0) addi $10, $0, 0xffffff sw $10, 268505132($0) addi $10, $0, 0xffffff sw $10, 268505136($0) addi $10, $0, 0xffffff sw $10, 268505140($0) addi $10, $0, 0xffffff sw $10, 268505144($0) addi $10, $0, 0xffffff sw $10, 268505148($0) addi $10, $0, 0xffffff sw $10, 268505152($0) addi $10, $0, 0xffffff sw $10, 268505156($0) addi $10, $0, 0xffffff sw $10, 268505160($0) addi $10, $0, 0xffffff sw $10, 268505164($0) addi $10, $0, 0xffffff sw $10, 268505168($0) addi $10, $0, 0xffffff sw $10, 268505172($0) addi $10, $0, 0xffffff sw $10, 268505176($0) addi $10, $0, 0xffffff sw $10, 268505180($0) addi $10, $0, 0xffffff sw $10, 268505184($0) addi $10, $0, 0xffffff sw $10, 268505188($0) addi $10, $0, 0xffffff sw $10, 268505192($0) addi $10, $0, 0xffffff sw $10, 268505196($0) addi $10, $0, 0xffffff sw $10, 268505200($0) addi $10, $0, 0xffffff sw $10, 268505204($0) addi $10, $0, 0xffffff sw $10, 268505208($0) addi $10, $0, 0xffffff sw $10, 268505212($0) addi $10, $0, 0xffffff sw $10, 268505216($0) addi $10, $0, 0xffffff sw $10, 268505220($0) addi $10, $0, 0xffffff sw $10, 268505224($0) addi $10, $0, 0xffffff sw $10, 268505228($0) addi $10, $0, 0xffffff sw $10, 268505232($0) addi $10, $0, 0xffffff sw $10, 268505236($0) addi $10, $0, 0xffffff sw $10, 268505240($0) addi $10, $0, 0xffffff sw $10, 268505244($0) addi $10, $0, 0xffffff sw $10, 268505248($0) addi $10, $0, 0xffffff sw $10, 268505252($0) addi $10, $0, 0xffffff sw $10, 268505256($0) addi $10, $0, 0xffffff sw $10, 268505260($0) addi $10, $0, 0xffffff sw $10, 268505264($0) addi $10, $0, 0xffffff sw $10, 268505268($0) addi $10, $0, 0xffffff sw $10, 268505272($0) addi $10, $0, 0xffffff sw $10, 268505276($0) addi $10, $0, 0xffffff sw $10, 268505280($0) addi $10, $0, 0xffffff sw $10, 268505284($0) addi $10, $0, 0xffffff sw $10, 268505288($0) addi $10, $0, 0xffffff sw $10, 268505292($0) addi $10, $0, 0xffffff sw $10, 268505296($0) addi $10, $0, 0xffffff sw $10, 268505300($0) addi $10, $0, 0xffffff sw $10, 268505304($0) addi $10, $0, 0xffffff sw $10, 268505308($0) addi $10, $0, 0xffffff sw $10, 268505312($0) addi $10, $0, 0xffffff sw $10, 268505316($0) addi $10, $0, 0xffffff sw $10, 268505320($0) addi $10, $0, 0xffffff sw $10, 268505324($0) addi $10, $0, 0xffffff sw $10, 268505328($0) addi $10, $0, 0xffffff sw $10, 268505332($0) addi $10, $0, 0xffffff sw $10, 268505336($0) addi $10, $0, 0x00d800 sw $10, 268505340($0) addi $10, $0, 0x00d800 sw $10, 268505344($0) addi $10, $0, 0xffffff sw $10, 268505348($0) addi $10, $0, 0xffffff sw $10, 268505352($0) addi $10, $0, 0xffffff sw $10, 268505356($0) addi $10, $0, 0xffffff sw $10, 268505360($0) addi $10, $0, 0xffffff sw $10, 268505364($0) addi $10, $0, 0xffffff sw $10, 268505368($0) addi $10, $0, 0xffffff sw $10, 268505372($0) addi $10, $0, 0xffffff sw $10, 268505376($0) addi $10, $0, 0xffffff sw $10, 268505380($0) addi $10, $0, 0xffffff sw $10, 268505384($0) addi $10, $0, 0xffffff sw $10, 268505388($0) addi $10, $0, 0xffffff sw $10, 268505392($0) addi $10, $0, 0xffffff sw $10, 268505396($0) addi $10, $0, 0xffffff sw $10, 268505400($0) addi $10, $0, 0xffffff sw $10, 268505404($0) addi $10, $0, 0xffffff sw $10, 268505408($0) addi $10, $0, 0xffffff sw $10, 268505412($0) addi $10, $0, 0xffffff sw $10, 268505416($0) addi $10, $0, 0xffffff sw $10, 268505420($0) addi $10, $0, 0xffffff sw $10, 268505424($0) addi $10, $0, 0xffffff sw $10, 268505428($0) addi $10, $0, 0xffffff sw $10, 268505432($0) addi $10, $0, 0xffffff sw $10, 268505436($0) addi $10, $0, 0xffffff sw $10, 268505440($0) addi $10, $0, 0xffffff sw $10, 268505444($0) addi $10, $0, 0xffffff sw $10, 268505448($0) addi $10, $0, 0xffffff sw $10, 268505452($0) addi $10, $0, 0xffffff sw $10, 268505456($0) addi $10, $0, 0xffffff sw $10, 268505460($0) addi $10, $0, 0xffffff sw $10, 268505464($0) addi $10, $0, 0xffffff sw $10, 268505468($0) addi $10, $0, 0xffffff sw $10, 268505472($0) addi $10, $0, 0xffffff sw $10, 268505476($0) addi $10, $0, 0xffffff sw $10, 268505480($0) addi $10, $0, 0xffffff sw $10, 268505484($0) addi $10, $0, 0xffffff sw $10, 268505488($0) addi $10, $0, 0xffffff sw $10, 268505492($0) addi $10, $0, 0xffffff sw $10, 268505496($0) addi $10, $0, 0xffffff sw $10, 268505500($0) addi $10, $0, 0xffffff sw $10, 268505504($0) addi $10, $0, 0xffffff sw $10, 268505508($0) addi $10, $0, 0xffffff sw $10, 268505512($0) addi $10, $0, 0xffffff sw $10, 268505516($0) addi $10, $0, 0xffffff sw $10, 268505520($0) addi $10, $0, 0xffffff sw $10, 268505524($0) addi $10, $0, 0xffffff sw $10, 268505528($0) addi $10, $0, 0xffffff sw $10, 268505532($0) addi $10, $0, 0xffffff sw $10, 268505536($0) addi $10, $0, 0xffffff sw $10, 268505540($0) addi $10, $0, 0xffffff sw $10, 268505544($0) addi $10, $0, 0xffffff sw $10, 268505548($0) addi $10, $0, 0xffffff sw $10, 268505552($0) addi $10, $0, 0xffffff sw $10, 268505556($0) addi $10, $0, 0xffffff sw $10, 268505560($0) addi $10, $0, 0xffffff sw $10, 268505564($0) addi $10, $0, 0xffffff sw $10, 268505568($0) addi $10, $0, 0xffffff sw $10, 268505572($0) addi $10, $0, 0xffffff sw $10, 268505576($0) addi $10, $0, 0xffffff sw $10, 268505580($0) addi $10, $0, 0xffffff sw $10, 268505584($0) addi $10, $0, 0xffffff sw $10, 268505588($0) addi $10, $0, 0xffffff sw $10, 268505592($0) addi $10, $0, 0x00d800 sw $10, 268505596($0) addi $10, $0, 0x00d800 sw $10, 268505600($0) addi $10, $0, 0xffffff sw $10, 268505604($0) addi $10, $0, 0xffffff sw $10, 268505608($0) addi $10, $0, 0xffffff sw $10, 268505612($0) addi $10, $0, 0xffffff sw $10, 268505616($0) addi $10, $0, 0xffffff sw $10, 268505620($0) addi $10, $0, 0xffffff sw $10, 268505624($0) addi $10, $0, 0xffffff sw $10, 268505628($0) addi $10, $0, 0xffffff sw $10, 268505632($0) addi $10, $0, 0xffffff sw $10, 268505636($0) addi $10, $0, 0xffffff sw $10, 268505640($0) addi $10, $0, 0xffffff sw $10, 268505644($0) addi $10, $0, 0xffffff sw $10, 268505648($0) addi $10, $0, 0xffffff sw $10, 268505652($0) addi $10, $0, 0xffffff sw $10, 268505656($0) addi $10, $0, 0xffffff sw $10, 268505660($0) addi $10, $0, 0xffffff sw $10, 268505664($0) addi $10, $0, 0xffffff sw $10, 268505668($0) addi $10, $0, 0xffffff sw $10, 268505672($0) addi $10, $0, 0xffffff sw $10, 268505676($0) addi $10, $0, 0xffffff sw $10, 268505680($0) addi $10, $0, 0xffffff sw $10, 268505684($0) addi $10, $0, 0xffffff sw $10, 268505688($0) addi $10, $0, 0xffffff sw $10, 268505692($0) addi $10, $0, 0xffffff sw $10, 268505696($0) addi $10, $0, 0xffffff sw $10, 268505700($0) addi $10, $0, 0xffffff sw $10, 268505704($0) addi $10, $0, 0xffffff sw $10, 268505708($0) addi $10, $0, 0xffffff sw $10, 268505712($0) addi $10, $0, 0xffffff sw $10, 268505716($0) addi $10, $0, 0xffffff sw $10, 268505720($0) addi $10, $0, 0xffffff sw $10, 268505724($0) addi $10, $0, 0xffffff sw $10, 268505728($0) addi $10, $0, 0xffffff sw $10, 268505732($0) addi $10, $0, 0xffffff sw $10, 268505736($0) addi $10, $0, 0xffffff sw $10, 268505740($0) addi $10, $0, 0xffffff sw $10, 268505744($0) addi $10, $0, 0xffffff sw $10, 268505748($0) addi $10, $0, 0xffffff sw $10, 268505752($0) addi $10, $0, 0xffffff sw $10, 268505756($0) addi $10, $0, 0xffffff sw $10, 268505760($0) addi $10, $0, 0xffffff sw $10, 268505764($0) addi $10, $0, 0xffffff sw $10, 268505768($0) addi $10, $0, 0xffffff sw $10, 268505772($0) addi $10, $0, 0xffffff sw $10, 268505776($0) addi $10, $0, 0xffffff sw $10, 268505780($0) addi $10, $0, 0xffffff sw $10, 268505784($0) addi $10, $0, 0xffffff sw $10, 268505788($0) addi $10, $0, 0xffffff sw $10, 268505792($0) addi $10, $0, 0xffffff sw $10, 268505796($0) addi $10, $0, 0xffffff sw $10, 268505800($0) addi $10, $0, 0xffffff sw $10, 268505804($0) addi $10, $0, 0xffffff sw $10, 268505808($0) addi $10, $0, 0xffffff sw $10, 268505812($0) addi $10, $0, 0xffffff sw $10, 268505816($0) addi $10, $0, 0xffffff sw $10, 268505820($0) addi $10, $0, 0xffffff sw $10, 268505824($0) addi $10, $0, 0xffffff sw $10, 268505828($0) addi $10, $0, 0xffffff sw $10, 268505832($0) addi $10, $0, 0xffffff sw $10, 268505836($0) addi $10, $0, 0xffffff sw $10, 268505840($0) addi $10, $0, 0xffffff sw $10, 268505844($0) addi $10, $0, 0xffffff sw $10, 268505848($0) addi $10, $0, 0x00d800 sw $10, 268505852($0) addi $10, $0, 0x00d800 sw $10, 268505856($0) addi $10, $0, 0xffffff sw $10, 268505860($0) addi $10, $0, 0xffffff sw $10, 268505864($0) addi $10, $0, 0xffffff sw $10, 268505868($0) addi $10, $0, 0xffffff sw $10, 268505872($0) addi $10, $0, 0xffffff sw $10, 268505876($0) addi $10, $0, 0xffffff sw $10, 268505880($0) addi $10, $0, 0xffffff sw $10, 268505884($0) addi $10, $0, 0xffffff sw $10, 268505888($0) addi $10, $0, 0xffffff sw $10, 268505892($0) addi $10, $0, 0xffffff sw $10, 268505896($0) addi $10, $0, 0xffffff sw $10, 268505900($0) addi $10, $0, 0xffffff sw $10, 268505904($0) addi $10, $0, 0xffffff sw $10, 268505908($0) addi $10, $0, 0xffffff sw $10, 268505912($0) addi $10, $0, 0xffffff sw $10, 268505916($0) addi $10, $0, 0xffffff sw $10, 268505920($0) addi $10, $0, 0xffffff sw $10, 268505924($0) addi $10, $0, 0xffffff sw $10, 268505928($0) addi $10, $0, 0xffffff sw $10, 268505932($0) addi $10, $0, 0xffffff sw $10, 268505936($0) addi $10, $0, 0xffffff sw $10, 268505940($0) addi $10, $0, 0xffffff sw $10, 268505944($0) addi $10, $0, 0xffffff sw $10, 268505948($0) addi $10, $0, 0xffffff sw $10, 268505952($0) addi $10, $0, 0xffffff sw $10, 268505956($0) addi $10, $0, 0xffffff sw $10, 268505960($0) addi $10, $0, 0xffffff sw $10, 268505964($0) addi $10, $0, 0xffffff sw $10, 268505968($0) addi $10, $0, 0xffffff sw $10, 268505972($0) addi $10, $0, 0xffffff sw $10, 268505976($0) addi $10, $0, 0xffffff sw $10, 268505980($0) addi $10, $0, 0xffffff sw $10, 268505984($0) addi $10, $0, 0xffffff sw $10, 268505988($0) addi $10, $0, 0xffffff sw $10, 268505992($0) addi $10, $0, 0xffffff sw $10, 268505996($0) addi $10, $0, 0xffffff sw $10, 268506000($0) addi $10, $0, 0xffffff sw $10, 268506004($0) addi $10, $0, 0xffffff sw $10, 268506008($0) addi $10, $0, 0xffffff sw $10, 268506012($0) addi $10, $0, 0xffffff sw $10, 268506016($0) addi $10, $0, 0xffffff sw $10, 268506020($0) addi $10, $0, 0xffffff sw $10, 268506024($0) addi $10, $0, 0xffffff sw $10, 268506028($0) addi $10, $0, 0xffffff sw $10, 268506032($0) addi $10, $0, 0xffffff sw $10, 268506036($0) addi $10, $0, 0xffffff sw $10, 268506040($0) addi $10, $0, 0xffffff sw $10, 268506044($0) addi $10, $0, 0xffffff sw $10, 268506048($0) addi $10, $0, 0xffffff sw $10, 268506052($0) addi $10, $0, 0xffffff sw $10, 268506056($0) addi $10, $0, 0xffffff sw $10, 268506060($0) addi $10, $0, 0xffffff sw $10, 268506064($0) addi $10, $0, 0xffffff sw $10, 268506068($0) addi $10, $0, 0xffffff sw $10, 268506072($0) addi $10, $0, 0xffffff sw $10, 268506076($0) addi $10, $0, 0xffffff sw $10, 268506080($0) addi $10, $0, 0xffffff sw $10, 268506084($0) addi $10, $0, 0xffffff sw $10, 268506088($0) addi $10, $0, 0xffffff sw $10, 268506092($0) addi $10, $0, 0xffffff sw $10, 268506096($0) addi $10, $0, 0xffffff sw $10, 268506100($0) addi $10, $0, 0xffffff sw $10, 268506104($0) addi $10, $0, 0x00d800 sw $10, 268506108($0) addi $10, $0, 0x00d800 sw $10, 268506112($0) addi $10, $0, 0xffffff sw $10, 268506116($0) addi $10, $0, 0xffffff sw $10, 268506120($0) addi $10, $0, 0xffffff sw $10, 268506124($0) addi $10, $0, 0xffffff sw $10, 268506128($0) addi $10, $0, 0xffffff sw $10, 268506132($0) addi $10, $0, 0xffffff sw $10, 268506136($0) addi $10, $0, 0xffffff sw $10, 268506140($0) addi $10, $0, 0xffffff sw $10, 268506144($0) addi $10, $0, 0xffffff sw $10, 268506148($0) addi $10, $0, 0xffffff sw $10, 268506152($0) addi $10, $0, 0xffffff sw $10, 268506156($0) addi $10, $0, 0xffffff sw $10, 268506160($0) addi $10, $0, 0xffffff sw $10, 268506164($0) addi $10, $0, 0xffffff sw $10, 268506168($0) addi $10, $0, 0xffffff sw $10, 268506172($0) addi $10, $0, 0xffffff sw $10, 268506176($0) addi $10, $0, 0xffffff sw $10, 268506180($0) addi $10, $0, 0xffffff sw $10, 268506184($0) addi $10, $0, 0xffffff sw $10, 268506188($0) addi $10, $0, 0xfbffff sw $10, 268506192($0) addi $10, $0, 0xfffff9 sw $10, 268506196($0) addi $10, $0, 0xfffef5 sw $10, 268506200($0) addi $10, $0, 0xfffff8 sw $10, 268506204($0) addi $10, $0, 0xfefefd sw $10, 268506208($0) addi $10, $0, 0xf7ffff sw $10, 268506212($0) addi $10, $0, 0xfaffff sw $10, 268506216($0) addi $10, $0, 0xfffcff sw $10, 268506220($0) addi $10, $0, 0xfdfeff sw $10, 268506224($0) addi $10, $0, 0xfffef9 sw $10, 268506228($0) addi $10, $0, 0xfbfefc sw $10, 268506232($0) addi $10, $0, 0xfefcf3 sw $10, 268506236($0) addi $10, $0, 0xffffff sw $10, 268506240($0) addi $10, $0, 0xffffff sw $10, 268506244($0) addi $10, $0, 0xffffff sw $10, 268506248($0) addi $10, $0, 0xffffff sw $10, 268506252($0) addi $10, $0, 0xffffff sw $10, 268506256($0) addi $10, $0, 0xffffff sw $10, 268506260($0) addi $10, $0, 0xffffff sw $10, 268506264($0) addi $10, $0, 0xffffff sw $10, 268506268($0) addi $10, $0, 0xffffff sw $10, 268506272($0) addi $10, $0, 0xffffff sw $10, 268506276($0) addi $10, $0, 0xffffff sw $10, 268506280($0) addi $10, $0, 0xffffff sw $10, 268506284($0) addi $10, $0, 0xffffff sw $10, 268506288($0) addi $10, $0, 0xffffff sw $10, 268506292($0) addi $10, $0, 0xffffff sw $10, 268506296($0) addi $10, $0, 0xffffff sw $10, 268506300($0) addi $10, $0, 0xffffff sw $10, 268506304($0) addi $10, $0, 0xffffff sw $10, 268506308($0) addi $10, $0, 0xffffff sw $10, 268506312($0) addi $10, $0, 0xffffff sw $10, 268506316($0) addi $10, $0, 0xffffff sw $10, 268506320($0) addi $10, $0, 0xffffff sw $10, 268506324($0) addi $10, $0, 0xffffff sw $10, 268506328($0) addi $10, $0, 0xffffff sw $10, 268506332($0) addi $10, $0, 0xffffff sw $10, 268506336($0) addi $10, $0, 0xffffff sw $10, 268506340($0) addi $10, $0, 0xffffff sw $10, 268506344($0) addi $10, $0, 0xffffff sw $10, 268506348($0) addi $10, $0, 0xffffff sw $10, 268506352($0) addi $10, $0, 0xffffff sw $10, 268506356($0) addi $10, $0, 0xffffff sw $10, 268506360($0) addi $10, $0, 0x00d800 sw $10, 268506364($0) addi $10, $0, 0x00d800 sw $10, 268506368($0) addi $10, $0, 0xffffff sw $10, 268506372($0) addi $10, $0, 0xffffff sw $10, 268506376($0) addi $10, $0, 0xffffff sw $10, 268506380($0) addi $10, $0, 0xffffff sw $10, 268506384($0) addi $10, $0, 0xffffff sw $10, 268506388($0) addi $10, $0, 0xffffff sw $10, 268506392($0) addi $10, $0, 0xffffff sw $10, 268506396($0) addi $10, $0, 0xffffff sw $10, 268506400($0) addi $10, $0, 0xffffff sw $10, 268506404($0) addi $10, $0, 0xffffff sw $10, 268506408($0) addi $10, $0, 0xffffff sw $10, 268506412($0) addi $10, $0, 0xffffff sw $10, 268506416($0) addi $10, $0, 0xffffff sw $10, 268506420($0) addi $10, $0, 0xffffff sw $10, 268506424($0) addi $10, $0, 0xffffff sw $10, 268506428($0) addi $10, $0, 0xffffff sw $10, 268506432($0) addi $10, $0, 0xffffff sw $10, 268506436($0) addi $10, $0, 0xffffff sw $10, 268506440($0) addi $10, $0, 0xfffffe sw $10, 268506444($0) addi $10, $0, 0xfffffc sw $10, 268506448($0) addi $10, $0, 0xfbffff sw $10, 268506452($0) addi $10, $0, 0xfaffff sw $10, 268506456($0) addi $10, $0, 0xf8fdff sw $10, 268506460($0) addi $10, $0, 0xfcfdf8 sw $10, 268506464($0) addi $10, $0, 0xfff9fe sw $10, 268506468($0) addi $10, $0, 0xfffbfa sw $10, 268506472($0) addi $10, $0, 0xfdfff2 sw $10, 268506476($0) addi $10, $0, 0xfdfdf1 sw $10, 268506480($0) addi $10, $0, 0xf8fefe sw $10, 268506484($0) addi $10, $0, 0xf6ffff sw $10, 268506488($0) addi $10, $0, 0xfbffff sw $10, 268506492($0) addi $10, $0, 0xffffff sw $10, 268506496($0) addi $10, $0, 0xffffff sw $10, 268506500($0) addi $10, $0, 0xffffff sw $10, 268506504($0) addi $10, $0, 0xffffff sw $10, 268506508($0) addi $10, $0, 0xffffff sw $10, 268506512($0) addi $10, $0, 0xffffff sw $10, 268506516($0) addi $10, $0, 0xffffff sw $10, 268506520($0) addi $10, $0, 0xffffff sw $10, 268506524($0) addi $10, $0, 0xffffff sw $10, 268506528($0) addi $10, $0, 0xffffff sw $10, 268506532($0) addi $10, $0, 0xffffff sw $10, 268506536($0) addi $10, $0, 0xffffff sw $10, 268506540($0) addi $10, $0, 0xffffff sw $10, 268506544($0) addi $10, $0, 0xffffff sw $10, 268506548($0) addi $10, $0, 0xffffff sw $10, 268506552($0) addi $10, $0, 0xffffff sw $10, 268506556($0) addi $10, $0, 0xffffff sw $10, 268506560($0) addi $10, $0, 0xffffff sw $10, 268506564($0) addi $10, $0, 0xffffff sw $10, 268506568($0) addi $10, $0, 0xffffff sw $10, 268506572($0) addi $10, $0, 0xffffff sw $10, 268506576($0) addi $10, $0, 0xffffff sw $10, 268506580($0) addi $10, $0, 0xffffff sw $10, 268506584($0) addi $10, $0, 0xffffff sw $10, 268506588($0) addi $10, $0, 0xffffff sw $10, 268506592($0) addi $10, $0, 0xffffff sw $10, 268506596($0) addi $10, $0, 0xffffff sw $10, 268506600($0) addi $10, $0, 0xffffff sw $10, 268506604($0) addi $10, $0, 0xffffff sw $10, 268506608($0) addi $10, $0, 0xffffff sw $10, 268506612($0) addi $10, $0, 0xffffff sw $10, 268506616($0) addi $10, $0, 0x00d800 sw $10, 268506620($0) addi $10, $0, 0x00d800 sw $10, 268506624($0) addi $10, $0, 0xffffff sw $10, 268506628($0) addi $10, $0, 0xffffff sw $10, 268506632($0) addi $10, $0, 0xffffff sw $10, 268506636($0) addi $10, $0, 0xffffff sw $10, 268506640($0) addi $10, $0, 0xffffff sw $10, 268506644($0) addi $10, $0, 0xffffff sw $10, 268506648($0) addi $10, $0, 0xffffff sw $10, 268506652($0) addi $10, $0, 0xffffff sw $10, 268506656($0) addi $10, $0, 0xffffff sw $10, 268506660($0) addi $10, $0, 0xffffff sw $10, 268506664($0) addi $10, $0, 0xffffff sw $10, 268506668($0) addi $10, $0, 0xffffff sw $10, 268506672($0) addi $10, $0, 0xffffff sw $10, 268506676($0) addi $10, $0, 0xffffff sw $10, 268506680($0) addi $10, $0, 0xffffff sw $10, 268506684($0) addi $10, $0, 0xffffff sw $10, 268506688($0) addi $10, $0, 0xffffff sw $10, 268506692($0) addi $10, $0, 0xffffff sw $10, 268506696($0) addi $10, $0, 0xffffff sw $10, 268506700($0) addi $10, $0, 0xf9ffff sw $10, 268506704($0) addi $10, $0, 0xfcfffc sw $10, 268506708($0) addi $10, $0, 0xcab29f sw $10, 268506712($0) addi $10, $0, 0x914c2a sw $10, 268506716($0) addi $10, $0, 0x874b38 sw $10, 268506720($0) addi $10, $0, 0xfcfff6 sw $10, 268506724($0) addi $10, $0, 0xefffff sw $10, 268506728($0) addi $10, $0, 0xfefcff sw $10, 268506732($0) addi $10, $0, 0xfbfbff sw $10, 268506736($0) addi $10, $0, 0x994a2b sw $10, 268506740($0) addi $10, $0, 0xa14a19 sw $10, 268506744($0) addi $10, $0, 0xe4cfca sw $10, 268506748($0) addi $10, $0, 0xffffff sw $10, 268506752($0) addi $10, $0, 0xffffff sw $10, 268506756($0) addi $10, $0, 0xffffff sw $10, 268506760($0) addi $10, $0, 0xffffff sw $10, 268506764($0) addi $10, $0, 0xffffff sw $10, 268506768($0) addi $10, $0, 0xffffff sw $10, 268506772($0) addi $10, $0, 0xffffff sw $10, 268506776($0) addi $10, $0, 0xffffff sw $10, 268506780($0) addi $10, $0, 0xffffff sw $10, 268506784($0) addi $10, $0, 0xffffff sw $10, 268506788($0) addi $10, $0, 0xffffff sw $10, 268506792($0) addi $10, $0, 0xffffff sw $10, 268506796($0) addi $10, $0, 0xffffff sw $10, 268506800($0) addi $10, $0, 0xffffff sw $10, 268506804($0) addi $10, $0, 0xffffff sw $10, 268506808($0) addi $10, $0, 0xffffff sw $10, 268506812($0) addi $10, $0, 0xffffff sw $10, 268506816($0) addi $10, $0, 0xffffff sw $10, 268506820($0) addi $10, $0, 0xffffff sw $10, 268506824($0) addi $10, $0, 0xffffff sw $10, 268506828($0) addi $10, $0, 0xffffff sw $10, 268506832($0) addi $10, $0, 0xffffff sw $10, 268506836($0) addi $10, $0, 0xffffff sw $10, 268506840($0) addi $10, $0, 0xffffff sw $10, 268506844($0) addi $10, $0, 0xffffff sw $10, 268506848($0) addi $10, $0, 0xffffff sw $10, 268506852($0) addi $10, $0, 0xffffff sw $10, 268506856($0) addi $10, $0, 0xffffff sw $10, 268506860($0) addi $10, $0, 0xffffff sw $10, 268506864($0) addi $10, $0, 0xffffff sw $10, 268506868($0) addi $10, $0, 0xffffff sw $10, 268506872($0) addi $10, $0, 0x00d800 sw $10, 268506876($0) addi $10, $0, 0x00d800 sw $10, 268506880($0) addi $10, $0, 0xffffff sw $10, 268506884($0) addi $10, $0, 0xffffff sw $10, 268506888($0) addi $10, $0, 0xffffff sw $10, 268506892($0) addi $10, $0, 0xffffff sw $10, 268506896($0) addi $10, $0, 0xffffff sw $10, 268506900($0) addi $10, $0, 0xffffff sw $10, 268506904($0) addi $10, $0, 0xffffff sw $10, 268506908($0) addi $10, $0, 0xffffff sw $10, 268506912($0) addi $10, $0, 0xffffff sw $10, 268506916($0) addi $10, $0, 0xffffff sw $10, 268506920($0) addi $10, $0, 0xffffff sw $10, 268506924($0) addi $10, $0, 0xffffff sw $10, 268506928($0) addi $10, $0, 0xffffff sw $10, 268506932($0) addi $10, $0, 0xffffff sw $10, 268506936($0) addi $10, $0, 0xffffff sw $10, 268506940($0) addi $10, $0, 0xffffff sw $10, 268506944($0) addi $10, $0, 0xffffff sw $10, 268506948($0) addi $10, $0, 0xffffff sw $10, 268506952($0) addi $10, $0, 0xfffffe sw $10, 268506956($0) addi $10, $0, 0xfbffff sw $10, 268506960($0) addi $10, $0, 0xfbfffe sw $10, 268506964($0) addi $10, $0, 0xceae99 sw $10, 268506968($0) addi $10, $0, 0xa74518 sw $10, 268506972($0) addi $10, $0, 0xa65325 sw $10, 268506976($0) addi $10, $0, 0xcfa389 sw $10, 268506980($0) addi $10, $0, 0xceae9c sw $10, 268506984($0) addi $10, $0, 0xcdad93 sw $10, 268506988($0) addi $10, $0, 0xcbb394 sw $10, 268506992($0) addi $10, $0, 0x9e4721 sw $10, 268506996($0) addi $10, $0, 0xa44b09 sw $10, 268507000($0) addi $10, $0, 0xe1d4bc sw $10, 268507004($0) addi $10, $0, 0xffffff sw $10, 268507008($0) addi $10, $0, 0xffffff sw $10, 268507012($0) addi $10, $0, 0xffffff sw $10, 268507016($0) addi $10, $0, 0xffffff sw $10, 268507020($0) addi $10, $0, 0xffffff sw $10, 268507024($0) addi $10, $0, 0xffffff sw $10, 268507028($0) addi $10, $0, 0xffffff sw $10, 268507032($0) addi $10, $0, 0xffffff sw $10, 268507036($0) addi $10, $0, 0xffffff sw $10, 268507040($0) addi $10, $0, 0xffffff sw $10, 268507044($0) addi $10, $0, 0xffffff sw $10, 268507048($0) addi $10, $0, 0xffffff sw $10, 268507052($0) addi $10, $0, 0xffffff sw $10, 268507056($0) addi $10, $0, 0xffffff sw $10, 268507060($0) addi $10, $0, 0xffffff sw $10, 268507064($0) addi $10, $0, 0xffffff sw $10, 268507068($0) addi $10, $0, 0xffffff sw $10, 268507072($0) addi $10, $0, 0xffffff sw $10, 268507076($0) addi $10, $0, 0xffffff sw $10, 268507080($0) addi $10, $0, 0xffffff sw $10, 268507084($0) addi $10, $0, 0xffffff sw $10, 268507088($0) addi $10, $0, 0xffffff sw $10, 268507092($0) addi $10, $0, 0xffffff sw $10, 268507096($0) addi $10, $0, 0xffffff sw $10, 268507100($0) addi $10, $0, 0xffffff sw $10, 268507104($0) addi $10, $0, 0xffffff sw $10, 268507108($0) addi $10, $0, 0xffffff sw $10, 268507112($0) addi $10, $0, 0xffffff sw $10, 268507116($0) addi $10, $0, 0xffffff sw $10, 268507120($0) addi $10, $0, 0xffffff sw $10, 268507124($0) addi $10, $0, 0xffffff sw $10, 268507128($0) addi $10, $0, 0x00d800 sw $10, 268507132($0) addi $10, $0, 0x00d800 sw $10, 268507136($0) addi $10, $0, 0xffffff sw $10, 268507140($0) addi $10, $0, 0xffffff sw $10, 268507144($0) addi $10, $0, 0xffffff sw $10, 268507148($0) addi $10, $0, 0xffffff sw $10, 268507152($0) addi $10, $0, 0xffffff sw $10, 268507156($0) addi $10, $0, 0xffffff sw $10, 268507160($0) addi $10, $0, 0xffffff sw $10, 268507164($0) addi $10, $0, 0xffffff sw $10, 268507168($0) addi $10, $0, 0xffffff sw $10, 268507172($0) addi $10, $0, 0xffffff sw $10, 268507176($0) addi $10, $0, 0xffffff sw $10, 268507180($0) addi $10, $0, 0xffffff sw $10, 268507184($0) addi $10, $0, 0xffffff sw $10, 268507188($0) addi $10, $0, 0xffffff sw $10, 268507192($0) addi $10, $0, 0xffffff sw $10, 268507196($0) addi $10, $0, 0xffffff sw $10, 268507200($0) addi $10, $0, 0xffffff sw $10, 268507204($0) addi $10, $0, 0xffffff sw $10, 268507208($0) addi $10, $0, 0xfffffc sw $10, 268507212($0) addi $10, $0, 0xf8fbf3 sw $10, 268507216($0) addi $10, $0, 0xf3fdfe sw $10, 268507220($0) addi $10, $0, 0xcfafa7 sw $10, 268507224($0) addi $10, $0, 0xab4125 sw $10, 268507228($0) addi $10, $0, 0xb5613d sw $10, 268507232($0) addi $10, $0, 0xc36035 sw $10, 268507236($0) addi $10, $0, 0xbd643c sw $10, 268507240($0) addi $10, $0, 0xaa6444 sw $10, 268507244($0) addi $10, $0, 0xae5b47 sw $10, 268507248($0) addi $10, $0, 0x904b15 sw $10, 268507252($0) addi $10, $0, 0xa7430a sw $10, 268507256($0) addi $10, $0, 0xe7c9c4 sw $10, 268507260($0) addi $10, $0, 0xffffff sw $10, 268507264($0) addi $10, $0, 0xffffff sw $10, 268507268($0) addi $10, $0, 0xffffff sw $10, 268507272($0) addi $10, $0, 0xffffff sw $10, 268507276($0) addi $10, $0, 0xffffff sw $10, 268507280($0) addi $10, $0, 0xffffff sw $10, 268507284($0) addi $10, $0, 0xffffff sw $10, 268507288($0) addi $10, $0, 0xffffff sw $10, 268507292($0) addi $10, $0, 0xfefdf6 sw $10, 268507296($0) addi $10, $0, 0xf6f8f8 sw $10, 268507300($0) addi $10, $0, 0xfdfcf4 sw $10, 268507304($0) addi $10, $0, 0xf7f6ec sw $10, 268507308($0) addi $10, $0, 0xffffff sw $10, 268507312($0) addi $10, $0, 0xffffff sw $10, 268507316($0) addi $10, $0, 0xffffff sw $10, 268507320($0) addi $10, $0, 0xffffff sw $10, 268507324($0) addi $10, $0, 0xffffff sw $10, 268507328($0) addi $10, $0, 0xffffff sw $10, 268507332($0) addi $10, $0, 0xffffff sw $10, 268507336($0) addi $10, $0, 0xffffff sw $10, 268507340($0) addi $10, $0, 0xffffff sw $10, 268507344($0) addi $10, $0, 0xffffff sw $10, 268507348($0) addi $10, $0, 0xffffff sw $10, 268507352($0) addi $10, $0, 0xffffff sw $10, 268507356($0) addi $10, $0, 0xffffff sw $10, 268507360($0) addi $10, $0, 0xffffff sw $10, 268507364($0) addi $10, $0, 0xffffff sw $10, 268507368($0) addi $10, $0, 0xffffff sw $10, 268507372($0) addi $10, $0, 0xffffff sw $10, 268507376($0) addi $10, $0, 0xffffff sw $10, 268507380($0) addi $10, $0, 0xffffff sw $10, 268507384($0) addi $10, $0, 0x00d800 sw $10, 268507388($0) addi $10, $0, 0x00d800 sw $10, 268507392($0) addi $10, $0, 0xffffff sw $10, 268507396($0) addi $10, $0, 0xffffff sw $10, 268507400($0) addi $10, $0, 0xffffff sw $10, 268507404($0) addi $10, $0, 0xffffff sw $10, 268507408($0) addi $10, $0, 0xffffff sw $10, 268507412($0) addi $10, $0, 0xffffff sw $10, 268507416($0) addi $10, $0, 0xffffff sw $10, 268507420($0) addi $10, $0, 0xffffff sw $10, 268507424($0) addi $10, $0, 0xffffff sw $10, 268507428($0) addi $10, $0, 0xffffff sw $10, 268507432($0) addi $10, $0, 0xffffff sw $10, 268507436($0) addi $10, $0, 0xffffff sw $10, 268507440($0) addi $10, $0, 0xffffff sw $10, 268507444($0) addi $10, $0, 0xffffff sw $10, 268507448($0) addi $10, $0, 0xffffff sw $10, 268507452($0) addi $10, $0, 0xffffff sw $10, 268507456($0) addi $10, $0, 0xffffff sw $10, 268507460($0) addi $10, $0, 0xffffff sw $10, 268507464($0) addi $10, $0, 0xffffff sw $10, 268507468($0) addi $10, $0, 0xf8fdfe sw $10, 268507472($0) addi $10, $0, 0xfcfdf1 sw $10, 268507476($0) addi $10, $0, 0xccb893 sw $10, 268507480($0) addi $10, $0, 0x894a16 sw $10, 268507484($0) addi $10, $0, 0x371a06 sw $10, 268507488($0) addi $10, $0, 0x915833 sw $10, 268507492($0) addi $10, $0, 0xa05a2e sw $10, 268507496($0) addi $10, $0, 0x9f5d3a sw $10, 268507500($0) addi $10, $0, 0x451a10 sw $10, 268507504($0) addi $10, $0, 0xad3e10 sw $10, 268507508($0) addi $10, $0, 0x9e4625 sw $10, 268507512($0) addi $10, $0, 0xe1d0b7 sw $10, 268507516($0) addi $10, $0, 0xffffff sw $10, 268507520($0) addi $10, $0, 0xffffff sw $10, 268507524($0) addi $10, $0, 0xffffff sw $10, 268507528($0) addi $10, $0, 0xffffff sw $10, 268507532($0) addi $10, $0, 0xffffff sw $10, 268507536($0) addi $10, $0, 0xffffff sw $10, 268507540($0) addi $10, $0, 0xffffff sw $10, 268507544($0) addi $10, $0, 0xffffff sw $10, 268507548($0) addi $10, $0, 0xfafeff sw $10, 268507552($0) addi $10, $0, 0xf1f3f9 sw $10, 268507556($0) addi $10, $0, 0xfff8f1 sw $10, 268507560($0) addi $10, $0, 0xf0f9f9 sw $10, 268507564($0) addi $10, $0, 0xfeffff sw $10, 268507568($0) addi $10, $0, 0xffffff sw $10, 268507572($0) addi $10, $0, 0xffffff sw $10, 268507576($0) addi $10, $0, 0xffffff sw $10, 268507580($0) addi $10, $0, 0xffffff sw $10, 268507584($0) addi $10, $0, 0xffffff sw $10, 268507588($0) addi $10, $0, 0xffffff sw $10, 268507592($0) addi $10, $0, 0xffffff sw $10, 268507596($0) addi $10, $0, 0xffffff sw $10, 268507600($0) addi $10, $0, 0xffffff sw $10, 268507604($0) addi $10, $0, 0xffffff sw $10, 268507608($0) addi $10, $0, 0xffffff sw $10, 268507612($0) addi $10, $0, 0xffffff sw $10, 268507616($0) addi $10, $0, 0xffffff sw $10, 268507620($0) addi $10, $0, 0xffffff sw $10, 268507624($0) addi $10, $0, 0xffffff sw $10, 268507628($0) addi $10, $0, 0xffffff sw $10, 268507632($0) addi $10, $0, 0xffffff sw $10, 268507636($0) addi $10, $0, 0xffffff sw $10, 268507640($0) addi $10, $0, 0x00d800 sw $10, 268507644($0) addi $10, $0, 0x00d800 sw $10, 268507648($0) addi $10, $0, 0xffffff sw $10, 268507652($0) addi $10, $0, 0xffffff sw $10, 268507656($0) addi $10, $0, 0xffffff sw $10, 268507660($0) addi $10, $0, 0xffffff sw $10, 268507664($0) addi $10, $0, 0xffffff sw $10, 268507668($0) addi $10, $0, 0xffffff sw $10, 268507672($0) addi $10, $0, 0xffffff sw $10, 268507676($0) addi $10, $0, 0xffffff sw $10, 268507680($0) addi $10, $0, 0xffffff sw $10, 268507684($0) addi $10, $0, 0xffffff sw $10, 268507688($0) addi $10, $0, 0xffffff sw $10, 268507692($0) addi $10, $0, 0xffffff sw $10, 268507696($0) addi $10, $0, 0xffffff sw $10, 268507700($0) addi $10, $0, 0xffffff sw $10, 268507704($0) addi $10, $0, 0xffffff sw $10, 268507708($0) addi $10, $0, 0xffffff sw $10, 268507712($0) addi $10, $0, 0xffffff sw $10, 268507716($0) addi $10, $0, 0xffffff sw $10, 268507720($0) addi $10, $0, 0xffffff sw $10, 268507724($0) addi $10, $0, 0xfdffff sw $10, 268507728($0) addi $10, $0, 0x2b1d12 sw $10, 268507732($0) addi $10, $0, 0x371505 sw $10, 268507736($0) addi $10, $0, 0x3d0e01 sw $10, 268507740($0) addi $10, $0, 0xb2613b sw $10, 268507744($0) addi $10, $0, 0xbb5e34 sw $10, 268507748($0) addi $10, $0, 0xbc5d39 sw $10, 268507752($0) addi $10, $0, 0xb75d43 sw $10, 268507756($0) addi $10, $0, 0xa76545 sw $10, 268507760($0) addi $10, $0, 0xb66423 sw $10, 268507764($0) addi $10, $0, 0xfdf8e6 sw $10, 268507768($0) addi $10, $0, 0xfffdf8 sw $10, 268507772($0) addi $10, $0, 0xffffff sw $10, 268507776($0) addi $10, $0, 0xffffff sw $10, 268507780($0) addi $10, $0, 0xffffff sw $10, 268507784($0) addi $10, $0, 0xffffff sw $10, 268507788($0) addi $10, $0, 0xffffff sw $10, 268507792($0) addi $10, $0, 0xffffff sw $10, 268507796($0) addi $10, $0, 0xffffff sw $10, 268507800($0) addi $10, $0, 0xffffff sw $10, 268507804($0) addi $10, $0, 0xfefef4 sw $10, 268507808($0) addi $10, $0, 0xfaece7 sw $10, 268507812($0) addi $10, $0, 0x834d2f sw $10, 268507816($0) addi $10, $0, 0xfefcf8 sw $10, 268507820($0) addi $10, $0, 0xfffffe sw $10, 268507824($0) addi $10, $0, 0xffffff sw $10, 268507828($0) addi $10, $0, 0xffffff sw $10, 268507832($0) addi $10, $0, 0xffffff sw $10, 268507836($0) addi $10, $0, 0xffffff sw $10, 268507840($0) addi $10, $0, 0xffffff sw $10, 268507844($0) addi $10, $0, 0xffffff sw $10, 268507848($0) addi $10, $0, 0xffffff sw $10, 268507852($0) addi $10, $0, 0xffffff sw $10, 268507856($0) addi $10, $0, 0xffffff sw $10, 268507860($0) addi $10, $0, 0xffffff sw $10, 268507864($0) addi $10, $0, 0xffffff sw $10, 268507868($0) addi $10, $0, 0xffffff sw $10, 268507872($0) addi $10, $0, 0xffffff sw $10, 268507876($0) addi $10, $0, 0xffffff sw $10, 268507880($0) addi $10, $0, 0xffffff sw $10, 268507884($0) addi $10, $0, 0xffffff sw $10, 268507888($0) addi $10, $0, 0xffffff sw $10, 268507892($0) addi $10, $0, 0xffffff sw $10, 268507896($0) addi $10, $0, 0x00d800 sw $10, 268507900($0) addi $10, $0, 0x00d800 sw $10, 268507904($0) addi $10, $0, 0xffffff sw $10, 268507908($0) addi $10, $0, 0xffffff sw $10, 268507912($0) addi $10, $0, 0xffffff sw $10, 268507916($0) addi $10, $0, 0xffffff sw $10, 268507920($0) addi $10, $0, 0xffffff sw $10, 268507924($0) addi $10, $0, 0xffffff sw $10, 268507928($0) addi $10, $0, 0xffffff sw $10, 268507932($0) addi $10, $0, 0xffffff sw $10, 268507936($0) addi $10, $0, 0xffffff sw $10, 268507940($0) addi $10, $0, 0xffffff sw $10, 268507944($0) addi $10, $0, 0xffffff sw $10, 268507948($0) addi $10, $0, 0xffffff sw $10, 268507952($0) addi $10, $0, 0xffffff sw $10, 268507956($0) addi $10, $0, 0xffffff sw $10, 268507960($0) addi $10, $0, 0xffffff sw $10, 268507964($0) addi $10, $0, 0xffffff sw $10, 268507968($0) addi $10, $0, 0xffffff sw $10, 268507972($0) addi $10, $0, 0xffffff sw $10, 268507976($0) addi $10, $0, 0xffffff sw $10, 268507980($0) addi $10, $0, 0xfffffe sw $10, 268507984($0) addi $10, $0, 0x2d1b17 sw $10, 268507988($0) addi $10, $0, 0x663525 sw $10, 268507992($0) addi $10, $0, 0xad6748 sw $10, 268507996($0) addi $10, $0, 0xb1642d sw $10, 268508000($0) addi $10, $0, 0xb3642d sw $10, 268508004($0) addi $10, $0, 0xae6532 sw $10, 268508008($0) addi $10, $0, 0xab6538 sw $10, 268508012($0) addi $10, $0, 0xbb5e35 sw $10, 268508016($0) addi $10, $0, 0xaa6731 sw $10, 268508020($0) addi $10, $0, 0x975d3d sw $10, 268508024($0) addi $10, $0, 0xe4d8d4 sw $10, 268508028($0) addi $10, $0, 0xffffff sw $10, 268508032($0) addi $10, $0, 0xffffff sw $10, 268508036($0) addi $10, $0, 0xffffff sw $10, 268508040($0) addi $10, $0, 0xffffff sw $10, 268508044($0) addi $10, $0, 0xffffff sw $10, 268508048($0) addi $10, $0, 0xffffff sw $10, 268508052($0) addi $10, $0, 0xffffff sw $10, 268508056($0) addi $10, $0, 0xffffff sw $10, 268508060($0) addi $10, $0, 0xfdfff2 sw $10, 268508064($0) addi $10, $0, 0xfbeddf sw $10, 268508068($0) addi $10, $0, 0x95481c sw $10, 268508072($0) addi $10, $0, 0xfbfdfd sw $10, 268508076($0) addi $10, $0, 0xfffffe sw $10, 268508080($0) addi $10, $0, 0xffffff sw $10, 268508084($0) addi $10, $0, 0xffffff sw $10, 268508088($0) addi $10, $0, 0xffffff sw $10, 268508092($0) addi $10, $0, 0xffffff sw $10, 268508096($0) addi $10, $0, 0xffffff sw $10, 268508100($0) addi $10, $0, 0xffffff sw $10, 268508104($0) addi $10, $0, 0xffffff sw $10, 268508108($0) addi $10, $0, 0xffffff sw $10, 268508112($0) addi $10, $0, 0xffffff sw $10, 268508116($0) addi $10, $0, 0xffffff sw $10, 268508120($0) addi $10, $0, 0xffffff sw $10, 268508124($0) addi $10, $0, 0xffffff sw $10, 268508128($0) addi $10, $0, 0xffffff sw $10, 268508132($0) addi $10, $0, 0xffffff sw $10, 268508136($0) addi $10, $0, 0xffffff sw $10, 268508140($0) addi $10, $0, 0xffffff sw $10, 268508144($0) addi $10, $0, 0xffffff sw $10, 268508148($0) addi $10, $0, 0xffffff sw $10, 268508152($0) addi $10, $0, 0x00d800 sw $10, 268508156($0) addi $10, $0, 0x00d800 sw $10, 268508160($0) addi $10, $0, 0xffffff sw $10, 268508164($0) addi $10, $0, 0xffffff sw $10, 268508168($0) addi $10, $0, 0xffffff sw $10, 268508172($0) addi $10, $0, 0xffffff sw $10, 268508176($0) addi $10, $0, 0xffffff sw $10, 268508180($0) addi $10, $0, 0xffffff sw $10, 268508184($0) addi $10, $0, 0xffffff sw $10, 268508188($0) addi $10, $0, 0xffffff sw $10, 268508192($0) addi $10, $0, 0xffffff sw $10, 268508196($0) addi $10, $0, 0xffffff sw $10, 268508200($0) addi $10, $0, 0xffffff sw $10, 268508204($0) addi $10, $0, 0xffffff sw $10, 268508208($0) addi $10, $0, 0xffffff sw $10, 268508212($0) addi $10, $0, 0xffffff sw $10, 268508216($0) addi $10, $0, 0xffffff sw $10, 268508220($0) addi $10, $0, 0xffffff sw $10, 268508224($0) addi $10, $0, 0xffffff sw $10, 268508228($0) addi $10, $0, 0xffffff sw $10, 268508232($0) addi $10, $0, 0xffffff sw $10, 268508236($0) addi $10, $0, 0xfafefe sw $10, 268508240($0) addi $10, $0, 0x3e3932 sw $10, 268508244($0) addi $10, $0, 0x754730 sw $10, 268508248($0) addi $10, $0, 0xb4582c sw $10, 268508252($0) addi $10, $0, 0xba5c31 sw $10, 268508256($0) addi $10, $0, 0xbd6a36 sw $10, 268508260($0) addi $10, $0, 0xb76033 sw $10, 268508264($0) addi $10, $0, 0xbc5c39 sw $10, 268508268($0) addi $10, $0, 0xba5e35 sw $10, 268508272($0) addi $10, $0, 0xb85f33 sw $10, 268508276($0) addi $10, $0, 0xac5325 sw $10, 268508280($0) addi $10, $0, 0xe0c299 sw $10, 268508284($0) addi $10, $0, 0xf0decf sw $10, 268508288($0) addi $10, $0, 0xf0ddcf sw $10, 268508292($0) addi $10, $0, 0xf0dfd0 sw $10, 268508296($0) addi $10, $0, 0xf0e0d1 sw $10, 268508300($0) addi $10, $0, 0xf0e3c6 sw $10, 268508304($0) addi $10, $0, 0xefdfca sw $10, 268508308($0) addi $10, $0, 0xeddbc8 sw $10, 268508312($0) addi $10, $0, 0xecd6c0 sw $10, 268508316($0) addi $10, $0, 0xecddbb sw $10, 268508320($0) addi $10, $0, 0xe2d9c4 sw $10, 268508324($0) addi $10, $0, 0x987a68 sw $10, 268508328($0) addi $10, $0, 0xfff8f2 sw $10, 268508332($0) addi $10, $0, 0xfffffe sw $10, 268508336($0) addi $10, $0, 0xffffff sw $10, 268508340($0) addi $10, $0, 0xffffff sw $10, 268508344($0) addi $10, $0, 0xffffff sw $10, 268508348($0) addi $10, $0, 0xffffff sw $10, 268508352($0) addi $10, $0, 0xffffff sw $10, 268508356($0) addi $10, $0, 0xffffff sw $10, 268508360($0) addi $10, $0, 0xffffff sw $10, 268508364($0) addi $10, $0, 0xffffff sw $10, 268508368($0) addi $10, $0, 0xffffff sw $10, 268508372($0) addi $10, $0, 0xffffff sw $10, 268508376($0) addi $10, $0, 0xffffff sw $10, 268508380($0) addi $10, $0, 0xffffff sw $10, 268508384($0) addi $10, $0, 0xffffff sw $10, 268508388($0) addi $10, $0, 0xffffff sw $10, 268508392($0) addi $10, $0, 0xffffff sw $10, 268508396($0) addi $10, $0, 0xffffff sw $10, 268508400($0) addi $10, $0, 0xffffff sw $10, 268508404($0) addi $10, $0, 0xffffff sw $10, 268508408($0) addi $10, $0, 0x00d800 sw $10, 268508412($0) addi $10, $0, 0x00d800 sw $10, 268508416($0) addi $10, $0, 0xffffff sw $10, 268508420($0) addi $10, $0, 0xffffff sw $10, 268508424($0) addi $10, $0, 0xffffff sw $10, 268508428($0) addi $10, $0, 0xffffff sw $10, 268508432($0) addi $10, $0, 0xffffff sw $10, 268508436($0) addi $10, $0, 0xffffff sw $10, 268508440($0) addi $10, $0, 0xffffff sw $10, 268508444($0) addi $10, $0, 0xffffff sw $10, 268508448($0) addi $10, $0, 0xffffff sw $10, 268508452($0) addi $10, $0, 0xffffff sw $10, 268508456($0) addi $10, $0, 0xffffff sw $10, 268508460($0) addi $10, $0, 0xffffff sw $10, 268508464($0) addi $10, $0, 0xffffff sw $10, 268508468($0) addi $10, $0, 0xffffff sw $10, 268508472($0) addi $10, $0, 0xffffff sw $10, 268508476($0) addi $10, $0, 0xffffff sw $10, 268508480($0) addi $10, $0, 0xffffff sw $10, 268508484($0) addi $10, $0, 0xffffff sw $10, 268508488($0) addi $10, $0, 0xffffff sw $10, 268508492($0) addi $10, $0, 0xf5f7f8 sw $10, 268508496($0) addi $10, $0, 0xf2f5f0 sw $10, 268508500($0) addi $10, $0, 0xcabbaa sw $10, 268508504($0) addi $10, $0, 0x925e41 sw $10, 268508508($0) addi $10, $0, 0x935e3e sw $10, 268508512($0) addi $10, $0, 0xaf6237 sw $10, 268508516($0) addi $10, $0, 0xb86032 sw $10, 268508520($0) addi $10, $0, 0xb46135 sw $10, 268508524($0) addi $10, $0, 0xb56132 sw $10, 268508528($0) addi $10, $0, 0xb76130 sw $10, 268508532($0) addi $10, $0, 0xb26031 sw $10, 268508536($0) addi $10, $0, 0xa85c32 sw $10, 268508540($0) addi $10, $0, 0xb9622d sw $10, 268508544($0) addi $10, $0, 0xb8622d sw $10, 268508548($0) addi $10, $0, 0xba642f sw $10, 268508552($0) addi $10, $0, 0xb8622d sw $10, 268508556($0) addi $10, $0, 0xb95e33 sw $10, 268508560($0) addi $10, $0, 0xb6613a sw $10, 268508564($0) addi $10, $0, 0xa9532f sw $10, 268508568($0) addi $10, $0, 0xa24824 sw $10, 268508572($0) addi $10, $0, 0xa2442c sw $10, 268508576($0) addi $10, $0, 0x794c3e sw $10, 268508580($0) addi $10, $0, 0xf2e8ea sw $10, 268508584($0) addi $10, $0, 0xedffff sw $10, 268508588($0) addi $10, $0, 0xfeffff sw $10, 268508592($0) addi $10, $0, 0xffffff sw $10, 268508596($0) addi $10, $0, 0xffffff sw $10, 268508600($0) addi $10, $0, 0xffffff sw $10, 268508604($0) addi $10, $0, 0xffffff sw $10, 268508608($0) addi $10, $0, 0xffffff sw $10, 268508612($0) addi $10, $0, 0xffffff sw $10, 268508616($0) addi $10, $0, 0xffffff sw $10, 268508620($0) addi $10, $0, 0xffffff sw $10, 268508624($0) addi $10, $0, 0xffffff sw $10, 268508628($0) addi $10, $0, 0xffffff sw $10, 268508632($0) addi $10, $0, 0xffffff sw $10, 268508636($0) addi $10, $0, 0xffffff sw $10, 268508640($0) addi $10, $0, 0xffffff sw $10, 268508644($0) addi $10, $0, 0xffffff sw $10, 268508648($0) addi $10, $0, 0xffffff sw $10, 268508652($0) addi $10, $0, 0xffffff sw $10, 268508656($0) addi $10, $0, 0xffffff sw $10, 268508660($0) addi $10, $0, 0xffffff sw $10, 268508664($0) addi $10, $0, 0x00d800 sw $10, 268508668($0) addi $10, $0, 0x00d800 sw $10, 268508672($0) addi $10, $0, 0xffffff sw $10, 268508676($0) addi $10, $0, 0xffffff sw $10, 268508680($0) addi $10, $0, 0xffffff sw $10, 268508684($0) addi $10, $0, 0xffffff sw $10, 268508688($0) addi $10, $0, 0xffffff sw $10, 268508692($0) addi $10, $0, 0xffffff sw $10, 268508696($0) addi $10, $0, 0xffffff sw $10, 268508700($0) addi $10, $0, 0xffffff sw $10, 268508704($0) addi $10, $0, 0xffffff sw $10, 268508708($0) addi $10, $0, 0xffffff sw $10, 268508712($0) addi $10, $0, 0xffffff sw $10, 268508716($0) addi $10, $0, 0xffffff sw $10, 268508720($0) addi $10, $0, 0xffffff sw $10, 268508724($0) addi $10, $0, 0xffffff sw $10, 268508728($0) addi $10, $0, 0xffffff sw $10, 268508732($0) addi $10, $0, 0xffffff sw $10, 268508736($0) addi $10, $0, 0xffffff sw $10, 268508740($0) addi $10, $0, 0xffffff sw $10, 268508744($0) addi $10, $0, 0xffffff sw $10, 268508748($0) addi $10, $0, 0xfffffd sw $10, 268508752($0) addi $10, $0, 0xf9ffff sw $10, 268508756($0) addi $10, $0, 0xfcfffa sw $10, 268508760($0) addi $10, $0, 0xfffef4 sw $10, 268508764($0) addi $10, $0, 0xfffcf0 sw $10, 268508768($0) addi $10, $0, 0xaa6446 sw $10, 268508772($0) addi $10, $0, 0xbd5e30 sw $10, 268508776($0) addi $10, $0, 0xb0652e sw $10, 268508780($0) addi $10, $0, 0xb16332 sw $10, 268508784($0) addi $10, $0, 0xb76130 sw $10, 268508788($0) addi $10, $0, 0xb76032 sw $10, 268508792($0) addi $10, $0, 0xac5931 sw $10, 268508796($0) addi $10, $0, 0xa25632 sw $10, 268508800($0) addi $10, $0, 0xad623d sw $10, 268508804($0) addi $10, $0, 0xa15631 sw $10, 268508808($0) addi $10, $0, 0xad623d sw $10, 268508812($0) addi $10, $0, 0xae6530 sw $10, 268508816($0) addi $10, $0, 0xad6632 sw $10, 268508820($0) addi $10, $0, 0xaa6431 sw $10, 268508824($0) addi $10, $0, 0x9d5928 sw $10, 268508828($0) addi $10, $0, 0xfff5ea sw $10, 268508832($0) addi $10, $0, 0xf6fdf7 sw $10, 268508836($0) addi $10, $0, 0xfffdff sw $10, 268508840($0) addi $10, $0, 0xfffaf6 sw $10, 268508844($0) addi $10, $0, 0xfffffe sw $10, 268508848($0) addi $10, $0, 0xffffff sw $10, 268508852($0) addi $10, $0, 0xffffff sw $10, 268508856($0) addi $10, $0, 0xffffff sw $10, 268508860($0) addi $10, $0, 0xffffff sw $10, 268508864($0) addi $10, $0, 0xffffff sw $10, 268508868($0) addi $10, $0, 0xffffff sw $10, 268508872($0) addi $10, $0, 0xffffff sw $10, 268508876($0) addi $10, $0, 0xffffff sw $10, 268508880($0) addi $10, $0, 0xffffff sw $10, 268508884($0) addi $10, $0, 0xffffff sw $10, 268508888($0) addi $10, $0, 0xffffff sw $10, 268508892($0) addi $10, $0, 0xffffff sw $10, 268508896($0) addi $10, $0, 0xffffff sw $10, 268508900($0) addi $10, $0, 0xffffff sw $10, 268508904($0) addi $10, $0, 0xffffff sw $10, 268508908($0) addi $10, $0, 0xffffff sw $10, 268508912($0) addi $10, $0, 0xffffff sw $10, 268508916($0) addi $10, $0, 0xffffff sw $10, 268508920($0) addi $10, $0, 0x00d800 sw $10, 268508924($0) addi $10, $0, 0x00d800 sw $10, 268508928($0) addi $10, $0, 0xffffff sw $10, 268508932($0) addi $10, $0, 0xffffff sw $10, 268508936($0) addi $10, $0, 0xffffff sw $10, 268508940($0) addi $10, $0, 0xffffff sw $10, 268508944($0) addi $10, $0, 0xffffff sw $10, 268508948($0) addi $10, $0, 0xffffff sw $10, 268508952($0) addi $10, $0, 0xffffff sw $10, 268508956($0) addi $10, $0, 0xffffff sw $10, 268508960($0) addi $10, $0, 0xffffff sw $10, 268508964($0) addi $10, $0, 0xffffff sw $10, 268508968($0) addi $10, $0, 0xffffff sw $10, 268508972($0) addi $10, $0, 0xffffff sw $10, 268508976($0) addi $10, $0, 0xffffff sw $10, 268508980($0) addi $10, $0, 0xffffff sw $10, 268508984($0) addi $10, $0, 0xffffff sw $10, 268508988($0) addi $10, $0, 0xffffff sw $10, 268508992($0) addi $10, $0, 0xffffff sw $10, 268508996($0) addi $10, $0, 0xffffff sw $10, 268509000($0) addi $10, $0, 0xffffff sw $10, 268509004($0) addi $10, $0, 0xfffffd sw $10, 268509008($0) addi $10, $0, 0xfffffd sw $10, 268509012($0) addi $10, $0, 0xfcfeff sw $10, 268509016($0) addi $10, $0, 0xf9ffff sw $10, 268509020($0) addi $10, $0, 0xfefcf5 sw $10, 268509024($0) addi $10, $0, 0xa56646 sw $10, 268509028($0) addi $10, $0, 0xbb5f30 sw $10, 268509032($0) addi $10, $0, 0xb76035 sw $10, 268509036($0) addi $10, $0, 0xb36332 sw $10, 268509040($0) addi $10, $0, 0xb76130 sw $10, 268509044($0) addi $10, $0, 0xb56132 sw $10, 268509048($0) addi $10, $0, 0xab5a31 sw $10, 268509052($0) addi $10, $0, 0xb15320 sw $10, 268509056($0) addi $10, $0, 0xbc5f2b sw $10, 268509060($0) addi $10, $0, 0xb1531f sw $10, 268509064($0) addi $10, $0, 0xbc5e2b sw $10, 268509068($0) addi $10, $0, 0xbc5e35 sw $10, 268509072($0) addi $10, $0, 0xbe5d32 sw $10, 268509076($0) addi $10, $0, 0xb95c30 sw $10, 268509080($0) addi $10, $0, 0xa5542c sw $10, 268509084($0) addi $10, $0, 0xffeeec sw $10, 268509088($0) addi $10, $0, 0xfafbfd sw $10, 268509092($0) addi $10, $0, 0xf7ffff sw $10, 268509096($0) addi $10, $0, 0xf2fff9 sw $10, 268509100($0) addi $10, $0, 0xfefffe sw $10, 268509104($0) addi $10, $0, 0xffffff sw $10, 268509108($0) addi $10, $0, 0xffffff sw $10, 268509112($0) addi $10, $0, 0xffffff sw $10, 268509116($0) addi $10, $0, 0xffffff sw $10, 268509120($0) addi $10, $0, 0xffffff sw $10, 268509124($0) addi $10, $0, 0xffffff sw $10, 268509128($0) addi $10, $0, 0xffffff sw $10, 268509132($0) addi $10, $0, 0xffffff sw $10, 268509136($0) addi $10, $0, 0xffffff sw $10, 268509140($0) addi $10, $0, 0xffffff sw $10, 268509144($0) addi $10, $0, 0xffffff sw $10, 268509148($0) addi $10, $0, 0xffffff sw $10, 268509152($0) addi $10, $0, 0xffffff sw $10, 268509156($0) addi $10, $0, 0xffffff sw $10, 268509160($0) addi $10, $0, 0xffffff sw $10, 268509164($0) addi $10, $0, 0xffffff sw $10, 268509168($0) addi $10, $0, 0xffffff sw $10, 268509172($0) addi $10, $0, 0xffffff sw $10, 268509176($0) addi $10, $0, 0x00d800 sw $10, 268509180($0) addi $10, $0, 0x00d800 sw $10, 268509184($0) addi $10, $0, 0xffffff sw $10, 268509188($0) addi $10, $0, 0xffffff sw $10, 268509192($0) addi $10, $0, 0xffffff sw $10, 268509196($0) addi $10, $0, 0xffffff sw $10, 268509200($0) addi $10, $0, 0xffffff sw $10, 268509204($0) addi $10, $0, 0xffffff sw $10, 268509208($0) addi $10, $0, 0xffffff sw $10, 268509212($0) addi $10, $0, 0xffffff sw $10, 268509216($0) addi $10, $0, 0xffffff sw $10, 268509220($0) addi $10, $0, 0xffffff sw $10, 268509224($0) addi $10, $0, 0xffffff sw $10, 268509228($0) addi $10, $0, 0xffffff sw $10, 268509232($0) addi $10, $0, 0xffffff sw $10, 268509236($0) addi $10, $0, 0xffffff sw $10, 268509240($0) addi $10, $0, 0xffffff sw $10, 268509244($0) addi $10, $0, 0xffffff sw $10, 268509248($0) addi $10, $0, 0xffffff sw $10, 268509252($0) addi $10, $0, 0xffffff sw $10, 268509256($0) addi $10, $0, 0xffffff sw $10, 268509260($0) addi $10, $0, 0xffffff sw $10, 268509264($0) addi $10, $0, 0xffffff sw $10, 268509268($0) addi $10, $0, 0xfffeff sw $10, 268509272($0) addi $10, $0, 0xffffff sw $10, 268509276($0) addi $10, $0, 0xf7f3eb sw $10, 268509280($0) addi $10, $0, 0x905132 sw $10, 268509284($0) addi $10, $0, 0xb5582f sw $10, 268509288($0) addi $10, $0, 0xbb5d39 sw $10, 268509292($0) addi $10, $0, 0xb75f39 sw $10, 268509296($0) addi $10, $0, 0xb86030 sw $10, 268509300($0) addi $10, $0, 0xb45b38 sw $10, 268509304($0) addi $10, $0, 0xb55d34 sw $10, 268509308($0) addi $10, $0, 0xb65f36 sw $10, 268509312($0) addi $10, $0, 0xb6622d sw $10, 268509316($0) addi $10, $0, 0xbc5d35 sw $10, 268509320($0) addi $10, $0, 0xb46232 sw $10, 268509324($0) addi $10, $0, 0xb26634 sw $10, 268509328($0) addi $10, $0, 0xb96833 sw $10, 268509332($0) addi $10, $0, 0xb0612f sw $10, 268509336($0) addi $10, $0, 0x9f572c sw $10, 268509340($0) addi $10, $0, 0xfff4e0 sw $10, 268509344($0) addi $10, $0, 0xfafefd sw $10, 268509348($0) addi $10, $0, 0xfffdff sw $10, 268509352($0) addi $10, $0, 0xfffdff sw $10, 268509356($0) addi $10, $0, 0xffffff sw $10, 268509360($0) addi $10, $0, 0xffffff sw $10, 268509364($0) addi $10, $0, 0xffffff sw $10, 268509368($0) addi $10, $0, 0xffffff sw $10, 268509372($0) addi $10, $0, 0xffffff sw $10, 268509376($0) addi $10, $0, 0xffffff sw $10, 268509380($0) addi $10, $0, 0xffffff sw $10, 268509384($0) addi $10, $0, 0xffffff sw $10, 268509388($0) addi $10, $0, 0xffffff sw $10, 268509392($0) addi $10, $0, 0xffffff sw $10, 268509396($0) addi $10, $0, 0xffffff sw $10, 268509400($0) addi $10, $0, 0xffffff sw $10, 268509404($0) addi $10, $0, 0xffffff sw $10, 268509408($0) addi $10, $0, 0xffffff sw $10, 268509412($0) addi $10, $0, 0xffffff sw $10, 268509416($0) addi $10, $0, 0xffffff sw $10, 268509420($0) addi $10, $0, 0xffffff sw $10, 268509424($0) addi $10, $0, 0xffffff sw $10, 268509428($0) addi $10, $0, 0xffffff sw $10, 268509432($0) addi $10, $0, 0x00d800 sw $10, 268509436($0) addi $10, $0, 0x00d800 sw $10, 268509440($0) addi $10, $0, 0xffffff sw $10, 268509444($0) addi $10, $0, 0xffffff sw $10, 268509448($0) addi $10, $0, 0xffffff sw $10, 268509452($0) addi $10, $0, 0xffffff sw $10, 268509456($0) addi $10, $0, 0xffffff sw $10, 268509460($0) addi $10, $0, 0xffffff sw $10, 268509464($0) addi $10, $0, 0xffffff sw $10, 268509468($0) addi $10, $0, 0xffffff sw $10, 268509472($0) addi $10, $0, 0xffffff sw $10, 268509476($0) addi $10, $0, 0xffffff sw $10, 268509480($0) addi $10, $0, 0xffffff sw $10, 268509484($0) addi $10, $0, 0xffffff sw $10, 268509488($0) addi $10, $0, 0xffffff sw $10, 268509492($0) addi $10, $0, 0xffffff sw $10, 268509496($0) addi $10, $0, 0xffffff sw $10, 268509500($0) addi $10, $0, 0xffffff sw $10, 268509504($0) addi $10, $0, 0xffffff sw $10, 268509508($0) addi $10, $0, 0xffffff sw $10, 268509512($0) addi $10, $0, 0xffffff sw $10, 268509516($0) addi $10, $0, 0xffffff sw $10, 268509520($0) addi $10, $0, 0xffffff sw $10, 268509524($0) addi $10, $0, 0xffffff sw $10, 268509528($0) addi $10, $0, 0xfffffe sw $10, 268509532($0) addi $10, $0, 0xfffdf6 sw $10, 268509536($0) addi $10, $0, 0x866252 sw $10, 268509540($0) addi $10, $0, 0xa76040 sw $10, 268509544($0) addi $10, $0, 0xb85c30 sw $10, 268509548($0) addi $10, $0, 0xb76033 sw $10, 268509552($0) addi $10, $0, 0xae6434 sw $10, 268509556($0) addi $10, $0, 0xb86139 sw $10, 268509560($0) addi $10, $0, 0xb45f33 sw $10, 268509564($0) addi $10, $0, 0xb2603c sw $10, 268509568($0) addi $10, $0, 0xaf6335 sw $10, 268509572($0) addi $10, $0, 0xb06042 sw $10, 268509576($0) addi $10, $0, 0xad633b sw $10, 268509580($0) addi $10, $0, 0xb06335 sw $10, 268509584($0) addi $10, $0, 0xb15f2f sw $10, 268509588($0) addi $10, $0, 0xb26032 sw $10, 268509592($0) addi $10, $0, 0xa4552e sw $10, 268509596($0) addi $10, $0, 0xfff3e2 sw $10, 268509600($0) addi $10, $0, 0xf9ffff sw $10, 268509604($0) addi $10, $0, 0xfdfffc sw $10, 268509608($0) addi $10, $0, 0xfdfffe sw $10, 268509612($0) addi $10, $0, 0xffffff sw $10, 268509616($0) addi $10, $0, 0xffffff sw $10, 268509620($0) addi $10, $0, 0xffffff sw $10, 268509624($0) addi $10, $0, 0xffffff sw $10, 268509628($0) addi $10, $0, 0xffffff sw $10, 268509632($0) addi $10, $0, 0xffffff sw $10, 268509636($0) addi $10, $0, 0xffffff sw $10, 268509640($0) addi $10, $0, 0xffffff sw $10, 268509644($0) addi $10, $0, 0xffffff sw $10, 268509648($0) addi $10, $0, 0xffffff sw $10, 268509652($0) addi $10, $0, 0xffffff sw $10, 268509656($0) addi $10, $0, 0xffffff sw $10, 268509660($0) addi $10, $0, 0xffffff sw $10, 268509664($0) addi $10, $0, 0xffffff sw $10, 268509668($0) addi $10, $0, 0xffffff sw $10, 268509672($0) addi $10, $0, 0xffffff sw $10, 268509676($0) addi $10, $0, 0xffffff sw $10, 268509680($0) addi $10, $0, 0xffffff sw $10, 268509684($0) addi $10, $0, 0xffffff sw $10, 268509688($0) addi $10, $0, 0x00d800 sw $10, 268509692($0) addi $10, $0, 0x00d800 sw $10, 268509696($0) addi $10, $0, 0xffffff sw $10, 268509700($0) addi $10, $0, 0xffffff sw $10, 268509704($0) addi $10, $0, 0xffffff sw $10, 268509708($0) addi $10, $0, 0xffffff sw $10, 268509712($0) addi $10, $0, 0xffffff sw $10, 268509716($0) addi $10, $0, 0xffffff sw $10, 268509720($0) addi $10, $0, 0xffffff sw $10, 268509724($0) addi $10, $0, 0xffffff sw $10, 268509728($0) addi $10, $0, 0xffffff sw $10, 268509732($0) addi $10, $0, 0xffffff sw $10, 268509736($0) addi $10, $0, 0xffffff sw $10, 268509740($0) addi $10, $0, 0xffffff sw $10, 268509744($0) addi $10, $0, 0xffffff sw $10, 268509748($0) addi $10, $0, 0xffffff sw $10, 268509752($0) addi $10, $0, 0xffffff sw $10, 268509756($0) addi $10, $0, 0xffffff sw $10, 268509760($0) addi $10, $0, 0xffffff sw $10, 268509764($0) addi $10, $0, 0xffffff sw $10, 268509768($0) addi $10, $0, 0xffffff sw $10, 268509772($0) addi $10, $0, 0xffffff sw $10, 268509776($0) addi $10, $0, 0xffffff sw $10, 268509780($0) addi $10, $0, 0xffffff sw $10, 268509784($0) addi $10, $0, 0xfffffe sw $10, 268509788($0) addi $10, $0, 0xfbfdf9 sw $10, 268509792($0) addi $10, $0, 0xfcfefd sw $10, 268509796($0) addi $10, $0, 0x7e5d4d sw $10, 268509800($0) addi $10, $0, 0x914d24 sw $10, 268509804($0) addi $10, $0, 0xa15222 sw $10, 268509808($0) addi $10, $0, 0x875c38 sw $10, 268509812($0) addi $10, $0, 0xb15f2f sw $10, 268509816($0) addi $10, $0, 0x9f6139 sw $10, 268509820($0) addi $10, $0, 0xa15930 sw $10, 268509824($0) addi $10, $0, 0xa15a2d sw $10, 268509828($0) addi $10, $0, 0x995b39 sw $10, 268509832($0) addi $10, $0, 0xb15c32 sw $10, 268509836($0) addi $10, $0, 0xa0582e sw $10, 268509840($0) addi $10, $0, 0xa7582a sw $10, 268509844($0) addi $10, $0, 0xb46334 sw $10, 268509848($0) addi $10, $0, 0xa05128 sw $10, 268509852($0) addi $10, $0, 0xfff2e1 sw $10, 268509856($0) addi $10, $0, 0xf7fdfd sw $10, 268509860($0) addi $10, $0, 0xfdfffc sw $10, 268509864($0) addi $10, $0, 0xfdfffe sw $10, 268509868($0) addi $10, $0, 0xffffff sw $10, 268509872($0) addi $10, $0, 0xffffff sw $10, 268509876($0) addi $10, $0, 0xffffff sw $10, 268509880($0) addi $10, $0, 0xffffff sw $10, 268509884($0) addi $10, $0, 0xffffff sw $10, 268509888($0) addi $10, $0, 0xffffff sw $10, 268509892($0) addi $10, $0, 0xffffff sw $10, 268509896($0) addi $10, $0, 0xffffff sw $10, 268509900($0) addi $10, $0, 0xffffff sw $10, 268509904($0) addi $10, $0, 0xffffff sw $10, 268509908($0) addi $10, $0, 0xffffff sw $10, 268509912($0) addi $10, $0, 0xffffff sw $10, 268509916($0) addi $10, $0, 0xffffff sw $10, 268509920($0) addi $10, $0, 0xffffff sw $10, 268509924($0) addi $10, $0, 0xffffff sw $10, 268509928($0) addi $10, $0, 0xffffff sw $10, 268509932($0) addi $10, $0, 0xffffff sw $10, 268509936($0) addi $10, $0, 0xffffff sw $10, 268509940($0) addi $10, $0, 0xffffff sw $10, 268509944($0) addi $10, $0, 0x00d800 sw $10, 268509948($0) addi $10, $0, 0x00d800 sw $10, 268509952($0) addi $10, $0, 0xffffff sw $10, 268509956($0) addi $10, $0, 0xffffff sw $10, 268509960($0) addi $10, $0, 0xffffff sw $10, 268509964($0) addi $10, $0, 0xffffff sw $10, 268509968($0) addi $10, $0, 0xffffff sw $10, 268509972($0) addi $10, $0, 0xffffff sw $10, 268509976($0) addi $10, $0, 0xffffff sw $10, 268509980($0) addi $10, $0, 0xffffff sw $10, 268509984($0) addi $10, $0, 0xffffff sw $10, 268509988($0) addi $10, $0, 0xffffff sw $10, 268509992($0) addi $10, $0, 0xffffff sw $10, 268509996($0) addi $10, $0, 0xffffff sw $10, 268510000($0) addi $10, $0, 0xffffff sw $10, 268510004($0) addi $10, $0, 0xffffff sw $10, 268510008($0) addi $10, $0, 0xffffff sw $10, 268510012($0) addi $10, $0, 0xffffff sw $10, 268510016($0) addi $10, $0, 0xffffff sw $10, 268510020($0) addi $10, $0, 0xffffff sw $10, 268510024($0) addi $10, $0, 0xffffff sw $10, 268510028($0) addi $10, $0, 0xffffff sw $10, 268510032($0) addi $10, $0, 0xffffff sw $10, 268510036($0) addi $10, $0, 0xffffff sw $10, 268510040($0) addi $10, $0, 0xffffff sw $10, 268510044($0) addi $10, $0, 0xfefeff sw $10, 268510048($0) addi $10, $0, 0xf9ffff sw $10, 268510052($0) addi $10, $0, 0xfffcf8 sw $10, 268510056($0) addi $10, $0, 0xf4e1d3 sw $10, 268510060($0) addi $10, $0, 0x98562d sw $10, 268510064($0) addi $10, $0, 0xfffaf1 sw $10, 268510068($0) addi $10, $0, 0xab643b sw $10, 268510072($0) addi $10, $0, 0xecd2bd sw $10, 268510076($0) addi $10, $0, 0xfaffff sw $10, 268510080($0) addi $10, $0, 0xfefdfe sw $10, 268510084($0) addi $10, $0, 0xf2fdfc sw $10, 268510088($0) addi $10, $0, 0x6f473b sw $10, 268510092($0) addi $10, $0, 0x8b4922 sw $10, 268510096($0) addi $10, $0, 0x91451b sw $10, 268510100($0) addi $10, $0, 0xb46336 sw $10, 268510104($0) addi $10, $0, 0xb16137 sw $10, 268510108($0) addi $10, $0, 0xfff4e3 sw $10, 268510112($0) addi $10, $0, 0xf8fefe sw $10, 268510116($0) addi $10, $0, 0xfdfffc sw $10, 268510120($0) addi $10, $0, 0xfdfffe sw $10, 268510124($0) addi $10, $0, 0xffffff sw $10, 268510128($0) addi $10, $0, 0xffffff sw $10, 268510132($0) addi $10, $0, 0xffffff sw $10, 268510136($0) addi $10, $0, 0xffffff sw $10, 268510140($0) addi $10, $0, 0xffffff sw $10, 268510144($0) addi $10, $0, 0xffffff sw $10, 268510148($0) addi $10, $0, 0xffffff sw $10, 268510152($0) addi $10, $0, 0xffffff sw $10, 268510156($0) addi $10, $0, 0xffffff sw $10, 268510160($0) addi $10, $0, 0xffffff sw $10, 268510164($0) addi $10, $0, 0xffffff sw $10, 268510168($0) addi $10, $0, 0xffffff sw $10, 268510172($0) addi $10, $0, 0xffffff sw $10, 268510176($0) addi $10, $0, 0xffffff sw $10, 268510180($0) addi $10, $0, 0xffffff sw $10, 268510184($0) addi $10, $0, 0xffffff sw $10, 268510188($0) addi $10, $0, 0xffffff sw $10, 268510192($0) addi $10, $0, 0xffffff sw $10, 268510196($0) addi $10, $0, 0xffffff sw $10, 268510200($0) addi $10, $0, 0x00d800 sw $10, 268510204($0) addi $10, $0, 0x00d800 sw $10, 268510208($0) addi $10, $0, 0xffffff sw $10, 268510212($0) addi $10, $0, 0xffffff sw $10, 268510216($0) addi $10, $0, 0xffffff sw $10, 268510220($0) addi $10, $0, 0xffffff sw $10, 268510224($0) addi $10, $0, 0xffffff sw $10, 268510228($0) addi $10, $0, 0xffffff sw $10, 268510232($0) addi $10, $0, 0xffffff sw $10, 268510236($0) addi $10, $0, 0xffffff sw $10, 268510240($0) addi $10, $0, 0xffffff sw $10, 268510244($0) addi $10, $0, 0xffffff sw $10, 268510248($0) addi $10, $0, 0xffffff sw $10, 268510252($0) addi $10, $0, 0xffffff sw $10, 268510256($0) addi $10, $0, 0xffffff sw $10, 268510260($0) addi $10, $0, 0xffffff sw $10, 268510264($0) addi $10, $0, 0xffffff sw $10, 268510268($0) addi $10, $0, 0xffffff sw $10, 268510272($0) addi $10, $0, 0xffffff sw $10, 268510276($0) addi $10, $0, 0xffffff sw $10, 268510280($0) addi $10, $0, 0xffffff sw $10, 268510284($0) addi $10, $0, 0xffffff sw $10, 268510288($0) addi $10, $0, 0xffffff sw $10, 268510292($0) addi $10, $0, 0xffffff sw $10, 268510296($0) addi $10, $0, 0xffffff sw $10, 268510300($0) addi $10, $0, 0xfffeff sw $10, 268510304($0) addi $10, $0, 0xfefffd sw $10, 268510308($0) addi $10, $0, 0xfbfdfd sw $10, 268510312($0) addi $10, $0, 0xf4eae5 sw $10, 268510316($0) addi $10, $0, 0x925639 sw $10, 268510320($0) addi $10, $0, 0xf8fdfe sw $10, 268510324($0) addi $10, $0, 0x9a6b3e sw $10, 268510328($0) addi $10, $0, 0xe8d5cd sw $10, 268510332($0) addi $10, $0, 0xfefefc sw $10, 268510336($0) addi $10, $0, 0xfbfef9 sw $10, 268510340($0) addi $10, $0, 0xf6f9e9 sw $10, 268510344($0) addi $10, $0, 0x78442a sw $10, 268510348($0) addi $10, $0, 0x81411d sw $10, 268510352($0) addi $10, $0, 0x90401c sw $10, 268510356($0) addi $10, $0, 0xb86534 sw $10, 268510360($0) addi $10, $0, 0xae6234 sw $10, 268510364($0) addi $10, $0, 0xfff8e6 sw $10, 268510368($0) addi $10, $0, 0xeff9fa sw $10, 268510372($0) addi $10, $0, 0xfefff7 sw $10, 268510376($0) addi $10, $0, 0xfdfffc sw $10, 268510380($0) addi $10, $0, 0xffffff sw $10, 268510384($0) addi $10, $0, 0xffffff sw $10, 268510388($0) addi $10, $0, 0xffffff sw $10, 268510392($0) addi $10, $0, 0xffffff sw $10, 268510396($0) addi $10, $0, 0xffffff sw $10, 268510400($0) addi $10, $0, 0xffffff sw $10, 268510404($0) addi $10, $0, 0xffffff sw $10, 268510408($0) addi $10, $0, 0xffffff sw $10, 268510412($0) addi $10, $0, 0xffffff sw $10, 268510416($0) addi $10, $0, 0xffffff sw $10, 268510420($0) addi $10, $0, 0xffffff sw $10, 268510424($0) addi $10, $0, 0xffffff sw $10, 268510428($0) addi $10, $0, 0xffffff sw $10, 268510432($0) addi $10, $0, 0xffffff sw $10, 268510436($0) addi $10, $0, 0xffffff sw $10, 268510440($0) addi $10, $0, 0xffffff sw $10, 268510444($0) addi $10, $0, 0xffffff sw $10, 268510448($0) addi $10, $0, 0xffffff sw $10, 268510452($0) addi $10, $0, 0xffffff sw $10, 268510456($0) addi $10, $0, 0x00d800 sw $10, 268510460($0) addi $10, $0, 0x00d800 sw $10, 268510464($0) addi $10, $0, 0xffffff sw $10, 268510468($0) addi $10, $0, 0xffffff sw $10, 268510472($0) addi $10, $0, 0xffffff sw $10, 268510476($0) addi $10, $0, 0xffffff sw $10, 268510480($0) addi $10, $0, 0xffffff sw $10, 268510484($0) addi $10, $0, 0xffffff sw $10, 268510488($0) addi $10, $0, 0xffffff sw $10, 268510492($0) addi $10, $0, 0xffffff sw $10, 268510496($0) addi $10, $0, 0xffffff sw $10, 268510500($0) addi $10, $0, 0xffffff sw $10, 268510504($0) addi $10, $0, 0xffffff sw $10, 268510508($0) addi $10, $0, 0xffffff sw $10, 268510512($0) addi $10, $0, 0xffffff sw $10, 268510516($0) addi $10, $0, 0xffffff sw $10, 268510520($0) addi $10, $0, 0xffffff sw $10, 268510524($0) addi $10, $0, 0xffffff sw $10, 268510528($0) addi $10, $0, 0xffffff sw $10, 268510532($0) addi $10, $0, 0xffffff sw $10, 268510536($0) addi $10, $0, 0xffffff sw $10, 268510540($0) addi $10, $0, 0xffffff sw $10, 268510544($0) addi $10, $0, 0xffffff sw $10, 268510548($0) addi $10, $0, 0xffffff sw $10, 268510552($0) addi $10, $0, 0xffffff sw $10, 268510556($0) addi $10, $0, 0xfefffe sw $10, 268510560($0) addi $10, $0, 0xfffefb sw $10, 268510564($0) addi $10, $0, 0xf9fdfe sw $10, 268510568($0) addi $10, $0, 0xf4e4d6 sw $10, 268510572($0) addi $10, $0, 0x944422 sw $10, 268510576($0) addi $10, $0, 0xfffcf4 sw $10, 268510580($0) addi $10, $0, 0xa15e25 sw $10, 268510584($0) addi $10, $0, 0xe9d1bb sw $10, 268510588($0) addi $10, $0, 0xfdffff sw $10, 268510592($0) addi $10, $0, 0xf8ffff sw $10, 268510596($0) addi $10, $0, 0xfaf8f5 sw $10, 268510600($0) addi $10, $0, 0xa59285 sw $10, 268510604($0) addi $10, $0, 0xa28c7f sw $10, 268510608($0) addi $10, $0, 0xa8876e sw $10, 268510612($0) addi $10, $0, 0x9e4c2a sw $10, 268510616($0) addi $10, $0, 0xbb9e83 sw $10, 268510620($0) addi $10, $0, 0xc3b2a1 sw $10, 268510624($0) addi $10, $0, 0xcab8a1 sw $10, 268510628($0) addi $10, $0, 0xf6ffff sw $10, 268510632($0) addi $10, $0, 0xfffff6 sw $10, 268510636($0) addi $10, $0, 0xffffff sw $10, 268510640($0) addi $10, $0, 0xffffff sw $10, 268510644($0) addi $10, $0, 0xffffff sw $10, 268510648($0) addi $10, $0, 0xffffff sw $10, 268510652($0) addi $10, $0, 0xffffff sw $10, 268510656($0) addi $10, $0, 0xffffff sw $10, 268510660($0) addi $10, $0, 0xffffff sw $10, 268510664($0) addi $10, $0, 0xffffff sw $10, 268510668($0) addi $10, $0, 0xffffff sw $10, 268510672($0) addi $10, $0, 0xffffff sw $10, 268510676($0) addi $10, $0, 0xffffff sw $10, 268510680($0) addi $10, $0, 0xffffff sw $10, 268510684($0) addi $10, $0, 0xffffff sw $10, 268510688($0) addi $10, $0, 0xffffff sw $10, 268510692($0) addi $10, $0, 0xffffff sw $10, 268510696($0) addi $10, $0, 0xffffff sw $10, 268510700($0) addi $10, $0, 0xffffff sw $10, 268510704($0) addi $10, $0, 0xffffff sw $10, 268510708($0) addi $10, $0, 0xffffff sw $10, 268510712($0) addi $10, $0, 0x00d800 sw $10, 268510716($0) addi $10, $0, 0x00d800 sw $10, 268510720($0) addi $10, $0, 0xffffff sw $10, 268510724($0) addi $10, $0, 0xffffff sw $10, 268510728($0) addi $10, $0, 0xffffff sw $10, 268510732($0) addi $10, $0, 0xffffff sw $10, 268510736($0) addi $10, $0, 0xffffff sw $10, 268510740($0) addi $10, $0, 0xffffff sw $10, 268510744($0) addi $10, $0, 0xffffff sw $10, 268510748($0) addi $10, $0, 0xffffff sw $10, 268510752($0) addi $10, $0, 0xffffff sw $10, 268510756($0) addi $10, $0, 0xffffff sw $10, 268510760($0) addi $10, $0, 0xffffff sw $10, 268510764($0) addi $10, $0, 0xffffff sw $10, 268510768($0) addi $10, $0, 0xffffff sw $10, 268510772($0) addi $10, $0, 0xffffff sw $10, 268510776($0) addi $10, $0, 0xffffff sw $10, 268510780($0) addi $10, $0, 0xffffff sw $10, 268510784($0) addi $10, $0, 0xffffff sw $10, 268510788($0) addi $10, $0, 0xffffff sw $10, 268510792($0) addi $10, $0, 0xffffff sw $10, 268510796($0) addi $10, $0, 0xffffff sw $10, 268510800($0) addi $10, $0, 0xffffff sw $10, 268510804($0) addi $10, $0, 0xffffff sw $10, 268510808($0) addi $10, $0, 0xffffff sw $10, 268510812($0) addi $10, $0, 0xfefffe sw $10, 268510816($0) addi $10, $0, 0xfffefb sw $10, 268510820($0) addi $10, $0, 0xfafefe sw $10, 268510824($0) addi $10, $0, 0xf0dfd1 sw $10, 268510828($0) addi $10, $0, 0x7b3b28 sw $10, 268510832($0) addi $10, $0, 0xf5fffe sw $10, 268510836($0) addi $10, $0, 0x934b30 sw $10, 268510840($0) addi $10, $0, 0xe3d4c7 sw $10, 268510844($0) addi $10, $0, 0xfafffc sw $10, 268510848($0) addi $10, $0, 0xfffbff sw $10, 268510852($0) addi $10, $0, 0xfffcff sw $10, 268510856($0) addi $10, $0, 0xf8fdfc sw $10, 268510860($0) addi $10, $0, 0xfdfeff sw $10, 268510864($0) addi $10, $0, 0xfbfbe3 sw $10, 268510868($0) addi $10, $0, 0x782710 sw $10, 268510872($0) addi $10, $0, 0xfdfdf6 sw $10, 268510876($0) addi $10, $0, 0x774a39 sw $10, 268510880($0) addi $10, $0, 0xa15520 sw $10, 268510884($0) addi $10, $0, 0xe9ffff sw $10, 268510888($0) addi $10, $0, 0xfffdf3 sw $10, 268510892($0) addi $10, $0, 0xfeffff sw $10, 268510896($0) addi $10, $0, 0xffffff sw $10, 268510900($0) addi $10, $0, 0xffffff sw $10, 268510904($0) addi $10, $0, 0xffffff sw $10, 268510908($0) addi $10, $0, 0xffffff sw $10, 268510912($0) addi $10, $0, 0xffffff sw $10, 268510916($0) addi $10, $0, 0xffffff sw $10, 268510920($0) addi $10, $0, 0xffffff sw $10, 268510924($0) addi $10, $0, 0xffffff sw $10, 268510928($0) addi $10, $0, 0xffffff sw $10, 268510932($0) addi $10, $0, 0xffffff sw $10, 268510936($0) addi $10, $0, 0xffffff sw $10, 268510940($0) addi $10, $0, 0xffffff sw $10, 268510944($0) addi $10, $0, 0xffffff sw $10, 268510948($0) addi $10, $0, 0xffffff sw $10, 268510952($0) addi $10, $0, 0xffffff sw $10, 268510956($0) addi $10, $0, 0xffffff sw $10, 268510960($0) addi $10, $0, 0xffffff sw $10, 268510964($0) addi $10, $0, 0xffffff sw $10, 268510968($0) addi $10, $0, 0x00d800 sw $10, 268510972($0) addi $10, $0, 0x00d800 sw $10, 268510976($0) addi $10, $0, 0xffffff sw $10, 268510980($0) addi $10, $0, 0xffffff sw $10, 268510984($0) addi $10, $0, 0xffffff sw $10, 268510988($0) addi $10, $0, 0xffffff sw $10, 268510992($0) addi $10, $0, 0xffffff sw $10, 268510996($0) addi $10, $0, 0xffffff sw $10, 268511000($0) addi $10, $0, 0xffffff sw $10, 268511004($0) addi $10, $0, 0xffffff sw $10, 268511008($0) addi $10, $0, 0xffffff sw $10, 268511012($0) addi $10, $0, 0xffffff sw $10, 268511016($0) addi $10, $0, 0xffffff sw $10, 268511020($0) addi $10, $0, 0xffffff sw $10, 268511024($0) addi $10, $0, 0xffffff sw $10, 268511028($0) addi $10, $0, 0xffffff sw $10, 268511032($0) addi $10, $0, 0xffffff sw $10, 268511036($0) addi $10, $0, 0xffffff sw $10, 268511040($0) addi $10, $0, 0xffffff sw $10, 268511044($0) addi $10, $0, 0xffffff sw $10, 268511048($0) addi $10, $0, 0xffffff sw $10, 268511052($0) addi $10, $0, 0xffffff sw $10, 268511056($0) addi $10, $0, 0xffffff sw $10, 268511060($0) addi $10, $0, 0xffffff sw $10, 268511064($0) addi $10, $0, 0xffffff sw $10, 268511068($0) addi $10, $0, 0xfdfffd sw $10, 268511072($0) addi $10, $0, 0xfffdfa sw $10, 268511076($0) addi $10, $0, 0xfbfefe sw $10, 268511080($0) addi $10, $0, 0xf3eddf sw $10, 268511084($0) addi $10, $0, 0x873e1d sw $10, 268511088($0) addi $10, $0, 0xfff2e0 sw $10, 268511092($0) addi $10, $0, 0x894d26 sw $10, 268511096($0) addi $10, $0, 0xe5c6a9 sw $10, 268511100($0) addi $10, $0, 0xfefffa sw $10, 268511104($0) addi $10, $0, 0xfffefd sw $10, 268511108($0) addi $10, $0, 0xfefeff sw $10, 268511112($0) addi $10, $0, 0xfcfeff sw $10, 268511116($0) addi $10, $0, 0xfefdfb sw $10, 268511120($0) addi $10, $0, 0xf6efdf sw $10, 268511124($0) addi $10, $0, 0x693523 sw $10, 268511128($0) addi $10, $0, 0xf9f9f3 sw $10, 268511132($0) addi $10, $0, 0x7c523f sw $10, 268511136($0) addi $10, $0, 0x81583a sw $10, 268511140($0) addi $10, $0, 0xf5ffff sw $10, 268511144($0) addi $10, $0, 0xfffffc sw $10, 268511148($0) addi $10, $0, 0xffffff sw $10, 268511152($0) addi $10, $0, 0xffffff sw $10, 268511156($0) addi $10, $0, 0xffffff sw $10, 268511160($0) addi $10, $0, 0xffffff sw $10, 268511164($0) addi $10, $0, 0xffffff sw $10, 268511168($0) addi $10, $0, 0xffffff sw $10, 268511172($0) addi $10, $0, 0xffffff sw $10, 268511176($0) addi $10, $0, 0xffffff sw $10, 268511180($0) addi $10, $0, 0xffffff sw $10, 268511184($0) addi $10, $0, 0xffffff sw $10, 268511188($0) addi $10, $0, 0xffffff sw $10, 268511192($0) addi $10, $0, 0xffffff sw $10, 268511196($0) addi $10, $0, 0xffffff sw $10, 268511200($0) addi $10, $0, 0xffffff sw $10, 268511204($0) addi $10, $0, 0xffffff sw $10, 268511208($0) addi $10, $0, 0xffffff sw $10, 268511212($0) addi $10, $0, 0xffffff sw $10, 268511216($0) addi $10, $0, 0xffffff sw $10, 268511220($0) addi $10, $0, 0xffffff sw $10, 268511224($0) addi $10, $0, 0x00d800 sw $10, 268511228($0) addi $10, $0, 0x00d800 sw $10, 268511232($0) addi $10, $0, 0xffffff sw $10, 268511236($0) addi $10, $0, 0xffffff sw $10, 268511240($0) addi $10, $0, 0xffffff sw $10, 268511244($0) addi $10, $0, 0xffffff sw $10, 268511248($0) addi $10, $0, 0xffffff sw $10, 268511252($0) addi $10, $0, 0xffffff sw $10, 268511256($0) addi $10, $0, 0xffffff sw $10, 268511260($0) addi $10, $0, 0xffffff sw $10, 268511264($0) addi $10, $0, 0xffffff sw $10, 268511268($0) addi $10, $0, 0xffffff sw $10, 268511272($0) addi $10, $0, 0xffffff sw $10, 268511276($0) addi $10, $0, 0xffffff sw $10, 268511280($0) addi $10, $0, 0xffffff sw $10, 268511284($0) addi $10, $0, 0xffffff sw $10, 268511288($0) addi $10, $0, 0xffffff sw $10, 268511292($0) addi $10, $0, 0xffffff sw $10, 268511296($0) addi $10, $0, 0xfffefc sw $10, 268511300($0) addi $10, $0, 0xffffff sw $10, 268511304($0) addi $10, $0, 0xfffffc sw $10, 268511308($0) addi $10, $0, 0xfffefc sw $10, 268511312($0) addi $10, $0, 0xfffefc sw $10, 268511316($0) addi $10, $0, 0xfeffff sw $10, 268511320($0) addi $10, $0, 0xfcfeff sw $10, 268511324($0) addi $10, $0, 0xfefffe sw $10, 268511328($0) addi $10, $0, 0xfffefb sw $10, 268511332($0) addi $10, $0, 0xf0f2f3 sw $10, 268511336($0) addi $10, $0, 0xfdf5ec sw $10, 268511340($0) addi $10, $0, 0xfdefef sw $10, 268511344($0) addi $10, $0, 0xf8faff sw $10, 268511348($0) addi $10, $0, 0xf5fff8 sw $10, 268511352($0) addi $10, $0, 0xfefefe sw $10, 268511356($0) addi $10, $0, 0xfffcfd sw $10, 268511360($0) addi $10, $0, 0xfcfffb sw $10, 268511364($0) addi $10, $0, 0xfcfffd sw $10, 268511368($0) addi $10, $0, 0xfffbfe sw $10, 268511372($0) addi $10, $0, 0xf5f6f3 sw $10, 268511376($0) addi $10, $0, 0xfef9fd sw $10, 268511380($0) addi $10, $0, 0xfbf4ee sw $10, 268511384($0) addi $10, $0, 0xfcfeff sw $10, 268511388($0) addi $10, $0, 0xfff9e9 sw $10, 268511392($0) addi $10, $0, 0xfcffff sw $10, 268511396($0) addi $10, $0, 0xfffef9 sw $10, 268511400($0) addi $10, $0, 0xfcffff sw $10, 268511404($0) addi $10, $0, 0xffffff sw $10, 268511408($0) addi $10, $0, 0xffffff sw $10, 268511412($0) addi $10, $0, 0xffffff sw $10, 268511416($0) addi $10, $0, 0xffffff sw $10, 268511420($0) addi $10, $0, 0xffffff sw $10, 268511424($0) addi $10, $0, 0xffffff sw $10, 268511428($0) addi $10, $0, 0xffffff sw $10, 268511432($0) addi $10, $0, 0xffffff sw $10, 268511436($0) addi $10, $0, 0xffffff sw $10, 268511440($0) addi $10, $0, 0xffffff sw $10, 268511444($0) addi $10, $0, 0xffffff sw $10, 268511448($0) addi $10, $0, 0xffffff sw $10, 268511452($0) addi $10, $0, 0xffffff sw $10, 268511456($0) addi $10, $0, 0xffffff sw $10, 268511460($0) addi $10, $0, 0xffffff sw $10, 268511464($0) addi $10, $0, 0xffffff sw $10, 268511468($0) addi $10, $0, 0xffffff sw $10, 268511472($0) addi $10, $0, 0xffffff sw $10, 268511476($0) addi $10, $0, 0xffffff sw $10, 268511480($0) addi $10, $0, 0x00d800 sw $10, 268511484($0) addi $10, $0, 0x00d800 sw $10, 268511488($0) addi $10, $0, 0xffffff sw $10, 268511492($0) addi $10, $0, 0xffffff sw $10, 268511496($0) addi $10, $0, 0xffffff sw $10, 268511500($0) addi $10, $0, 0xffffff sw $10, 268511504($0) addi $10, $0, 0xffffff sw $10, 268511508($0) addi $10, $0, 0xffffff sw $10, 268511512($0) addi $10, $0, 0xffffff sw $10, 268511516($0) addi $10, $0, 0xffffff sw $10, 268511520($0) addi $10, $0, 0xffffff sw $10, 268511524($0) addi $10, $0, 0xffffff sw $10, 268511528($0) addi $10, $0, 0xffffff sw $10, 268511532($0) addi $10, $0, 0xffffff sw $10, 268511536($0) addi $10, $0, 0xffffff sw $10, 268511540($0) addi $10, $0, 0xffffff sw $10, 268511544($0) addi $10, $0, 0xffffff sw $10, 268511548($0) addi $10, $0, 0xffffff sw $10, 268511552($0) addi $10, $0, 0xffffff sw $10, 268511556($0) addi $10, $0, 0xffffff sw $10, 268511560($0) addi $10, $0, 0xffffff sw $10, 268511564($0) addi $10, $0, 0xffffff sw $10, 268511568($0) addi $10, $0, 0xffffff sw $10, 268511572($0) addi $10, $0, 0xffffff sw $10, 268511576($0) addi $10, $0, 0xffffff sw $10, 268511580($0) addi $10, $0, 0xffffff sw $10, 268511584($0) addi $10, $0, 0xffffff sw $10, 268511588($0) addi $10, $0, 0xffffff sw $10, 268511592($0) addi $10, $0, 0xffffff sw $10, 268511596($0) addi $10, $0, 0xffffff sw $10, 268511600($0) addi $10, $0, 0xffffff sw $10, 268511604($0) addi $10, $0, 0xffffff sw $10, 268511608($0) addi $10, $0, 0xffffff sw $10, 268511612($0) addi $10, $0, 0xffffff sw $10, 268511616($0) addi $10, $0, 0xffffff sw $10, 268511620($0) addi $10, $0, 0xffffff sw $10, 268511624($0) addi $10, $0, 0xffffff sw $10, 268511628($0) addi $10, $0, 0xffffff sw $10, 268511632($0) addi $10, $0, 0xffffff sw $10, 268511636($0) addi $10, $0, 0xffffff sw $10, 268511640($0) addi $10, $0, 0xffffff sw $10, 268511644($0) addi $10, $0, 0xffffff sw $10, 268511648($0) addi $10, $0, 0xffffff sw $10, 268511652($0) addi $10, $0, 0xffffff sw $10, 268511656($0) addi $10, $0, 0xffffff sw $10, 268511660($0) addi $10, $0, 0xffffff sw $10, 268511664($0) addi $10, $0, 0xffffff sw $10, 268511668($0) addi $10, $0, 0xffffff sw $10, 268511672($0) addi $10, $0, 0xffffff sw $10, 268511676($0) addi $10, $0, 0xffffff sw $10, 268511680($0) addi $10, $0, 0xffffff sw $10, 268511684($0) addi $10, $0, 0xffffff sw $10, 268511688($0) addi $10, $0, 0xffffff sw $10, 268511692($0) addi $10, $0, 0xffffff sw $10, 268511696($0) addi $10, $0, 0xffffff sw $10, 268511700($0) addi $10, $0, 0xffffff sw $10, 268511704($0) addi $10, $0, 0xffffff sw $10, 268511708($0) addi $10, $0, 0xffffff sw $10, 268511712($0) addi $10, $0, 0xffffff sw $10, 268511716($0) addi $10, $0, 0xffffff sw $10, 268511720($0) addi $10, $0, 0xffffff sw $10, 268511724($0) addi $10, $0, 0xffffff sw $10, 268511728($0) addi $10, $0, 0xffffff sw $10, 268511732($0) addi $10, $0, 0xffffff sw $10, 268511736($0) addi $10, $0, 0x00d800 sw $10, 268511740($0) addi $10, $0, 0x00d800 sw $10, 268511744($0) addi $10, $0, 0xffffff sw $10, 268511748($0) addi $10, $0, 0xffffff sw $10, 268511752($0) addi $10, $0, 0xffffff sw $10, 268511756($0) addi $10, $0, 0xffffff sw $10, 268511760($0) addi $10, $0, 0xffffff sw $10, 268511764($0) addi $10, $0, 0xffffff sw $10, 268511768($0) addi $10, $0, 0xffffff sw $10, 268511772($0) addi $10, $0, 0xffffff sw $10, 268511776($0) addi $10, $0, 0xffffff sw $10, 268511780($0) addi $10, $0, 0xffffff sw $10, 268511784($0) addi $10, $0, 0xffffff sw $10, 268511788($0) addi $10, $0, 0xffffff sw $10, 268511792($0) addi $10, $0, 0xffffff sw $10, 268511796($0) addi $10, $0, 0xffffff sw $10, 268511800($0) addi $10, $0, 0xffffff sw $10, 268511804($0) addi $10, $0, 0xffffff sw $10, 268511808($0) addi $10, $0, 0xffffff sw $10, 268511812($0) addi $10, $0, 0xffffff sw $10, 268511816($0) addi $10, $0, 0xffffff sw $10, 268511820($0) addi $10, $0, 0xffffff sw $10, 268511824($0) addi $10, $0, 0xffffff sw $10, 268511828($0) addi $10, $0, 0xffffff sw $10, 268511832($0) addi $10, $0, 0xffffff sw $10, 268511836($0) addi $10, $0, 0xffffff sw $10, 268511840($0) addi $10, $0, 0xffffff sw $10, 268511844($0) addi $10, $0, 0xffffff sw $10, 268511848($0) addi $10, $0, 0xffffff sw $10, 268511852($0) addi $10, $0, 0xffffff sw $10, 268511856($0) addi $10, $0, 0xffffff sw $10, 268511860($0) addi $10, $0, 0xffffff sw $10, 268511864($0) addi $10, $0, 0xffffff sw $10, 268511868($0) addi $10, $0, 0xffffff sw $10, 268511872($0) addi $10, $0, 0xffffff sw $10, 268511876($0) addi $10, $0, 0xffffff sw $10, 268511880($0) addi $10, $0, 0xffffff sw $10, 268511884($0) addi $10, $0, 0xffffff sw $10, 268511888($0) addi $10, $0, 0xffffff sw $10, 268511892($0) addi $10, $0, 0xffffff sw $10, 268511896($0) addi $10, $0, 0xffffff sw $10, 268511900($0) addi $10, $0, 0xffffff sw $10, 268511904($0) addi $10, $0, 0xffffff sw $10, 268511908($0) addi $10, $0, 0xffffff sw $10, 268511912($0) addi $10, $0, 0xffffff sw $10, 268511916($0) addi $10, $0, 0xffffff sw $10, 268511920($0) addi $10, $0, 0xffffff sw $10, 268511924($0) addi $10, $0, 0xffffff sw $10, 268511928($0) addi $10, $0, 0xffffff sw $10, 268511932($0) addi $10, $0, 0xffffff sw $10, 268511936($0) addi $10, $0, 0xffffff sw $10, 268511940($0) addi $10, $0, 0xffffff sw $10, 268511944($0) addi $10, $0, 0xffffff sw $10, 268511948($0) addi $10, $0, 0xffffff sw $10, 268511952($0) addi $10, $0, 0xffffff sw $10, 268511956($0) addi $10, $0, 0xffffff sw $10, 268511960($0) addi $10, $0, 0xffffff sw $10, 268511964($0) addi $10, $0, 0xffffff sw $10, 268511968($0) addi $10, $0, 0xffffff sw $10, 268511972($0) addi $10, $0, 0xffffff sw $10, 268511976($0) addi $10, $0, 0xffffff sw $10, 268511980($0) addi $10, $0, 0xffffff sw $10, 268511984($0) addi $10, $0, 0xffffff sw $10, 268511988($0) addi $10, $0, 0xffffff sw $10, 268511992($0) addi $10, $0, 0x00d800 sw $10, 268511996($0) addi $10, $0, 0x00d800 sw $10, 268512000($0) addi $10, $0, 0xffffff sw $10, 268512004($0) addi $10, $0, 0xffffff sw $10, 268512008($0) addi $10, $0, 0xffffff sw $10, 268512012($0) addi $10, $0, 0xffffff sw $10, 268512016($0) addi $10, $0, 0xffffff sw $10, 268512020($0) addi $10, $0, 0xffffff sw $10, 268512024($0) addi $10, $0, 0xffffff sw $10, 268512028($0) addi $10, $0, 0xffffff sw $10, 268512032($0) addi $10, $0, 0xffffff sw $10, 268512036($0) addi $10, $0, 0xffffff sw $10, 268512040($0) addi $10, $0, 0xffffff sw $10, 268512044($0) addi $10, $0, 0xffffff sw $10, 268512048($0) addi $10, $0, 0xffffff sw $10, 268512052($0) addi $10, $0, 0xffffff sw $10, 268512056($0) addi $10, $0, 0xffffff sw $10, 268512060($0) addi $10, $0, 0xffffff sw $10, 268512064($0) addi $10, $0, 0xffffff sw $10, 268512068($0) addi $10, $0, 0xffffff sw $10, 268512072($0) addi $10, $0, 0xffffff sw $10, 268512076($0) addi $10, $0, 0xffffff sw $10, 268512080($0) addi $10, $0, 0xffffff sw $10, 268512084($0) addi $10, $0, 0xffffff sw $10, 268512088($0) addi $10, $0, 0xffffff sw $10, 268512092($0) addi $10, $0, 0xffffff sw $10, 268512096($0) addi $10, $0, 0xffffff sw $10, 268512100($0) addi $10, $0, 0xffffff sw $10, 268512104($0) addi $10, $0, 0xffffff sw $10, 268512108($0) addi $10, $0, 0xffffff sw $10, 268512112($0) addi $10, $0, 0xffffff sw $10, 268512116($0) addi $10, $0, 0xffffff sw $10, 268512120($0) addi $10, $0, 0xffffff sw $10, 268512124($0) addi $10, $0, 0xffffff sw $10, 268512128($0) addi $10, $0, 0xffffff sw $10, 268512132($0) addi $10, $0, 0xffffff sw $10, 268512136($0) addi $10, $0, 0xffffff sw $10, 268512140($0) addi $10, $0, 0xffffff sw $10, 268512144($0) addi $10, $0, 0xffffff sw $10, 268512148($0) addi $10, $0, 0xffffff sw $10, 268512152($0) addi $10, $0, 0xffffff sw $10, 268512156($0) addi $10, $0, 0xffffff sw $10, 268512160($0) addi $10, $0, 0xffffff sw $10, 268512164($0) addi $10, $0, 0xffffff sw $10, 268512168($0) addi $10, $0, 0xffffff sw $10, 268512172($0) addi $10, $0, 0xffffff sw $10, 268512176($0) addi $10, $0, 0xffffff sw $10, 268512180($0) addi $10, $0, 0xffffff sw $10, 268512184($0) addi $10, $0, 0xffffff sw $10, 268512188($0) addi $10, $0, 0xffffff sw $10, 268512192($0) addi $10, $0, 0xffffff sw $10, 268512196($0) addi $10, $0, 0xffffff sw $10, 268512200($0) addi $10, $0, 0xffffff sw $10, 268512204($0) addi $10, $0, 0xffffff sw $10, 268512208($0) addi $10, $0, 0xffffff sw $10, 268512212($0) addi $10, $0, 0xffffff sw $10, 268512216($0) addi $10, $0, 0xffffff sw $10, 268512220($0) addi $10, $0, 0xffffff sw $10, 268512224($0) addi $10, $0, 0xffffff sw $10, 268512228($0) addi $10, $0, 0xffffff sw $10, 268512232($0) addi $10, $0, 0xffffff sw $10, 268512236($0) addi $10, $0, 0xffffff sw $10, 268512240($0) addi $10, $0, 0xffffff sw $10, 268512244($0) addi $10, $0, 0xffffff sw $10, 268512248($0) addi $10, $0, 0x00d800 sw $10, 268512252($0) addi $10, $0, 0x00d800 sw $10, 268512256($0) addi $10, $0, 0xffffff sw $10, 268512260($0) addi $10, $0, 0xffffff sw $10, 268512264($0) addi $10, $0, 0xffffff sw $10, 268512268($0) addi $10, $0, 0xffffff sw $10, 268512272($0) addi $10, $0, 0xffffff sw $10, 268512276($0) addi $10, $0, 0xffffff sw $10, 268512280($0) addi $10, $0, 0xffffff sw $10, 268512284($0) addi $10, $0, 0xffffff sw $10, 268512288($0) addi $10, $0, 0xffffff sw $10, 268512292($0) addi $10, $0, 0xffffff sw $10, 268512296($0) addi $10, $0, 0xffffff sw $10, 268512300($0) addi $10, $0, 0xffffff sw $10, 268512304($0) addi $10, $0, 0xffffff sw $10, 268512308($0) addi $10, $0, 0xffffff sw $10, 268512312($0) addi $10, $0, 0xffffff sw $10, 268512316($0) addi $10, $0, 0xffffff sw $10, 268512320($0) addi $10, $0, 0xffffff sw $10, 268512324($0) addi $10, $0, 0xffffff sw $10, 268512328($0) addi $10, $0, 0xffffff sw $10, 268512332($0) addi $10, $0, 0xffffff sw $10, 268512336($0) addi $10, $0, 0xffffff sw $10, 268512340($0) addi $10, $0, 0xffffff sw $10, 268512344($0) addi $10, $0, 0xffffff sw $10, 268512348($0) addi $10, $0, 0xffffff sw $10, 268512352($0) addi $10, $0, 0xffffff sw $10, 268512356($0) addi $10, $0, 0xffffff sw $10, 268512360($0) addi $10, $0, 0xffffff sw $10, 268512364($0) addi $10, $0, 0xffffff sw $10, 268512368($0) addi $10, $0, 0xffffff sw $10, 268512372($0) addi $10, $0, 0xffffff sw $10, 268512376($0) addi $10, $0, 0xffffff sw $10, 268512380($0) addi $10, $0, 0xffffff sw $10, 268512384($0) addi $10, $0, 0xffffff sw $10, 268512388($0) addi $10, $0, 0xffffff sw $10, 268512392($0) addi $10, $0, 0xffffff sw $10, 268512396($0) addi $10, $0, 0xffffff sw $10, 268512400($0) addi $10, $0, 0xffffff sw $10, 268512404($0) addi $10, $0, 0xffffff sw $10, 268512408($0) addi $10, $0, 0xffffff sw $10, 268512412($0) addi $10, $0, 0xffffff sw $10, 268512416($0) addi $10, $0, 0xffffff sw $10, 268512420($0) addi $10, $0, 0xffffff sw $10, 268512424($0) addi $10, $0, 0xffffff sw $10, 268512428($0) addi $10, $0, 0xffffff sw $10, 268512432($0) addi $10, $0, 0xffffff sw $10, 268512436($0) addi $10, $0, 0xffffff sw $10, 268512440($0) addi $10, $0, 0xffffff sw $10, 268512444($0) addi $10, $0, 0xffffff sw $10, 268512448($0) addi $10, $0, 0xffffff sw $10, 268512452($0) addi $10, $0, 0xffffff sw $10, 268512456($0) addi $10, $0, 0xffffff sw $10, 268512460($0) addi $10, $0, 0xffffff sw $10, 268512464($0) addi $10, $0, 0xffffff sw $10, 268512468($0) addi $10, $0, 0xffffff sw $10, 268512472($0) addi $10, $0, 0xffffff sw $10, 268512476($0) addi $10, $0, 0xffffff sw $10, 268512480($0) addi $10, $0, 0xffffff sw $10, 268512484($0) addi $10, $0, 0xffffff sw $10, 268512488($0) addi $10, $0, 0xffffff sw $10, 268512492($0) addi $10, $0, 0xffffff sw $10, 268512496($0) addi $10, $0, 0xffffff sw $10, 268512500($0) addi $10, $0, 0xffffff sw $10, 268512504($0) addi $10, $0, 0x00d800 sw $10, 268512508($0) addi $10, $0, 0x00d800 sw $10, 268512512($0) addi $10, $0, 0xffffff sw $10, 268512516($0) addi $10, $0, 0xffffff sw $10, 268512520($0) addi $10, $0, 0xffffff sw $10, 268512524($0) addi $10, $0, 0xffffff sw $10, 268512528($0) addi $10, $0, 0xffffff sw $10, 268512532($0) addi $10, $0, 0xffffff sw $10, 268512536($0) addi $10, $0, 0xffffff sw $10, 268512540($0) addi $10, $0, 0xffffff sw $10, 268512544($0) addi $10, $0, 0xffffff sw $10, 268512548($0) addi $10, $0, 0xffffff sw $10, 268512552($0) addi $10, $0, 0xffffff sw $10, 268512556($0) addi $10, $0, 0xffffff sw $10, 268512560($0) addi $10, $0, 0xffffff sw $10, 268512564($0) addi $10, $0, 0xffffff sw $10, 268512568($0) addi $10, $0, 0xffffff sw $10, 268512572($0) addi $10, $0, 0xffffff sw $10, 268512576($0) addi $10, $0, 0xffffff sw $10, 268512580($0) addi $10, $0, 0xffffff sw $10, 268512584($0) addi $10, $0, 0xffffff sw $10, 268512588($0) addi $10, $0, 0xffffff sw $10, 268512592($0) addi $10, $0, 0xffffff sw $10, 268512596($0) addi $10, $0, 0xffffff sw $10, 268512600($0) addi $10, $0, 0xffffff sw $10, 268512604($0) addi $10, $0, 0xffffff sw $10, 268512608($0) addi $10, $0, 0xffffff sw $10, 268512612($0) addi $10, $0, 0xffffff sw $10, 268512616($0) addi $10, $0, 0xffffff sw $10, 268512620($0) addi $10, $0, 0xffffff sw $10, 268512624($0) addi $10, $0, 0xffffff sw $10, 268512628($0) addi $10, $0, 0xffffff sw $10, 268512632($0) addi $10, $0, 0xffffff sw $10, 268512636($0) addi $10, $0, 0xffffff sw $10, 268512640($0) addi $10, $0, 0xffffff sw $10, 268512644($0) addi $10, $0, 0xffffff sw $10, 268512648($0) addi $10, $0, 0xffffff sw $10, 268512652($0) addi $10, $0, 0xffffff sw $10, 268512656($0) addi $10, $0, 0xffffff sw $10, 268512660($0) addi $10, $0, 0xffffff sw $10, 268512664($0) addi $10, $0, 0xffffff sw $10, 268512668($0) addi $10, $0, 0xffffff sw $10, 268512672($0) addi $10, $0, 0xffffff sw $10, 268512676($0) addi $10, $0, 0xffffff sw $10, 268512680($0) addi $10, $0, 0xffffff sw $10, 268512684($0) addi $10, $0, 0xffffff sw $10, 268512688($0) addi $10, $0, 0xffffff sw $10, 268512692($0) addi $10, $0, 0xffffff sw $10, 268512696($0) addi $10, $0, 0xffffff sw $10, 268512700($0) addi $10, $0, 0xffffff sw $10, 268512704($0) addi $10, $0, 0xffffff sw $10, 268512708($0) addi $10, $0, 0xffffff sw $10, 268512712($0) addi $10, $0, 0xffffff sw $10, 268512716($0) addi $10, $0, 0xffffff sw $10, 268512720($0) addi $10, $0, 0xffffff sw $10, 268512724($0) addi $10, $0, 0xffffff sw $10, 268512728($0) addi $10, $0, 0xffffff sw $10, 268512732($0) addi $10, $0, 0xffffff sw $10, 268512736($0) addi $10, $0, 0xffffff sw $10, 268512740($0) addi $10, $0, 0xffffff sw $10, 268512744($0) addi $10, $0, 0xffffff sw $10, 268512748($0) addi $10, $0, 0xffffff sw $10, 268512752($0) addi $10, $0, 0xffffff sw $10, 268512756($0) addi $10, $0, 0xffffff sw $10, 268512760($0) addi $10, $0, 0x00d800 sw $10, 268512764($0) addi $10, $0, 0x00d800 sw $10, 268512768($0) addi $10, $0, 0xffffff sw $10, 268512772($0) addi $10, $0, 0xffffff sw $10, 268512776($0) addi $10, $0, 0xffffff sw $10, 268512780($0) addi $10, $0, 0xffffff sw $10, 268512784($0) addi $10, $0, 0xffffff sw $10, 268512788($0) addi $10, $0, 0xffffff sw $10, 268512792($0) addi $10, $0, 0xffffff sw $10, 268512796($0) addi $10, $0, 0xffffff sw $10, 268512800($0) addi $10, $0, 0xffffff sw $10, 268512804($0) addi $10, $0, 0xffffff sw $10, 268512808($0) addi $10, $0, 0xffffff sw $10, 268512812($0) addi $10, $0, 0xffffff sw $10, 268512816($0) addi $10, $0, 0xffffff sw $10, 268512820($0) addi $10, $0, 0xffffff sw $10, 268512824($0) addi $10, $0, 0xffffff sw $10, 268512828($0) addi $10, $0, 0xffffff sw $10, 268512832($0) addi $10, $0, 0xffffff sw $10, 268512836($0) addi $10, $0, 0xffffff sw $10, 268512840($0) addi $10, $0, 0xffffff sw $10, 268512844($0) addi $10, $0, 0xffffff sw $10, 268512848($0) addi $10, $0, 0xffffff sw $10, 268512852($0) addi $10, $0, 0xffffff sw $10, 268512856($0) addi $10, $0, 0xffffff sw $10, 268512860($0) addi $10, $0, 0xffffff sw $10, 268512864($0) addi $10, $0, 0xffffff sw $10, 268512868($0) addi $10, $0, 0xffffff sw $10, 268512872($0) addi $10, $0, 0xffffff sw $10, 268512876($0) addi $10, $0, 0xffffff sw $10, 268512880($0) addi $10, $0, 0xffffff sw $10, 268512884($0) addi $10, $0, 0xffffff sw $10, 268512888($0) addi $10, $0, 0xffffff sw $10, 268512892($0) addi $10, $0, 0xffffff sw $10, 268512896($0) addi $10, $0, 0xffffff sw $10, 268512900($0) addi $10, $0, 0xffffff sw $10, 268512904($0) addi $10, $0, 0xffffff sw $10, 268512908($0) addi $10, $0, 0xffffff sw $10, 268512912($0) addi $10, $0, 0xffffff sw $10, 268512916($0) addi $10, $0, 0xffffff sw $10, 268512920($0) addi $10, $0, 0xffffff sw $10, 268512924($0) addi $10, $0, 0xffffff sw $10, 268512928($0) addi $10, $0, 0xffffff sw $10, 268512932($0) addi $10, $0, 0xffffff sw $10, 268512936($0) addi $10, $0, 0xffffff sw $10, 268512940($0) addi $10, $0, 0xffffff sw $10, 268512944($0) addi $10, $0, 0xffffff sw $10, 268512948($0) addi $10, $0, 0xffffff sw $10, 268512952($0) addi $10, $0, 0xffffff sw $10, 268512956($0) addi $10, $0, 0xffffff sw $10, 268512960($0) addi $10, $0, 0xffffff sw $10, 268512964($0) addi $10, $0, 0xffffff sw $10, 268512968($0) addi $10, $0, 0xffffff sw $10, 268512972($0) addi $10, $0, 0xffffff sw $10, 268512976($0) addi $10, $0, 0xffffff sw $10, 268512980($0) addi $10, $0, 0xffffff sw $10, 268512984($0) addi $10, $0, 0xffffff sw $10, 268512988($0) addi $10, $0, 0xffffff sw $10, 268512992($0) addi $10, $0, 0xffffff sw $10, 268512996($0) addi $10, $0, 0xffffff sw $10, 268513000($0) addi $10, $0, 0xffffff sw $10, 268513004($0) addi $10, $0, 0xffffff sw $10, 268513008($0) addi $10, $0, 0xffffff sw $10, 268513012($0) addi $10, $0, 0xffffff sw $10, 268513016($0) addi $10, $0, 0x00d800 sw $10, 268513020($0) addi $10, $0, 0x00d800 sw $10, 268513024($0) addi $10, $0, 0xffffff sw $10, 268513028($0) addi $10, $0, 0xffffff sw $10, 268513032($0) addi $10, $0, 0xffffff sw $10, 268513036($0) addi $10, $0, 0xffffff sw $10, 268513040($0) addi $10, $0, 0xffffff sw $10, 268513044($0) addi $10, $0, 0xffffff sw $10, 268513048($0) addi $10, $0, 0xffffff sw $10, 268513052($0) addi $10, $0, 0xffffff sw $10, 268513056($0) addi $10, $0, 0xffffff sw $10, 268513060($0) addi $10, $0, 0xffffff sw $10, 268513064($0) addi $10, $0, 0xffffff sw $10, 268513068($0) addi $10, $0, 0xffffff sw $10, 268513072($0) addi $10, $0, 0xffffff sw $10, 268513076($0) addi $10, $0, 0xffffff sw $10, 268513080($0) addi $10, $0, 0xffffff sw $10, 268513084($0) addi $10, $0, 0xffffff sw $10, 268513088($0) addi $10, $0, 0xffffff sw $10, 268513092($0) addi $10, $0, 0xffffff sw $10, 268513096($0) addi $10, $0, 0xffffff sw $10, 268513100($0) addi $10, $0, 0xffffff sw $10, 268513104($0) addi $10, $0, 0xffffff sw $10, 268513108($0) addi $10, $0, 0xffffff sw $10, 268513112($0) addi $10, $0, 0xffffff sw $10, 268513116($0) addi $10, $0, 0xffffff sw $10, 268513120($0) addi $10, $0, 0xffffff sw $10, 268513124($0) addi $10, $0, 0xffffff sw $10, 268513128($0) addi $10, $0, 0xffffff sw $10, 268513132($0) addi $10, $0, 0xffffff sw $10, 268513136($0) addi $10, $0, 0xffffff sw $10, 268513140($0) addi $10, $0, 0xffffff sw $10, 268513144($0) addi $10, $0, 0xffffff sw $10, 268513148($0) addi $10, $0, 0xffffff sw $10, 268513152($0) addi $10, $0, 0xffffff sw $10, 268513156($0) addi $10, $0, 0xffffff sw $10, 268513160($0) addi $10, $0, 0xffffff sw $10, 268513164($0) addi $10, $0, 0xffffff sw $10, 268513168($0) addi $10, $0, 0xffffff sw $10, 268513172($0) addi $10, $0, 0xffffff sw $10, 268513176($0) addi $10, $0, 0xffffff sw $10, 268513180($0) addi $10, $0, 0xffffff sw $10, 268513184($0) addi $10, $0, 0xffffff sw $10, 268513188($0) addi $10, $0, 0xffffff sw $10, 268513192($0) addi $10, $0, 0xffffff sw $10, 268513196($0) addi $10, $0, 0xffffff sw $10, 268513200($0) addi $10, $0, 0xffffff sw $10, 268513204($0) addi $10, $0, 0xffffff sw $10, 268513208($0) addi $10, $0, 0xffffff sw $10, 268513212($0) addi $10, $0, 0xffffff sw $10, 268513216($0) addi $10, $0, 0xffffff sw $10, 268513220($0) addi $10, $0, 0xffffff sw $10, 268513224($0) addi $10, $0, 0xffffff sw $10, 268513228($0) addi $10, $0, 0xffffff sw $10, 268513232($0) addi $10, $0, 0xffffff sw $10, 268513236($0) addi $10, $0, 0xffffff sw $10, 268513240($0) addi $10, $0, 0xffffff sw $10, 268513244($0) addi $10, $0, 0xffffff sw $10, 268513248($0) addi $10, $0, 0xffffff sw $10, 268513252($0) addi $10, $0, 0xffffff sw $10, 268513256($0) addi $10, $0, 0xffffff sw $10, 268513260($0) addi $10, $0, 0xffffff sw $10, 268513264($0) addi $10, $0, 0xffffff sw $10, 268513268($0) addi $10, $0, 0xffffff sw $10, 268513272($0) addi $10, $0, 0x00d800 sw $10, 268513276($0) addi $10, $0, 0x00d800 sw $10, 268513280($0) addi $10, $0, 0xffffff sw $10, 268513284($0) addi $10, $0, 0xffffff sw $10, 268513288($0) addi $10, $0, 0xffffff sw $10, 268513292($0) addi $10, $0, 0xffffff sw $10, 268513296($0) addi $10, $0, 0xffffff sw $10, 268513300($0) addi $10, $0, 0xffffff sw $10, 268513304($0) addi $10, $0, 0xffffff sw $10, 268513308($0) addi $10, $0, 0xffffff sw $10, 268513312($0) addi $10, $0, 0xffffff sw $10, 268513316($0) addi $10, $0, 0xffffff sw $10, 268513320($0) addi $10, $0, 0xffffff sw $10, 268513324($0) addi $10, $0, 0xffffff sw $10, 268513328($0) addi $10, $0, 0xffffff sw $10, 268513332($0) addi $10, $0, 0xffffff sw $10, 268513336($0) addi $10, $0, 0xffffff sw $10, 268513340($0) addi $10, $0, 0xffffff sw $10, 268513344($0) addi $10, $0, 0xffffff sw $10, 268513348($0) addi $10, $0, 0xffffff sw $10, 268513352($0) addi $10, $0, 0xffffff sw $10, 268513356($0) addi $10, $0, 0xffffff sw $10, 268513360($0) addi $10, $0, 0xffffff sw $10, 268513364($0) addi $10, $0, 0xffffff sw $10, 268513368($0) addi $10, $0, 0xffffff sw $10, 268513372($0) addi $10, $0, 0xffffff sw $10, 268513376($0) addi $10, $0, 0xffffff sw $10, 268513380($0) addi $10, $0, 0xffffff sw $10, 268513384($0) addi $10, $0, 0xffffff sw $10, 268513388($0) addi $10, $0, 0xffffff sw $10, 268513392($0) addi $10, $0, 0xffffff sw $10, 268513396($0) addi $10, $0, 0xffffff sw $10, 268513400($0) addi $10, $0, 0xffffff sw $10, 268513404($0) addi $10, $0, 0xffffff sw $10, 268513408($0) addi $10, $0, 0xffffff sw $10, 268513412($0) addi $10, $0, 0xffffff sw $10, 268513416($0) addi $10, $0, 0xffffff sw $10, 268513420($0) addi $10, $0, 0xffffff sw $10, 268513424($0) addi $10, $0, 0xffffff sw $10, 268513428($0) addi $10, $0, 0xffffff sw $10, 268513432($0) addi $10, $0, 0xffffff sw $10, 268513436($0) addi $10, $0, 0xffffff sw $10, 268513440($0) addi $10, $0, 0xffffff sw $10, 268513444($0) addi $10, $0, 0xffffff sw $10, 268513448($0) addi $10, $0, 0xffffff sw $10, 268513452($0) addi $10, $0, 0xffffff sw $10, 268513456($0) addi $10, $0, 0xffffff sw $10, 268513460($0) addi $10, $0, 0xffffff sw $10, 268513464($0) addi $10, $0, 0xffffff sw $10, 268513468($0) addi $10, $0, 0xffffff sw $10, 268513472($0) addi $10, $0, 0xffffff sw $10, 268513476($0) addi $10, $0, 0xffffff sw $10, 268513480($0) addi $10, $0, 0xffffff sw $10, 268513484($0) addi $10, $0, 0xffffff sw $10, 268513488($0) addi $10, $0, 0xffffff sw $10, 268513492($0) addi $10, $0, 0xffffff sw $10, 268513496($0) addi $10, $0, 0xffffff sw $10, 268513500($0) addi $10, $0, 0xffffff sw $10, 268513504($0) addi $10, $0, 0xffffff sw $10, 268513508($0) addi $10, $0, 0xffffff sw $10, 268513512($0) addi $10, $0, 0xffffff sw $10, 268513516($0) addi $10, $0, 0xffffff sw $10, 268513520($0) addi $10, $0, 0xffffff sw $10, 268513524($0) addi $10, $0, 0xffffff sw $10, 268513528($0) addi $10, $0, 0x00d800 sw $10, 268513532($0) addi $10, $0, 0x00d800 sw $10, 268513536($0) addi $10, $0, 0xffffff sw $10, 268513540($0) addi $10, $0, 0xffffff sw $10, 268513544($0) addi $10, $0, 0xffffff sw $10, 268513548($0) addi $10, $0, 0xffffff sw $10, 268513552($0) addi $10, $0, 0xffffff sw $10, 268513556($0) addi $10, $0, 0xffffff sw $10, 268513560($0) addi $10, $0, 0xffffff sw $10, 268513564($0) addi $10, $0, 0xffffff sw $10, 268513568($0) addi $10, $0, 0xffffff sw $10, 268513572($0) addi $10, $0, 0xffffff sw $10, 268513576($0) addi $10, $0, 0xffffff sw $10, 268513580($0) addi $10, $0, 0xffffff sw $10, 268513584($0) addi $10, $0, 0xffffff sw $10, 268513588($0) addi $10, $0, 0xffffff sw $10, 268513592($0) addi $10, $0, 0xffffff sw $10, 268513596($0) addi $10, $0, 0xffffff sw $10, 268513600($0) addi $10, $0, 0xffffff sw $10, 268513604($0) addi $10, $0, 0xffffff sw $10, 268513608($0) addi $10, $0, 0xffffff sw $10, 268513612($0) addi $10, $0, 0xffffff sw $10, 268513616($0) addi $10, $0, 0xffffff sw $10, 268513620($0) addi $10, $0, 0xffffff sw $10, 268513624($0) addi $10, $0, 0xffffff sw $10, 268513628($0) addi $10, $0, 0xffffff sw $10, 268513632($0) addi $10, $0, 0xffffff sw $10, 268513636($0) addi $10, $0, 0xffffff sw $10, 268513640($0) addi $10, $0, 0xffffff sw $10, 268513644($0) addi $10, $0, 0xffffff sw $10, 268513648($0) addi $10, $0, 0xffffff sw $10, 268513652($0) addi $10, $0, 0xffffff sw $10, 268513656($0) addi $10, $0, 0xffffff sw $10, 268513660($0) addi $10, $0, 0xffffff sw $10, 268513664($0) addi $10, $0, 0xffffff sw $10, 268513668($0) addi $10, $0, 0xffffff sw $10, 268513672($0) addi $10, $0, 0xffffff sw $10, 268513676($0) addi $10, $0, 0xffffff sw $10, 268513680($0) addi $10, $0, 0xffffff sw $10, 268513684($0) addi $10, $0, 0xffffff sw $10, 268513688($0) addi $10, $0, 0xffffff sw $10, 268513692($0) addi $10, $0, 0xffffff sw $10, 268513696($0) addi $10, $0, 0xffffff sw $10, 268513700($0) addi $10, $0, 0xffffff sw $10, 268513704($0) addi $10, $0, 0xffffff sw $10, 268513708($0) addi $10, $0, 0xffffff sw $10, 268513712($0) addi $10, $0, 0xffffff sw $10, 268513716($0) addi $10, $0, 0xffffff sw $10, 268513720($0) addi $10, $0, 0xffffff sw $10, 268513724($0) addi $10, $0, 0xffffff sw $10, 268513728($0) addi $10, $0, 0xffffff sw $10, 268513732($0) addi $10, $0, 0xffffff sw $10, 268513736($0) addi $10, $0, 0xffffff sw $10, 268513740($0) addi $10, $0, 0xffffff sw $10, 268513744($0) addi $10, $0, 0xffffff sw $10, 268513748($0) addi $10, $0, 0xffffff sw $10, 268513752($0) addi $10, $0, 0xffffff sw $10, 268513756($0) addi $10, $0, 0xffffff sw $10, 268513760($0) addi $10, $0, 0xffffff sw $10, 268513764($0) addi $10, $0, 0xffffff sw $10, 268513768($0) addi $10, $0, 0xffffff sw $10, 268513772($0) addi $10, $0, 0xffffff sw $10, 268513776($0) addi $10, $0, 0xffffff sw $10, 268513780($0) addi $10, $0, 0xffffff sw $10, 268513784($0) addi $10, $0, 0x00d800 sw $10, 268513788($0) addi $10, $0, 0x00d800 sw $10, 268513792($0) addi $10, $0, 0xffffff sw $10, 268513796($0) addi $10, $0, 0xffffff sw $10, 268513800($0) addi $10, $0, 0xffffff sw $10, 268513804($0) addi $10, $0, 0xffffff sw $10, 268513808($0) addi $10, $0, 0xffffff sw $10, 268513812($0) addi $10, $0, 0xffffff sw $10, 268513816($0) addi $10, $0, 0xffffff sw $10, 268513820($0) addi $10, $0, 0xffffff sw $10, 268513824($0) addi $10, $0, 0xffffff sw $10, 268513828($0) addi $10, $0, 0xffffff sw $10, 268513832($0) addi $10, $0, 0xffffff sw $10, 268513836($0) addi $10, $0, 0xffffff sw $10, 268513840($0) addi $10, $0, 0xffffff sw $10, 268513844($0) addi $10, $0, 0xffffff sw $10, 268513848($0) addi $10, $0, 0xffffff sw $10, 268513852($0) addi $10, $0, 0xffffff sw $10, 268513856($0) addi $10, $0, 0xffffff sw $10, 268513860($0) addi $10, $0, 0xffffff sw $10, 268513864($0) addi $10, $0, 0xffffff sw $10, 268513868($0) addi $10, $0, 0xffffff sw $10, 268513872($0) addi $10, $0, 0xffffff sw $10, 268513876($0) addi $10, $0, 0xffffff sw $10, 268513880($0) addi $10, $0, 0xffffff sw $10, 268513884($0) addi $10, $0, 0xffffff sw $10, 268513888($0) addi $10, $0, 0xffffff sw $10, 268513892($0) addi $10, $0, 0xffffff sw $10, 268513896($0) addi $10, $0, 0xffffff sw $10, 268513900($0) addi $10, $0, 0xffffff sw $10, 268513904($0) addi $10, $0, 0xffffff sw $10, 268513908($0) addi $10, $0, 0xffffff sw $10, 268513912($0) addi $10, $0, 0xffffff sw $10, 268513916($0) addi $10, $0, 0xffffff sw $10, 268513920($0) addi $10, $0, 0xffffff sw $10, 268513924($0) addi $10, $0, 0xffffff sw $10, 268513928($0) addi $10, $0, 0xffffff sw $10, 268513932($0) addi $10, $0, 0xffffff sw $10, 268513936($0) addi $10, $0, 0xffffff sw $10, 268513940($0) addi $10, $0, 0xffffff sw $10, 268513944($0) addi $10, $0, 0xffffff sw $10, 268513948($0) addi $10, $0, 0xffffff sw $10, 268513952($0) addi $10, $0, 0xffffff sw $10, 268513956($0) addi $10, $0, 0xffffff sw $10, 268513960($0) addi $10, $0, 0xffffff sw $10, 268513964($0) addi $10, $0, 0xffffff sw $10, 268513968($0) addi $10, $0, 0xffffff sw $10, 268513972($0) addi $10, $0, 0xffffff sw $10, 268513976($0) addi $10, $0, 0xffffff sw $10, 268513980($0) addi $10, $0, 0xffffff sw $10, 268513984($0) addi $10, $0, 0xffffff sw $10, 268513988($0) addi $10, $0, 0xffffff sw $10, 268513992($0) addi $10, $0, 0xffffff sw $10, 268513996($0) addi $10, $0, 0xffffff sw $10, 268514000($0) addi $10, $0, 0xffffff sw $10, 268514004($0) addi $10, $0, 0xffffff sw $10, 268514008($0) addi $10, $0, 0xffffff sw $10, 268514012($0) addi $10, $0, 0xffffff sw $10, 268514016($0) addi $10, $0, 0xffffff sw $10, 268514020($0) addi $10, $0, 0xffffff sw $10, 268514024($0) addi $10, $0, 0xffffff sw $10, 268514028($0) addi $10, $0, 0xffffff sw $10, 268514032($0) addi $10, $0, 0xffffff sw $10, 268514036($0) addi $10, $0, 0xffffff sw $10, 268514040($0) addi $10, $0, 0x00d800 sw $10, 268514044($0) addi $10, $0, 0x00d800 sw $10, 268514048($0) addi $10, $0, 0xffffff sw $10, 268514052($0) addi $10, $0, 0xffffff sw $10, 268514056($0) addi $10, $0, 0xffffff sw $10, 268514060($0) addi $10, $0, 0xffffff sw $10, 268514064($0) addi $10, $0, 0xffffff sw $10, 268514068($0) addi $10, $0, 0xffffff sw $10, 268514072($0) addi $10, $0, 0xffffff sw $10, 268514076($0) addi $10, $0, 0xffffff sw $10, 268514080($0) addi $10, $0, 0xffffff sw $10, 268514084($0) addi $10, $0, 0xffffff sw $10, 268514088($0) addi $10, $0, 0xffffff sw $10, 268514092($0) addi $10, $0, 0xffffff sw $10, 268514096($0) addi $10, $0, 0xffffff sw $10, 268514100($0) addi $10, $0, 0xffffff sw $10, 268514104($0) addi $10, $0, 0xffffff sw $10, 268514108($0) addi $10, $0, 0xffffff sw $10, 268514112($0) addi $10, $0, 0xffffff sw $10, 268514116($0) addi $10, $0, 0xffffff sw $10, 268514120($0) addi $10, $0, 0xffffff sw $10, 268514124($0) addi $10, $0, 0xffffff sw $10, 268514128($0) addi $10, $0, 0x404040 sw $10, 268514132($0) addi $10, $0, 0x000000 sw $10, 268514136($0) addi $10, $0, 0x000000 sw $10, 268514140($0) addi $10, $0, 0x101010 sw $10, 268514144($0) addi $10, $0, 0xffffff sw $10, 268514148($0) addi $10, $0, 0xffffff sw $10, 268514152($0) addi $10, $0, 0xffffff sw $10, 268514156($0) addi $10, $0, 0xffffff sw $10, 268514160($0) addi $10, $0, 0xffffff sw $10, 268514164($0) addi $10, $0, 0xffffff sw $10, 268514168($0) addi $10, $0, 0x000000 sw $10, 268514172($0) addi $10, $0, 0x000000 sw $10, 268514176($0) addi $10, $0, 0x686868 sw $10, 268514180($0) addi $10, $0, 0xffffff sw $10, 268514184($0) addi $10, $0, 0xffffff sw $10, 268514188($0) addi $10, $0, 0xffffff sw $10, 268514192($0) addi $10, $0, 0xffffff sw $10, 268514196($0) addi $10, $0, 0xffffff sw $10, 268514200($0) addi $10, $0, 0xa0a0a0 sw $10, 268514204($0) addi $10, $0, 0x000000 sw $10, 268514208($0) addi $10, $0, 0x000000 sw $10, 268514212($0) addi $10, $0, 0xdbdbdb sw $10, 268514216($0) addi $10, $0, 0xffffff sw $10, 268514220($0) addi $10, $0, 0xffffff sw $10, 268514224($0) addi $10, $0, 0xffffff sw $10, 268514228($0) addi $10, $0, 0xffffff sw $10, 268514232($0) addi $10, $0, 0xffffff sw $10, 268514236($0) addi $10, $0, 0xffffff sw $10, 268514240($0) addi $10, $0, 0xffffff sw $10, 268514244($0) addi $10, $0, 0xffffff sw $10, 268514248($0) addi $10, $0, 0xffffff sw $10, 268514252($0) addi $10, $0, 0xffffff sw $10, 268514256($0) addi $10, $0, 0xffffff sw $10, 268514260($0) addi $10, $0, 0xffffff sw $10, 268514264($0) addi $10, $0, 0xffffff sw $10, 268514268($0) addi $10, $0, 0xffffff sw $10, 268514272($0) addi $10, $0, 0xffffff sw $10, 268514276($0) addi $10, $0, 0xffffff sw $10, 268514280($0) addi $10, $0, 0xffffff sw $10, 268514284($0) addi $10, $0, 0xffffff sw $10, 268514288($0) addi $10, $0, 0xffffff sw $10, 268514292($0) addi $10, $0, 0xffffff sw $10, 268514296($0) addi $10, $0, 0x00d800 sw $10, 268514300($0) addi $10, $0, 0x00d800 sw $10, 268514304($0) addi $10, $0, 0xffffff sw $10, 268514308($0) addi $10, $0, 0xffffff sw $10, 268514312($0) addi $10, $0, 0xffffff sw $10, 268514316($0) addi $10, $0, 0xffffff sw $10, 268514320($0) addi $10, $0, 0xffffff sw $10, 268514324($0) addi $10, $0, 0xffffff sw $10, 268514328($0) addi $10, $0, 0xffffff sw $10, 268514332($0) addi $10, $0, 0xffffff sw $10, 268514336($0) addi $10, $0, 0xffffff sw $10, 268514340($0) addi $10, $0, 0xffffff sw $10, 268514344($0) addi $10, $0, 0xffffff sw $10, 268514348($0) addi $10, $0, 0xffffff sw $10, 268514352($0) addi $10, $0, 0xffffff sw $10, 268514356($0) addi $10, $0, 0xffffff sw $10, 268514360($0) addi $10, $0, 0xffffff sw $10, 268514364($0) addi $10, $0, 0xffffff sw $10, 268514368($0) addi $10, $0, 0xffffff sw $10, 268514372($0) addi $10, $0, 0xffffff sw $10, 268514376($0) addi $10, $0, 0xffffff sw $10, 268514380($0) addi $10, $0, 0xffffff sw $10, 268514384($0) addi $10, $0, 0x404040 sw $10, 268514388($0) addi $10, $0, 0x000000 sw $10, 268514392($0) addi $10, $0, 0xffffff sw $10, 268514396($0) addi $10, $0, 0x000000 sw $10, 268514400($0) addi $10, $0, 0x000000 sw $10, 268514404($0) addi $10, $0, 0xffffff sw $10, 268514408($0) addi $10, $0, 0xffffff sw $10, 268514412($0) addi $10, $0, 0xffffff sw $10, 268514416($0) addi $10, $0, 0xffffff sw $10, 268514420($0) addi $10, $0, 0x000000 sw $10, 268514424($0) addi $10, $0, 0x181818 sw $10, 268514428($0) addi $10, $0, 0xffffff sw $10, 268514432($0) addi $10, $0, 0x000000 sw $10, 268514436($0) addi $10, $0, 0x000000 sw $10, 268514440($0) addi $10, $0, 0xffffff sw $10, 268514444($0) addi $10, $0, 0xffffff sw $10, 268514448($0) addi $10, $0, 0xffffff sw $10, 268514452($0) addi $10, $0, 0x000000 sw $10, 268514456($0) addi $10, $0, 0x000000 sw $10, 268514460($0) addi $10, $0, 0xffffff sw $10, 268514464($0) addi $10, $0, 0xffffff sw $10, 268514468($0) addi $10, $0, 0xebebeb sw $10, 268514472($0) addi $10, $0, 0xffffff sw $10, 268514476($0) addi $10, $0, 0xffffff sw $10, 268514480($0) addi $10, $0, 0xffffff sw $10, 268514484($0) addi $10, $0, 0xffffff sw $10, 268514488($0) addi $10, $0, 0xffffff sw $10, 268514492($0) addi $10, $0, 0xffffff sw $10, 268514496($0) addi $10, $0, 0xffffff sw $10, 268514500($0) addi $10, $0, 0xffffff sw $10, 268514504($0) addi $10, $0, 0xffffff sw $10, 268514508($0) addi $10, $0, 0xffffff sw $10, 268514512($0) addi $10, $0, 0xffffff sw $10, 268514516($0) addi $10, $0, 0xffffff sw $10, 268514520($0) addi $10, $0, 0xffffff sw $10, 268514524($0) addi $10, $0, 0xffffff sw $10, 268514528($0) addi $10, $0, 0xffffff sw $10, 268514532($0) addi $10, $0, 0xffffff sw $10, 268514536($0) addi $10, $0, 0xffffff sw $10, 268514540($0) addi $10, $0, 0xffffff sw $10, 268514544($0) addi $10, $0, 0xffffff sw $10, 268514548($0) addi $10, $0, 0xffffff sw $10, 268514552($0) addi $10, $0, 0x00d800 sw $10, 268514556($0) addi $10, $0, 0x00d800 sw $10, 268514560($0) addi $10, $0, 0xffffff sw $10, 268514564($0) addi $10, $0, 0xffffff sw $10, 268514568($0) addi $10, $0, 0xffffff sw $10, 268514572($0) addi $10, $0, 0xffffff sw $10, 268514576($0) addi $10, $0, 0xffffff sw $10, 268514580($0) addi $10, $0, 0xffffff sw $10, 268514584($0) addi $10, $0, 0xffffff sw $10, 268514588($0) addi $10, $0, 0xffffff sw $10, 268514592($0) addi $10, $0, 0xffffff sw $10, 268514596($0) addi $10, $0, 0xffffff sw $10, 268514600($0) addi $10, $0, 0xffffff sw $10, 268514604($0) addi $10, $0, 0xffffff sw $10, 268514608($0) addi $10, $0, 0xffffff sw $10, 268514612($0) addi $10, $0, 0xffffff sw $10, 268514616($0) addi $10, $0, 0xffffff sw $10, 268514620($0) addi $10, $0, 0xffffff sw $10, 268514624($0) addi $10, $0, 0xffffff sw $10, 268514628($0) addi $10, $0, 0xffffff sw $10, 268514632($0) addi $10, $0, 0xffffff sw $10, 268514636($0) addi $10, $0, 0xffffff sw $10, 268514640($0) addi $10, $0, 0x404040 sw $10, 268514644($0) addi $10, $0, 0x000000 sw $10, 268514648($0) addi $10, $0, 0xffffff sw $10, 268514652($0) addi $10, $0, 0xffffff sw $10, 268514656($0) addi $10, $0, 0x000000 sw $10, 268514660($0) addi $10, $0, 0xd3d3d3 sw $10, 268514664($0) addi $10, $0, 0xffffff sw $10, 268514668($0) addi $10, $0, 0xffffff sw $10, 268514672($0) addi $10, $0, 0x000000 sw $10, 268514676($0) addi $10, $0, 0x000000 sw $10, 268514680($0) addi $10, $0, 0xffffff sw $10, 268514684($0) addi $10, $0, 0xffffff sw $10, 268514688($0) addi $10, $0, 0xffffff sw $10, 268514692($0) addi $10, $0, 0x000000 sw $10, 268514696($0) addi $10, $0, 0xffffff sw $10, 268514700($0) addi $10, $0, 0xffffff sw $10, 268514704($0) addi $10, $0, 0xffffff sw $10, 268514708($0) addi $10, $0, 0x000000 sw $10, 268514712($0) addi $10, $0, 0xffffff sw $10, 268514716($0) addi $10, $0, 0xffffff sw $10, 268514720($0) addi $10, $0, 0xffffff sw $10, 268514724($0) addi $10, $0, 0xffffff sw $10, 268514728($0) addi $10, $0, 0xffffff sw $10, 268514732($0) addi $10, $0, 0xffffff sw $10, 268514736($0) addi $10, $0, 0xffffff sw $10, 268514740($0) addi $10, $0, 0xffffff sw $10, 268514744($0) addi $10, $0, 0xffffff sw $10, 268514748($0) addi $10, $0, 0xffffff sw $10, 268514752($0) addi $10, $0, 0xffffff sw $10, 268514756($0) addi $10, $0, 0xffffff sw $10, 268514760($0) addi $10, $0, 0xffffff sw $10, 268514764($0) addi $10, $0, 0xffffff sw $10, 268514768($0) addi $10, $0, 0xffffff sw $10, 268514772($0) addi $10, $0, 0xffffff sw $10, 268514776($0) addi $10, $0, 0xffffff sw $10, 268514780($0) addi $10, $0, 0xffffff sw $10, 268514784($0) addi $10, $0, 0xffffff sw $10, 268514788($0) addi $10, $0, 0xffffff sw $10, 268514792($0) addi $10, $0, 0xffffff sw $10, 268514796($0) addi $10, $0, 0xffffff sw $10, 268514800($0) addi $10, $0, 0xffffff sw $10, 268514804($0) addi $10, $0, 0xffffff sw $10, 268514808($0) addi $10, $0, 0x00d800 sw $10, 268514812($0) addi $10, $0, 0x00d800 sw $10, 268514816($0) addi $10, $0, 0xffffff sw $10, 268514820($0) addi $10, $0, 0xffffff sw $10, 268514824($0) addi $10, $0, 0xffffff sw $10, 268514828($0) addi $10, $0, 0xffffff sw $10, 268514832($0) addi $10, $0, 0xffffff sw $10, 268514836($0) addi $10, $0, 0xffffff sw $10, 268514840($0) addi $10, $0, 0xffffff sw $10, 268514844($0) addi $10, $0, 0xffffff sw $10, 268514848($0) addi $10, $0, 0xffffff sw $10, 268514852($0) addi $10, $0, 0xffffff sw $10, 268514856($0) addi $10, $0, 0xffffff sw $10, 268514860($0) addi $10, $0, 0xffffff sw $10, 268514864($0) addi $10, $0, 0xffffff sw $10, 268514868($0) addi $10, $0, 0xffffff sw $10, 268514872($0) addi $10, $0, 0xffffff sw $10, 268514876($0) addi $10, $0, 0xffffff sw $10, 268514880($0) addi $10, $0, 0xffffff sw $10, 268514884($0) addi $10, $0, 0xffffff sw $10, 268514888($0) addi $10, $0, 0xffffff sw $10, 268514892($0) addi $10, $0, 0xffffff sw $10, 268514896($0) addi $10, $0, 0x404040 sw $10, 268514900($0) addi $10, $0, 0x000000 sw $10, 268514904($0) addi $10, $0, 0xffffff sw $10, 268514908($0) addi $10, $0, 0xffffff sw $10, 268514912($0) addi $10, $0, 0x000000 sw $10, 268514916($0) addi $10, $0, 0x606060 sw $10, 268514920($0) addi $10, $0, 0xffffff sw $10, 268514924($0) addi $10, $0, 0xffffff sw $10, 268514928($0) addi $10, $0, 0x000000 sw $10, 268514932($0) addi $10, $0, 0x000000 sw $10, 268514936($0) addi $10, $0, 0xffffff sw $10, 268514940($0) addi $10, $0, 0xffffff sw $10, 268514944($0) addi $10, $0, 0xffffff sw $10, 268514948($0) addi $10, $0, 0x000000 sw $10, 268514952($0) addi $10, $0, 0xffffff sw $10, 268514956($0) addi $10, $0, 0xffffff sw $10, 268514960($0) addi $10, $0, 0xffffff sw $10, 268514964($0) addi $10, $0, 0x000000 sw $10, 268514968($0) addi $10, $0, 0xffffff sw $10, 268514972($0) addi $10, $0, 0xffffff sw $10, 268514976($0) addi $10, $0, 0xbfbfbf sw $10, 268514980($0) addi $10, $0, 0x000000 sw $10, 268514984($0) addi $10, $0, 0xffffff sw $10, 268514988($0) addi $10, $0, 0xffffff sw $10, 268514992($0) addi $10, $0, 0xffffff sw $10, 268514996($0) addi $10, $0, 0xffffff sw $10, 268515000($0) addi $10, $0, 0xffffff sw $10, 268515004($0) addi $10, $0, 0xffffff sw $10, 268515008($0) addi $10, $0, 0xffffff sw $10, 268515012($0) addi $10, $0, 0xffffff sw $10, 268515016($0) addi $10, $0, 0xffffff sw $10, 268515020($0) addi $10, $0, 0xffffff sw $10, 268515024($0) addi $10, $0, 0xffffff sw $10, 268515028($0) addi $10, $0, 0xffffff sw $10, 268515032($0) addi $10, $0, 0xffffff sw $10, 268515036($0) addi $10, $0, 0xffffff sw $10, 268515040($0) addi $10, $0, 0xffffff sw $10, 268515044($0) addi $10, $0, 0xffffff sw $10, 268515048($0) addi $10, $0, 0xffffff sw $10, 268515052($0) addi $10, $0, 0xffffff sw $10, 268515056($0) addi $10, $0, 0xffffff sw $10, 268515060($0) addi $10, $0, 0xffffff sw $10, 268515064($0) addi $10, $0, 0x00d800 sw $10, 268515068($0) addi $10, $0, 0x00d800 sw $10, 268515072($0) addi $10, $0, 0xffffff sw $10, 268515076($0) addi $10, $0, 0xffffff sw $10, 268515080($0) addi $10, $0, 0xffffff sw $10, 268515084($0) addi $10, $0, 0xffffff sw $10, 268515088($0) addi $10, $0, 0xffffff sw $10, 268515092($0) addi $10, $0, 0xffffff sw $10, 268515096($0) addi $10, $0, 0xffffff sw $10, 268515100($0) addi $10, $0, 0xffffff sw $10, 268515104($0) addi $10, $0, 0xffffff sw $10, 268515108($0) addi $10, $0, 0xffffff sw $10, 268515112($0) addi $10, $0, 0xffffff sw $10, 268515116($0) addi $10, $0, 0xffffff sw $10, 268515120($0) addi $10, $0, 0xffffff sw $10, 268515124($0) addi $10, $0, 0xffffff sw $10, 268515128($0) addi $10, $0, 0xffffff sw $10, 268515132($0) addi $10, $0, 0xffffff sw $10, 268515136($0) addi $10, $0, 0xffffff sw $10, 268515140($0) addi $10, $0, 0xffffff sw $10, 268515144($0) addi $10, $0, 0xffffff sw $10, 268515148($0) addi $10, $0, 0xffffff sw $10, 268515152($0) addi $10, $0, 0x404040 sw $10, 268515156($0) addi $10, $0, 0x000000 sw $10, 268515160($0) addi $10, $0, 0xffffff sw $10, 268515164($0) addi $10, $0, 0xffffff sw $10, 268515168($0) addi $10, $0, 0x000000 sw $10, 268515172($0) addi $10, $0, 0xffffff sw $10, 268515176($0) addi $10, $0, 0xffffff sw $10, 268515180($0) addi $10, $0, 0xffffff sw $10, 268515184($0) addi $10, $0, 0xebebeb sw $10, 268515188($0) addi $10, $0, 0x000000 sw $10, 268515192($0) addi $10, $0, 0xffffff sw $10, 268515196($0) addi $10, $0, 0xffffff sw $10, 268515200($0) addi $10, $0, 0x101010 sw $10, 268515204($0) addi $10, $0, 0x000000 sw $10, 268515208($0) addi $10, $0, 0xffffff sw $10, 268515212($0) addi $10, $0, 0xffffff sw $10, 268515216($0) addi $10, $0, 0xffffff sw $10, 268515220($0) addi $10, $0, 0x000000 sw $10, 268515224($0) addi $10, $0, 0x000000 sw $10, 268515228($0) addi $10, $0, 0xffffff sw $10, 268515232($0) addi $10, $0, 0xbfbfbf sw $10, 268515236($0) addi $10, $0, 0x000000 sw $10, 268515240($0) addi $10, $0, 0xffffff sw $10, 268515244($0) addi $10, $0, 0xffffff sw $10, 268515248($0) addi $10, $0, 0xffffff sw $10, 268515252($0) addi $10, $0, 0xffffff sw $10, 268515256($0) addi $10, $0, 0xffffff sw $10, 268515260($0) addi $10, $0, 0xffffff sw $10, 268515264($0) addi $10, $0, 0xffffff sw $10, 268515268($0) addi $10, $0, 0xffffff sw $10, 268515272($0) addi $10, $0, 0xffffff sw $10, 268515276($0) addi $10, $0, 0xffffff sw $10, 268515280($0) addi $10, $0, 0xffffff sw $10, 268515284($0) addi $10, $0, 0xffffff sw $10, 268515288($0) addi $10, $0, 0xffffff sw $10, 268515292($0) addi $10, $0, 0xffffff sw $10, 268515296($0) addi $10, $0, 0xffffff sw $10, 268515300($0) addi $10, $0, 0xffffff sw $10, 268515304($0) addi $10, $0, 0xffffff sw $10, 268515308($0) addi $10, $0, 0xffffff sw $10, 268515312($0) addi $10, $0, 0xffffff sw $10, 268515316($0) addi $10, $0, 0xffffff sw $10, 268515320($0) addi $10, $0, 0x00d800 sw $10, 268515324($0) addi $10, $0, 0x00d800 sw $10, 268515328($0) addi $10, $0, 0xffffff sw $10, 268515332($0) addi $10, $0, 0xffffff sw $10, 268515336($0) addi $10, $0, 0xffffff sw $10, 268515340($0) addi $10, $0, 0xffffff sw $10, 268515344($0) addi $10, $0, 0xffffff sw $10, 268515348($0) addi $10, $0, 0xffffff sw $10, 268515352($0) addi $10, $0, 0xffffff sw $10, 268515356($0) addi $10, $0, 0xffffff sw $10, 268515360($0) addi $10, $0, 0xffffff sw $10, 268515364($0) addi $10, $0, 0xffffff sw $10, 268515368($0) addi $10, $0, 0xffffff sw $10, 268515372($0) addi $10, $0, 0xffffff sw $10, 268515376($0) addi $10, $0, 0xffffff sw $10, 268515380($0) addi $10, $0, 0xffffff sw $10, 268515384($0) addi $10, $0, 0xffffff sw $10, 268515388($0) addi $10, $0, 0xffffff sw $10, 268515392($0) addi $10, $0, 0xffffff sw $10, 268515396($0) addi $10, $0, 0xffffff sw $10, 268515400($0) addi $10, $0, 0xffffff sw $10, 268515404($0) addi $10, $0, 0xffffff sw $10, 268515408($0) addi $10, $0, 0x404040 sw $10, 268515412($0) addi $10, $0, 0x000000 sw $10, 268515416($0) addi $10, $0, 0x000000 sw $10, 268515420($0) addi $10, $0, 0x000000 sw $10, 268515424($0) addi $10, $0, 0x0c0c0c sw $10, 268515428($0) addi $10, $0, 0xffffff sw $10, 268515432($0) addi $10, $0, 0xffffff sw $10, 268515436($0) addi $10, $0, 0xffffff sw $10, 268515440($0) addi $10, $0, 0xffffff sw $10, 268515444($0) addi $10, $0, 0x000000 sw $10, 268515448($0) addi $10, $0, 0x000000 sw $10, 268515452($0) addi $10, $0, 0x000000 sw $10, 268515456($0) addi $10, $0, 0x000000 sw $10, 268515460($0) addi $10, $0, 0xffffff sw $10, 268515464($0) addi $10, $0, 0xffffff sw $10, 268515468($0) addi $10, $0, 0xffffff sw $10, 268515472($0) addi $10, $0, 0xffffff sw $10, 268515476($0) addi $10, $0, 0xffffff sw $10, 268515480($0) addi $10, $0, 0x000000 sw $10, 268515484($0) addi $10, $0, 0x000000 sw $10, 268515488($0) addi $10, $0, 0x000000 sw $10, 268515492($0) addi $10, $0, 0x000000 sw $10, 268515496($0) addi $10, $0, 0xffffff sw $10, 268515500($0) addi $10, $0, 0xffffff sw $10, 268515504($0) addi $10, $0, 0xffffff sw $10, 268515508($0) addi $10, $0, 0xffffff sw $10, 268515512($0) addi $10, $0, 0xffffff sw $10, 268515516($0) addi $10, $0, 0xffffff sw $10, 268515520($0) addi $10, $0, 0xffffff sw $10, 268515524($0) addi $10, $0, 0xffffff sw $10, 268515528($0) addi $10, $0, 0xffffff sw $10, 268515532($0) addi $10, $0, 0xffffff sw $10, 268515536($0) addi $10, $0, 0xffffff sw $10, 268515540($0) addi $10, $0, 0xffffff sw $10, 268515544($0) addi $10, $0, 0xffffff sw $10, 268515548($0) addi $10, $0, 0xffffff sw $10, 268515552($0) addi $10, $0, 0xffffff sw $10, 268515556($0) addi $10, $0, 0xffffff sw $10, 268515560($0) addi $10, $0, 0xffffff sw $10, 268515564($0) addi $10, $0, 0xffffff sw $10, 268515568($0) addi $10, $0, 0xffffff sw $10, 268515572($0) addi $10, $0, 0xffffff sw $10, 268515576($0) addi $10, $0, 0x00d800 sw $10, 268515580($0) addi $10, $0, 0x00d800 sw $10, 268515584($0) addi $10, $0, 0xffffff sw $10, 268515588($0) addi $10, $0, 0xffffff sw $10, 268515592($0) addi $10, $0, 0xffffff sw $10, 268515596($0) addi $10, $0, 0xffffff sw $10, 268515600($0) addi $10, $0, 0xffffff sw $10, 268515604($0) addi $10, $0, 0xffffff sw $10, 268515608($0) addi $10, $0, 0xffffff sw $10, 268515612($0) addi $10, $0, 0xffffff sw $10, 268515616($0) addi $10, $0, 0xffffff sw $10, 268515620($0) addi $10, $0, 0xffffff sw $10, 268515624($0) addi $10, $0, 0xffffff sw $10, 268515628($0) addi $10, $0, 0xffffff sw $10, 268515632($0) addi $10, $0, 0xffffff sw $10, 268515636($0) addi $10, $0, 0xffffff sw $10, 268515640($0) addi $10, $0, 0xffffff sw $10, 268515644($0) addi $10, $0, 0xffffff sw $10, 268515648($0) addi $10, $0, 0xffffff sw $10, 268515652($0) addi $10, $0, 0xffffff sw $10, 268515656($0) addi $10, $0, 0xffffff sw $10, 268515660($0) addi $10, $0, 0xffffff sw $10, 268515664($0) addi $10, $0, 0xffffff sw $10, 268515668($0) addi $10, $0, 0xffffff sw $10, 268515672($0) addi $10, $0, 0xffffff sw $10, 268515676($0) addi $10, $0, 0xffffff sw $10, 268515680($0) addi $10, $0, 0xffffff sw $10, 268515684($0) addi $10, $0, 0xffffff sw $10, 268515688($0) addi $10, $0, 0xffffff sw $10, 268515692($0) addi $10, $0, 0xffffff sw $10, 268515696($0) addi $10, $0, 0xffffff sw $10, 268515700($0) addi $10, $0, 0xffffff sw $10, 268515704($0) addi $10, $0, 0xffffff sw $10, 268515708($0) addi $10, $0, 0xffffff sw $10, 268515712($0) addi $10, $0, 0xffffff sw $10, 268515716($0) addi $10, $0, 0xffffff sw $10, 268515720($0) addi $10, $0, 0xffffff sw $10, 268515724($0) addi $10, $0, 0xffffff sw $10, 268515728($0) addi $10, $0, 0xffffff sw $10, 268515732($0) addi $10, $0, 0xffffff sw $10, 268515736($0) addi $10, $0, 0xffffff sw $10, 268515740($0) addi $10, $0, 0xffffff sw $10, 268515744($0) addi $10, $0, 0xffffff sw $10, 268515748($0) addi $10, $0, 0xffffff sw $10, 268515752($0) addi $10, $0, 0xffffff sw $10, 268515756($0) addi $10, $0, 0xffffff sw $10, 268515760($0) addi $10, $0, 0xffffff sw $10, 268515764($0) addi $10, $0, 0xffffff sw $10, 268515768($0) addi $10, $0, 0xffffff sw $10, 268515772($0) addi $10, $0, 0xffffff sw $10, 268515776($0) addi $10, $0, 0xffffff sw $10, 268515780($0) addi $10, $0, 0xffffff sw $10, 268515784($0) addi $10, $0, 0xffffff sw $10, 268515788($0) addi $10, $0, 0xffffff sw $10, 268515792($0) addi $10, $0, 0xffffff sw $10, 268515796($0) addi $10, $0, 0xffffff sw $10, 268515800($0) addi $10, $0, 0xffffff sw $10, 268515804($0) addi $10, $0, 0xffffff sw $10, 268515808($0) addi $10, $0, 0xffffff sw $10, 268515812($0) addi $10, $0, 0xffffff sw $10, 268515816($0) addi $10, $0, 0xffffff sw $10, 268515820($0) addi $10, $0, 0xffffff sw $10, 268515824($0) addi $10, $0, 0xffffff sw $10, 268515828($0) addi $10, $0, 0xffffff sw $10, 268515832($0) addi $10, $0, 0x00d800 sw $10, 268515836($0) addi $10, $0, 0x00d800 sw $10, 268515840($0) addi $10, $0, 0xffffff sw $10, 268515844($0) addi $10, $0, 0xffffff sw $10, 268515848($0) addi $10, $0, 0xffffff sw $10, 268515852($0) addi $10, $0, 0xffffff sw $10, 268515856($0) addi $10, $0, 0xffffff sw $10, 268515860($0) addi $10, $0, 0xffffff sw $10, 268515864($0) addi $10, $0, 0xffffff sw $10, 268515868($0) addi $10, $0, 0xffffff sw $10, 268515872($0) addi $10, $0, 0xffffff sw $10, 268515876($0) addi $10, $0, 0xffffff sw $10, 268515880($0) addi $10, $0, 0xffffff sw $10, 268515884($0) addi $10, $0, 0xffffff sw $10, 268515888($0) addi $10, $0, 0xffffff sw $10, 268515892($0) addi $10, $0, 0xffffff sw $10, 268515896($0) addi $10, $0, 0xffffff sw $10, 268515900($0) addi $10, $0, 0xffffff sw $10, 268515904($0) addi $10, $0, 0xffffff sw $10, 268515908($0) addi $10, $0, 0xffffff sw $10, 268515912($0) addi $10, $0, 0xffffff sw $10, 268515916($0) addi $10, $0, 0xffffff sw $10, 268515920($0) addi $10, $0, 0xffffff sw $10, 268515924($0) addi $10, $0, 0x000000 sw $10, 268515928($0) addi $10, $0, 0x000000 sw $10, 268515932($0) addi $10, $0, 0x000000 sw $10, 268515936($0) addi $10, $0, 0x000000 sw $10, 268515940($0) addi $10, $0, 0x000000 sw $10, 268515944($0) addi $10, $0, 0x000000 sw $10, 268515948($0) addi $10, $0, 0xffffff sw $10, 268515952($0) addi $10, $0, 0x000000 sw $10, 268515956($0) addi $10, $0, 0x000000 sw $10, 268515960($0) addi $10, $0, 0x000000 sw $10, 268515964($0) addi $10, $0, 0x000000 sw $10, 268515968($0) addi $10, $0, 0x000000 sw $10, 268515972($0) addi $10, $0, 0x000000 sw $10, 268515976($0) addi $10, $0, 0xffffff sw $10, 268515980($0) addi $10, $0, 0xffffff sw $10, 268515984($0) addi $10, $0, 0x000000 sw $10, 268515988($0) addi $10, $0, 0x000000 sw $10, 268515992($0) addi $10, $0, 0x000000 sw $10, 268515996($0) addi $10, $0, 0x000000 sw $10, 268516000($0) addi $10, $0, 0x000000 sw $10, 268516004($0) addi $10, $0, 0x000000 sw $10, 268516008($0) addi $10, $0, 0xffffff sw $10, 268516012($0) addi $10, $0, 0xffffff sw $10, 268516016($0) addi $10, $0, 0xffffff sw $10, 268516020($0) addi $10, $0, 0xffffff sw $10, 268516024($0) addi $10, $0, 0xffffff sw $10, 268516028($0) addi $10, $0, 0xffffff sw $10, 268516032($0) addi $10, $0, 0xffffff sw $10, 268516036($0) addi $10, $0, 0xffffff sw $10, 268516040($0) addi $10, $0, 0xffffff sw $10, 268516044($0) addi $10, $0, 0xffffff sw $10, 268516048($0) addi $10, $0, 0xffffff sw $10, 268516052($0) addi $10, $0, 0xffffff sw $10, 268516056($0) addi $10, $0, 0xffffff sw $10, 268516060($0) addi $10, $0, 0xffffff sw $10, 268516064($0) addi $10, $0, 0xffffff sw $10, 268516068($0) addi $10, $0, 0xffffff sw $10, 268516072($0) addi $10, $0, 0xffffff sw $10, 268516076($0) addi $10, $0, 0xffffff sw $10, 268516080($0) addi $10, $0, 0xffffff sw $10, 268516084($0) addi $10, $0, 0xffffff sw $10, 268516088($0) addi $10, $0, 0x00d800 sw $10, 268516092($0) addi $10, $0, 0x00d800 sw $10, 268516096($0) addi $10, $0, 0xffffff sw $10, 268516100($0) addi $10, $0, 0xffffff sw $10, 268516104($0) addi $10, $0, 0xffffff sw $10, 268516108($0) addi $10, $0, 0xffffff sw $10, 268516112($0) addi $10, $0, 0xffffff sw $10, 268516116($0) addi $10, $0, 0xffffff sw $10, 268516120($0) addi $10, $0, 0xffffff sw $10, 268516124($0) addi $10, $0, 0xffffff sw $10, 268516128($0) addi $10, $0, 0xffffff sw $10, 268516132($0) addi $10, $0, 0xffffff sw $10, 268516136($0) addi $10, $0, 0xffffff sw $10, 268516140($0) addi $10, $0, 0xffffff sw $10, 268516144($0) addi $10, $0, 0xffffff sw $10, 268516148($0) addi $10, $0, 0xffffff sw $10, 268516152($0) addi $10, $0, 0xffffff sw $10, 268516156($0) addi $10, $0, 0xffffff sw $10, 268516160($0) addi $10, $0, 0xffffff sw $10, 268516164($0) addi $10, $0, 0xffffff sw $10, 268516168($0) addi $10, $0, 0xffffff sw $10, 268516172($0) addi $10, $0, 0xffffff sw $10, 268516176($0) addi $10, $0, 0xffffff sw $10, 268516180($0) addi $10, $0, 0xffffff sw $10, 268516184($0) addi $10, $0, 0xffffff sw $10, 268516188($0) addi $10, $0, 0xffffff sw $10, 268516192($0) addi $10, $0, 0xffffff sw $10, 268516196($0) addi $10, $0, 0xffffff sw $10, 268516200($0) addi $10, $0, 0xffffff sw $10, 268516204($0) addi $10, $0, 0xffffff sw $10, 268516208($0) addi $10, $0, 0xffffff sw $10, 268516212($0) addi $10, $0, 0xffffff sw $10, 268516216($0) addi $10, $0, 0xffffff sw $10, 268516220($0) addi $10, $0, 0xffffff sw $10, 268516224($0) addi $10, $0, 0xffffff sw $10, 268516228($0) addi $10, $0, 0xffffff sw $10, 268516232($0) addi $10, $0, 0xffffff sw $10, 268516236($0) addi $10, $0, 0xffffff sw $10, 268516240($0) addi $10, $0, 0xffffff sw $10, 268516244($0) addi $10, $0, 0xffffff sw $10, 268516248($0) addi $10, $0, 0xffffff sw $10, 268516252($0) addi $10, $0, 0xffffff sw $10, 268516256($0) addi $10, $0, 0xffffff sw $10, 268516260($0) addi $10, $0, 0xffffff sw $10, 268516264($0) addi $10, $0, 0xffffff sw $10, 268516268($0) addi $10, $0, 0xffffff sw $10, 268516272($0) addi $10, $0, 0xffffff sw $10, 268516276($0) addi $10, $0, 0xffffff sw $10, 268516280($0) addi $10, $0, 0xffffff sw $10, 268516284($0) addi $10, $0, 0xffffff sw $10, 268516288($0) addi $10, $0, 0xffffff sw $10, 268516292($0) addi $10, $0, 0xffffff sw $10, 268516296($0) addi $10, $0, 0xffffff sw $10, 268516300($0) addi $10, $0, 0xffffff sw $10, 268516304($0) addi $10, $0, 0xffffff sw $10, 268516308($0) addi $10, $0, 0xffffff sw $10, 268516312($0) addi $10, $0, 0xffffff sw $10, 268516316($0) addi $10, $0, 0xffffff sw $10, 268516320($0) addi $10, $0, 0xffffff sw $10, 268516324($0) addi $10, $0, 0xffffff sw $10, 268516328($0) addi $10, $0, 0xffffff sw $10, 268516332($0) addi $10, $0, 0xffffff sw $10, 268516336($0) addi $10, $0, 0xffffff sw $10, 268516340($0) addi $10, $0, 0xffffff sw $10, 268516344($0) addi $10, $0, 0x00d800 sw $10, 268516348($0) addi $10, $0, 0x00d800 sw $10, 268516352($0) addi $10, $0, 0xffffff sw $10, 268516356($0) addi $10, $0, 0xffffff sw $10, 268516360($0) addi $10, $0, 0xffffff sw $10, 268516364($0) addi $10, $0, 0xffffff sw $10, 268516368($0) addi $10, $0, 0xffffff sw $10, 268516372($0) addi $10, $0, 0xffffff sw $10, 268516376($0) addi $10, $0, 0xffffff sw $10, 268516380($0) addi $10, $0, 0xffffff sw $10, 268516384($0) addi $10, $0, 0xffffff sw $10, 268516388($0) addi $10, $0, 0xffffff sw $10, 268516392($0) addi $10, $0, 0xffffff sw $10, 268516396($0) addi $10, $0, 0xffffff sw $10, 268516400($0) addi $10, $0, 0xffffff sw $10, 268516404($0) addi $10, $0, 0xffffff sw $10, 268516408($0) addi $10, $0, 0xffffff sw $10, 268516412($0) addi $10, $0, 0xffffff sw $10, 268516416($0) addi $10, $0, 0xffffff sw $10, 268516420($0) addi $10, $0, 0xffffff sw $10, 268516424($0) addi $10, $0, 0xffffff sw $10, 268516428($0) addi $10, $0, 0xffffff sw $10, 268516432($0) addi $10, $0, 0xffffff sw $10, 268516436($0) addi $10, $0, 0xffffff sw $10, 268516440($0) addi $10, $0, 0xffffff sw $10, 268516444($0) addi $10, $0, 0xffffff sw $10, 268516448($0) addi $10, $0, 0xffffff sw $10, 268516452($0) addi $10, $0, 0xffffff sw $10, 268516456($0) addi $10, $0, 0xffffff sw $10, 268516460($0) addi $10, $0, 0xffffff sw $10, 268516464($0) addi $10, $0, 0xffffff sw $10, 268516468($0) addi $10, $0, 0xffffff sw $10, 268516472($0) addi $10, $0, 0xffffff sw $10, 268516476($0) addi $10, $0, 0xffffff sw $10, 268516480($0) addi $10, $0, 0xffffff sw $10, 268516484($0) addi $10, $0, 0xffffff sw $10, 268516488($0) addi $10, $0, 0xffffff sw $10, 268516492($0) addi $10, $0, 0xffffff sw $10, 268516496($0) addi $10, $0, 0xffffff sw $10, 268516500($0) addi $10, $0, 0xffffff sw $10, 268516504($0) addi $10, $0, 0xffffff sw $10, 268516508($0) addi $10, $0, 0xffffff sw $10, 268516512($0) addi $10, $0, 0xffffff sw $10, 268516516($0) addi $10, $0, 0xffffff sw $10, 268516520($0) addi $10, $0, 0xffffff sw $10, 268516524($0) addi $10, $0, 0xffffff sw $10, 268516528($0) addi $10, $0, 0xffffff sw $10, 268516532($0) addi $10, $0, 0xffffff sw $10, 268516536($0) addi $10, $0, 0xffffff sw $10, 268516540($0) addi $10, $0, 0xffffff sw $10, 268516544($0) addi $10, $0, 0xffffff sw $10, 268516548($0) addi $10, $0, 0xffffff sw $10, 268516552($0) addi $10, $0, 0xffffff sw $10, 268516556($0) addi $10, $0, 0xffffff sw $10, 268516560($0) addi $10, $0, 0xffffff sw $10, 268516564($0) addi $10, $0, 0xffffff sw $10, 268516568($0) addi $10, $0, 0xffffff sw $10, 268516572($0) addi $10, $0, 0xffffff sw $10, 268516576($0) addi $10, $0, 0xffffff sw $10, 268516580($0) addi $10, $0, 0xffffff sw $10, 268516584($0) addi $10, $0, 0xffffff sw $10, 268516588($0) addi $10, $0, 0xffffff sw $10, 268516592($0) addi $10, $0, 0xffffff sw $10, 268516596($0) addi $10, $0, 0xffffff sw $10, 268516600($0) addi $10, $0, 0x00d800 sw $10, 268516604($0) addi $10, $0, 0x00d800 sw $10, 268516608($0) addi $10, $0, 0xffffff sw $10, 268516612($0) addi $10, $0, 0xffffff sw $10, 268516616($0) addi $10, $0, 0xffffff sw $10, 268516620($0) addi $10, $0, 0xffffff sw $10, 268516624($0) addi $10, $0, 0xffffff sw $10, 268516628($0) addi $10, $0, 0xffffff sw $10, 268516632($0) addi $10, $0, 0xffffff sw $10, 268516636($0) addi $10, $0, 0xffffff sw $10, 268516640($0) addi $10, $0, 0xffffff sw $10, 268516644($0) addi $10, $0, 0xffffff sw $10, 268516648($0) addi $10, $0, 0xffffff sw $10, 268516652($0) addi $10, $0, 0xffffff sw $10, 268516656($0) addi $10, $0, 0xffffff sw $10, 268516660($0) addi $10, $0, 0xffffff sw $10, 268516664($0) addi $10, $0, 0xffffff sw $10, 268516668($0) addi $10, $0, 0xffffff sw $10, 268516672($0) addi $10, $0, 0xffffff sw $10, 268516676($0) addi $10, $0, 0xffffff sw $10, 268516680($0) addi $10, $0, 0xffffff sw $10, 268516684($0) addi $10, $0, 0xffffff sw $10, 268516688($0) addi $10, $0, 0xffffff sw $10, 268516692($0) addi $10, $0, 0xffffff sw $10, 268516696($0) addi $10, $0, 0xffffff sw $10, 268516700($0) addi $10, $0, 0xffffff sw $10, 268516704($0) addi $10, $0, 0xffffff sw $10, 268516708($0) addi $10, $0, 0xffffff sw $10, 268516712($0) addi $10, $0, 0xffffff sw $10, 268516716($0) addi $10, $0, 0xffffff sw $10, 268516720($0) addi $10, $0, 0xffffff sw $10, 268516724($0) addi $10, $0, 0xffffff sw $10, 268516728($0) addi $10, $0, 0xffffff sw $10, 268516732($0) addi $10, $0, 0xffffff sw $10, 268516736($0) addi $10, $0, 0xffffff sw $10, 268516740($0) addi $10, $0, 0xffffff sw $10, 268516744($0) addi $10, $0, 0xffffff sw $10, 268516748($0) addi $10, $0, 0xffffff sw $10, 268516752($0) addi $10, $0, 0xffffff sw $10, 268516756($0) addi $10, $0, 0xffffff sw $10, 268516760($0) addi $10, $0, 0xffffff sw $10, 268516764($0) addi $10, $0, 0xffffff sw $10, 268516768($0) addi $10, $0, 0xffffff sw $10, 268516772($0) addi $10, $0, 0xffffff sw $10, 268516776($0) addi $10, $0, 0xffffff sw $10, 268516780($0) addi $10, $0, 0xffffff sw $10, 268516784($0) addi $10, $0, 0xffffff sw $10, 268516788($0) addi $10, $0, 0xffffff sw $10, 268516792($0) addi $10, $0, 0xffffff sw $10, 268516796($0) addi $10, $0, 0xffffff sw $10, 268516800($0) addi $10, $0, 0xffffff sw $10, 268516804($0) addi $10, $0, 0xffffff sw $10, 268516808($0) addi $10, $0, 0xffffff sw $10, 268516812($0) addi $10, $0, 0xffffff sw $10, 268516816($0) addi $10, $0, 0xffffff sw $10, 268516820($0) addi $10, $0, 0xffffff sw $10, 268516824($0) addi $10, $0, 0xffffff sw $10, 268516828($0) addi $10, $0, 0xffffff sw $10, 268516832($0) addi $10, $0, 0xffffff sw $10, 268516836($0) addi $10, $0, 0xffffff sw $10, 268516840($0) addi $10, $0, 0xffffff sw $10, 268516844($0) addi $10, $0, 0xffffff sw $10, 268516848($0) addi $10, $0, 0xffffff sw $10, 268516852($0) addi $10, $0, 0xffffff sw $10, 268516856($0) addi $10, $0, 0x00d800 sw $10, 268516860($0) addi $10, $0, 0x00d800 sw $10, 268516864($0) addi $10, $0, 0xffffff sw $10, 268516868($0) addi $10, $0, 0xffffff sw $10, 268516872($0) addi $10, $0, 0xffffff sw $10, 268516876($0) addi $10, $0, 0xffffff sw $10, 268516880($0) addi $10, $0, 0xffffff sw $10, 268516884($0) addi $10, $0, 0xffffff sw $10, 268516888($0) addi $10, $0, 0xffffff sw $10, 268516892($0) addi $10, $0, 0xffffff sw $10, 268516896($0) addi $10, $0, 0xffffff sw $10, 268516900($0) addi $10, $0, 0xffffff sw $10, 268516904($0) addi $10, $0, 0xffffff sw $10, 268516908($0) addi $10, $0, 0xffffff sw $10, 268516912($0) addi $10, $0, 0xffffff sw $10, 268516916($0) addi $10, $0, 0xffffff sw $10, 268516920($0) addi $10, $0, 0xffffff sw $10, 268516924($0) addi $10, $0, 0xffffff sw $10, 268516928($0) addi $10, $0, 0xffffff sw $10, 268516932($0) addi $10, $0, 0xffffff sw $10, 268516936($0) addi $10, $0, 0xffffff sw $10, 268516940($0) addi $10, $0, 0xffffff sw $10, 268516944($0) addi $10, $0, 0xffffff sw $10, 268516948($0) addi $10, $0, 0xffffff sw $10, 268516952($0) addi $10, $0, 0xffffff sw $10, 268516956($0) addi $10, $0, 0xffffff sw $10, 268516960($0) addi $10, $0, 0xffffff sw $10, 268516964($0) addi $10, $0, 0xffffff sw $10, 268516968($0) addi $10, $0, 0xffffff sw $10, 268516972($0) addi $10, $0, 0xffffff sw $10, 268516976($0) addi $10, $0, 0xffffff sw $10, 268516980($0) addi $10, $0, 0xffffff sw $10, 268516984($0) addi $10, $0, 0xffffff sw $10, 268516988($0) addi $10, $0, 0xffffff sw $10, 268516992($0) addi $10, $0, 0xffffff sw $10, 268516996($0) addi $10, $0, 0xffffff sw $10, 268517000($0) addi $10, $0, 0xffffff sw $10, 268517004($0) addi $10, $0, 0xffffff sw $10, 268517008($0) addi $10, $0, 0xffffff sw $10, 268517012($0) addi $10, $0, 0xffffff sw $10, 268517016($0) addi $10, $0, 0xffffff sw $10, 268517020($0) addi $10, $0, 0xffffff sw $10, 268517024($0) addi $10, $0, 0xffffff sw $10, 268517028($0) addi $10, $0, 0xffffff sw $10, 268517032($0) addi $10, $0, 0xffffff sw $10, 268517036($0) addi $10, $0, 0xffffff sw $10, 268517040($0) addi $10, $0, 0xffffff sw $10, 268517044($0) addi $10, $0, 0xffffff sw $10, 268517048($0) addi $10, $0, 0xffffff sw $10, 268517052($0) addi $10, $0, 0xffffff sw $10, 268517056($0) addi $10, $0, 0xffffff sw $10, 268517060($0) addi $10, $0, 0xffffff sw $10, 268517064($0) addi $10, $0, 0xffffff sw $10, 268517068($0) addi $10, $0, 0xffffff sw $10, 268517072($0) addi $10, $0, 0xffffff sw $10, 268517076($0) addi $10, $0, 0xffffff sw $10, 268517080($0) addi $10, $0, 0xffffff sw $10, 268517084($0) addi $10, $0, 0xffffff sw $10, 268517088($0) addi $10, $0, 0xffffff sw $10, 268517092($0) addi $10, $0, 0xffffff sw $10, 268517096($0) addi $10, $0, 0xffffff sw $10, 268517100($0) addi $10, $0, 0xffffff sw $10, 268517104($0) addi $10, $0, 0xffffff sw $10, 268517108($0) addi $10, $0, 0xffffff sw $10, 268517112($0) addi $10, $0, 0x00d800 sw $10, 268517116($0) addi $10, $0, 0x00d800 sw $10, 268517120($0) addi $10, $0, 0x00d800 sw $10, 268517124($0) addi $10, $0, 0x00d800 sw $10, 268517128($0) addi $10, $0, 0x00d800 sw $10, 268517132($0) addi $10, $0, 0x00d800 sw $10, 268517136($0) addi $10, $0, 0x00d800 sw $10, 268517140($0) addi $10, $0, 0x00d800 sw $10, 268517144($0) addi $10, $0, 0x00d800 sw $10, 268517148($0) addi $10, $0, 0x00d800 sw $10, 268517152($0) addi $10, $0, 0x00d800 sw $10, 268517156($0) addi $10, $0, 0x00d800 sw $10, 268517160($0) addi $10, $0, 0x00d800 sw $10, 268517164($0) addi $10, $0, 0x00d800 sw $10, 268517168($0) addi $10, $0, 0x00d800 sw $10, 268517172($0) addi $10, $0, 0x00d800 sw $10, 268517176($0) addi $10, $0, 0x00d800 sw $10, 268517180($0) addi $10, $0, 0x00d800 sw $10, 268517184($0) addi $10, $0, 0x00d800 sw $10, 268517188($0) addi $10, $0, 0x00d800 sw $10, 268517192($0) addi $10, $0, 0x00d800 sw $10, 268517196($0) addi $10, $0, 0x00d800 sw $10, 268517200($0) addi $10, $0, 0x00d800 sw $10, 268517204($0) addi $10, $0, 0x00d800 sw $10, 268517208($0) addi $10, $0, 0x00d800 sw $10, 268517212($0) addi $10, $0, 0x00d800 sw $10, 268517216($0) addi $10, $0, 0x00d800 sw $10, 268517220($0) addi $10, $0, 0x00d800 sw $10, 268517224($0) addi $10, $0, 0x00d800 sw $10, 268517228($0) addi $10, $0, 0x00d800 sw $10, 268517232($0) addi $10, $0, 0x00d800 sw $10, 268517236($0) addi $10, $0, 0x00d800 sw $10, 268517240($0) addi $10, $0, 0x00d800 sw $10, 268517244($0) addi $10, $0, 0x00d800 sw $10, 268517248($0) addi $10, $0, 0x00d800 sw $10, 268517252($0) addi $10, $0, 0x00d800 sw $10, 268517256($0) addi $10, $0, 0x00d800 sw $10, 268517260($0) addi $10, $0, 0x00d800 sw $10, 268517264($0) addi $10, $0, 0x00d800 sw $10, 268517268($0) addi $10, $0, 0x00d800 sw $10, 268517272($0) addi $10, $0, 0x00d800 sw $10, 268517276($0) addi $10, $0, 0x00d800 sw $10, 268517280($0) addi $10, $0, 0x00d800 sw $10, 268517284($0) addi $10, $0, 0x00d800 sw $10, 268517288($0) addi $10, $0, 0x00d800 sw $10, 268517292($0) addi $10, $0, 0x00d800 sw $10, 268517296($0) addi $10, $0, 0x00d800 sw $10, 268517300($0) addi $10, $0, 0x00d800 sw $10, 268517304($0) addi $10, $0, 0x00d800 sw $10, 268517308($0) addi $10, $0, 0x00d800 sw $10, 268517312($0) addi $10, $0, 0x00d800 sw $10, 268517316($0) addi $10, $0, 0x00d800 sw $10, 268517320($0) addi $10, $0, 0x00d800 sw $10, 268517324($0) addi $10, $0, 0x00d800 sw $10, 268517328($0) addi $10, $0, 0x00d800 sw $10, 268517332($0) addi $10, $0, 0x00d800 sw $10, 268517336($0) addi $10, $0, 0x00d800 sw $10, 268517340($0) addi $10, $0, 0x00d800 sw $10, 268517344($0) addi $10, $0, 0x00d800 sw $10, 268517348($0) addi $10, $0, 0x00d800 sw $10, 268517352($0) addi $10, $0, 0x00d800 sw $10, 268517356($0) addi $10, $0, 0x00d800 sw $10, 268517360($0) addi $10, $0, 0x00d800 sw $10, 268517364($0) addi $10, $0, 0x00d800 sw $10, 268517368($0) addi $10, $0, 0x00d800 sw $10, 268517372($0) jr $ra
// // Created by yche on 1/17/18. // #include <iostream> #include "random_pair_generator.h" //#include "../playground/pretty_print.h" void generate_sample_pairs(string graph_name, int pair_num, int round_num) { string path = get_edge_list_path(graph_name); GraphYche g(path); // generate pairs random_device rd; mt19937 gen(rd()); uniform_int_distribution<int> distribution(0, g.n - 1); for (auto round_i = 0; round_i < round_num; round_i++) { vector<pair<int, int>> sample_pairs; for (auto i = 0; i < pair_num; i++) { auto u = distribution(gen); auto v = distribution(gen); sample_pairs.emplace_back(u, v); } #ifdef DEBUG cout << sample_pairs << endl; cout << get_file_path(graph_name, round_i, pair_num) << endl; #endif string ofs_file_path = get_file_path(graph_name, round_i, pair_num); FILE *ofs = fopen(ofs_file_path.c_str(), "wb"); YcheSerializer serializer; serializer.write_vec(ofs, sample_pairs); fclose(ofs); } } vector<pair<int, int>> read_sample_pairs(string graph_name, int pair_num, int round) { vector<pair<int, int>> sample_pairs; string ifs_file_path = get_file_path(graph_name, round, pair_num); FILE *ifs = fopen(ifs_file_path.c_str(), "r"); YcheSerializer serializer; serializer.read_vec(ifs, sample_pairs); fclose(ifs); return sample_pairs; };
copyright zengfr site:http://github.com/zengfr/romhack 001590 lea ($20,A0), A0 00195A clr.b ($c0,A1) [enemy+16] 00195E clr.b ($c2,A1) [enemy+C0] 004100 rts [enemy+C0] 0122AC move.l (A2)+, (A3)+ [enemy+BC, enemy+BE] 0122AE move.l (A2)+, (A3)+ [enemy+C0, enemy+C2] 01A75E dbra D4, $1a75c 025544 move.w ($6,PC,D0.w), D1 [enemy+C0] 0255A2 adda.w (A4,D0.w), A4 [enemy+C0] 0268EC move.w ($6,PC,D0.w), D1 [enemy+C0] 026A78 adda.w (A4,D0.w), A4 [enemy+C0] 026BC0 move.b ($c0,A0), D0 [enemy+2B] 026BC4 movea.l #$82a08, A4 [enemy+C0] 029346 move.w ($6,PC,D0.w), D1 [enemy+C0] 0293A2 adda.w (A4,D0.w), A4 [enemy+C0] 02944A move.b ($c0,A0), D0 [enemy+2B] 02944E movea.l #$8714c, A4 [enemy+C0] 029472 move.b ($c0,A0), D0 [enemy+2B] 029476 movea.l #$8714c, A4 [enemy+C0] 02A714 move.w ($6,PC,D0.w), D1 [enemy+C0] 02A770 adda.w (A4,D0.w), A4 [enemy+C0] 02B934 move.w ($6,PC,D0.w), D1 [enemy+C0] 02B990 adda.w (A4,D0.w), A4 [enemy+C0] 0329C6 bne $3294a [enemy+C0] 032AFA move.w ($6,PC,D0.w), D1 [enemy+C0] 032B66 adda.w (A4,D0.w), A4 032C3A move.b ($c0,A0), D0 [enemy+64, enemy+66] 032C3E movea.l #$85e66, A4 [enemy+C0] 032ED0 move.b #$e, ($c0,A0) [enemy+2B] 032ED6 movea.l #$8611e, A4 [enemy+C0] 036800 bne $3677e [enemy+C0] 03690A move.w ($6,PC,D0.w), D1 [enemy+C0] 03696C adda.w (A4,D0.w), A4 0369CA rts [enemy+2B] 0369D6 subq.b #1, ($a7,A0) [enemy+C0] 0369EE move.b ($c0,A0), D0 [enemy+7A] 0369F2 add.w D0, D0 [enemy+C0] 036A0A adda.w (A4,D0.w), A4 [enemy+C0] 046A06 move.w ($6,PC,D0.w), D1 [enemy+C0] 046B02 adda.w (A4,D0.w), A4 [enemy+C0] 046B6E adda.w (A4,D0.w), A4 [enemy+C0] copyright zengfr site:http://github.com/zengfr/romhack
INCLUDE "config_private.inc" SECTION code_esxdos PUBLIC __esx_exx_mmu67_bc IF __ZXNEXT __esx_exx_mmu67_bc: ; enter : c = new mmu6 page ; b = new mmu7 page ; ; exit : c = old mmu6 page ; b = old mmu7 page ; ; mmu6 and mmu7 set to new page numbers ; ; uses : af, bc push hl ld l,c ld h,b ld bc,__IO_NEXTREG_REG ld a,__REG_MMU6 out (c),a inc b in a,(c) out (c),l ld l,a dec b ld a,__REG_MMU7 out (c),a inc b in a,(c) out (c),h ld b,a ld c,l pop hl ret ELSE EXTERN l_ret defc __esx_exx_mmu67_bc = l_ret ENDIF
// Juan Manuel Young Hoyos @256 D=A @SP M=D @300 D=A @LCL M=D @400 D=A @ARG M=D @3000 D=A @THIS M=D @3010 D=A @THAT M=D @10 D=A @SP A=M M=D @SP M=M+1 @0 D=A @LCL D=D+M @13 M=D @SP A=M-1 D=M @13 A=M M=D @SP M=M-1 @21 D=A @SP A=M M=D @SP M=M+1 @22 D=A @SP A=M M=D @SP M=M+1 @2 D=A @ARG D=D+M @13 M=D @SP A=M-1 D=M @13 A=M M=D @SP M=M-1 @1 D=A @ARG D=D+M @13 M=D @SP A=M-1 D=M @13 A=M M=D @SP M=M-1 @36 D=A @SP A=M M=D @SP M=M+1 @6 D=A @THIS D=D+M @13 M=D @SP A=M-1 D=M @13 A=M M=D @SP M=M-1 @42 D=A @SP A=M M=D @SP M=M+1 @45 D=A @SP A=M M=D @SP M=M+1 @5 D=A @THAT D=D+M @13 M=D @SP A=M-1 D=M @13 A=M M=D @SP M=M-1 @2 D=A @THAT D=D+M @13 M=D @SP A=M-1 D=M @13 A=M M=D @SP M=M-1 @510 D=A @SP A=M M=D @SP M=M+1 @6 D=A @5 D=D+A @13 M=D @SP A=M-1 D=M @13 A=M M=D @SP M=M-1 @0 D=A @LCL A=D+M D=M @SP A=M M=D @SP M=M+1 @5 D=A @THAT A=D+M D=M @SP A=M M=D @SP M=M+1 @SP A=M-1 D=M A=A-1 D=D+M M=D @SP M=M-1 @1 D=A @ARG A=D+M D=M @SP A=M M=D @SP M=M+1 @SP A=M-1 D=M A=A-1 D=M-D M=D @SP M=M-1 @6 D=A @THIS A=D+M D=M @SP A=M M=D @SP M=M+1 @6 D=A @THIS A=D+M D=M @SP A=M M=D @SP M=M+1 @SP A=M-1 D=M A=A-1 D=D+M M=D @SP M=M-1 @SP A=M-1 D=M A=A-1 D=M-D M=D @SP M=M-1 @6 D=A @5 A=D+A D=M @SP A=M M=D @SP M=M+1 @SP A=M-1 D=M A=A-1 D=D+M M=D @SP M=M-1
#include "Rect.hpp" #include "Point.hpp" #include "Segment.hpp" #include <Constants.hpp> using namespace std; namespace Geometry2d { //constants used for the rect-segment intersection const int INSIDE = 0x00; // 0000 const int LEFT = 0x01; // 0001 const int RIGHT = 0x02; // 0010 const int BOTTOM = 0x04; // 0100 const int TOP = 0x08; // 1000 Shape* Rect::clone() const { return new Rect(*this); } bool Rect::intersects(const Rect& other) const { return !(other.maxx() < minx() || other.minx() > maxx() || other.maxy() < miny() || other.miny() > maxy()); } int Rect::CohenSutherlandOutCode(const Point& other) const{ int code; double x; double y; x = other.x(); y = other.y(); code = INSIDE; // initialised as being inside of [[clip window]] if (x < minx()) { // to the left of clip window code |= LEFT; } else if (x > maxx()) { // to the right of clip window code |= RIGHT; } if (y < miny()) { // below the clip window code |= BOTTOM; } else if (y > maxy()) { // above the clip window code |= TOP; } return code; } std::tuple<bool, std::vector<Point> > Rect::intersects(const Segment& other) const{ //Code aggressively borrowed from wikipedia entry Cohen-Sutherland Line Clipping Point p0 = other.pt[0]; double x0 = p0.x(); double y0 = p0.y(); Point p1 = other.pt[1]; double x1 = p1.x(); double y1 = p1.y(); int outcode0 = CohenSutherlandOutCode(p0); int outcode1 = CohenSutherlandOutCode(p1); std::vector<Point> intersectionPoints; bool accept = false; while (true) { if ((outcode0 | outcode1) == 0) { // bitwise OR is 0: both points inside window; trivially accept and exit loop accept = true; break; } if ((outcode0 & outcode1) != 0) { // bitwise AND is not 0: both points share an outside zone (LEFT, RIGHT, TOP, // or BOTTOM), so both must be outside window; exit loop (accept is false) break; } // failed both tests, so calculate the line segment to clip // from an outside point to an intersection with clip edge double x; double y; // At least one endpoint is outside the clip rectangle; pick it. int outcodeOut = outcode0 != 0 ? outcode0 : outcode1; // Now find the intersection point; // use formulas: // slope = (y1 - y0) / (x1 - x0) // x = x0 + (1 / slope) * (ym - y0), where ym is ymin or ymax // y = y0 + slope * (xm - x0), where xm is xmin or xmax // No need to worry about divide-by-zero because, in each case, the // outcode bit being tested guarantees the denominator is non-zero if ((outcodeOut & TOP) != 0) { // point is above the clip window x = x0 + (x1 - x0) * (maxy() - y0) / (y1 - y0); y = maxy(); } else if ((outcodeOut & BOTTOM) != 0) { // point is below the clip window x = x0 + (x1 - x0) * (miny() - y0) / (y1 - y0); y = miny(); } else if ((outcodeOut & RIGHT) != 0) { // point is to the right of clip window y = y0 + (y1 - y0) * (maxx() - x0) / (x1 - x0); x = maxx(); } else if ((outcodeOut & LEFT) != 0) { // point is to the left of clip window y = y0 + (y1 - y0) * (minx() - x0) / (x1 - x0); x = minx(); } // Now we move outside point to intersection point to clip // and get ready for next pass. if (outcodeOut == outcode0) { x0 = x; y0 = y; Point pt = Point(x0, y0); outcode0 = CohenSutherlandOutCode(pt); // Save point iff it is inside the Rect if (outcode0 == INSIDE) { intersectionPoints.push_back(pt); } } else { x1 = x; y1 = y; Point pt = Point(x1, y1); outcode1 = CohenSutherlandOutCode(pt); // Save point iff it is inside the Rect if (outcode1 == INSIDE) { intersectionPoints.push_back(pt); } } } return std::tuple<bool, std::vector<Point> >(accept,intersectionPoints); } std::vector<Point> Rect::corners(){ std::vector<Point> tmp; tmp.emplace_back(minx(),miny()); tmp.emplace_back(minx(),maxy()); tmp.emplace_back(maxx(),maxy()); tmp.emplace_back(maxx(),miny()); return tmp; } bool Rect::containsRect(const Rect& other) const { // return other.pt[0].inRect(*this) && other.pt[1].inRect(*this); return this->containsPoint(other.pt[0]) && this->containsPoint(other.pt[1]); } bool Rect::containsPoint(Point point) const { return point.x() >= minx() && point.x() <= maxx() && point.y() >= miny() && point.y() <= maxy(); } bool Rect::hit(const Segment& seg) const { return nearSegment(seg, Robot_Radius); } bool Rect::hit(Point point) const { return nearPoint(point, Robot_Radius); } void Rect::expand(Point p) { float _minx = minx(); float _miny = miny(); float _maxx = maxx(); float _maxy = maxy(); pt[0].x() = min(_minx, (float)p.x()); pt[0].y() = min(_miny, (float)p.y()); pt[1].x() = max(_maxx, (float)p.x()); pt[1].y() = max(_maxy, (float)p.y()); } void Rect::expand(const Rect& rect) { expand(rect.pt[0]); expand(rect.pt[1]); } void Rect::pad(float padding){ float _minx = minx(); float _miny = miny(); float _maxx = maxx(); float _maxy = maxy(); pt[0].x() = _minx - padding; pt[0].y() = _miny - padding; pt[1].x() = _maxx + padding; pt[1].y() = _maxy + padding; } bool Rect::nearSegment(const Segment& seg, float threshold) const { Point p1 = seg.pt[0]; Point p2 = seg.pt[1]; // Simpler case if this rect is degenerate if (pt[0] == pt[1]) { // return pt[0].nearSegment(seg, threshold); return seg.nearPoint(pt[0], threshold); } // If either endpoint is inside this rect the the segment intersects it. if (this->containsPoint(p1) || this->containsPoint(p2)) { return true; } // If any corner of this rect is near the segment, // then the segment is near this rect. Point ur = Point(pt[1].x(), pt[0].y()); Point ll = Point(pt[0].x(), pt[1].y()); if (seg.nearPoint(pt[0], threshold) || seg.nearPoint(ur, threshold) || seg.nearPoint(ll, threshold) || seg.nearPoint(pt[1], threshold)) { return true; } Segment edges[4] = {Segment(pt[0], ur), Segment(ur, pt[1]), Segment(pt[0], ll), Segment(ll, pt[1])}; // If either endpoint of the segment is near an edge of the rect, then the // segment is near this rect. for (Segment& edge : edges) { if (edge.nearPoint(p1, threshold) || edge.nearPoint(p2, threshold)) { return true; } } // If any edge of this rect intersects the segment, then the segment is near // this rect. for (Segment& edge : edges) { if (seg.intersects(edge)) { return true; } } return false; } bool Rect::nearPoint(Point other, float threshold) const { // Simpler case if this rect is degenerate if (pt[0] == pt[1]) { return pt[0].distTo(other) <= threshold; } // If the point is inside this rect then it is near it. if (this->containsPoint(other)) { return true; } Point ur = Point(pt[1].x(), pt[0].y()); Point ll = Point(pt[0].x(), pt[1].y()); Segment edges[4] = {Segment(pt[0], ur), Segment(ur, pt[1]), Segment(pt[0], ll), Segment(ll, pt[1])}; // If any edge of this rect is near the point, then the point is near the // rect. for (Segment& edge : edges) { if (edge.nearPoint(other, threshold)) { return true; } } return false; } } // namespace Geometry2d
// ====================================================================== // \title SystemResources.hpp // \author mstarch // \brief cpp file for SystemResources test harness implementation class // // \copyright // Copyright 2009-2015, by the California Institute of Technology. // ALL RIGHTS RESERVED. United States Government Sponsorship // acknowledged. // // ====================================================================== #include "Tester.hpp" #include "version.hpp" #define INSTANCE 0 #define MAX_HISTORY_SIZE 100 namespace Svc { // ---------------------------------------------------------------------- // Construction and destruction // ---------------------------------------------------------------------- Tester ::Tester() : SystemResourcesGTestBase("Tester", MAX_HISTORY_SIZE), component("SystemResources") { this->initComponents(); this->connectPorts(); } Tester ::~Tester() {} // ---------------------------------------------------------------------- // Tests // ---------------------------------------------------------------------- void Tester ::test_tlm(bool enabled) { U32 count = 0; if (Os::SystemResources::getCpuCount(count) == Os::SystemResources::SYSTEM_RESOURCES_OK) { this->invoke_to_run(0, 0); count = (count <= 16) ? count : 16; // All cascades expected switch (count) { case 16: ASSERT_TLM_CPU_15_SIZE((enabled) ? 1 : 0); // Cascade expected case 15: ASSERT_TLM_CPU_14_SIZE((enabled) ? 1 : 0); // Cascade expected case 14: ASSERT_TLM_CPU_13_SIZE((enabled) ? 1 : 0); // Cascade expected case 13: ASSERT_TLM_CPU_12_SIZE((enabled) ? 1 : 0); // Cascade expected case 12: ASSERT_TLM_CPU_11_SIZE((enabled) ? 1 : 0); // Cascade expected case 11: ASSERT_TLM_CPU_10_SIZE((enabled) ? 1 : 0); // Cascade expected case 10: ASSERT_TLM_CPU_09_SIZE((enabled) ? 1 : 0); // Cascade expected case 9: ASSERT_TLM_CPU_08_SIZE((enabled) ? 1 : 0); // Cascade expected case 8: ASSERT_TLM_CPU_07_SIZE((enabled) ? 1 : 0); // Cascade expected case 7: ASSERT_TLM_CPU_06_SIZE((enabled) ? 1 : 0); // Cascade expected case 6: ASSERT_TLM_CPU_05_SIZE((enabled) ? 1 : 0); // Cascade expected case 5: ASSERT_TLM_CPU_04_SIZE((enabled) ? 1 : 0); // Cascade expected case 4: ASSERT_TLM_CPU_03_SIZE((enabled) ? 1 : 0); // Cascade expected case 3: ASSERT_TLM_CPU_02_SIZE((enabled) ? 1 : 0); // Cascade expected case 2: ASSERT_TLM_CPU_01_SIZE((enabled) ? 1 : 0); // Cascade expected case 1: ASSERT_TLM_CPU_00_SIZE((enabled) ? 1 : 0); // Cascade expected default: ASSERT_TLM_CPU_SIZE((enabled) ? 1 : 0); ASSERT_TLM_MEMORY_USED_SIZE((enabled) ? 1 : 0); ASSERT_TLM_MEMORY_TOTAL_SIZE((enabled) ? 1 : 0); ASSERT_TLM_NON_VOLATILE_FREE_SIZE((enabled) ? 1 : 0); ASSERT_TLM_NON_VOLATILE_TOTAL_SIZE((enabled) ? 1 : 0); ASSERT_TLM_VERSION_SIZE((enabled) ? 1 : 0); if (enabled) { ASSERT_TLM_VERSION(0, VERSION); } ASSERT_TLM_SIZE((enabled) ? (count + 6) : 0); // CPU count channels + avg + 2 mem + 2 non-volatile + ver break; } } } void Tester ::test_disable_enable() { this->sendCmd_ENABLE(0, 0, SystemResourceEnabled::DISABLED); this->test_tlm(false); this->sendCmd_ENABLE(0, 0, SystemResourceEnabled::ENABLED); this->test_tlm(true); } void Tester ::test_version_evr() { this->sendCmd_VERSION(0, 0); ASSERT_EVENTS_VERSION_SIZE(1); ASSERT_EVENTS_VERSION(0, VERSION); } // ---------------------------------------------------------------------- // Helper methods // ---------------------------------------------------------------------- void Tester ::connectPorts() { // run this->connect_to_run(0, this->component.get_run_InputPort(0)); // CmdDisp this->connect_to_CmdDisp(0, this->component.get_CmdDisp_InputPort(0)); // CmdStatus this->component.set_CmdStatus_OutputPort(0, this->get_from_CmdStatus(0)); // CmdReg this->component.set_CmdReg_OutputPort(0, this->get_from_CmdReg(0)); // Tlm this->component.set_Tlm_OutputPort(0, this->get_from_Tlm(0)); // Time this->component.set_Time_OutputPort(0, this->get_from_Time(0)); // Log this->component.set_Log_OutputPort(0, this->get_from_Log(0)); // LogText this->component.set_LogText_OutputPort(0, this->get_from_LogText(0)); } void Tester ::initComponents() { this->init(); this->component.init(INSTANCE); } } // end namespace Svc
MODULE console_vars PUBLIC __zx_console_attr SECTION data_clib __zx_console_attr: defb 56 ;Default attribute
// This is a part of the Microsoft Foundation Classes C++ library. // Copyright (C) 1992-1998 Microsoft Corporation // All rights reserved. // // This source code is only intended as a supplement to the // Microsoft Foundation Classes Reference and related // electronic documentation provided with the library. // See these sources for detailed information regarding the // Microsoft Foundation Classes product. ///////////////////////////////////////////////////////////////////////////// // // Implementation of parmeterized Map // ///////////////////////////////////////////////////////////////////////////// #include "stdafx.h" #ifdef AFX_COLL2_SEG #pragma code_seg(AFX_COLL2_SEG) #endif #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif #define new DEBUG_NEW ///////////////////////////////////////////////////////////////////////////// CMapWordToOb::CMapWordToOb(int nBlockSize) { ASSERT(nBlockSize > 0); m_pHashTable = NULL; m_nHashTableSize = 17; // default size m_nCount = 0; m_pFreeList = NULL; m_pBlocks = NULL; m_nBlockSize = nBlockSize; } inline UINT CMapWordToOb::HashKey(WORD key) const { // default identity hash - works for most primitive values return ((UINT)(void*)(DWORD)key) >> 4; } void CMapWordToOb::InitHashTable( UINT nHashSize, BOOL bAllocNow) // // Used to force allocation of a hash table or to override the default // hash table size of (which is fairly small) { ASSERT_VALID(this); ASSERT(m_nCount == 0); ASSERT(nHashSize > 0); if (m_pHashTable != NULL) { // free hash table delete[] m_pHashTable; m_pHashTable = NULL; } if (bAllocNow) { m_pHashTable = new CAssoc* [nHashSize]; memset(m_pHashTable, 0, sizeof(CAssoc*) * nHashSize); } m_nHashTableSize = nHashSize; } void CMapWordToOb::RemoveAll() { ASSERT_VALID(this); if (m_pHashTable != NULL) { // free hash table delete[] m_pHashTable; m_pHashTable = NULL; } m_nCount = 0; m_pFreeList = NULL; m_pBlocks->FreeDataChain(); m_pBlocks = NULL; } CMapWordToOb::~CMapWordToOb() { RemoveAll(); ASSERT(m_nCount == 0); } ///////////////////////////////////////////////////////////////////////////// // Assoc helpers // same as CList implementation except we store CAssoc's not CNode's // and CAssoc's are singly linked all the time CMapWordToOb::CAssoc* CMapWordToOb::NewAssoc() { if (m_pFreeList == NULL) { // add another block CPlex* newBlock = CPlex::Create(m_pBlocks, m_nBlockSize, sizeof(CMapWordToOb::CAssoc)); // chain them into free list CMapWordToOb::CAssoc* pAssoc = (CMapWordToOb::CAssoc*) newBlock->data(); // free in reverse order to make it easier to debug pAssoc += m_nBlockSize - 1; for (int i = m_nBlockSize-1; i >= 0; i--, pAssoc--) { pAssoc->pNext = m_pFreeList; m_pFreeList = pAssoc; } } ASSERT(m_pFreeList != NULL); // we must have something CMapWordToOb::CAssoc* pAssoc = m_pFreeList; m_pFreeList = m_pFreeList->pNext; m_nCount++; ASSERT(m_nCount > 0); // make sure we don't overflow pAssoc->key = 0; pAssoc->value = 0; return pAssoc; } void CMapWordToOb::FreeAssoc(CMapWordToOb::CAssoc* pAssoc) { pAssoc->pNext = m_pFreeList; m_pFreeList = pAssoc; m_nCount--; ASSERT(m_nCount >= 0); // make sure we don't underflow // if no more elements, cleanup completely if (m_nCount == 0) RemoveAll(); } CMapWordToOb::CAssoc* CMapWordToOb::GetAssocAt(WORD key, UINT& nHash) const // find association (or return NULL) { nHash = HashKey(key) % m_nHashTableSize; if (m_pHashTable == NULL) return NULL; // see if it exists CAssoc* pAssoc; for (pAssoc = m_pHashTable[nHash]; pAssoc != NULL; pAssoc = pAssoc->pNext) { if (pAssoc->key == key) return pAssoc; } return NULL; } ///////////////////////////////////////////////////////////////////////////// BOOL CMapWordToOb::Lookup(WORD key, CObject*& rValue) const { ASSERT_VALID(this); UINT nHash; CAssoc* pAssoc = GetAssocAt(key, nHash); if (pAssoc == NULL) return FALSE; // not in map rValue = pAssoc->value; return TRUE; } CObject*& CMapWordToOb::operator[](WORD key) { ASSERT_VALID(this); UINT nHash; CAssoc* pAssoc; if ((pAssoc = GetAssocAt(key, nHash)) == NULL) { if (m_pHashTable == NULL) InitHashTable(m_nHashTableSize); // it doesn't exist, add a new Association pAssoc = NewAssoc(); pAssoc->key = key; // 'pAssoc->value' is a constructed object, nothing more // put into hash table pAssoc->pNext = m_pHashTable[nHash]; m_pHashTable[nHash] = pAssoc; } return pAssoc->value; // return new reference } BOOL CMapWordToOb::RemoveKey(WORD key) // remove key - return TRUE if removed { ASSERT_VALID(this); if (m_pHashTable == NULL) return FALSE; // nothing in the table CAssoc** ppAssocPrev; ppAssocPrev = &m_pHashTable[HashKey(key) % m_nHashTableSize]; CAssoc* pAssoc; for (pAssoc = *ppAssocPrev; pAssoc != NULL; pAssoc = pAssoc->pNext) { if (pAssoc->key == key) { // remove it *ppAssocPrev = pAssoc->pNext; // remove from list FreeAssoc(pAssoc); return TRUE; } ppAssocPrev = &pAssoc->pNext; } return FALSE; // not found } ///////////////////////////////////////////////////////////////////////////// // Iterating void CMapWordToOb::GetNextAssoc(POSITION& rNextPosition, WORD& rKey, CObject*& rValue) const { ASSERT_VALID(this); ASSERT(m_pHashTable != NULL); // never call on empty map CAssoc* pAssocRet = (CAssoc*)rNextPosition; ASSERT(pAssocRet != NULL); if (pAssocRet == (CAssoc*) BEFORE_START_POSITION) { // find the first association for (UINT nBucket = 0; nBucket < m_nHashTableSize; nBucket++) if ((pAssocRet = m_pHashTable[nBucket]) != NULL) break; ASSERT(pAssocRet != NULL); // must find something } // find next association ASSERT(AfxIsValidAddress(pAssocRet, sizeof(CAssoc))); CAssoc* pAssocNext; if ((pAssocNext = pAssocRet->pNext) == NULL) { // go to next bucket for (UINT nBucket = (HashKey(pAssocRet->key) % m_nHashTableSize) + 1; nBucket < m_nHashTableSize; nBucket++) if ((pAssocNext = m_pHashTable[nBucket]) != NULL) break; } rNextPosition = (POSITION) pAssocNext; // fill in return data rKey = pAssocRet->key; rValue = pAssocRet->value; } ///////////////////////////////////////////////////////////////////////////// // Serialization void CMapWordToOb::Serialize(CArchive& ar) { ASSERT_VALID(this); CObject::Serialize(ar); if (ar.IsStoring()) { ar.WriteCount(m_nCount); if (m_nCount == 0) return; // nothing more to do ASSERT(m_pHashTable != NULL); for (UINT nHash = 0; nHash < m_nHashTableSize; nHash++) { CAssoc* pAssoc; for (pAssoc = m_pHashTable[nHash]; pAssoc != NULL; pAssoc = pAssoc->pNext) { ar << pAssoc->key; ar << pAssoc->value; } } } else { DWORD nNewCount = ar.ReadCount(); WORD newKey; CObject* newValue; while (nNewCount--) { ar >> newKey; ar >> newValue; SetAt(newKey, newValue); } } } ///////////////////////////////////////////////////////////////////////////// // Diagnostics #ifdef _DEBUG void CMapWordToOb::Dump(CDumpContext& dc) const { CObject::Dump(dc); dc << "with " << m_nCount << " elements"; if (dc.GetDepth() > 0) { // Dump in format "[key] -> value" WORD key; CObject* val; POSITION pos = GetStartPosition(); while (pos != NULL) { GetNextAssoc(pos, key, val); dc << "\n\t[" << key << "] = " << val; } } dc << "\n"; } void CMapWordToOb::AssertValid() const { CObject::AssertValid(); ASSERT(m_nHashTableSize > 0); ASSERT(m_nCount == 0 || m_pHashTable != NULL); // non-empty map should have hash table } #endif //_DEBUG #ifdef AFX_INIT_SEG #pragma code_seg(AFX_INIT_SEG) #endif IMPLEMENT_SERIAL(CMapWordToOb, CObject, 0) /////////////////////////////////////////////////////////////////////////////
; A087123: a(n) = Fibonacci(n+1) - (-1)^n*Fibonacci(n). ; 1,2,1,5,2,13,5,34,13,89,34,233,89,610,233,1597,610,4181,1597,10946,4181,28657,10946,75025,28657,196418,75025,514229,196418,1346269,514229,3524578,1346269,9227465,3524578,24157817,9227465,63245986,24157817 add $0,1 cal $0,97131 ; F(n)+(-1)^n*F(n-1). mov $1,$0
; Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR> ; This program and the accompanying materials ; are licensed and made available under the terms and conditions of the BSD License ; which accompanies this distribution. The full text of the license may be found at ; http://opensource.org/licenses/bsd-license.php ; ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. ; ; Module Name: ; ; Thunk.asm ; ; Abstract: ; ; Real mode thunk ; ;------------------------------------------------------------------------------ EXTERNDEF m16Start:BYTE EXTERNDEF m16Size:WORD EXTERNDEF mThunk16Attr:WORD EXTERNDEF m16Gdt:WORD EXTERNDEF m16GdtrBase:WORD EXTERNDEF mTransition:WORD THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 EQU 2 THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL EQU 4 IA32_REGS STRUC 4t _EDI DD ? _ESI DD ? _EBP DD ? _ESP DD ? _EBX DD ? _EDX DD ? _ECX DD ? _EAX DD ? _DS DW ? _ES DW ? _FS DW ? _GS DW ? _EFLAGS DQ ? _EIP DD ? _CS DW ? _SS DW ? IA32_REGS ENDS .const m16Size DW InternalAsmThunk16 - m16Start mThunk16Attr DW _ThunkAttr - m16Start m16Gdt DW _NullSeg - m16Start m16GdtrBase DW _16GdtrBase - m16Start mTransition DW _EntryPoint - m16Start .code m16Start LABEL BYTE SavedGdt LABEL FWORD DW ? DQ ? ;------------------------------------------------------------------------------ ; _BackFromUserCode() takes control in real mode after 'retf' has been executed ; by user code. It will be shadowed to somewhere in memory below 1MB. ;------------------------------------------------------------------------------ _BackFromUserCode PROC ; ; The order of saved registers on the stack matches the order they appears ; in IA32_REGS structure. This facilitates wrapper function to extract them ; into that structure. ; ; Some instructions for manipulation of segment registers have to be written ; in opcode since 64-bit MASM prevents accesses to those registers. ; DB 16h ; push ss DB 0eh ; push cs DB 66h call @Base ; push eip @Base: DB 66h push 0 ; reserved high order 32 bits of EFlags pushf ; pushfd actually cli ; disable interrupts push gs push fs DB 6 ; push es DB 1eh ; push ds DB 66h, 60h ; pushad DB 66h, 0bah ; mov edx, imm32 _ThunkAttr DD ? test dl, THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 jz @1 mov eax, 15cd2401h ; mov ax, 2401h & int 15h cli ; disable interrupts jnc @2 @1: test dl, THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL jz @2 in al, 92h or al, 2 out 92h, al ; deactivate A20M# @2: xor ax, ax ; xor eax, eax mov eax, ss ; mov ax, ss lea bp, [esp + sizeof (IA32_REGS)] ; ; rsi in the following 2 instructions is indeed bp in 16-bit code ; mov word ptr (IA32_REGS ptr [rsi - sizeof (IA32_REGS)])._ESP, bp DB 66h mov ebx, (IA32_REGS ptr [rsi - sizeof (IA32_REGS)])._EIP shl ax, 4 ; shl eax, 4 add bp, ax ; add ebp, eax mov ax, cs shl ax, 4 lea ax, [eax + ebx + (@64BitCode - @Base)] DB 66h, 2eh, 89h, 87h ; mov cs:[bx + (@64Eip - @Base)], eax DW @64Eip - @Base DB 66h, 0b8h ; mov eax, imm32 SavedCr4 DD ? mov cr4, rax ; ; rdi in the instruction below is indeed bx in 16-bit code ; DB 66h, 2eh ; 2eh is "cs:" segment override lgdt fword ptr [rdi + (SavedGdt - @Base)] DB 66h mov ecx, 0c0000080h rdmsr or ah, 1 wrmsr DB 66h, 0b8h ; mov eax, imm32 SavedCr0 DD ? mov cr0, rax DB 66h, 0eah ; jmp far cs:@64Bit @64Eip DD ? SavedCs DW ? @64BitCode: db 090h db 067h, 0bch ; mov esp, imm32 SavedSp DD ? ; restore stack nop ret _BackFromUserCode ENDP _EntryPoint DD _ToUserCode - m16Start DW CODE16 _16Gdtr LABEL FWORD DW GDT_SIZE - 1 _16GdtrBase DQ _NullSeg _16Idtr FWORD (1 SHL 10) - 1 ;------------------------------------------------------------------------------ ; _ToUserCode() takes control in real mode before passing control to user code. ; It will be shadowed to somewhere in memory below 1MB. ;------------------------------------------------------------------------------ _ToUserCode PROC mov ss, edx ; set new segment selectors mov ds, edx mov es, edx mov fs, edx mov gs, edx DB 66h mov ecx, 0c0000080h mov cr0, rax ; real mode starts at next instruction rdmsr and ah, NOT 1 wrmsr mov cr4, rbp mov ss, esi ; set up 16-bit stack segment mov sp, bx ; set up 16-bit stack pointer DB 66h ; make the following call 32-bit call @Base ; push eip @Base: pop bp ; ebp <- address of @Base push [esp + sizeof (IA32_REGS) + 2] lea eax, [rsi + (@RealMode - @Base)] ; rsi is "bp" in 16-bit code push rax retf ; execution begins at next instruction @RealMode: DB 66h, 2eh ; CS and operand size override lidt fword ptr [rsi + (_16Idtr - @Base)] DB 66h, 61h ; popad DB 1fh ; pop ds DB 07h ; pop es pop fs pop gs popf ; popfd lea sp, [esp + 4] ; skip high order 32 bits of EFlags DB 66h ; make the following retf 32-bit retf ; transfer control to user code _ToUserCode ENDP CODE16 = _16Code - $ DATA16 = _16Data - $ DATA32 = _32Data - $ _NullSeg DQ 0 _16Code LABEL QWORD DW -1 DW 0 DB 0 DB 9bh DB 8fh ; 16-bit segment, 4GB limit DB 0 _16Data LABEL QWORD DW -1 DW 0 DB 0 DB 93h DB 8fh ; 16-bit segment, 4GB limit DB 0 _32Data LABEL QWORD DW -1 DW 0 DB 0 DB 93h DB 0cfh ; 16-bit segment, 4GB limit DB 0 GDT_SIZE = $ - _NullSeg ;------------------------------------------------------------------------------ ; IA32_REGISTER_SET * ; EFIAPI ; InternalAsmThunk16 ( ; IN IA32_REGISTER_SET *RegisterSet, ; IN OUT VOID *Transition ; ); ;------------------------------------------------------------------------------ InternalAsmThunk16 PROC USES rbp rbx rsi rdi mov rbx, ds push rbx ; Save ds segment register on the stack mov rbx, es push rbx ; Save es segment register on the stack mov rbx, ss push rbx ; Save ss segment register on the stack push fs push gs mov rsi, rcx movzx r8d, (IA32_REGS ptr [rsi])._SS mov edi, (IA32_REGS ptr [rsi])._ESP lea rdi, [edi - (sizeof (IA32_REGS) + 4)] imul eax, r8d, 16 ; eax <- r8d(stack segment) * 16 mov ebx, edi ; ebx <- stack for 16-bit code push sizeof (IA32_REGS) / 4 add edi, eax ; edi <- linear address of 16-bit stack pop rcx rep movsd ; copy RegSet lea ecx, [rdx + (SavedCr4 - m16Start)] mov eax, edx ; eax <- transition code address and edx, 0fh shl eax, 12 ; segment address in high order 16 bits lea ax, [rdx + (_BackFromUserCode - m16Start)] ; offset address stosd ; [edi] <- return address of user code sgdt fword ptr [rcx + (SavedGdt - SavedCr4)] sidt fword ptr [rsp + 50h] ; save IDT stack in argument space mov rax, cr0 mov [rcx + (SavedCr0 - SavedCr4)], eax and eax, 7ffffffeh ; clear PE, PG bits mov rbp, cr4 mov [rcx], ebp ; save CR4 in SavedCr4 and ebp, 300h ; clear all but PCE and OSFXSR bits mov esi, r8d ; esi <- 16-bit stack segment DB 6ah, DATA32 ; push DATA32 pop rdx ; rdx <- 32-bit data segment selector lgdt fword ptr [rcx + (_16Gdtr - SavedCr4)] mov ss, edx pushfq lea edx, [rdx + DATA16 - DATA32] lea r8, @RetFromRealMode push r8 mov r8d, cs mov [rcx + (SavedCs - SavedCr4)], r8w mov [rcx + (SavedSp - SavedCr4)], esp jmp fword ptr [rcx + (_EntryPoint - SavedCr4)] @RetFromRealMode: popfq lidt fword ptr [rsp + 50h] ; restore protected mode IDTR lea eax, [rbp - sizeof (IA32_REGS)] pop gs pop fs pop rbx mov ss, rbx pop rbx mov es, rbx pop rbx mov ds, rbx ret InternalAsmThunk16 ENDP END
#include "joiners/multistep_example_joiner.h" #include "parse_example_external.h" #include "generated/v2/DedupInfo_generated.h" #include "generated/v2/Event_generated.h" #include "generated/v2/Metadata_generated.h" #include "generated/v2/OutcomeEvent_generated.h" #include "io/logger.h" #include "event_processors/typed_events.h" #include "utils.h" #include <limits.h> #include <time.h> #include <map> #include <stack> #include <queue> #include <tuple> // VW headers #include "example.h" #include "io/logger.h" #include "parse_example_json.h" #include "parser.h" #include "v_array.h" multistep_example_joiner::multistep_example_joiner(VW::workspace *vw) : i_joiner(vw->logger) , _vw(vw) , _reward_calculation(&reward::earliest) , _multistep_reward_calculation(&multistep_reward_suffix_mean) {} multistep_example_joiner::~multistep_example_joiner() { // cleanup examples for (auto *ex : _example_pool) { VW::dealloc_examples(ex, 1); } } bool multistep_example_joiner::process_event(const v2::JoinedEvent &joined_event) { auto event = flatbuffers::GetRoot<v2::Event>(joined_event.event()->data()); const v2::Metadata& meta = *event->meta(); auto enqueued_time_utc = get_enqueued_time(joined_event.timestamp(), meta.client_time_utc(), _loop_info.use_client_time, logger); switch (meta.payload_type()) { case v2::PayloadType_MultiStep: { auto interaction = flatbuffers::GetRoot<v2::MultiStepEvent>(event->payload()->data()); _interactions[interaction->event_id()->str()].push_back({enqueued_time_utc, meta, *interaction}); break; } case v2::PayloadType_Outcome: { auto outcome = flatbuffers::GetRoot<v2::OutcomeEvent>(event->payload()->data()); const char* id = outcome->index_type() == v2::IndexValue_literal ? outcome->index_as_literal()->c_str() : nullptr; if (id == nullptr) { _episodic_outcomes.push_back(process_outcome(enqueued_time_utc, meta, *outcome)); } else { _outcomes[std::string(id)].push_back(process_outcome(enqueued_time_utc, meta, *outcome)); } break; } default: break; } return true; } void multistep_example_joiner::set_default_reward(float default_reward, bool sticky) { _loop_info.default_reward.set(default_reward, sticky); } void multistep_example_joiner::set_learning_mode_config( v2::LearningModeType learning_mode, bool sticky) { _loop_info.learning_mode_config.set(learning_mode, sticky); } void multistep_example_joiner::set_problem_type_config(v2::ProblemType problem_type, bool sticky) { _loop_info.problem_type_config.set(problem_type, sticky); } void multistep_example_joiner::set_use_client_time(bool use_client_time, bool sticky) { _loop_info.use_client_time.set(use_client_time, sticky); } bool multistep_example_joiner::joiner_ready() { return _loop_info.is_configured() && _reward_calculation.is_valid(); } void multistep_example_joiner::set_reward_function(const v2::RewardFunctionType type, bool sticky) { reward::RewardFunctionType reward_calculation = nullptr; switch (type) { case v2::RewardFunctionType_Earliest: reward_calculation = &reward::earliest; break; case v2::RewardFunctionType_Average: reward_calculation = &reward::average; break; case v2::RewardFunctionType_Sum: reward_calculation = &reward::sum; break; case v2::RewardFunctionType_Min: reward_calculation = &reward::min; break; case v2::RewardFunctionType_Max: reward_calculation = &reward::max; break; case v2::RewardFunctionType_Median: reward_calculation = &reward::median; break; default: break; } if(reward_calculation) { _reward_calculation.set(reward_calculation, sticky); } } void multistep_example_joiner::set_multistep_reward_function(const multistep_reward_funtion_type type, bool sticky) { MultistepRewardFunctionType result = nullptr; switch (type) { case multistep_reward_funtion_type::SuffixMean: result = &multistep_reward_suffix_mean; break; case multistep_reward_funtion_type::SuffixSum: result = &multistep_reward_suffix_sum; break; case multistep_reward_funtion_type::Identity: result = &multistep_reward_identity; break; default: break; } if(result) { _multistep_reward_calculation.set(result, sticky); } } /* take forest of tuples <id, secondary> as input. Edges are defined using optional previous_id parameter. get return list of ids ordered topologically with respect to <previous_id, id> edges and according to comp_t comparison for vertices that are not connected */ template<typename id_t, typename secondary_t, typename comp_t = std::greater<std::tuple<secondary_t, id_t>>> class topo_sorter { public: using elem_t = std::tuple<secondary_t, id_t>; using layer_t = std::priority_queue<elem_t, std::vector<elem_t>, comp_t>; private: std::map<id_t, layer_t> next; layer_t roots; public: void push(const id_t& id, const secondary_t& secondary) { roots.push(std::make_tuple(secondary, id)); } void push(const id_t& id, const secondary_t& secondary, const id_t& previous_id) { next[previous_id].push(std::make_tuple(secondary, id)); } void get(std::deque<id_t>& result) { std::stack<layer_t*> states; states.emplace(&roots); while (!states.empty()) { auto& top = *(states.top()); if (!top.empty()) { const auto& cur = top.top(); const auto& cur_id = std::get<1>(cur); result.push_back(cur_id); states.push(&next[cur_id]); top.pop(); } else { states.pop(); } } } }; bool multistep_example_joiner::populate_order() { topo_sorter<std::string, TimePoint> sorter; for (const auto& it: _interactions) { const auto& parsed = it.second[0]; if (parsed.event.previous_id() == nullptr) { sorter.push(it.first, parsed.timestamp); } else { sorter.push(it.first, parsed.timestamp, parsed.event.previous_id()->str()); } } sorter.get(_order); _sorted = true; return true; } reward::outcome_event multistep_example_joiner::process_outcome( const TimePoint&, const v2::Metadata &metadata, const v2::OutcomeEvent& event) { reward::outcome_event o_event; o_event.metadata = {metadata.app_id() ? metadata.app_id()->str() : "", metadata.payload_type(), metadata.pass_probability(), metadata.encoding(), metadata.id()->str(), v2::LearningModeType::LearningModeType_Online}; if (event.value_type() == v2::OutcomeValue_literal) { o_event.s_value = event.value_as_literal()->c_str(); } else if (event.value_type() == v2::OutcomeValue_numeric) { o_event.value = event.value_as_numeric()->value(); } o_event.action_taken = event.action_taken(); return o_event; } joined_event::multistep_joined_event multistep_example_joiner::process_interaction( const multistep_example_joiner::Parsed<v2::MultiStepEvent> &event_meta, v_array<example *> &examples) { const auto& metadata = event_meta.meta; const auto& event = event_meta.event; metadata::event_metadata_info meta = { metadata.app_id() ? metadata.app_id()->str() : "", metadata.payload_type(), metadata.pass_probability(), metadata.encoding(), metadata.id()->str(), v2::LearningModeType::LearningModeType_Online}; auto cb_data = VW::make_unique<joined_event::cb_joined_event>(); cb_data->interaction_data.eventId = event.event_id()->str(); cb_data->interaction_data.actions = {event.action_ids()->data(), event.action_ids()->data() + event.action_ids()->size()}; cb_data->interaction_data.probabilities = {event.probabilities()->data(), event.probabilities()->data() + event.probabilities()->size()}; cb_data->interaction_data.probabilityOfDrop = 1.f - metadata.pass_probability(); cb_data->interaction_data.skipLearn = event.deferred_action(); std::string line_vec(reinterpret_cast<char const *>(event.context()->data()), event.context()->size()); if (_vw->audit || _vw->hash_inv) { VW::template read_line_json_s<true>( *_vw, examples, const_cast<char *>(line_vec.c_str()), line_vec.size(), reinterpret_cast<VW::example_factory_t>(VW::new_unused_example), _vw); } else { VW::template read_line_json_s<false>( *_vw, examples, const_cast<char *>(line_vec.c_str()), line_vec.size(), reinterpret_cast<VW::example_factory_t>(VW::new_unused_example), _vw); } return joined_event::multistep_joined_event(std::move(meta), std::move(cb_data)); } bool multistep_example_joiner::process_joined(v_array<example *> &examples) { _current_je_is_skip_learn = false; if (!_sorted) { if (!populate_order()) { return false; } } const auto& id = _order.front(); const float reward = _rewards.front(); const auto& interactions = _interactions[id]; if (interactions.size() != 1) { return false; } const auto& interaction = interactions[0]; auto joined = process_interaction(interaction, examples); const auto outcomes = _outcomes[id]; for (const auto& o: outcomes) { joined.outcome_events.push_back(o); } for (const auto& o: _episodic_outcomes) { joined.outcome_events.push_back(o); } bool clear_examples = false; auto guard = VW::scope_exit([&] { _order.pop_front(); _rewards.pop_front(); if (clear_examples) { VW::return_multiple_example(*_vw, examples); examples.push_back(VW::new_unused_example(*_vw)); } }); if (!joined.is_joined_event_learnable()) { _current_je_is_skip_learn = true; clear_examples = true; return false; } joined.cb_data->reward = reward; joined.fill_in_label(examples, logger); // add an empty example to signal end-of-multiline examples.push_back(VW::new_unused_example(*_vw)); _vw->example_parser->lbl_parser.default_label(examples.back()->l); examples.back()->is_newline = true; return true; } bool multistep_example_joiner::processing_batch() { return _sorted && !_order.empty(); } void multistep_example_joiner::on_new_batch() { _interactions.clear(); _outcomes.clear(); _episodic_outcomes.clear(); _rewards.clear(); _sorted = false; } void multistep_example_joiner::populate_episodic_rewards() { for (const std::string& id: _order) { std::vector<reward::outcome_event> outcomes = _episodic_outcomes; const auto outcomes_per_step = _outcomes[id]; outcomes.insert(outcomes.end(), std::make_move_iterator(outcomes_per_step.begin()), std::make_move_iterator(outcomes_per_step.end())); _rewards.push_back(_reward_calculation.value()(outcomes, _loop_info.default_reward)); } _multistep_reward_calculation.value()(_rewards); } void multistep_example_joiner::on_batch_read() { populate_order(); _sorted = true; populate_episodic_rewards(); } metrics::joiner_metrics multistep_example_joiner::get_metrics() { return _joiner_metrics; } bool multistep_example_joiner::current_event_is_skip_learn() { return _current_je_is_skip_learn; } void multistep_example_joiner::apply_cli_overrides(VW::workspace *all, const input_options &parsed_options) { if(all->options->was_supplied("multistep_reward")) { multistep_reward_funtion_type multistep_reward_func; if(!VW::external::str_to_enum(parsed_options.ext_opts->multistep_reward, multistep_reward_functions, multistep_reward_funtion_type::Identity, multistep_reward_func)) { throw std::runtime_error("Invalid argument to --multistep_reward " + parsed_options.ext_opts->reward_function); } set_multistep_reward_function(multistep_reward_func, true); } }
/* * Copyright 2009-2021 The VOTCA Development Team (http://www.votca.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * 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. * */ #define BOOST_TEST_MAIN #define BOOST_TEST_MODULE beadstructure_test // Standard includes #include <stdexcept> // Third party includes #include <boost/test/unit_test.hpp> // VOTCA includes #include <votca/tools/types.h> // Local VOTCA includes #include "votca/csg/basebead.h" #include "votca/csg/beadstructure.h" // IWYU pragma: keep using namespace std; using namespace votca::csg; using namespace votca::tools; class TestBead : public BaseBead { public: TestBead() : BaseBead(){}; }; BOOST_AUTO_TEST_SUITE(beadstructure_test) BOOST_AUTO_TEST_CASE(test_beadstructure_constructor) { BeadStructure beadstructure; } BOOST_AUTO_TEST_CASE(test_beadstructure_beadcount) { BeadStructure beadstructure; BOOST_CHECK_EQUAL(beadstructure.BeadCount(), 0); } BOOST_AUTO_TEST_CASE(test_beadstructure_add_and_getbead) { BeadStructure beadstructure; TestBead testbead; testbead.setId(2); testbead.setName("Carbon"); beadstructure.AddBead(testbead); BOOST_CHECK_EQUAL(beadstructure.BeadCount(), 1); BOOST_CHECK(beadstructure.BeadExist(2)); } BOOST_AUTO_TEST_CASE(test_beadstructure_ConnectBeads) { BeadStructure beadstructure; TestBead testbead1; testbead1.setId(1); testbead1.setName("Carbon"); TestBead testbead2; testbead2.setId(2); testbead2.setName("Carbon"); beadstructure.AddBead(testbead1); beadstructure.AddBead(testbead2); beadstructure.ConnectBeads(1, 2); } BOOST_AUTO_TEST_CASE(test_beadstructure_getBeadIds) { BeadStructure beadstructure; TestBead testbead1; testbead1.setId(1); testbead1.setName("Carbon"); TestBead testbead2; testbead2.setId(2); testbead2.setName("Carbon"); beadstructure.AddBead(testbead1); beadstructure.AddBead(testbead2); vector<votca::Index> bead_ids = beadstructure.getBeadIds(); BOOST_CHECK_EQUAL(bead_ids.size(), 2); sort(bead_ids.begin(), bead_ids.end()); BOOST_CHECK_EQUAL(bead_ids.at(0), 1); BOOST_CHECK_EQUAL(bead_ids.at(1), 2); } BOOST_AUTO_TEST_CASE(test_beadstructure_getSubStructure) { BeadStructure beadstructure; TestBead testbead1; testbead1.setId(1); testbead1.setName("Carbon"); TestBead testbead2; testbead2.setId(2); testbead2.setName("Carbon"); TestBead testbead3; testbead3.setId(3); testbead3.setName("Hydrogen"); beadstructure.AddBead(testbead1); beadstructure.AddBead(testbead2); beadstructure.AddBead(testbead3); beadstructure.ConnectBeads(1, 2); beadstructure.ConnectBeads(2, 3); vector<votca::Index> CH = {2, 3}; vector<Edge> CH_bond = {Edge(2, 3)}; BeadStructure CHstructure = beadstructure.getSubStructure(CH, CH_bond); BOOST_CHECK(CHstructure.BeadExist(2)); BOOST_CHECK(CHstructure.BeadExist(3)); /// Should Throw bond connecting bead 1 and 3 is not in beadstructure vector<Edge> CH_bond_false = {Edge(1, 3)}; BOOST_CHECK_THROW(beadstructure.getSubStructure(CH, CH_bond_false), std::runtime_error); /// Should Throw bead with id 4 is not in beadstructure vector<votca::Index> CHH_false = {2, 3, 4}; BOOST_CHECK_THROW(beadstructure.getSubStructure(CHH_false, CH_bond), std::runtime_error); } BOOST_AUTO_TEST_CASE(test_beadstructure_isSingleStructure) { BeadStructure beadstructure; TestBead testbead1; testbead1.setName("Carbon"); testbead1.setId(1); TestBead testbead2; testbead2.setName("Carbon"); testbead2.setId(2); TestBead testbead3; testbead3.setName("Oxygen"); testbead3.setId(3); TestBead testbead4; testbead4.setName("Hydrogen"); testbead4.setId(4); TestBead testbead5; testbead5.setName("Hydrogen"); testbead5.setId(5); beadstructure.AddBead(testbead1); beadstructure.AddBead(testbead2); BOOST_CHECK(!beadstructure.isSingleStructure()); // C - C beadstructure.ConnectBeads(1, 2); BOOST_CHECK(beadstructure.isSingleStructure()); // C - C O beadstructure.AddBead(testbead3); BOOST_CHECK(!beadstructure.isSingleStructure()); // C - C - O beadstructure.ConnectBeads(2, 3); BOOST_CHECK(beadstructure.isSingleStructure()); // C - C - O H - H beadstructure.AddBead(testbead4); beadstructure.AddBead(testbead5); beadstructure.ConnectBeads(4, 5); BOOST_CHECK(!beadstructure.isSingleStructure()); } BOOST_AUTO_TEST_CASE(test_beadstructure_isStructureEquivalent) { BeadStructure beadstructure1; BeadStructure beadstructure2; // Beads for bead structure 1 TestBead testbead1; testbead1.setName("Carbon"); testbead1.setId(1); TestBead testbead2; testbead2.setName("Carbon"); testbead2.setId(2); TestBead testbead3; testbead3.setName("Oxygen"); testbead3.setId(3); TestBead testbead4; testbead4.setName("Hydrogen"); testbead4.setId(4); TestBead testbead5; testbead5.setName("Hydrogen"); testbead5.setId(5); // Beads for bead structure 2 TestBead testbead6; testbead6.setName("Carbon"); testbead6.setId(6); TestBead testbead7; testbead7.setName("Carbon"); testbead7.setId(7); TestBead testbead8; testbead8.setName("Oxygen"); testbead8.setId(8); TestBead testbead9; testbead9.setName("Hydrogen"); testbead9.setId(9); TestBead testbead10; testbead10.setName("Hydrogen"); testbead10.setId(10); BOOST_CHECK(beadstructure1.isStructureEquivalent(beadstructure2)); beadstructure1.AddBead(testbead1); BOOST_CHECK(!beadstructure1.isStructureEquivalent(beadstructure2)); beadstructure2.AddBead(testbead6); BOOST_CHECK(beadstructure1.isStructureEquivalent(beadstructure2)); beadstructure1.AddBead(testbead2); beadstructure2.AddBead(testbead7); beadstructure1.ConnectBeads(1, 2); BOOST_CHECK(!beadstructure1.isStructureEquivalent(beadstructure2)); beadstructure2.ConnectBeads(6, 7); BOOST_CHECK(beadstructure1.isStructureEquivalent(beadstructure2)); beadstructure1.AddBead(testbead3); beadstructure1.AddBead(testbead4); beadstructure1.AddBead(testbead5); beadstructure1.ConnectBeads(2, 3); beadstructure1.ConnectBeads(4, 5); beadstructure2.AddBead(testbead10); beadstructure2.AddBead(testbead8); beadstructure2.AddBead(testbead9); beadstructure2.ConnectBeads(7, 8); beadstructure2.ConnectBeads(9, 10); BOOST_CHECK(beadstructure1.isStructureEquivalent(beadstructure2)); } BOOST_AUTO_TEST_CASE(test_beadstructure_getNeighBeadIds) { BeadStructure beadstructure1; // Beads for bead structure 1 // Make a methane molecule // // H // | // H - C - H // | // H // TestBead testbead1; testbead1.setName("Hydrogen"); testbead1.setId(1); TestBead testbead2; testbead2.setName("Carbon"); testbead2.setId(2); TestBead testbead3; testbead3.setName("Hydrogen"); testbead3.setId(3); TestBead testbead4; testbead4.setName("Hydrogen"); testbead4.setId(4); TestBead testbead5; testbead5.setName("Hydrogen"); testbead5.setId(5); // Make a Water molecule // // H - O - H // TestBead testbead6; testbead6.setName("Hydrogen"); testbead6.setId(6); TestBead testbead7; testbead7.setName("Oxygen"); testbead7.setId(7); TestBead testbead8; testbead8.setName("Hydrogen"); testbead8.setId(8); beadstructure1.AddBead(testbead1); beadstructure1.AddBead(testbead2); beadstructure1.AddBead(testbead3); beadstructure1.AddBead(testbead4); beadstructure1.AddBead(testbead5); beadstructure1.AddBead(testbead6); beadstructure1.AddBead(testbead7); beadstructure1.AddBead(testbead8); // At this point non of the beads are connected so should return a vector of // size 0 auto v1 = beadstructure1.getNeighBeadIds(1); BOOST_CHECK_EQUAL(v1.size(), 0); auto v2 = beadstructure1.getNeighBeadIds(2); BOOST_CHECK_EQUAL(v2.size(), 0); auto v3 = beadstructure1.getNeighBeadIds(3); BOOST_CHECK_EQUAL(v3.size(), 0); auto v4 = beadstructure1.getNeighBeadIds(4); BOOST_CHECK_EQUAL(v4.size(), 0); auto v5 = beadstructure1.getNeighBeadIds(5); BOOST_CHECK_EQUAL(v5.size(), 0); auto v6 = beadstructure1.getNeighBeadIds(1); BOOST_CHECK_EQUAL(v6.size(), 0); auto v7 = beadstructure1.getNeighBeadIds(7); BOOST_CHECK_EQUAL(v7.size(), 0); auto v8 = beadstructure1.getNeighBeadIds(8); BOOST_CHECK_EQUAL(v8.size(), 0); // Connect beads beadstructure1.ConnectBeads(1, 2); beadstructure1.ConnectBeads(3, 2); beadstructure1.ConnectBeads(4, 2); beadstructure1.ConnectBeads(5, 2); beadstructure1.ConnectBeads(6, 7); beadstructure1.ConnectBeads(7, 8); v1 = beadstructure1.getNeighBeadIds(1); BOOST_CHECK_EQUAL(v1.size(), 1); v2 = beadstructure1.getNeighBeadIds(2); BOOST_CHECK_EQUAL(v2.size(), 4); v3 = beadstructure1.getNeighBeadIds(3); BOOST_CHECK_EQUAL(v3.size(), 1); v4 = beadstructure1.getNeighBeadIds(4); BOOST_CHECK_EQUAL(v4.size(), 1); v5 = beadstructure1.getNeighBeadIds(5); BOOST_CHECK_EQUAL(v5.size(), 1); v6 = beadstructure1.getNeighBeadIds(1); BOOST_CHECK_EQUAL(v6.size(), 1); v7 = beadstructure1.getNeighBeadIds(7); BOOST_CHECK_EQUAL(v7.size(), 2); v8 = beadstructure1.getNeighBeadIds(8); BOOST_CHECK_EQUAL(v8.size(), 1); } BOOST_AUTO_TEST_CASE(test_beadstructure_catchError) { { TestBead testbead1; testbead1.setName("Hydrogen"); testbead1.setId(1); TestBead testbead2; testbead2.setName("Carbon"); testbead2.setId(2); TestBead testbead3; testbead3.setName("Hydrogen"); testbead3.setId(3); TestBead testbead4; testbead4.setName("Hydrogen"); testbead4.setId(4); TestBead testbead5; testbead5.setName("Hydrogen"); testbead5.setId(5); TestBead testbead6; testbead6.setName("Hydrogen"); testbead6.setId(5); BeadStructure beadstructure; beadstructure.AddBead(testbead1); beadstructure.AddBead(testbead2); beadstructure.AddBead(testbead3); beadstructure.AddBead(testbead4); beadstructure.AddBead(testbead5); BOOST_CHECK_THROW(beadstructure.AddBead(testbead6), invalid_argument); BOOST_CHECK_THROW(beadstructure.ConnectBeads(0, 1), invalid_argument); BOOST_CHECK_THROW(beadstructure.ConnectBeads(5, 6), invalid_argument); BOOST_CHECK_THROW(beadstructure.ConnectBeads(1, 1), invalid_argument); } } BOOST_AUTO_TEST_SUITE_END()
; A172517: Number of ways to place 2 nonattacking queens on an n X n toroidal board. ; 0,0,0,32,100,288,588,1152,1944,3200,4840,7200,10140,14112,18900,25088,32368,41472,51984,64800,79380,96800,116380,139392,165000,194688,227448,264992,306124,352800,403620,460800,522720,591872,666400,749088,837828,935712,1040364,1155200,1277560,1411200,1553160,1707552,1871100,2048288,2235508,2437632,2650704,2880000,3121200,3380000,3651700,3942432,4247100,4572288,4912488,5274752,5653144,6055200,6474540,6919200,7382340,7872512,8382400,8921088,9480768,10071072,10683684,11328800,11997580,12700800,13429080,14193792,14985000,15814688,16672348,17570592,18498324,19468800,20470320,21516800,22595920,23722272,24882900,26093088,27339228,28637312,29973064,31363200,32792760,34279200,35806860,37393952,39024100,40716288,42453408,44255232,46103904,48020000 mov $2,$0 add $0,1 pow $0,2 sub $2,1 pow $2,2 mov $1,$2 div $1,2 mul $0,$1
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r13 push %r9 push %rbx push %rsi lea addresses_WC_ht+0x12045, %r10 nop nop nop nop nop inc %r12 mov $0x6162636465666768, %rsi movq %rsi, %xmm6 vmovups %ymm6, (%r10) nop xor $15592, %r13 lea addresses_A_ht+0x4d85, %r10 nop sub %r9, %r9 mov (%r10), %ebx nop nop nop nop sub %rbx, %rbx pop %rsi pop %rbx pop %r9 pop %r13 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r14 push %r15 push %r9 push %rax push %rdi push %rsi // Store lea addresses_A+0x7a70, %r10 clflush (%r10) xor $37732, %r15 mov $0x5152535455565758, %rdi movq %rdi, (%r10) nop sub $20812, %rdi // Store lea addresses_UC+0x1c5e1, %r9 nop nop nop cmp %rax, %rax movw $0x5152, (%r9) sub $7274, %rsi // Faulty Load lea addresses_UC+0x15a85, %rdi add $59213, %r9 movb (%rdi), %r15b lea oracles, %r14 and $0xff, %r15 shlq $12, %r15 mov (%r14,%r15,1), %r15 pop %rsi pop %rdi pop %rax pop %r9 pop %r15 pop %r14 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_UC', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_A', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_UC', 'same': False, 'AVXalign': False, 'congruent': 1}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_UC', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 5}} {'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 8}} {'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 */
#include <Switch/Switch> using namespace System; namespace Examples { class Program { public: // The main entry point for the application. static void Main() { String str; String nl = Environment::NewLine; Console::WriteLine(); // <-- Keep this information secure! --> String query = "My system drive is %SystemDrive% and my system root is %SystemRoot%"; str = Environment::ExpandEnvironmentVariables(query); Console::WriteLine("ExpandEnvironmentVariables: {0} {1}", nl, str); } }; } startup_(Examples::Program); // This example produces results similar to the following: // // ExpandEnvironmentVariables: // My system drive is C: and my system root is C:\windows
; A291017: p-INVERT of (1,1,1,1,1,...), where p(S) = 1 - 5 S + S^2. ; 5,29,168,973,5635,32634,188993,1094513,6338640,36708889,212591743,1231179978,7130117645,41292563669,239137122168,1384911909493,8020423511275,46448581212474,268997103908393,1557839658871433,9021897884741280,52248407581088929,302585567874433543,1752360122053412298,10148421879252851285,58772432300396072909,340368072948002551368,1971169484533245349213,11415609881096699584915,66111082775944179649914,382868310263932360454993,2217300592415917265635553,12841025975063894336263920,74366077678535839494398569,430675361924303616106942543,2494164989720374436287807818,14444427394572495741266056925,83651836833964849134847743749,484451866075746473755071807768,2805600204692471372341568448133,16248038370317074290105476482555,94097067159372220424347356240954,544943201523386022939693158308793,3155922940548096617607420614474873,18276858173172974162674092193162560,105846546628374142815466701050813809,612987819186408180569548262003558743 mov $2,$0 mov $0,2 add $2,2 lpb $2 add $3,$0 mul $0,7 sub $0,$3 sub $2,1 lpe div $0,14
; A075841: Numbers k such that 2*k^2 - 9 is a square. ; 3,15,87,507,2955,17223,100383,585075,3410067,19875327,115841895,675176043,3935214363,22936110135,133681446447,779152568547,4541233964835,26468251220463,154268273357943,899141388927195,5240580060205227 mul $0,2 mov $1,3 lpb $0 sub $0,1 add $2,$1 mov $3,$1 add $1,$2 mov $2,$3 lpe
; =============================================================== ; Sep 2005, Apr 2014 ; =============================================================== ; ; void in_mouse_kempston_setpos(uint16_t x, uint16_t y) ; ; Set the mouse coordinate. ; ; =============================================================== SECTION code_input PUBLIC asm_in_mouse_kempston_setpos EXTERN __input_kempston_mouse_x, __input_kempston_mouse_y EXTERN __input_kempston_mouse_rawx, __input_kempston_mouse_rawy asm_in_mouse_kempston_setpos: ; enter : de = x ; bc = y ; ; uses : af, bc, de ; zero out any existing deltas ld a,$fb in a,($df) ld (__input_kempston_mouse_rawx),a ld a,$ff in a,($df) ld (__input_kempston_mouse_rawy),a ; boundary check test_x: inc d dec d jr z, test_y adjust_x: ld de,$00ff test_y: inc b djnz adjust_y ld a,c cp 192 jr c, set_xy adjust_y: ld bc,191 set_xy: ld (__input_kempston_mouse_x),de ld (__input_kempston_mouse_y),bc ret
// Copyright 2018 Slightech Co., Ltd. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // 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. #include <iostream> #include <opencv2/highgui/highgui.hpp> #include "mynteyed/camera.h" #include "mynteyed/utils.h" #include "util/cam_utils.h" #include "util/counter.h" #include "util/cv_painter.h" MYNTEYE_USE_NAMESPACE int main(int argc, char const* argv[]) { Camera cam; DeviceInfo dev_info; if (!util::select(cam, &dev_info)) { return 1; } util::print_stream_infos(cam, dev_info.index); std::cout << "Open device: " << dev_info.index << ", " << dev_info.name << std::endl << std::endl; OpenParams params(dev_info.index); { // Framerate: 10(default usb3.0) 5(default usb2.0), [0,60], [30](STREAM_2560x720) params.framerate = 10; // Device mode, default DEVICE_ALL // DEVICE_COLOR: IMAGE_LEFT_COLOR ✓ IMAGE_RIGHT_COLOR ? IMAGE_DEPTH x // DEVICE_DEPTH: IMAGE_LEFT_COLOR x IMAGE_RIGHT_COLOR x IMAGE_DEPTH ✓ // DEVICE_ALL: IMAGE_LEFT_COLOR ✓ IMAGE_RIGHT_COLOR ? IMAGE_DEPTH ✓ // Note: ✓: available, x: unavailable, ?: depends on #stream_mode // params.dev_mode = DeviceMode::DEVICE_ALL; // Color mode: raw(default), rectified // params.color_mode = ColorMode::COLOR_RECTIFIED; // Depth mode: colorful(default), gray, raw // params.depth_mode = DepthMode::DEPTH_GRAY; // Stream mode: left color only // params.stream_mode = StreamMode::STREAM_640x480; // vga params.stream_mode = StreamMode::STREAM_1280x720; // hd // Stream mode: left+right color // params.stream_mode = StreamMode::STREAM_1280x480; // vga // params.stream_mode = StreamMode::STREAM_2560x720; // hd // Auto-exposure: true(default), false // params.state_ae = false; // Auto-white balance: true(default), false // params.state_awb = false; // IR Depth Only: true, false(default) // Note: IR Depth Only mode support frame rate between 15fps and 30fps. // When dev_mode != DeviceMode::DEVICE_ALL, // IR Depth Only mode not be supported. // When stream_mode == StreamMode::STREAM_2560x720, // frame rate only be 15fps in this mode. // When frame rate less than 15fps or greater than 30fps, // IR Depth Only mode will be not available. // params.ir_depth_only = true; // Infrared intensity: 0(default), [0,10] params.ir_intensity = 4; // Colour depth image, default 5000. [0, 16384] params.colour_depth_value = 5000; } // Enable what process logics // cam.EnableProcessMode(ProcessMode::PROC_IMU_ALL); // Enable image infos cam.EnableImageInfo(true); cam.Open(params); std::cout << std::endl; if (!cam.IsOpened()) { std::cerr << "Error: Open camera failed" << std::endl; return 1; } std::cout << "Open device success" << std::endl << std::endl; std::cout << "Press ESC/Q on Windows to terminate" << std::endl; bool is_left_ok = cam.IsStreamDataEnabled(ImageType::IMAGE_LEFT_COLOR); bool is_depth_ok = cam.IsStreamDataEnabled(ImageType::IMAGE_DEPTH); if (is_left_ok) cv::namedWindow("left color"); if (is_depth_ok) cv::namedWindow("depth"); CVPainter painter; util::Counter counter; for (;;) { cam.WaitForStream(); counter.Update(); if (is_left_ok) { auto left_color = cam.GetStreamData(ImageType::IMAGE_LEFT_COLOR); if (left_color.img) { cv::Mat left = left_color.img->To(ImageFormat::COLOR_BGR)->ToMat(); painter.DrawSize(left, CVPainter::TOP_LEFT); painter.DrawStreamData(left, left_color, CVPainter::TOP_RIGHT); painter.DrawInformation(left, util::to_string(counter.fps()), CVPainter::BOTTOM_RIGHT); cv::imshow("left color", left); } } if (is_depth_ok) { auto image_depth = cam.GetStreamData(ImageType::IMAGE_DEPTH); if (image_depth.img) { cv::Mat depth; if (params.depth_mode == DepthMode::DEPTH_COLORFUL) { depth = image_depth.img->To(ImageFormat::DEPTH_BGR)->ToMat(); } else { depth = image_depth.img->ToMat(); } painter.DrawSize(depth, CVPainter::TOP_LEFT); painter.DrawStreamData(depth, image_depth, CVPainter::TOP_RIGHT); cv::imshow("depth", depth); } } char key = static_cast<char>(cv::waitKey(1)); if (key == 27 || key == 'q' || key == 'Q') { // ESC/Q break; } } cam.Close(); cv::destroyAllWindows(); return 0; }
; A092810: Binomial transform of a Jacobsthal trisection. ; 1,6,54,486,4374,39366,354294,3188646,28697814,258280326,2324522934,20920706406,188286357654,1694577218886,15251194969974,137260754729766,1235346792567894,11118121133111046 mul $0,2 lpb $0,1 add $3,2 add $1,$3 add $4,$1 mov $2,$4 sub $2,1 mov $1,$2 mov $3,$2 sub $0,1 lpe add $1,1
;***************************************************** ; ; Video Technology library for small C compiler ; ; Juergen Buchmueller ; ;***************************************************** ; ----- void __CALLEE__ vz_soundcopy_callee(char *dst, char *src, int size, int sound1, int sound2); SECTION code_clib PUBLIC vz_soundcopy_callee PUBLIC _vz_soundcopy_callee PUBLIC ASMDISP_VZ_SOUNDCOPY_CALLEE EXTERN __stdlib_seed .vz_soundcopy_callee ._vz_soundcopy_callee pop af pop bc pop de ld b,e exx pop bc pop hl pop de push af exx ; bc' = int size ; hl' = char *src ; de' = char *dst ; c = sound 2 ; b = sound 1 .asmentry ld e,c ld d,b ld hl,(__stdlib_seed) ld a,b or c ; both off? exx ld a,($783b) ; get latch data jp nz, soundcopy1 ; sound is on ldir ret .soundcopy1 exx inc d ; tone ? dec d jr z, soundcopy2 ; nope, skip dec d ; counted down? jr nz, soundcopy2 ; nope ld d,b ; reset counter xor $21 ; toggle output ld ($6800),a .soundcopy2 inc e ; noise ? dec e jr z, soundcopy3 ; nope, skip dec e ; counted down? jr nz, soundcopy3 ; nope ld e,c ; reset counter add hl,hl ; rotate 16 random bits jr nc, soundcopy3 ; not set inc l ; set bit 0 agaon xor $21 ; toggle output ld ($6800),a .soundcopy3 exx ldi ; transfer 4 bytes ldi ldi ldi jp pe, soundcopy1 ; until done ld ($783b),a ret DEFC ASMDISP_VZ_SOUNDCOPY_CALLEE = asmentry - vz_soundcopy_callee
//============================================================================== /* Software License Agreement (BSD License) Copyright (c) 2003-2016, CHAI3D. (www.chai3d.org) 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 CHAI3D 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. \author <http://www.chai3d.org> \author Francois Conti \version 3.2.0 $Rev: 2173 $ */ //============================================================================== //------------------------------------------------------------------------------ #include "graphics/CPrimitives.h" //------------------------------------------------------------------------------ #include "graphics/CTriangleArray.h" #include "math/CBezier.h" #include "math/CMaths.h" //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ namespace chai3d { //------------------------------------------------------------------------------ //============================================================================== /*! This function creates a plane by defining its size along the X and Y axes. Texture coordinates are defined so that the bitmap image maps the entire plane. \param a_mesh Mesh object in which primitive is created. \param a_lengthX Size along X axis. \param a_lengthY Size along Y axis. \param a_pos Position where to build the new primitive. \param a_rot Orientation of the new primitive. \param a_color Color of vertices. */ //============================================================================== void cCreatePlane(cMesh* a_mesh, const double& a_lengthX, const double& a_lengthY, const cVector3d& a_pos, const cMatrix3d& a_rot, const cColorf& a_color) { cCreatePlane2(a_mesh, a_lengthX, a_lengthY, a_pos, a_rot, a_color, a_color, a_color, a_color); } //============================================================================== /*! This function creates a plane by defining its size along the X and Y axes. Texture coordinates are defined so that the bitmap image maps the entire plane. \param a_mesh Mesh object in which primitive is created. \param a_lengthX Size along X axis. \param a_lengthY Size along Y axis. \param a_pos Position where to build the new primitive. \param a_rot Orientation of the new primitive. \param a_colorTopLeft Color of top left vertex. \param a_colorTopRight Color of top right vertex. \param a_colorBottomLeft Color of bottom left vertex. \param a_colorBottomRight Color of bottom right vertex. */ //============================================================================== void cCreatePlane2(cMesh* a_mesh, const double& a_lengthX, const double& a_lengthY, const cVector3d& a_pos, const cMatrix3d& a_rot, const cColorf& a_colorTopLeft, const cColorf& a_colorTopRight, const cColorf& a_colorBottomLeft, const cColorf& a_colorBottomRight) { // sanity check if (a_lengthX <= 0) { return; } if (a_lengthY <= 0) { return; } // compute half edges double half_length_X = 0.5 * a_lengthX; double half_length_Y = 0.5 * a_lengthY;; // compute position of vertices cVector3d v0 = cAdd(a_pos, cMul(a_rot, cVector3d(-half_length_X, -half_length_Y, 0.0))); cVector3d v1 = cAdd(a_pos, cMul(a_rot, cVector3d( half_length_X, -half_length_Y, 0.0))); cVector3d v2 = cAdd(a_pos, cMul(a_rot, cVector3d( half_length_X, half_length_Y, 0.0))); cVector3d v3 = cAdd(a_pos, cMul(a_rot, cVector3d(-half_length_X, half_length_Y, 0.0))); // compute surface normal cVector3d n = cMul(a_rot, cVector3d(0.0, 0.0, 1.0)); // create new vertices int vertexIndex0 = a_mesh->newVertex(v0); int vertexIndex1 = a_mesh->newVertex(v1); int vertexIndex2 = a_mesh->newVertex(v2); int vertexIndex3 = a_mesh->newVertex(v3); // vertex (bottom left) a_mesh->m_vertices->setNormal(vertexIndex0, n); a_mesh->m_vertices->setTexCoord(vertexIndex0, 0.0, 0.0); a_mesh->m_vertices->setColor(vertexIndex0, a_colorBottomLeft); // vertex (bottom right) a_mesh->m_vertices->setNormal(vertexIndex1, n); a_mesh->m_vertices->setTexCoord(vertexIndex1, 1.0, 0.0); a_mesh->m_vertices->setColor(vertexIndex1, a_colorBottomRight); // vertex (top right) a_mesh->m_vertices->setNormal(vertexIndex2, n); a_mesh->m_vertices->setTexCoord(vertexIndex2, 1.0, 1.0); a_mesh->m_vertices->setColor(vertexIndex2, a_colorTopRight); // vertex (top left) a_mesh->m_vertices->setNormal(vertexIndex3, n); a_mesh->m_vertices->setTexCoord(vertexIndex3, 0.0, 1.0); a_mesh->m_vertices->setColor(vertexIndex3, a_colorTopLeft); // create triangles a_mesh->newTriangle(vertexIndex0, vertexIndex1, vertexIndex2); a_mesh->newTriangle(vertexIndex0, vertexIndex2, vertexIndex3); } //============================================================================== /*! This function creates a 2D map by defining the size along the X and Y axes, and the number of sides along each axis. For instance, a map containing 3 sides along the X axis and 4 sides along the Y axis will contains: 12 squares composed each of two triangles. The total number of vertices will be equal to 20, respectively (3+1)x(4+1). By modifying the Z component of each vertex you can easily create height maps for instance.Texture coordinates are defined so that the bitmap image covers the entire map. \param a_mesh Mesh object in which primitive is created. \param a_lengthX Size along X axis. \param a_lengthY Size along Y axis. \param a_numSidesX Number of elements along X axis. \param a_numSidesY Number of elements along Y axis. \param a_pos Position where to build the new primitive. \param a_rot Orientation of the new primitive. \param a_color Color of vertices. */ //============================================================================== void cCreateMap(cMesh* a_mesh, const double& a_lengthX, const double& a_lengthY, const unsigned int a_numSidesX, const unsigned int a_numSidesY, const cVector3d& a_pos, const cMatrix3d& a_rot, const cColorf& a_color) { // sanity check if ((a_numSidesX < 1) || (a_numSidesY < 1)) { return; } if (a_lengthX <= 0) { return; } if (a_lengthY <= 0) { return; } // compute half sides double half_length_X = a_lengthX / 2.0; double half_length_Y = a_lengthY / 2.0; // compute size of single element double size_X = a_lengthX / (double)a_numSidesX; double size_Y = a_lengthY / (double)a_numSidesY; // compute map normal cVector3d normal = cMul(a_rot, cVector3d(0.0, 0.0, 1.0)); // get current vertex index int index = a_mesh->getNumVertices(); // create vertices int numVerticesX = a_numSidesX + 1; int numVerticesY = a_numSidesY + 1; for (int ix=0; ix<numVerticesX; ix++) { double posX = -half_length_X + (double)(ix) * size_X; double textureCoordX = (double)(ix)/(double)(a_numSidesX); for (int iy=0; iy<numVerticesY; iy++) { double posY = -half_length_Y + (double)(iy) * size_Y; cVector3d pos = cAdd(a_pos, cMul(a_rot, cVector3d(posX, posY, 0.0))); double textureCoordY = (double)(iy)/(double)(a_numSidesY); cVector3d textCoord(textureCoordX, textureCoordY, 0.0); a_mesh->newVertex(pos, normal, textCoord, a_color); } } // create triangles for (unsigned int ix=0; ix<a_numSidesX; ix++) { for (unsigned int iy=0; iy<a_numSidesY; iy++) { unsigned int index00 = index + (ix * numVerticesY) + iy; unsigned int index01 = index + (ix * numVerticesY) + (iy+1); unsigned int index10 = index + ((ix+1) * numVerticesY) + iy; unsigned int index11 = index + ((ix+1) * numVerticesY) + (iy+1); a_mesh->newTriangle(index00, index10, index11); a_mesh->newTriangle(index00, index11, index01); } } } //============================================================================== /*! This function creates a disk by defining its radius properties along axis X and axis Y. \param a_mesh Mesh object in which primitive is created. \param a_radiusX Radius of sphere along axis X. \param a_radiusY Radius of sphere along axis Y. \param a_numSlices Specifies the number of slices composing the disc. \param a_pos Position where to build the new primitive. \param a_rot Orientation of the new primitive. \param a_color Color of vertices. */ //============================================================================== void cCreateDisk(cMesh* a_mesh, const double& a_radiusX, const double& a_radiusY, const unsigned int a_numSlices, const cVector3d& a_pos, const cMatrix3d& a_rot, const cColorf& a_color) { // sanity check if (a_numSlices < 3) { return; } if (a_radiusX <= 0) { return; } if (a_radiusY <= 0) { return; } // compute offset double delta_a = C_TWO_PI / (double)a_numSlices; // compute normal cVector3d normal = cMul(a_rot, cVector3d(0.0, 0.0, 1.0)); // create first vertex cVector3d p = cAdd(a_pos, cMul(a_rot, cVector3d(0.0, 0.0, 0.0))); unsigned int index = a_mesh->newVertex(p); // set texture coordinate a_mesh->m_vertices->setTexCoord(index, cVector3d(0.5, 0.5, 0.0)); // set normal a_mesh->m_vertices->setNormal(index, normal); // create first round of points double angle = 0.0; for (unsigned int i=0; i<a_numSlices; i++) { // set position p = cAdd(a_pos, cMul(a_rot, cVector3d(a_radiusX * cos(angle), a_radiusY * sin(angle), 0.0))); int vertexID = a_mesh->newVertex(p); // set normal a_mesh->m_vertices->setNormal(vertexID, normal); // set texture coordinate a_mesh->m_vertices->setTexCoord(vertexID, cVector3d(0.5 + 0.5 * cos(angle), 0.5 + 0.5 * sin(angle), 0.0)); angle = angle + delta_a; } // create triangles for (unsigned int i=1; i<a_numSlices; i++) { unsigned int index0 = index; unsigned int index1 = index + i; unsigned int index2 = index + i + 1; a_mesh->newTriangle(index0, index1, index2); } a_mesh->newTriangle(index, index + a_numSlices, index + 1); } //============================================================================== /*! This function creates a panel with optional rounded corners. \param a_mesh Mesh object in which primitive is created. \param a_lengthX Size along X axis. \param a_lengthY Size along Y axis. \param a_radiusCorners Radius of corners. \param a_numSegmentsPerCorner Number of segments per rounded corner. \param a_pos Position where to build the new primitive. \param a_rot Orientation of the new primitive. \param a_color Color of vertices. */ //============================================================================== void cCreatePanel(cMesh* a_mesh, const double& a_lengthX, const double& a_lengthY, const double& a_radiusCorners, const int& a_numSegmentsPerCorner, const cVector3d& a_pos, const cMatrix3d& a_rot, const cColorf& a_color) { cCreatePanel2(a_mesh, a_lengthX, a_lengthY, a_radiusCorners, a_radiusCorners, a_radiusCorners, a_radiusCorners, a_numSegmentsPerCorner, a_pos, a_rot, a_color, a_color, a_color, a_color); } //============================================================================== /*! This function creates a panel with optional rounded corners. \param a_mesh Mesh object in which primitive is created. \param a_lengthX Size along X axis. \param a_lengthY Size along Y axis. \param a_cornerTopLeftRadius Radius of top left corner. \param a_cornerTopRightRadius Radius of top right corner. \param a_cornerBottomLeftRadius Radius of bottom left corner. \param a_cornerTopLeftRadius Radius of bottom right corner. \param a_cornerBottomRightRadius Number of segments per rounded corner. \param a_numSegmentsPerCorner Number of segments composing the circular corners. \param a_pos Position where to build the new primitive. \param a_rot Orientation of the new primitive. \param a_colorTopLeft Color of top left vertex. \param a_colorTopRight Color of top right vertex. \param a_colorBottomLeft Color of bottom left vertex. \param a_colorBottomRight Color of bottom right vertex. */ //============================================================================== void cCreatePanel2(cMesh* a_mesh, const double& a_lengthX, const double& a_lengthY, const double& a_cornerTopLeftRadius, const double& a_cornerTopRightRadius, const double& a_cornerBottomLeftRadius, const double& a_cornerBottomRightRadius, const int& a_numSegmentsPerCorner, const cVector3d& a_pos, const cMatrix3d& a_rot, const cColorf& a_colorTopLeft, const cColorf& a_colorTopRight, const cColorf& a_colorBottomLeft, const cColorf& a_colorBottomRight) { // sanity check if (a_cornerTopLeftRadius < 0) { return; } if (a_cornerTopRightRadius < 0) { return; } if (a_cornerBottomLeftRadius < 0) { return; } if (a_cornerBottomRightRadius < 0) { return; } if (a_lengthX <= 0) { return; } if (a_lengthY <= 0) { return; } // sharp corners if ( (a_cornerTopLeftRadius == 0) && (a_cornerTopRightRadius == 0) && (a_cornerBottomLeftRadius == 0) && (a_cornerBottomRightRadius == 0) ) { cCreatePlane2(a_mesh, a_lengthX, a_lengthY, a_pos, a_rot, a_colorTopLeft, a_colorTopRight, a_colorBottomLeft, a_colorBottomRight); return; } // create a panel with corners double maxRadius = cMax(cMax(a_cornerTopLeftRadius, a_cornerTopRightRadius), cMax(a_cornerBottomLeftRadius, a_cornerBottomRightRadius)); double minLength = cMin(a_lengthX, a_lengthY) / 2.0; maxRadius = cMin(maxRadius, minLength); // compute inner rectangle dimensions double hx0 = (a_lengthX / 2.0) - a_cornerTopRightRadius; double hy0 = (a_lengthY / 2.0) - a_cornerTopRightRadius; double hx1 = (a_lengthX / 2.0) - a_cornerTopLeftRadius; double hy1 = (a_lengthY / 2.0) - a_cornerTopLeftRadius; double hx2 = (a_lengthX / 2.0) - a_cornerBottomLeftRadius; double hy2 = (a_lengthY / 2.0) - a_cornerBottomLeftRadius; double hx3 = (a_lengthX / 2.0) - a_cornerBottomRightRadius; double hy3 = (a_lengthY / 2.0) - a_cornerBottomRightRadius; double sx = 0.5 / (a_lengthX / 2.0); double sy = 0.5 / (a_lengthY / 2.0); // compute surface normal cVector3d normal = cMul(a_rot, cVector3d(0.0, 0.0, 1.0)); // setup variables int numVerticesPerCorner = a_numSegmentsPerCorner + 1; double deltaAng = C_PI_DIV_2 / (double(a_numSegmentsPerCorner)); // create center vertex cVector3d pos = cAdd(a_pos, cMul(a_rot, cVector3d(0.0, 0.0, 0.0))); int vertexIndex0 = a_mesh->newVertex(pos); a_mesh->m_vertices->setNormal(vertexIndex0, normal); a_mesh->m_vertices->setTexCoord(vertexIndex0, 0.5, 0.5); // compute at center of panel cColorf color; color.setR(0.25f * (a_colorTopLeft.getR() + a_colorTopRight.getR() + a_colorBottomLeft.getR() + a_colorBottomRight.getR())); color.setG(0.25f * (a_colorTopLeft.getG() + a_colorTopRight.getG() + a_colorBottomLeft.getG() + a_colorBottomRight.getG())); color.setB(0.25f * (a_colorTopLeft.getB() + a_colorTopRight.getB() + a_colorBottomLeft.getB() + a_colorBottomRight.getB())); color.setA(0.25f * (a_colorTopLeft.getA() + a_colorTopRight.getA() + a_colorBottomLeft.getA() + a_colorBottomRight.getA())); a_mesh->m_vertices->setColor(vertexIndex0, color); // create vertices (top right corner) for (int i=0; i<numVerticesPerCorner; i++) { // compute position of vertex double angle = (double)(i) * deltaAng; double x = hx0 + a_cornerTopRightRadius * cos(angle); double y = hy0 + a_cornerTopRightRadius * sin(angle); cVector3d p = cAdd(a_pos, cMul(a_rot, cVector3d(x, y, 0.0))); // compute texture coordinate cVector3d texCoord(0.5 + sx*x, 0.5 + sy*y, 0.0); // create new vertex a_mesh->newVertex(p, normal, texCoord, a_colorTopRight); } // create vertices (top left corner) for (int i=0; i<numVerticesPerCorner; i++) { // compute position of vertex double angle = (1 * C_PI_DIV_2) + (double)(i) * deltaAng; double x =-hx1 + a_cornerTopLeftRadius * cos(angle); double y = hy1 + a_cornerTopLeftRadius * sin(angle); cVector3d p = cAdd(a_pos, cMul(a_rot, cVector3d(x, y, 0.0))); // compute texture coordinate cVector3d texCoord(0.5 + sx*x, 0.5 + sy*y, 0.0); // create new vertex a_mesh->newVertex(p, normal, texCoord, a_colorTopLeft); } // create vertices (bottom left corner) for (int i=0; i<numVerticesPerCorner; i++) { // compute position of vertex double angle = (2 * C_PI_DIV_2) + (double)(i) * deltaAng; double x =-hx2 + a_cornerBottomLeftRadius * cos(angle); double y =-hy2 + a_cornerBottomLeftRadius * sin(angle); cVector3d p = cAdd(a_pos, cMul(a_rot, cVector3d(x, y, 0.0))); // compute texture coordinate cVector3d texCoord(0.5 + sx*x, 0.5 + sy*y, 0.0); // create new vertex a_mesh->newVertex(p, normal, texCoord, a_colorBottomLeft); } // create vertices (bottom right corner) for (int i=0; i<numVerticesPerCorner; i++) { // compute position of vertex double angle = (3 * C_PI_DIV_2) + (double)(i) * deltaAng; double x = hx3 + a_cornerBottomRightRadius * cos(angle); double y =-hy3 + a_cornerBottomRightRadius * sin(angle); cVector3d p = cAdd(a_pos, cMul(a_rot, cVector3d(x, y, 0.0))); // compute texture coordinate cVector3d texCoord(0.5 + sx*x, 0.5 + sy*y, 0.0); // create new vertex a_mesh->newVertex(p, normal, texCoord, a_colorBottomRight); } // create triangles int numTriangles = 4 * numVerticesPerCorner; int v = vertexIndex0 + 1; for (int i=0; i<numTriangles; i++) { int vertexIndex1 = v + i; int vertexIndex2 = v + ((i+1) % (numTriangles)); a_mesh->newTriangle(vertexIndex0, vertexIndex1, vertexIndex2); } } //============================================================================== /*! This function creates a box by defining its size along the x, y and z axis. Texture coordinates are defined so that the bitmap image is displayed on each face of the box. \param a_mesh Mesh object in which primitive is created. \param a_lengthX Size along X axis. \param a_lengthY Size along Y axis. \param a_lengthZ Size along Z axis. \param a_pos Position where to build the new primitive. \param a_rot Orientation of the new primitive. \param a_color Color of vertices. */ //============================================================================== void cCreateBox(cMesh* a_mesh, const double& a_lengthX, const double& a_lengthY, const double& a_lengthZ, const cVector3d& a_pos, const cMatrix3d& a_rot, const cColorf& a_color) { // sanity check if (a_lengthX < 0) { return; } if (a_lengthY < 0) { return; } if (a_lengthZ < 0) { return; } // compute half edges double half_length_X = a_lengthX / 2.0; double half_length_Y = a_lengthY / 2.0; double half_length_Z = a_lengthZ / 2.0; // create texture coordinates cVector3d t00(0.0, 0.0, 0.0); cVector3d t10(1.0, 0.0, 0.0); cVector3d t01(0.0, 1.0, 0.0); cVector3d t11(1.0, 1.0, 0.0); // compute position of vertices cVector3d v000 = cAdd(a_pos, cMul(a_rot, cVector3d(-half_length_X, -half_length_Y, -half_length_Z))); cVector3d v100 = cAdd(a_pos, cMul(a_rot, cVector3d( half_length_X, -half_length_Y, -half_length_Z))); cVector3d v110 = cAdd(a_pos, cMul(a_rot, cVector3d( half_length_X, half_length_Y, -half_length_Z))); cVector3d v010 = cAdd(a_pos, cMul(a_rot, cVector3d(-half_length_X, half_length_Y, -half_length_Z))); cVector3d v001 = cAdd(a_pos, cMul(a_rot, cVector3d(-half_length_X, -half_length_Y, half_length_Z))); cVector3d v101 = cAdd(a_pos, cMul(a_rot, cVector3d( half_length_X, -half_length_Y, half_length_Z))); cVector3d v111 = cAdd(a_pos, cMul(a_rot, cVector3d( half_length_X, half_length_Y, half_length_Z))); cVector3d v011 = cAdd(a_pos, cMul(a_rot, cVector3d(-half_length_X, half_length_Y, half_length_Z))); // compute normals cVector3d nx0 = cMul(a_rot, cVector3d(-1.0, 0.0, 0.0)); cVector3d nx1 = cMul(a_rot, cVector3d( 1.0, 0.0, 0.0)); cVector3d ny0 = cMul(a_rot, cVector3d( 0.0,-1.0, 0.0)); cVector3d ny1 = cMul(a_rot, cVector3d( 0.0, 1.0, 0.0)); cVector3d nz0 = cMul(a_rot, cVector3d( 0.0, 0.0,-1.0)); cVector3d nz1 = cMul(a_rot, cVector3d( 0.0, 0.0, 1.0)); // create triangles a_mesh->newTriangle(v011, v010, v000, nx0, nx0, nx0, t11, t10, t00, a_color, a_color, a_color); a_mesh->newTriangle(v011, v000, v001, nx0, nx0, nx0, t11, t00, t01, a_color, a_color, a_color); a_mesh->newTriangle(v101, v100, v110, nx1, nx1, nx1, t01, t00, t10, a_color, a_color, a_color); a_mesh->newTriangle(v101, v110, v111, nx1, nx1, nx1, t01, t10, t11, a_color, a_color, a_color); a_mesh->newTriangle(v101, v001, v000, ny0, ny0, ny0, t11, t01, t00, a_color, a_color, a_color); a_mesh->newTriangle(v101, v000, v100, ny0, ny0, ny0, t11, t00, t10, a_color, a_color, a_color); a_mesh->newTriangle(v111, v110, v010, ny1, ny1, ny1, t11, t10, t00, a_color, a_color, a_color); a_mesh->newTriangle(v111, v010, v011, ny1, ny1, ny1, t11, t00, t01, a_color, a_color, a_color); a_mesh->newTriangle(v000, v010, v110, nz0, nz0, nz0, t00, t01, t11, a_color, a_color, a_color); a_mesh->newTriangle(v000, v110, v100, nz0, nz0, nz0, t00, t11, t10, a_color, a_color, a_color); a_mesh->newTriangle(v001, v101, v111, nz1, nz1, nz1, t00, t10, t11, a_color, a_color, a_color); a_mesh->newTriangle(v001, v111, v011, nz1, nz1, nz1, t00, t11, t01, a_color, a_color, a_color); } //============================================================================== /*! This function creates a cylinder by defining its radius and height. The user may also decide if the top and bottom discs should be included. Texture coordinates are defined so that the bitmap image wraps around the cylinder. The texture coordinates for the top part of the cylinder are set to (0.0, 0.0, 0.0). The texture coordinates for the bottom part of the cylinder are set to (1.0, 1.0, 0.0). When texture is enabled, the colors defining the top and bottoms sections of the cylinder are defined by both texels. \param a_mesh Mesh object in which primitive is created. \param a_height Height of the cylinder. \param a_radius Radius of the cylinder. \param a_numSides Number of sides composing the cylinder. \param a_numHeightSegments Number of segments along the cylinder axis. \param a_numRings Number of rings that compose the top and bottom disks. \param a_includeTop If __true__, then the top disc is included. \param a_includeBottom If __true__, then the bottom disc is included. \param a_pos Position where to build the new primitive. \param a_rot Orientation of the new primitive. \param a_color Color of vertices. */ //============================================================================== void cCreateCylinder(cMesh* a_mesh, const double& a_height, const double& a_radius, const unsigned int a_numSides, const unsigned int a_numHeightSegments, const unsigned int a_numRings, const bool a_includeTop, const bool a_includeBottom, const cVector3d& a_pos, const cMatrix3d& a_rot, const cColorf& a_color) { cCreateCone(a_mesh, a_height, a_radius, a_radius, a_numSides, a_numHeightSegments, a_numRings, a_includeBottom, a_includeTop, a_pos, a_rot, a_color); } //============================================================================== /*! This function creates a cone by defining its height and bottom radius. By defining a top radius larger than zero, it is possible to create a truncated cone. Top and bottom parts can also be included or not. \param a_mesh Mesh object in which primitive is created. \param a_height Height of cone. \param a_radiusBottom Bottom radius of cone. \param a_radiusTop Top radius of cone. Apply 0 value for non truncated cone. \param a_numSides Number of sides composing the cone. \param a_numHeightSegments Number of segments along the cone axis. \param a_numRings Number of rings that compose the top and bottom disks. \param a_includeTop If __true__, then the top disc is included. (truncated cone) \param a_includeBottom If __true__, then the bottom disc is included. \param a_pos Position where to build the new primitive. \param a_rot Orientation of the new primitive. \param a_color Color of vertices. */ //============================================================================== void cCreateCone(cMesh* a_mesh, const double& a_height, const double& a_radiusBottom, const double& a_radiusTop, const unsigned int a_numSides, const unsigned int a_numHeightSegments, const unsigned int a_numRings, const bool a_includeBottom, const bool a_includeTop, const cVector3d& a_pos, const cMatrix3d& a_rot, const cColorf& a_color) { // sanity check unsigned int numS = cMax((unsigned int)3, a_numSides); unsigned int numH = cMax((unsigned int)1, a_numHeightSegments); // compute shared values double deltaAng = C_TWO_PI / (double)numS; double deltaLen = a_height / (double)numH; // get vertex base id int vertexBaseID = a_mesh->getNumVertices(); if (a_height > 0.0) { // create vertices double nz = (a_radiusBottom - a_radiusTop) / a_height; double deltaRadius = (a_radiusTop - a_radiusBottom) / ((double)(numH)); for (unsigned int i=0; i<=numS; i++) { cVector3d p; double ang = (double)(i) * deltaAng; double cosAng = cos(ang); double sinAng = sin(ang); cVector3d np = cVector3d(cosAng, sinAng, 0.0); cVector3d n_ = cMul(a_rot, cVector3d(cosAng, sinAng, nz)); n_.normalize(); for (unsigned int j=0; j<=numH; j++) { cVector3d offset(0.0, 0.0, (double)j * deltaLen); double radius = a_radiusBottom + (double)(j) * deltaRadius; np.mulr(radius, p); cVector3d p_ = cAdd(a_pos, cMul(a_rot, p + offset)); cVector3d t_((double)(i)/(double)(numS), (double)(j)/(double)(numH), 0.0); a_mesh->newVertex(p_, n_, t_, a_color); } } // create triangles for (unsigned int i=0; i<numS; i++) { for (unsigned int j=0; j<numH; j++) { int index00 = vertexBaseID + ((i ) * (numH+1)) + j; int index01 = vertexBaseID + ((i+1) * (numH+1)) + j; int index10 = vertexBaseID + ((i ) * (numH+1)) + j+1; int index11 = vertexBaseID + ((i+1) * (numH+1)) + j+1; a_mesh->newTriangle(index00, index01, index11); a_mesh->newTriangle(index00, index11, index10); } } } // build cylinder bottom - create vertices and triangles if ((a_includeBottom) && (a_radiusBottom > 0.0)) { double radius = a_radiusBottom / (double)(cMax((unsigned int)1, a_numRings)); cVector3d t(0.0, 0.0, 0.0); cVector3d n = cMul(a_rot, cVector3d(0,0,-1)); cVector3d p = a_pos; unsigned int vertex0 = a_mesh->newVertex(p, n, t, a_color); for (unsigned int i=0; i<numS; i++) { double ang = -(double)(i) * deltaAng; p = cAdd(a_pos, cMul(a_rot, cVector3d(radius * cos(ang), radius * sin(ang), 0.0))); a_mesh->newVertex(p, n, t, a_color); } vertexBaseID = vertex0 + 1; for (unsigned int i=0; i<numS; i++) { unsigned int vertex1 = vertexBaseID + i; unsigned int vertex2 = vertexBaseID + (i + 1)%numS; a_mesh->newTriangle(vertex0, vertex1, vertex2); } if (a_numRings > 1) { int rings = a_numRings - 1; for (int i=0; i<rings; i++) { // create vertices for (unsigned int j=0; j<numS; j++) { double ang = -(double)(j) * deltaAng; p = cAdd(a_pos, cMul(a_rot, cVector3d((i+2) * radius * cos(ang), (i+2) * radius * sin(ang), 0.0))); a_mesh->newVertex(p, n, t, a_color); } // create triangles for (unsigned int j=0; j<numS; j++) { unsigned int vertex00 = vertexBaseID + j; unsigned int vertex01 = vertexBaseID + (j + 1)%numS; unsigned int vertex10 = vertexBaseID + numS + j; unsigned int vertex11 = vertexBaseID + numS + (j + 1)%numS; a_mesh->newTriangle(vertex00, vertex11, vertex01); a_mesh->newTriangle(vertex00, vertex10, vertex11); } vertexBaseID = vertexBaseID + numS; } } } // build cylinder top - create vertices and triangles if ((a_includeTop) && (a_radiusTop > 0.0)) { double radius = a_radiusTop / (double)(cMax((unsigned int)1, a_numRings)); cVector3d t(1.0, 1.0, 0.0); cVector3d n = cMul(a_rot, cVector3d(0,0,1)); cVector3d p = cAdd(a_pos, cMul(a_rot, cVector3d(0,0,a_height))); unsigned int vertex0 = a_mesh->newVertex(p, n, t, a_color); for (unsigned int i=0; i<numS; i++) { double ang = (double)(i) * deltaAng; p = cAdd(a_pos, cMul(a_rot, cVector3d(radius * cos(ang), radius * sin(ang), a_height))); a_mesh->newVertex(p, n, t, a_color); } vertexBaseID = vertex0 + 1; for (unsigned int i=0; i<numS; i++) { unsigned int vertex1 = vertexBaseID + i; unsigned int vertex2 = vertexBaseID + (i + 1)%numS; a_mesh->newTriangle(vertex0, vertex1, vertex2); } if (a_numRings > 1) { int rings = a_numRings - 1; for (int i=0; i<rings; i++) { // create vertices for (unsigned int j=0; j<numS; j++) { double ang = (double)(j) * deltaAng; p = cAdd(a_pos, cMul(a_rot, cVector3d((i+2) * radius * cos(ang), (i+2) * radius * sin(ang), a_height))); a_mesh->newVertex(p, n, t, a_color); } // create triangles for (unsigned int j=0; j<numS; j++) { unsigned int vertex00 = vertexBaseID + j; unsigned int vertex01 = vertexBaseID + (j + 1)%numS; unsigned int vertex10 = vertexBaseID + numS + j; unsigned int vertex11 = vertexBaseID + numS + (j + 1)%numS; a_mesh->newTriangle(vertex00, vertex11, vertex01); a_mesh->newTriangle(vertex00, vertex10, vertex11); } vertexBaseID = vertexBaseID + numS; } } } } //============================================================================== /*! This function creates a pipe by defining a height, inner radius and outer radius. \param a_mesh Mesh object in which primitive is created. \param a_height Height of the pipe. \param a_innerRadius Inner radius of the pipe. \param a_outerRadius Outer radius of the pipe. \param a_numSides Number of sides composing the pipe. \param a_numHeightSegments Number of segments along the cylinder axis. \param a_pos Position where to build the new primitive. \param a_rot Orientation of the new primitive. \param a_color Color of vertices. */ //============================================================================== void cCreatePipe(cMesh* a_mesh, const double& a_height, const double& a_innerRadius, const double& a_outerRadius, const unsigned int a_numSides, const unsigned int a_numHeightSegments, const cVector3d& a_pos, const cMatrix3d& a_rot, const cColorf& a_color) { // sanity check unsigned int numS = cMax((unsigned int)3, a_numSides); unsigned int numH = cMax((unsigned int)1, a_numHeightSegments); double innerRadius = cMin(a_innerRadius, a_outerRadius); double outerRadius = cMax(a_innerRadius, a_outerRadius); // compute shared values double deltaAng = C_TWO_PI / (double)numS; double deltaLen = a_height / (double)numH; // get vertex base id int vertexBaseID; if (a_height > 0.0) { vertexBaseID = a_mesh->getNumVertices(); // create cylinder vertices for (unsigned int i=0; i<=numS; i++) { cVector3d p; double ang = (double)(i) * deltaAng; double cosAng = cos(ang); double sinAng = sin(ang); cVector3d n = cVector3d(cosAng, sinAng, 0.0); cVector3d n_ = cMul(a_rot, cVector3d(cosAng, sinAng, 0.0)); n_.normalize(); for (unsigned int j=0; j<=numH; j++) { cVector3d offset(0.0, 0.0, (double)j * deltaLen); n.mulr(outerRadius, p); cVector3d p_ = cAdd(a_pos, cMul(a_rot, p + offset)); cVector3d t_((double)(i)/(double)(numS), (double)(j)/(double)(numH), 0.0); a_mesh->newVertex(p_, n_, t_, a_color); } } // create cylinder triangles for (unsigned int i=0; i<numS; i++) { for (unsigned int j=0; j<numH; j++) { int index00 = vertexBaseID + ((i ) * (numH+1)) + j; int index01 = vertexBaseID + ((i+1) * (numH+1)) + j; int index10 = vertexBaseID + ((i ) * (numH+1)) + j+1; int index11 = vertexBaseID + ((i+1) * (numH+1)) + j+1; a_mesh->newTriangle(index00, index01, index11); a_mesh->newTriangle(index00, index11, index10); } } vertexBaseID = a_mesh->getNumVertices(); // create cylinder vertices for (unsigned int i=0; i<=numS; i++) { cVector3d p; double ang = (double)(i) * deltaAng; double cosAng = cos(ang); double sinAng = sin(ang); cVector3d n = cVector3d(cosAng, sinAng, 0.0); cVector3d n_ = cMul(a_rot, cVector3d(cosAng, sinAng, 0.0)); n_.normalize(); for (unsigned int j=0; j<=numH; j++) { cVector3d offset(0.0, 0.0, (double)j * deltaLen); n.mulr(innerRadius, p); cVector3d p_ = cAdd(a_pos, cMul(a_rot, p + offset)); cVector3d t_((double)(i)/(double)(numS), (double)(j)/(double)(numH), 0.0); a_mesh->newVertex(p_, n_, t_, a_color); } } // create cylinder triangles for (unsigned int i=0; i<numS; i++) { for (unsigned int j=0; j<numH; j++) { int index00 = vertexBaseID + ((i ) * (numH+1)) + j; int index01 = vertexBaseID + ((i+1) * (numH+1)) + j; int index10 = vertexBaseID + ((i ) * (numH+1)) + j+1; int index11 = vertexBaseID + ((i+1) * (numH+1)) + j+1; a_mesh->newTriangle(index00, index11, index01); a_mesh->newTriangle(index00, index10, index11); } } } // create extremities double deltaRadius = outerRadius - innerRadius; if (deltaRadius > 0.0) { // create top vertexBaseID = a_mesh->getNumVertices(); cVector3d t(0.0, 0.0, 0.0); cVector3d n = cMul(a_rot, cVector3d(0,0,-1)); for (unsigned int i=0; i<=numS; i++) { double ang = (double)(i) * deltaAng; cVector3d p0 = cAdd(a_pos, cMul(a_rot, cVector3d(outerRadius * cos(ang), outerRadius * sin(ang), 0.0))); cVector3d p1 = cAdd(a_pos, cMul(a_rot, cVector3d(innerRadius * cos(ang), innerRadius * sin(ang), 0.0))); a_mesh->newVertex(p0, n, t, a_color); a_mesh->newVertex(p1, n, t, a_color); } for (unsigned int i=0; i<numS; i++) { unsigned int vertex0 = vertexBaseID + (2*i); unsigned int vertex1 = vertexBaseID + (2*i) + 1; unsigned int vertex2 = vertexBaseID + (2*i) + 2; unsigned int vertex3 = vertexBaseID + (2*i) + 3; a_mesh->newTriangle(vertex0, vertex1, vertex2); a_mesh->newTriangle(vertex1, vertex3, vertex2); } // create bottom vertexBaseID = a_mesh->getNumVertices(); t.set(1.0, 1.0, 0.0); n = cMul(a_rot, cVector3d(0,0,1)); for (unsigned int i=0; i<=numS; i++) { double ang = (double)(i) * deltaAng; cVector3d p0 = cAdd(a_pos, cMul(a_rot, cVector3d(outerRadius * cos(ang), outerRadius * sin(ang), a_height))); cVector3d p1 = cAdd(a_pos, cMul(a_rot, cVector3d(innerRadius * cos(ang), innerRadius * sin(ang), a_height))); a_mesh->newVertex(p0, n, t, a_color); a_mesh->newVertex(p1, n, t, a_color); } for (unsigned int i=0; i<numS; i++) { unsigned int vertex0 = vertexBaseID + (2*i); unsigned int vertex1 = vertexBaseID + (2*i) + 1; unsigned int vertex2 = vertexBaseID + (2*i) + 2; unsigned int vertex3 = vertexBaseID + (2*i) + 3; a_mesh->newTriangle(vertex0, vertex2, vertex1); a_mesh->newTriangle(vertex1, vertex2, vertex3); } } } //============================================================================== /*! This function creates sphere by defining its radius. \param a_mesh Mesh object in which primitive is created. \param a_radius Radius of sphere. \param a_numSlices Specifies the number of subdivisions around the z axis (similar to lines of longitude). \param a_numStacks Specifies the number of subdivisions along the z axis (similar to lines of latitude). \param a_pos Position where to build the new primitive. \param a_rot Orientation of the new primitive. \param a_color Color of vertices. */ //============================================================================== void cCreateSphere(cMesh* a_mesh, const double& a_radius, const unsigned int a_numSlices, const unsigned int a_numStacks, const cVector3d& a_pos, const cMatrix3d& a_rot, const cColorf& a_color) { cCreateEllipsoid(a_mesh, a_radius, a_radius, a_radius, a_numSlices, a_numStacks, a_pos, a_rot, a_color); } //============================================================================== /*! This function creates an ellipsoid by defining the radius properties along each axis X, Y and Z. \param a_mesh Mesh object in which primitive is created. \param a_radiusX Radius along X axis. \param a_radiusY Radius along Y axis. \param a_radiusZ Radius along Z axis. \param a_numSlices Specifies the number of subdivisions around the z axis (similar to lines of longitude). \param a_numStacks Specifies the number of subdivisions along the z axis (similar to lines of latitude). \param a_pos Position where to build the new primitive. \param a_rot Orientation of the new primitive. \param a_color Color of vertices. */ //============================================================================== void cCreateEllipsoid(cMesh* a_mesh, const double& a_radiusX, const double& a_radiusY, const double& a_radiusZ, const unsigned int a_numSlices, const unsigned int a_numStacks, const cVector3d& a_pos, const cMatrix3d& a_rot, const cColorf& a_color) { // sanity check unsigned int numS = cMax((unsigned int)3, a_numSlices); unsigned int numH = cMax((unsigned int)2, a_numStacks); if (a_radiusX <= 0.0) { return; } if (a_radiusY <= 0.0) { return; } if (a_radiusZ <= 0.0) { return; } // compute shared values double deltaAngS = C_TWO_PI / (double)numS; double deltaAngH = C_PI / (double)(numH); double cX = 1.0 / a_radiusX; double cY = 1.0 / a_radiusY; double cZ = 1.0 / a_radiusZ; // get vertex base id int vertexBaseID = a_mesh->getNumVertices(); if (a_radiusZ > 0.0) { // create vertices for (unsigned int i=0; i<=numS; i++) { cVector3d p, n; double ang = (double)(i) * deltaAngS; double cosAng = cos(ang); double sinAng = sin(ang); for (unsigned int j=0; j<=numH; j++) { double angH = -C_PI_DIV_2 + (double)(j) * deltaAngH; double sinAngH = sin(angH); double cosAngH = cos(angH); p.set(a_radiusX * cosAng * cosAngH, a_radiusY * sinAng * cosAngH, a_radiusZ * sinAngH); n.set(cX * cosAng * cosAngH, cY * sinAng * cosAngH, cZ * sinAngH); n.normalize(); cVector3d n_ = cMul(a_rot, n); n_.normalize(); cVector3d p_ = cAdd(a_pos, cMul(a_rot, p)); cVector3d t_((double)(i)/(double)(numS), (double)(j)/(double)(numH), 0.0); a_mesh->newVertex(p_, n_, t_, a_color); } } // create triangles for (unsigned int i=0; i<numS; i++) { for (unsigned int j=0; j<numH; j++) { int index00 = vertexBaseID + ((i ) * (numH+1)) + j; int index01 = vertexBaseID + ((i+1) * (numH+1)) + j; int index10 = vertexBaseID + ((i ) * (numH+1)) + j+1; int index11 = vertexBaseID + ((i+1) * (numH+1)) + j+1; a_mesh->newTriangle(index00, index01, index11); a_mesh->newTriangle(index00, index11, index10); } } } } //============================================================================== /*! This function creates a torus by defining the inner and outer radius values. \param a_mesh Mesh object in which primitive is created. \param a_innerRadius Inner radius of the torus. \param a_outerRadius Outer radius of the torus. \param a_numSides Number of sides for each radial section. \param a_numRings Number of radial divisions for the torus. \param a_pos Position where to build the new primitive. \param a_rot Orientation of the new primitive. \param a_color Color of vertices. */ //============================================================================== void cCreateRing(cMesh* a_mesh, const double& a_innerRadius, const double& a_outerRadius, const unsigned int a_numSides, const unsigned int a_numRings, const cVector3d& a_pos, const cMatrix3d& a_rot, const cColorf& a_color) { // sanity check unsigned int numS = cMax((unsigned int)3, a_numSides); unsigned int numR = cMax((unsigned int)3, a_numRings); if (a_innerRadius < 0.0) { return; } if (a_outerRadius < 0.0) { return; } // compute step values double deltaAngS = C_TWO_PI / (double)numS; double deltaAngR = C_TWO_PI / (double)numR; // get vertex base id int vertexBaseID = a_mesh->getNumVertices(); // create vertices for (unsigned int i=0; i<=numR; i++) { double angR = (double)(i) * deltaAngR; double cosAngR = cos(angR); double sinAngR = sin(angR); cVector3d pos(-a_outerRadius * sinAngR, a_outerRadius * cosAngR, 0.0); cMatrix3d rot; rot.identity(); rot.rotateAboutGlobalAxisRad(cVector3d(0.0, 0.0, 1.0), angR); for (unsigned int j=0; j<=numS; j++) { double angS = (double)(j) * deltaAngS; double cosAngS = cos(angS); double sinAngS = sin(angS); cVector3d p_ = cAdd(a_pos, cMul(a_rot, cAdd(pos, cMul(rot, cVector3d(0.0, a_innerRadius * cosAngS, a_innerRadius * sinAngS))))); cVector3d n_ = cMul(a_rot, cMul(rot, cVector3d(0.0, cosAngS, sinAngS))); cVector3d t_((double)(j)/(double)(numS), (double)(i)/(double)(numR), 0.0); a_mesh->newVertex(p_, n_, t_, a_color); } } // create triangles for (unsigned int i=0; i<numR; i++) { for (unsigned int j=0; j<numS; j++) { int index00 = vertexBaseID + ((i ) * (numS+1)) + j; int index01 = vertexBaseID + ((i+1) * (numS+1)) + j; int index10 = vertexBaseID + ((i ) * (numS+1)) + j+1; int index11 = vertexBaseID + ((i+1) * (numS+1)) + j+1; a_mesh->newTriangle(index00, index01, index11); a_mesh->newTriangle(index00, index11, index10); } } } //============================================================================== /*! This function creates a torus by defining the inner and outer radius values. \param a_mesh Mesh object in which primitive is created. \param a_innerRadius0 Inner radius of the ring at the beginning extremity. \param a_innerRadius1 Inner radius of the ring at the end extremity. \param a_outerRadius Outer radius of the torus. \param a_coverageAngleDEG Coverage angle in degrees (from 0 to 360). \param a_includeExtremityFaces Include flat surfaces at extremities of ring section. \param a_numSides Number of sides for each radial section. \param a_numRings Number of radial divisions for the torus. \param a_pos Position where to build the new primitive. \param a_rot Orientation of the new primitive. \param a_color Color of vertices. */ //============================================================================== void cCreateRingSection(cMesh* a_mesh, const double& a_innerRadius0, const double& a_innerRadius1, const double& a_outerRadius, const double& a_coverageAngleDEG, const bool a_includeExtremityFaces, const unsigned int a_numSides, const unsigned int a_numRings, const cVector3d& a_pos, const cMatrix3d& a_rot, const cColorf& a_color) { // sanity check unsigned int numS = cMax((unsigned int)3, a_numSides); unsigned int numR = cMax((unsigned int)3, a_numRings); double coverageAngle = cClamp(a_coverageAngleDEG, 0.0, 360.0); if (coverageAngle == 0.0) { return; } bool includeExtremityFaces = a_includeExtremityFaces; if (coverageAngle == 360) { includeExtremityFaces = false; } if (a_innerRadius0 < 0.0) { return; } if (a_innerRadius1 < 0.0) { return; } if (a_outerRadius < 0.0) { return; } // compute step values double deltaAngS = C_TWO_PI / (double)numS; double deltaAngR = (coverageAngle / 360) * (C_TWO_PI / (double)numR); double deltaInnerRadius = (a_innerRadius1 - a_innerRadius0) / a_numRings; // get vertex base id int vertexBaseID = a_mesh->getNumVertices(); // create vertices for (unsigned int i=0; i<=numR; i++) { double angR = (double)(i) * deltaAngR; double cosAngR = cos(angR); double sinAngR = sin(angR); cVector3d pos(-a_outerRadius * sinAngR, a_outerRadius * cosAngR, 0.0); cMatrix3d rot; rot.identity(); rot.rotateAboutGlobalAxisRad(cVector3d(0.0, 0.0, 1.0), angR); double innerRadius = a_innerRadius0 + deltaInnerRadius * i; for (unsigned int j=0; j<=numS; j++) { double angS = (double)(j) * deltaAngS; double cosAngS = cos(angS); double sinAngS = sin(angS); cVector3d p_ = cAdd(a_pos, cMul(a_rot, cAdd(pos, cMul(rot, cVector3d(0.0, innerRadius * cosAngS, innerRadius * sinAngS))))); cVector3d n_ = cMul(a_rot, cMul(rot, cVector3d(0.0, cosAngS, sinAngS))); cVector3d t_((double)(j)/(double)(numS), (double)(i)/(double)(numR), 0.0); a_mesh->newVertex(p_, n_, t_, a_color); } } // create ring triangles for (unsigned int i=0; i<numR; i++) { for (unsigned int j=0; j<numS; j++) { int index00 = vertexBaseID + ((i ) * (numS+1)) + j; int index01 = vertexBaseID + ((i+1) * (numS+1)) + j; int index10 = vertexBaseID + ((i ) * (numS+1)) + j+1; int index11 = vertexBaseID + ((i+1) * (numS+1)) + j+1; a_mesh->newTriangle(index00, index01, index11); a_mesh->newTriangle(index00, index11, index10); } } // create extremity triangles if (includeExtremityFaces) { // extremity 0: if (a_innerRadius0 > 0.0) { for (unsigned int j=0; j<numS; j++) { int index0 = vertexBaseID; int index1 = vertexBaseID + j; int index2 = vertexBaseID + j+1; cVector3d pos0 = a_mesh->m_vertices->getLocalPos(index0); cVector3d pos1 = a_mesh->m_vertices->getLocalPos(index1); cVector3d pos2 = a_mesh->m_vertices->getLocalPos(index2); int triangleIndex = a_mesh->newTriangle(pos0, pos1, pos2); a_mesh->m_triangles->computeNormal(triangleIndex, true); } } // extremity 1: if (a_innerRadius1 > 0.0) { for (unsigned int j=0; j<numS; j++) { int index0 = vertexBaseID + (numR * numS); int index1 = vertexBaseID + (numR * numS) + j; int index2 = vertexBaseID + (numR * numS) + j+1; cVector3d pos0 = a_mesh->m_vertices->getLocalPos(index0); cVector3d pos1 = a_mesh->m_vertices->getLocalPos(index1); cVector3d pos2 = a_mesh->m_vertices->getLocalPos(index2); int triangleIndex = a_mesh->newTriangle(pos0, pos1, pos2); a_mesh->m_triangles->computeNormal(triangleIndex, true); } } } } //============================================================================== /*! This function creates a square pyramid. \param a_mesh Mesh object in which primitive is created. \param a_height Height of square pyramid. \param a_baseSize Size of a base of the pyramid. \param a_includeBottom If __true__, then the bottom (square) of the pyramid is included. \param a_pos Position where to build the new primitive. \param a_rot Orientation of the new primitive. \param a_color Color of vertices. */ //============================================================================== void cCreateSquarePyramid(cMesh* a_mesh, const double& a_height, const double& a_baseSize, const bool a_includeBottom, const cVector3d& a_pos, const cMatrix3d& a_rot, const cColorf& a_color) { // sanity check if (a_baseSize == 0.0) { return; } // temp variables cVector3d v0, v1, v2, v3; cVector3d t0, t1, t2, t3; cVector3d n; double s = a_baseSize / 2.0; // create texture coordinates t0.set(0.0, 0.0, 0.0); t1.set(1.0, 0.0, 0.0); t2.set(0.5, 1.0, 0.0); // create face 1 v0 = cAdd(a_pos, cMul(a_rot, cVector3d( s, -s, 0.0))); v1 = cAdd(a_pos, cMul(a_rot, cVector3d( s, s, 0.0))); v2 = cAdd(a_pos, cMul(a_rot, cVector3d(0.0, 0.0, a_height))); n = cMul(a_rot, cNormalize(cCross(cSub(v1, v0), cSub(v2, v1)))); a_mesh->newTriangle(v0, v1, v2, n, n, n, t0, t1, t2, a_color, a_color, a_color); // create face 2 v0 = cAdd(a_pos, cMul(a_rot, cVector3d( s, s, 0.0))); v1 = cAdd(a_pos, cMul(a_rot, cVector3d(-s, s, 0.0))); n = cMul(a_rot, cNormalize(cCross(cSub(v1, v0), cSub(v2, v1)))); a_mesh->newTriangle(v0, v1, v2, n, n, n, t0, t1, t2, a_color, a_color, a_color); // create face 3 v0 = cAdd(a_pos, cMul(a_rot, cVector3d(-s, s, 0.0))); v1 = cAdd(a_pos, cMul(a_rot, cVector3d(-s, -s, 0.0))); n = cMul(a_rot, cNormalize(cCross(cSub(v1, v0), cSub(v2, v1)))); a_mesh->newTriangle(v0, v1, v2, n, n, n, t0, t1, t2, a_color, a_color, a_color); // create face 4 v0 = cAdd(a_pos, cMul(a_rot, cVector3d(-s, -s, 0.0))); v1 = cAdd(a_pos, cMul(a_rot, cVector3d( s, -s, 0.0))); n = cMul(a_rot, cNormalize(cCross(cSub(v1, v0), cSub(v2, v1)))); a_mesh->newTriangle(v0, v1, v2, n, n, n, t0, t1, t2, a_color, a_color, a_color); // create bottom if (a_includeBottom) { v0 = cAdd(a_pos, cMul(a_rot, cVector3d( s, -s, 0.0))); v1 = cAdd(a_pos, cMul(a_rot, cVector3d( s, s, 0.0))); v2 = cAdd(a_pos, cMul(a_rot, cVector3d(-s, s, 0.0))); v3 = cAdd(a_pos, cMul(a_rot, cVector3d(-s, -s, 0.0))); n = cMul(a_rot, cVector3d(0.0, 0.0,-1.0)); t0.set(0.0, 1.0, 0.0); t1.set(1.0, 1.0, 0.0); t2.set(1.0, 0.0, 0.0); t3.set(0.0, 0.0, 0.0); a_mesh->newTriangle(v0, v3, v2, n, n, n, t0, t3, t2, a_color, a_color, a_color); a_mesh->newTriangle(v0, v2, v1, n, n, n, t0, t2, t1, a_color, a_color, a_color); } } //============================================================================== /*! This function creates a copy of the famous OpenGL tea pot. \param a_mesh Mesh object in which primitive is created. \param a_size Size of the tea pot. \param a_resolution Number of divisions per patch. \param a_pos Position where to build the new primitive. \param a_rot Orientation of the new primitive. \param a_color Color of vertices. */ //============================================================================== void cCreateTeaPot(cMesh* a_mesh, const double& a_size, const int& a_resolution, const cVector3d& a_pos, const cMatrix3d& a_rot, const cColorf& a_color) { // Teapot data const static int kTeapotNumPatches = 32; const static int kTeapotNumVertices = 306; const int teapotPatches[kTeapotNumPatches][16] = { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }, { 4, 17, 18, 19, 8, 20, 21, 22, 12, 23, 24, 25, 16, 26, 27, 28 }, { 19, 29, 30, 31, 22, 32, 33, 34, 25, 35, 36, 37, 28, 38, 39, 40 }, { 31, 41, 42, 1, 34, 43, 44, 5, 37, 45, 46, 9, 40, 47, 48, 13 }, { 13, 14, 15, 16, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60 }, { 16, 26, 27, 28, 52, 61, 62, 63, 56, 64, 65, 66, 60, 67, 68, 69 }, { 28, 38, 39, 40, 63, 70, 71, 72, 66, 73, 74, 75, 69, 76, 77, 78 }, { 40, 47, 48, 13, 72, 79, 80, 49, 75, 81, 82, 53, 78, 83, 84, 57 }, { 57, 58, 59, 60, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 }, { 60, 67, 68, 69, 88, 97, 98, 99, 92, 100, 101, 102, 96, 103, 104, 105 }, { 69, 76, 77, 78, 99, 106, 107, 108, 102, 109, 110, 111, 105, 112, 113, 114 }, { 78, 83, 84, 57, 108, 115, 116, 85, 111, 117, 118, 89, 114, 119, 120, 93 }, { 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136 }, { 124, 137, 138, 121, 128, 139, 140, 125, 132, 141, 142, 129, 136, 143, 144, 133 }, { 133, 134, 135, 136, 145, 146, 147, 148, 149, 150, 151, 152, 69, 153, 154, 155 }, { 136, 143, 144, 133, 148, 156, 157, 145, 152, 158, 159, 149, 155, 160, 161, 69 }, { 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177 }, { 165, 178, 179, 162, 169, 180, 181, 166, 173, 182, 183, 170, 177, 184, 185, 174 }, { 174, 175, 176, 177, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197 }, { 177, 184, 185, 174, 189, 198, 199, 186, 193, 200, 201, 190, 197, 202, 203, 194 }, { 204, 204, 204, 204, 207, 208, 209, 210, 211, 211, 211, 211, 212, 213, 214, 215 }, { 204, 204, 204, 204, 210, 217, 218, 219, 211, 211, 211, 211, 215, 220, 221, 222 }, { 204, 204, 204, 204, 219, 224, 225, 226, 211, 211, 211, 211, 222, 227, 228, 229 }, { 204, 204, 204, 204, 226, 230, 231, 207, 211, 211, 211, 211, 229, 232, 233, 212 }, { 212, 213, 214, 215, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245 }, { 215, 220, 221, 222, 237, 246, 247, 248, 241, 249, 250, 251, 245, 252, 253, 254 }, { 222, 227, 228, 229, 248, 255, 256, 257, 251, 258, 259, 260, 254, 261, 262, 263 }, { 229, 232, 233, 212, 257, 264, 265, 234, 260, 266, 267, 238, 263, 268, 269, 242 }, { 270, 270, 270, 270, 279, 280, 281, 282, 275, 276, 277, 278, 271, 272, 273, 274 }, { 270, 270, 270, 270, 282, 289, 290, 291, 278, 286, 287, 288, 274, 283, 284, 285 }, { 270, 270, 270, 270, 291, 298, 299, 300, 288, 295, 296, 297, 285, 292, 293, 294 }, { 270, 270, 270, 270, 300, 305, 306, 279, 297, 303, 304, 275, 294, 301, 302, 271 } }; const double teapotVertices[kTeapotNumVertices][3] = { { 1.4000, 0.0000, 2.4000 }, { 1.4000, -0.7840, 2.4000 }, { 0.7840, -1.4000, 2.4000 }, { 0.0000, -1.4000, 2.4000 }, { 1.3375, 0.0000, 2.5312 }, { 1.3375, -0.7490, 2.5312 }, { 0.7490, -1.3375, 2.5312 }, { 0.0000, -1.3375, 2.5312 }, { 1.4375, 0.0000, 2.5312 }, { 1.4375, -0.8050, 2.5312 }, { 0.8050, -1.4375, 2.5312 }, { 0.0000, -1.4375, 2.5312 }, { 1.5000, 0.0000, 2.4000 }, { 1.5000, -0.8400, 2.4000 }, { 0.8400, -1.5000, 2.4000 }, { 0.0000, -1.5000, 2.4000 }, {-0.7840, -1.4000, 2.4000 }, {-1.4000, -0.7840, 2.4000 }, {-1.4000, 0.0000, 2.4000 }, {-0.7490, -1.3375, 2.5312 }, {-1.3375, -0.7490, 2.5312 }, {-1.3375, 0.0000, 2.5312 }, {-0.8050, -1.4375, 2.5312 }, {-1.4375, -0.8050, 2.5312 }, {-1.4375, 0.0000, 2.5312 }, {-0.8400, -1.5000, 2.4000 }, {-1.5000, -0.8400, 2.4000 }, {-1.5000, 0.0000, 2.4000 }, {-1.4000, 0.7840, 2.4000 }, {-0.7840, 1.4000, 2.4000 }, { 0.0000, 1.4000, 2.4000 }, {-1.3375, 0.7490, 2.5312 }, {-0.7490, 1.3375, 2.5312 }, { 0.0000, 1.3375, 2.5312 }, {-1.4375, 0.8050, 2.5312 }, {-0.8050, 1.4375, 2.5312 }, { 0.0000, 1.4375, 2.5312 }, {-1.5000, 0.8400, 2.4000 }, {-0.8400, 1.5000, 2.4000 }, { 0.0000, 1.5000, 2.4000 }, { 0.7840, 1.4000, 2.4000 }, { 1.4000, 0.7840, 2.4000 }, { 0.7490, 1.3375, 2.5312 }, { 1.3375, 0.7490, 2.5312 }, { 0.8050, 1.4375, 2.5312 }, { 1.4375, 0.8050, 2.5312 }, { 0.8400, 1.5000, 2.4000 }, { 1.5000, 0.8400, 2.4000 }, { 1.7500, 0.0000, 1.8750 }, { 1.7500, -0.9800, 1.8750 }, { 0.9800, -1.7500, 1.8750 }, { 0.0000, -1.7500, 1.8750 }, { 2.0000, 0.0000, 1.3500 }, { 2.0000, -1.1200, 1.3500 }, { 1.1200, -2.0000, 1.3500 }, { 0.0000, -2.0000, 1.3500 }, { 2.0000, 0.0000, 0.9000 }, { 2.0000, -1.1200, 0.9000 }, { 1.1200, -2.0000, 0.9000 }, { 0.0000, -2.0000, 0.9000 }, {-0.9800, -1.7500, 1.8750 }, {-1.7500, -0.9800, 1.8750 }, {-1.7500, 0.0000, 1.8750 }, {-1.1200, -2.0000, 1.3500 }, {-2.0000, -1.1200, 1.3500 }, {-2.0000, 0.0000, 1.3500 }, {-1.1200, -2.0000, 0.9000 }, {-2.0000, -1.1200, 0.9000 }, {-2.0000, 0.0000, 0.9000 }, {-1.7500, 0.9800, 1.8750 }, {-0.9800, 1.7500, 1.8750 }, { 0.0000, 1.7500, 1.8750 }, {-2.0000, 1.1200, 1.3500 }, {-1.1200, 2.0000, 1.3500 }, { 0.0000, 2.0000, 1.3500 }, {-2.0000, 1.1200, 0.9000 }, {-1.1200, 2.0000, 0.9000 }, { 0.0000, 2.0000, 0.9000 }, { 0.9800, 1.7500, 1.8750 }, { 1.7500, 0.9800, 1.8750 }, { 1.1200, 2.0000, 1.3500 }, { 2.0000, 1.1200, 1.3500 }, { 1.1200, 2.0000, 0.9000 }, { 2.0000, 1.1200, 0.9000 }, { 2.0000, 0.0000, 0.4500 }, { 2.0000, -1.1200, 0.4500 }, { 1.1200, -2.0000, 0.4500 }, { 0.0000, -2.0000, 0.4500 }, { 1.5000, 0.0000, 0.2250 }, { 1.5000, -0.8400, 0.2250 }, { 0.8400, -1.5000, 0.2250 }, { 0.0000, -1.5000, 0.2250 }, { 1.5000, 0.0000, 0.1500 }, { 1.5000, -0.8400, 0.1500 }, { 0.8400, -1.5000, 0.1500 }, { 0.0000, -1.5000, 0.1500 }, {-1.1200, -2.0000, 0.4500 }, {-2.0000, -1.1200, 0.4500 }, {-2.0000, 0.0000, 0.4500 }, {-0.8400, -1.5000, 0.2250 }, {-1.5000, -0.8400, 0.2250 }, {-1.5000, 0.0000, 0.2250 }, {-0.8400, -1.5000, 0.1500 }, {-1.5000, -0.8400, 0.1500 }, {-1.5000, 0.0000, 0.1500 }, {-2.0000, 1.1200, 0.4500 }, {-1.1200, 2.0000, 0.4500 }, { 0.0000, 2.0000, 0.4500 }, {-1.5000, 0.8400, 0.2250 }, {-0.8400, 1.5000, 0.2250 }, { 0.0000, 1.5000, 0.2250 }, {-1.5000, 0.8400, 0.1500 }, {-0.8400, 1.5000, 0.1500 }, { 0.0000, 1.5000, 0.1500 }, { 1.1200, 2.0000, 0.4500 }, { 2.0000, 1.1200, 0.4500 }, { 0.8400, 1.5000, 0.2250 }, { 1.5000, 0.8400, 0.2250 }, { 0.8400, 1.5000, 0.1500 }, { 1.5000, 0.8400, 0.1500 }, {-1.6000, 0.0000, 2.0250 }, {-1.6000, -0.3000, 2.0250 }, {-1.5000, -0.3000, 2.2500 }, {-1.5000, 0.0000, 2.2500 }, {-2.3000, 0.0000, 2.0250 }, {-2.3000, -0.3000, 2.0250 }, {-2.5000, -0.3000, 2.2500 }, {-2.5000, 0.0000, 2.2500 }, {-2.7000, 0.0000, 2.0250 }, {-2.7000, -0.3000, 2.0250 }, {-3.0000, -0.3000, 2.2500 }, {-3.0000, 0.0000, 2.2500 }, {-2.7000, 0.0000, 1.8000 }, {-2.7000, -0.3000, 1.8000 }, {-3.0000, -0.3000, 1.8000 }, {-3.0000, 0.0000, 1.8000 }, {-1.5000, 0.3000, 2.2500 }, {-1.6000, 0.3000, 2.0250 }, {-2.5000, 0.3000, 2.2500 }, {-2.3000, 0.3000, 2.0250 }, {-3.0000, 0.3000, 2.2500 }, {-2.7000, 0.3000, 2.0250 }, {-3.0000, 0.3000, 1.8000 }, {-2.7000, 0.3000, 1.8000 }, {-2.7000, 0.0000, 1.5750 }, {-2.7000, -0.3000, 1.5750 }, {-3.0000, -0.3000, 1.3500 }, {-3.0000, 0.0000, 1.3500 }, {-2.5000, 0.0000, 1.1250 }, {-2.5000, -0.3000, 1.1250 }, {-2.6500, -0.3000, 0.9375 }, {-2.6500, 0.0000, 0.9375 }, {-2.0000, -0.3000, 0.9000 }, {-1.9000, -0.3000, 0.6000 }, {-1.9000, 0.0000, 0.6000 }, {-3.0000, 0.3000, 1.3500 }, {-2.7000, 0.3000, 1.5750 }, {-2.6500, 0.3000, 0.9375 }, {-2.5000, 0.3000, 1.1250 }, {-1.9000, 0.3000, 0.6000 }, {-2.0000, 0.3000, 0.9000 }, { 1.7000, 0.0000, 1.4250 }, { 1.7000, -0.6600, 1.4250 }, { 1.7000, -0.6600, 0.6000 }, { 1.7000, 0.0000, 0.6000 }, { 2.6000, 0.0000, 1.4250 }, { 2.6000, -0.6600, 1.4250 }, { 3.1000, -0.6600, 0.8250 }, { 3.1000, 0.0000, 0.8250 }, { 2.3000, 0.0000, 2.1000 }, { 2.3000, -0.2500, 2.1000 }, { 2.4000, -0.2500, 2.0250 }, { 2.4000, 0.0000, 2.0250 }, { 2.7000, 0.0000, 2.4000 }, { 2.7000, -0.2500, 2.4000 }, { 3.3000, -0.2500, 2.4000 }, { 3.3000, 0.0000, 2.4000 }, { 1.7000, 0.6600, 0.6000 }, { 1.7000, 0.6600, 1.4250 }, { 3.1000, 0.6600, 0.8250 }, { 2.6000, 0.6600, 1.4250 }, { 2.4000, 0.2500, 2.0250 }, { 2.3000, 0.2500, 2.1000 }, { 3.3000, 0.2500, 2.4000 }, { 2.7000, 0.2500, 2.4000 }, { 2.8000, 0.0000, 2.4750 }, { 2.8000, -0.2500, 2.4750 }, { 3.5250, -0.2500, 2.4938 }, { 3.5250, 0.0000, 2.4938 }, { 2.9000, 0.0000, 2.4750 }, { 2.9000, -0.1500, 2.4750 }, { 3.4500, -0.1500, 2.5125 }, { 3.4500, 0.0000, 2.5125 }, { 2.8000, 0.0000, 2.4000 }, { 2.8000, -0.1500, 2.4000 }, { 3.2000, -0.1500, 2.4000 }, { 3.2000, 0.0000, 2.4000 }, { 3.5250, 0.2500, 2.4938 }, { 2.8000, 0.2500, 2.4750 }, { 3.4500, 0.1500, 2.5125 }, { 2.9000, 0.1500, 2.4750 }, { 3.2000, 0.1500, 2.4000 }, { 2.8000, 0.1500, 2.4000 }, { 0.0000, 0.0000, 3.1500 }, { 0.0000, -0.0020, 3.1500 }, { 0.0020, 0.0000, 3.1500 }, { 0.8000, 0.0000, 3.1500 }, { 0.8000, -0.4500, 3.1500 }, { 0.4500, -0.8000, 3.1500 }, { 0.0000, -0.8000, 3.1500 }, { 0.0000, 0.0000, 2.8500 }, { 0.2000, 0.0000, 2.7000 }, { 0.2000, -0.1120, 2.7000 }, { 0.1120, -0.2000, 2.7000 }, { 0.0000, -0.2000, 2.7000 }, {-0.0020, 0.0000, 3.1500 }, {-0.4500, -0.8000, 3.1500 }, {-0.8000, -0.4500, 3.1500 }, {-0.8000, 0.0000, 3.1500 }, {-0.1120, -0.2000, 2.7000 }, {-0.2000, -0.1120, 2.7000 }, {-0.2000, 0.0000, 2.7000 }, { 0.0000, 0.0020, 3.1500 }, {-0.8000, 0.4500, 3.1500 }, {-0.4500, 0.8000, 3.1500 }, { 0.0000, 0.8000, 3.1500 }, {-0.2000, 0.1120, 2.7000 }, {-0.1120, 0.2000, 2.7000 }, { 0.0000, 0.2000, 2.7000 }, { 0.4500, 0.8000, 3.1500 }, { 0.8000, 0.4500, 3.1500 }, { 0.1120, 0.2000, 2.7000 }, { 0.2000, 0.1120, 2.7000 }, { 0.4000, 0.0000, 2.5500 }, { 0.4000, -0.2240, 2.5500 }, { 0.2240, -0.4000, 2.5500 }, { 0.0000, -0.4000, 2.5500 }, { 1.3000, 0.0000, 2.5500 }, { 1.3000, -0.7280, 2.5500 }, { 0.7280, -1.3000, 2.5500 }, { 0.0000, -1.3000, 2.5500 }, { 1.3000, 0.0000, 2.4000 }, { 1.3000, -0.7280, 2.4000 }, { 0.7280, -1.3000, 2.4000 }, { 0.0000, -1.3000, 2.4000 }, {-0.2240, -0.4000, 2.5500 }, {-0.4000, -0.2240, 2.5500 }, {-0.4000, 0.0000, 2.5500 }, {-0.7280, -1.3000, 2.5500 }, {-1.3000, -0.7280, 2.5500 }, {-1.3000, 0.0000, 2.5500 }, {-0.7280, -1.3000, 2.4000 }, {-1.3000, -0.7280, 2.4000 }, {-1.3000, 0.0000, 2.4000 }, {-0.4000, 0.2240, 2.5500 }, {-0.2240, 0.4000, 2.5500 }, { 0.0000, 0.4000, 2.5500 }, {-1.3000, 0.7280, 2.5500 }, {-0.7280, 1.3000, 2.5500 }, { 0.0000, 1.3000, 2.5500 }, {-1.3000, 0.7280, 2.4000 }, {-0.7280, 1.3000, 2.4000 }, { 0.0000, 1.3000, 2.4000 }, { 0.2240, 0.4000, 2.5500 }, { 0.4000, 0.2240, 2.5500 }, { 0.7280, 1.3000, 2.5500 }, { 1.3000, 0.7280, 2.5500 }, { 0.7280, 1.3000, 2.4000 }, { 1.3000, 0.7280, 2.4000 }, { 0.0000, 0.0000, 0.0000 }, { 1.5000, 0.0000, 0.1500 }, { 1.5000, 0.8400, 0.1500 }, { 0.8400, 1.5000, 0.1500 }, { 0.0000, 1.5000, 0.1500 }, { 1.5000, 0.0000, 0.0750 }, { 1.5000, 0.8400, 0.0750 }, { 0.8400, 1.5000, 0.0750 }, { 0.0000, 1.5000, 0.0750 }, { 1.4250, 0.0000, 0.0000 }, { 1.4250, 0.7980, 0.0000 }, { 0.7980, 1.4250, 0.0000 }, { 0.0000, 1.4250, 0.0000 }, {-0.8400, 1.5000, 0.1500 }, {-1.5000, 0.8400, 0.1500 }, {-1.5000, 0.0000, 0.1500 }, {-0.8400, 1.5000, 0.0750 }, {-1.5000, 0.8400, 0.0750 }, {-1.5000, 0.0000, 0.0750 }, {-0.7980, 1.4250, 0.0000 }, {-1.4250, 0.7980, 0.0000 }, {-1.4250, 0.0000, 0.0000 }, {-1.5000, -0.8400, 0.1500 }, {-0.8400, -1.5000, 0.1500 }, { 0.0000, -1.5000, 0.1500 }, {-1.5000, -0.8400, 0.0750 }, {-0.8400, -1.5000, 0.0750 }, { 0.0000, -1.5000, 0.0750 }, {-1.4250, -0.7980, 0.0000 }, {-0.7980, -1.4250, 0.0000 }, { 0.0000, -1.4250, 0.0000 }, { 0.8400, -1.5000, 0.1500 }, { 1.5000, -0.8400, 0.1500 }, { 0.8400, -1.5000, 0.0750 }, { 1.5000, -0.8400, 0.0750 }, { 0.7980, -1.4250, 0.0000 }, { 1.4250, -0.7980, 0.0000 }}; // get index of first triangle and vertex int indexTriangle = a_mesh->m_triangles->getNumElements(); int indexVertex = a_mesh->m_vertices->getNumElements(); // compute scale factor by taking intto account original size of object double scale = (1.0 / 6.4335) * a_size; // create patches cVector3d controlPoints[16]; for (int np = 0; np < kTeapotNumPatches; ++np) { // set the control points for the current patch for (int i = 0; i < 16; ++i) { controlPoints[i].set(scale * teapotVertices[teapotPatches[np][i] - 1][0], scale * teapotVertices[teapotPatches[np][i] - 1][1], scale * teapotVertices[teapotPatches[np][i] - 1][2]); } // generate patch cCreateBezierPatch(a_mesh, controlPoints, a_resolution, a_pos, a_rot, a_color); } // flip triangles int numTriangles = a_mesh->getNumTriangles(); for (int i = indexTriangle; i < numTriangles; i++) { a_mesh->m_triangles->flip(i); } // offset and translate model int numVertices = a_mesh->getNumVertices(); for (int i = indexVertex; i < numVertices; i++) { cVector3d v = cAdd(a_pos, cMul(a_rot, a_mesh->m_vertices->getLocalPos(i))); a_mesh->m_vertices->setLocalPos(i, v); cVector3d n = cMul(a_rot, a_mesh->m_vertices->getNormal(i)); a_mesh->m_vertices->setNormal(i, n); } } //============================================================================== /*! This function creates a linear arrow. \param a_mesh Mesh object in which primitive is created. \param a_length Length of arrow. \param a_radiusShaft Radius of arrow shaft. \param a_lengthTip Length or arrow tip. \param a_radiusTip Radius of arrow tip. \param a_includeTipsAtBothExtremities Include tip at both extremities of arrow. \param a_numSides Number of sides for each radial section. \param a_direction Direction of arrow. \param a_pos Position where to build the new primitive. \param a_color Color of vertices. */ //============================================================================== void cCreateArrow(cMesh* a_mesh, const double& a_length, const double& a_radiusShaft, const double& a_lengthTip, const double& a_radiusTip, const bool a_includeTipsAtBothExtremities, const unsigned int a_numSides, const cVector3d& a_direction, const cVector3d& a_pos, const cColorf& a_color) { // sanity check if ((a_direction.length() == 0.0) || (a_length < 0) || (a_radiusShaft < 0) || (a_lengthTip < 0) || (a_radiusTip > 360)) { return; } // create rotation frame from direction vector cVector3d vx,vy,vz,t0,t1, t;; t0.set(1,0,0); t1.set(0,1,0); vz = cNormalize(a_direction); double ang0 = cAngle(vz, t0); double ang1 = cAngle(vz, t1); if (ang0>ang1) { t = cCross(vz, t0); } else { t = cCross(vz, t1); } vy = cNormalize(t); vx = cNormalize(cCross(vy, vz)); cMatrix3d rot; rot.setCol(vx, vy, vz); cVector3d offset0, offset1, offset2; double length; if (a_includeTipsAtBothExtremities) { length = a_length - 2.0 * a_lengthTip; offset0.set(0, 0, length + a_lengthTip); offset1.set(0, 0, a_lengthTip); } else { length = a_length - 1.0 * a_lengthTip; offset0.set(0, 0, length); offset1.set(0, 0, 0); } // create first tip cVector3d pos0 = cAdd(a_pos, cMul(rot, offset0)); cMatrix3d rot0 = rot; cCreateCone(a_mesh, a_lengthTip, a_radiusTip, 0.0, a_numSides, 1, 1, true, false, pos0, rot0, a_color); // create arrow shaft cVector3d pos1 = cAdd(a_pos, cMul(rot, offset1)); cMatrix3d rot1 = rot; if (length > 0) { cCreateCylinder(a_mesh, length, a_radiusShaft, a_numSides, 1, 1, true, true, pos1, rot1, a_color); } // create possibly second tip if (a_includeTipsAtBothExtremities) { offset2.set(0, 0, a_lengthTip); cVector3d pos2 = cAdd(a_pos, cMul(rot, offset2)); cMatrix3d rot2p; rot2p.identity(); rot2p.rotateAboutGlobalAxisDeg(cVector3d(1,0,0), 180); cMatrix3d rot2 = cMul(rot,rot2p); cCreateCone(a_mesh, a_lengthTip, a_radiusTip, 0.0, a_numSides, 1, 1, true, false, pos2, rot2, a_color); } } //============================================================================== /*! This function creates a circular arrow. \param a_mesh Mesh object in which primitive is created. \param a_innerRadius0 Length of arrow. \param a_innerRadius1 Radius of arrow shaft. \param a_outerRadius Radius of arrow shaft. \param a_lengthTip Length or arrow tip. \param a_radiusTip Radius of arrow tip. \param a_coverageAngleDeg Coverage angle of the arrow (0-360 degrees) \param a_includeTipsAtBothExtremities Include tip at both extremities of arrow. \param a_numSides Number of sides for each radial section. \param a_numRings Number of radial divisions for the circular shaft. \param a_direction Direction of circular arrow plane. \param a_pos Position where to build the new primitive. \param a_color Color of vertices. */ //============================================================================== void cCreateCircularArrow(cMesh* a_mesh, const double& a_innerRadius0, const double& a_innerRadius1, const double& a_outerRadius, const double& a_lengthTip, const double& a_radiusTip, const double& a_coverageAngleDeg, const bool a_includeTipsAtBothExtremities, const unsigned int a_numSides, const unsigned int a_numRings, const cVector3d& a_direction, const cVector3d& a_pos, const cColorf& a_color) { // sanity check if ((a_direction.length() == 0.0) || (a_innerRadius0 < 0) || (a_innerRadius1 < 0) || (a_coverageAngleDeg < 0) || (a_coverageAngleDeg > 360) || (a_outerRadius < 0) || (a_outerRadius < 0)) { return; } // create rotation frame from direction vector cVector3d vx,vy,vz,t0,t1, t;; t0.set(1,0,0); t1.set(0,1,0); vz = cNormalize(a_direction); double ang0 = cAngle(vz, t0); double ang1 = cAngle(vz, t1); if (ang0>ang1) { t = cCross(vz, t0); } else { t = cCross(vz, t1); } vy = cNormalize(t); vx = cNormalize(cCross(vy, vz)); cMatrix3d rot; rot.setCol(vx, vy, vz); // create ring cCreateRingSection(a_mesh, a_innerRadius0, a_innerRadius1, a_outerRadius, a_coverageAngleDeg, true, a_numSides, a_numRings, a_pos, rot, a_color); cVector3d offset0, offset1, pos0, pos1; cMatrix3d rot0, rot0p, rot1, rot1p; offset0.set(a_outerRadius * cCosDeg(a_coverageAngleDeg + 90), a_outerRadius * cSinDeg(a_coverageAngleDeg + 90), 0.0); pos0 = cAdd(a_pos, cMul(rot, offset0)); rot0p.identity(); rot0p.rotateAboutGlobalAxisDeg(cVector3d(0,1,0), -90); rot0p.rotateAboutGlobalAxisDeg(cVector3d(0,0,1), a_coverageAngleDeg); rot0 = cMul(rot,rot0p); // create first arrow tip cCreateCone(a_mesh, a_lengthTip, a_radiusTip, 0.0, a_numSides, 1, 1, true, false, pos0, rot0, a_color); // create second arrow tip if (a_includeTipsAtBothExtremities) { offset1.set(0, a_outerRadius, 0); pos1 = cAdd(a_pos, cMul(rot, offset1)); rot1p.identity(); rot1p.rotateAboutGlobalAxisDeg(cVector3d(0,1,0), 90); rot1 = cMul(rot, rot1p); // create first arrow tip cCreateCone(a_mesh, a_lengthTip, a_radiusTip, 0.0, a_numSides, 1, 1, true, false, pos1, rot1, a_color); } } //============================================================================== /*! This function creates a Bezier patch from a set of control points. \param a_mesh Mesh object in which primitive is created. \param a_controlPoints Bezier control points (16). \param a_numDivisions Number of division along each side of the patch. \param a_pos Position where to build the new primitive. \param a_rot Orientation of the new primitive. \param a_color Color of vertices. */ //============================================================================== void cCreateBezierPatch(cMesh* a_mesh, const cVector3d *a_controlPoints, const int a_numDivisions, const cVector3d& a_pos, const cMatrix3d& a_rot, const cColorf& a_color) { // get index of first vertex int index = a_mesh->getNumVertices(); // create patch cCreateMap(a_mesh, 1.0, 1.0, a_numDivisions, a_numDivisions, a_pos, a_rot, a_color); // compute position of all points for (int j = 0, k = index; j <= a_numDivisions; ++j) { double v = j / (double)a_numDivisions; for (int i = 0; i <= a_numDivisions; ++i, ++k) { double u = i / (double)a_numDivisions; cVector3d p = cEvalBezierPatch(a_controlPoints, u, v); cVector3d dU = cDerivUBezier(a_controlPoints, u, v); cVector3d dV = cDerivVBezier(a_controlPoints, u, v); cVector3d n = cNormalize(cCross(dU, dV)); a_mesh->m_vertices->setLocalPos(k, p); a_mesh->m_vertices->setNormal(k, n); a_mesh->m_vertices->setTangent(k, dU); a_mesh->m_vertices->setTangent(k, dV); } } } //------------------------------------------------------------------------------ } // namespace chai3d //------------------------------------------------------------------------------
.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 a, 08 ld(hl++), a inc l inc l ld a, d ld(hl++), a ld a, 08 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, 28 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, 48 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, 48 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, 02 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
; A134953: Length of the longest prime implicant of the Y function of order n. ; Submitted by Jon Maiga ; 0,2,3,4,6,8,11,14,18,23,27 mul $0,2 mov $1,$0 lpb $1 mul $0,2 pow $0,2 mov $1,1 mov $2,2 lpe add $3,33 add $0,$3 div $0,63 add $0,$2
; A214560: Number of 0's in binary expansion of n^2. ; 1,0,2,2,4,2,4,3,6,4,4,2,6,4,5,4,8,6,6,4,6,3,4,7,8,5,6,4,7,5,6,5,10,8,8,6,8,5,6,4,8,6,5,4,6,3,9,8,10,7,7,7,8,4,6,5,9,6,7,5,8,6,7,6,12,10,10,8,10,7,8,6,10,7,7,4,8,6,6,8,10,7,8,5,7,6,6,6,8,4,5,9,11,8,10,9,12,9,9,8,9,5,9,7,10,8,6,6,8,6,7,10,11,7,8,6,9,5,7,6,10,7,8,6,9,7,8,7,14,12,12,10,12,9,10,8,12,9,9,6,10,7,8,6,12,10,9,8,9,6,6,9,10,6,8,5,8,10,10,9,12,9,9,6,10,7,7,6,9,6,8,7,8,6,8,6,10,7,6,6,7,2,11,10,13,9,10,10,12,9,11,10,14,11,11,10,11,7,10,8,11,7,7,8,11,10,9,8,12,9,10,6,8,8,8,9,10,5,8,6,9,6,12,11,13,9,9,9,10,7,8,9,11,10,7,5,9,6,8,7,12,8,9,7,10,6,8,7,11,8 pow $0,2 mov $3,1 add $3,$0 lpb $0 div $0,2 add $0,1 sub $3,$0 sub $0,1 mov $2,$3 lpe mov $1,14 mov $3,$2 add $3,2 add $1,$3 sub $0,$1 add $0,17968504 mov $1,$0 sub $1,17968487
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %r14 push %r15 push %r8 push %r9 push %rbp push %rcx push %rdi push %rsi lea addresses_A_ht+0x3a9a, %r9 nop nop nop nop xor %r13, %r13 vmovups (%r9), %ymm7 vextracti128 $1, %ymm7, %xmm7 vpextrq $0, %xmm7, %rbp nop nop add $38738, %r10 lea addresses_WT_ht+0xd8c2, %r14 nop sub $58073, %r8 mov $0x6162636465666768, %rbp movq %rbp, %xmm1 vmovups %ymm1, (%r14) nop nop nop add %r14, %r14 lea addresses_normal_ht+0x2cc2, %r8 nop xor %r15, %r15 movw $0x6162, (%r8) nop nop nop nop sub %r9, %r9 lea addresses_A_ht+0x150c2, %r14 nop nop nop nop nop inc %r13 movl $0x61626364, (%r14) nop nop nop cmp $10895, %r15 lea addresses_D_ht+0xf2c2, %rsi lea addresses_normal_ht+0x133a2, %rdi clflush (%rsi) nop cmp $3409, %r15 mov $76, %rcx rep movsq xor %rsi, %rsi lea addresses_WT_ht+0x69c2, %r10 cmp %r13, %r13 mov (%r10), %r8w nop nop nop nop dec %r15 lea addresses_D_ht+0x14fc9, %rbp nop nop nop nop xor %rsi, %rsi mov $0x6162636465666768, %rdi movq %rdi, (%rbp) nop nop nop nop add %r15, %r15 lea addresses_A_ht+0x10025, %r13 nop nop nop nop lfence movb $0x61, (%r13) nop nop nop nop nop xor %r10, %r10 lea addresses_normal_ht+0x7c7a, %r10 and $3688, %rcx and $0xffffffffffffffc0, %r10 movntdqa (%r10), %xmm1 vpextrq $0, %xmm1, %r14 nop nop nop nop sub %rdi, %rdi lea addresses_normal_ht+0x17cc2, %rsi lea addresses_WC_ht+0xa942, %rdi nop nop nop dec %r9 mov $33, %rcx rep movsb nop nop nop nop nop xor $49999, %r10 lea addresses_D_ht+0x10a42, %r9 nop nop add $61952, %r10 vmovups (%r9), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $1, %xmm1, %r14 nop nop nop nop nop dec %rbp lea addresses_D_ht+0x32be, %rcx sub $42281, %rdi vmovups (%rcx), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $0, %xmm2, %r14 nop nop add $9, %rsi lea addresses_UC_ht+0x124c2, %r9 clflush (%r9) nop and $18847, %r10 movl $0x61626364, (%r9) nop nop nop nop nop and %rdi, %rdi pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r8 pop %r15 pop %r14 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r15 push %rax push %rdx push %rsi // Store lea addresses_WC+0x5102, %rsi nop nop nop nop nop and %r13, %r13 mov $0x5152535455565758, %r10 movq %r10, (%rsi) nop nop nop and %r15, %r15 // Faulty Load lea addresses_D+0x18cc2, %rax nop nop nop nop nop xor $64940, %rsi mov (%rax), %r10d lea oracles, %r15 and $0xff, %r10 shlq $12, %r10 mov (%r15,%r10,1), %r10 pop %rsi pop %rdx pop %rax pop %r15 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_D', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WC', 'same': False, 'size': 8, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_D', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 32, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_normal_ht', 'same': True, 'size': 2, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 4, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WT_ht', 'same': True, 'size': 2, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'same': True, 'size': 16, 'congruent': 1, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': True}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 32, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 32, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_UC_ht', 'same': True, 'size': 4, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'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 */
/* $Id$ $Revision$ */ /* vim:set shiftwidth=4 ts=8: */ /************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ *************************************************************************/ #include "config.h" #include <stdlib.h> #include <stddef.h> #include <string.h> #include "gvplugin_loadimage.h" #include "gvplugin_gdiplus.h" #include <windows.h> #include "GdiPlus.h" #include "FileStream.h" using namespace Gdiplus; static void gdiplus_freeimage(usershape_t *us) { delete (Image*)us->data; } static Image* gdiplus_loadimage(GVJ_t * job, usershape_t *us) { assert(job); assert(us); assert(us->name); if (us->data && us->datafree != gdiplus_freeimage) { us->datafree(us); /* free incompatible cache data */ us->data = NULL; us->datafree = NULL; } if (!us->data) { /* read file into cache */ if (!gvusershape_file_access(us)) return NULL; /* create image from the usershape file */ /* NOTE: since Image::FromStream consumes the stream, we assume FileStream's lifetime should be shorter than us->name and us->f... */ IStream *stream = FileStream::Create((char*)us->name, us->f); us->data = Image::FromStream (stream); /* clean up */ if (us->data) us->datafree = gdiplus_freeimage; stream->Release(); gvusershape_file_release(us); } return (Image *)(us->data); } static void gdiplus_loadimage_gdiplus(GVJ_t * job, usershape_t *us, boxf b, boolean filled) { /* get the image from usershape details, then blit it to the context */ Image *image = gdiplus_loadimage(job, us); if (image) ((Graphics *)job->context)->DrawImage(image, RectF(b.LL.x, b.LL.y, b.UR.x - b.LL.x, b.UR.y - b.LL.y)); } static gvloadimage_engine_t engine = { gdiplus_loadimage_gdiplus }; gvplugin_installed_t gvloadimage_gdiplus_types[] = { {FORMAT_BMP, "bmp:gdiplus", 8, &engine, NULL}, {FORMAT_GIF, "gif:gdiplus", 8, &engine, NULL}, {FORMAT_JPEG, "jpe:gdiplus", 8, &engine, NULL}, {FORMAT_JPEG, "jpeg:gdiplus", 8, &engine, NULL}, {FORMAT_JPEG, "jpg:gdiplus", 8, &engine, NULL}, {FORMAT_PNG, "png:gdiplus", 8, &engine, NULL}, {0, NULL, 0, NULL, NULL} };
; A080424: a(n) = 3*a(n-1) + 18*a(n-2), a(0)=0, a(1)=1. ; 0,1,3,27,135,891,5103,31347,185895,1121931,6711903,40330467,241805655,1451365371,8706597903,52244370387,313451873415,1880754287211,11284396583103,67706766919107,406239439253175,2437440122303451 add $0,1 mov $4,2 lpb $0 sub $0,1 mov $3,$1 mov $1,$2 mul $1,6 add $4,$3 mul $4,3 mov $2,$4 lpe div $1,36
SECTION code_stdio PUBLIC __stdio_scanf_c EXTERN STDIO_SEEK_CUR EXTERN __stdio_recv_input_read EXTERN l_addu_hl_bc, asm0_fseek_unlocked __stdio_scanf_c: ; %c converter called from vfscanf() ; ; enter : ix = FILE * ; bc = field width (0 means default) ; hl = void *p (0 means assignment suppression) ; ; exit : carry set if error ; ; uses : all except ix ; DEFAULT FIELD WIDTH ld a,b or c jr nz, width_specified inc c ; default is one char width_specified: ld a,h or l jr z, assignment_suppressed ; READ CHARS FROM STREAM ex de,hl ; de = void *buffer call __stdio_recv_input_read ret c ; any kind of error is a failure exx inc hl ; number of assigned items++ exx ret assignment_suppressed: ; SEEK PAST CHARS FROM STREAM ; forward seek is always successful even if it passes end of file ld l,c ld h,b ld de,0 ; dehl = forward seek offset ld c,STDIO_SEEK_CUR push hl ; save forward seek offset exx push de ; save chars read from stream push hl ; save items assigned exx call asm0_fseek_unlocked pop de ; de = items assigned pop hl ; hl = chars read from stream pop bc ; bc = forward seek offset call l_addu_hl_bc ex de,hl exx or a ret
; A055037: Number of numbers <= n with an even number of prime factors (counted with multiplicity). ; 1,1,1,2,2,3,3,3,4,5,5,5,5,6,7,8,8,8,8,8,9,10,10,11,12,13,13,13,13,13,13,13,14,15,16,17,17,18,19,20,20,20,20,20,20,21,21,21,22,22,23,23,23,24,25,26,27,28,28,29,29,30,30,31,32,32,32,32,33,33,33,33,33,34,34,34 mov $1,$0 seq $1,55038 ; Number of numbers <= n with an odd number of prime factors (counted with multiplicity). sub $0,$1 add $0,1
cpu 1802 r0 = 0 r1 = 1 r2 = 2 r3 = 3 r4 = 4 r5 = 5 rd = 13 re = 14 rf = 15 dis ldi 01Eh plo r2 ; working stack. ldi 00h phi r2 ldi start & 255 plo r4 ldi start / 256 phi r4 sep r4 org 100h v2 = 0FFFFh v1 = 00001h start: sex r2 dec r2 ldi v1/256 ; set up for 0+ pending stxd ; X+2 = high byte ldi v1&255 stxd ldi '*' str r2 ; ; get next term into RF. ; ldi 0 ; RE is used for the counter/total for multiply/divide phi re plo re phi rf ; the RF value is initialised to zero for digit constants. plo rf ldi v2/256 phi rf ldi v2&255 plo rf ; ; Now we have the right hand term in RF, R(X) points to the operator, then low left then high left ; lda r2 ; restore the operator and pop off the stack. xri '+' ; is it + (add) bnz __NotPlus ; ; 16 bit addition ; glo rf ; low byte add str r2 ghi rf ; high byte inc r2 adc br __WriteHighAndExit __NotPlus: xri '+'!'*' ; is it * (multiply) bnz __NotMultiply ; ; 16 bit multiplication....... slow but compact. 1 x 65535 about 16 seconds :) ; __MultiplyLoop: glo rf ; check completed (e.g. RF = 0) bnz __MultiplyContinuing ghi rf bz __SaveREtoResult __MultiplyContinuing: dec rf ; one fewer add glo re add plo re ghi re inc r2 adc phi re dec r2 br __MultiplyLoop __NotMultiply: xri '*'!'/' ; check if it is divide. bnz __NotAddMulDiv ; it is not + * or / ; ; 16 bit division. like multiply, 65535 / 1 takes about 16 seconds :) ; glo rf ; check divide by zero (e.g. RF = 0) bnz __DivideLoop ghi rf bz __SaveREToResult ; if RF is zero then return 0 - so n/0 = 0 in this. __DivideLoop: glo rf ; subtract once. sd plo rd ; save result in RD in case we borrow out. ghi rf inc r2 sdb bnf __DivideCompleted ; if DF = 0 we have finished the division. stxd ; save a-b back on stack space. glo rd str r2 inc re ; we've done it once. br __DivideLoop __DivideCompleted: ldn r2 ; this is remainder high - TODO: save it dec r2 ldn r2 ; this is remainder low. - TODO: save it. __SaveREToResult: glo re ; copy RE to the final result. str r2 inc r2 ghi re br __WriteHighAndExit __NotAddMulDiv: ; we don't know, so we do -, it's probably - > < = glo rf sd str r2 ghi rf inc r2 sdb __WriteHighAndExit: stxd ; ; Subtraction. ; EndEvaluate: ; R2 points to the result. br EndEvaluate
; A186295: A007519(n)-2. ; 15,39,71,87,95,111,135,191,231,239,255,279,311,335,351,399,407,431,447,455,519,567,575,591,599,615,639,671,759,767,807,855,879,927,935,951,975,1007,1031,1047,1095,1127,1151,1191,1199,1215 seq $0,5123 ; Numbers n such that 8n + 1 is prime. mul $0,8 sub $0,1
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r14 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x4348, %r10 nop and $24674, %rdx movb (%r10), %r14b nop nop nop nop nop xor $61553, %rbx lea addresses_UC_ht+0x13648, %rsi lea addresses_WC_ht+0x1a5a8, %rdi clflush (%rdi) nop sub $64451, %rdx mov $17, %rcx rep movsq xor %rbx, %rbx lea addresses_normal_ht+0x18748, %rdx clflush (%rdx) nop inc %rcx movw $0x6162, (%rdx) nop nop nop nop cmp %rsi, %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r14 pop %r10 ret .global s_faulty_load s_faulty_load: push %r12 push %r14 push %r15 push %rax push %rbp push %rbx push %rcx // Store lea addresses_normal+0x1bdc0, %rax clflush (%rax) nop nop nop and $57905, %r14 mov $0x5152535455565758, %rcx movq %rcx, %xmm5 vmovups %ymm5, (%rax) xor %r14, %r14 // Load lea addresses_normal+0x1dd48, %rax nop nop nop nop and $57535, %r12 mov (%rax), %r14 nop nop nop nop and %r12, %r12 // Store lea addresses_D+0x1e438, %r15 nop nop nop sub %r14, %r14 movl $0x51525354, (%r15) nop nop add %rcx, %rcx // Load lea addresses_WT+0x18e48, %r14 nop nop add $45721, %rbx movups (%r14), %xmm7 vpextrq $1, %xmm7, %rbp nop nop nop nop nop xor %rbp, %rbp // Faulty Load lea addresses_US+0x10e48, %rbx nop nop nop cmp %r14, %r14 movb (%rbx), %r15b lea oracles, %rbp and $0xff, %r15 shlq $12, %r15 mov (%rbp,%r15,1), %r15 pop %rcx pop %rbx pop %rbp pop %rax pop %r15 pop %r14 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_US', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_normal', 'same': False, 'size': 32, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal', 'same': False, 'size': 8, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_D', 'same': False, 'size': 4, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WT', 'same': False, 'size': 16, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_US', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 1, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': True}, 'OP': 'REPM'} {'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 2, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'00': 161} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
; A094761: a(n) = n + (square excess of n). ; 0,1,3,5,4,6,8,10,12,9,11,13,15,17,19,21,16,18,20,22,24,26,28,30,32,25,27,29,31,33,35,37,39,41,43,45,36,38,40,42,44,46,48,50,52,54,56,58,60,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,64,66,68,70,72,74,76,78 mov $2,$0 lpb $2,1 mov $1,$0 sub $2,1 add $1,$2 add $3,2 trn $2,$3 lpe