Naglfar Posted April 9, 2012 Share Posted April 9, 2012 do any of you know this programming shit teach me your ways Quote Link to comment Share on other sites More sharing options...
Junkhead Posted April 9, 2012 Share Posted April 9, 2012 What about it. Quote Link to comment Share on other sites More sharing options...
Dr. Tarrasque Posted April 9, 2012 Share Posted April 9, 2012 This is not serious. Quote Link to comment Share on other sites More sharing options...
Quintessence Posted April 9, 2012 Share Posted April 9, 2012 ... if (you=="want help") { cout<<endl<<"Ask Camtech about it :S"<<endl; else { cout<<endl<<"DERP"<<endl; } } ... Quote Link to comment Share on other sites More sharing options...
Inactive Account Posted April 9, 2012 Share Posted April 9, 2012 (edited) if(learningC == true){ int p = 20; printf("just get the Kernighan and Ritchie book\n"); printf("pick that shit up from a library or it's like %d bucks used on Amazon\n", p); } give me proper indentation or give me death Edited April 9, 2012 by kdanger Quote Link to comment Share on other sites More sharing options...
Biabarr Posted April 9, 2012 Share Posted April 9, 2012 My answer depends on what you want to do...since my C++ knowledge is pretty basic. Quote Link to comment Share on other sites More sharing options...
Thor Odinson Posted April 9, 2012 Share Posted April 9, 2012 ... if (you=="want help") { cout<<endl<<"Ask Camtech about it :S"<<endl; else { cout<<endl<<"DERP"<<endl; } } ... Not sure if Camcam is very familiar with C/C++. He can probably read it, but afaik his more familiar languages are Java, Python, and ASM. Quote Link to comment Share on other sites More sharing options...
CT075 Posted April 9, 2012 Share Posted April 9, 2012 (edited) ... if (you=="want help") { cout<<endl<<"Ask Camtech about it :S"<<endl; else { cout<<endl<<"DERP"<<endl; } } ... A) indentation plz B) I'm not as comfortable with C/++ but I know enough about it to read it. Dunno if I could actually teach it to you. C) why am i suddenly the dude to go to for programming help anyway EDIT: @rimu: i can read basically anything that's C-derived (if you ask me to write something in them that's a different story) and ruby/python. and asm. for the most part as long as the syntax isn't ungodly weird then I can get a decent idea of how it works? Aside from random syntax shit (ie i had no idea what a lambda was in python until like two months ago) Edited April 9, 2012 by Camtech Quote Link to comment Share on other sites More sharing options...
Balcerzak Posted April 9, 2012 Share Posted April 9, 2012 ... if (you=="want help") { cout<<endl<<"Ask Camtech about it :S"<<endl; else { cout<<endl<<"DERP"<<endl; } } ... Mishandled braces, oh my! Quote Link to comment Share on other sites More sharing options...
CT075 Posted April 9, 2012 Share Posted April 9, 2012 (edited) the random ending brace... edit oh shit the "if" isn't closed properly either Edited April 9, 2012 by Camtech Quote Link to comment Share on other sites More sharing options...
Thor Odinson Posted April 9, 2012 Share Posted April 9, 2012 Now that I actually look at the code djfaljg;lagjl;ajg;lagjlagjalgakgh :< Quote Link to comment Share on other sites More sharing options...
Inactive Account Posted April 9, 2012 Share Posted April 9, 2012 (edited) Eegh. I was half-asleep when I posted earlier and I missed that too. BRACKETS The non-obfuscated version of my prior post is that there's a good solid textbook for starting with C (called The C Programming Language) that you can get for like 20 bucks on Amazon. Or at a library or whatever. Overall I'd say the syntax is not the hard part in C. Memory management can get irritating. I can't speak as much for C++, since I haven't used it as much, but I know C++ comes pretty easily once you know C, and has some fun things like object oriented programming. Edited April 9, 2012 by kdanger Quote Link to comment Share on other sites More sharing options...
CT075 Posted April 10, 2012 Share Posted April 10, 2012 C's syntax is only weird if you're used to languages like python or ruby (hell, even java to some degree). I'm not talking about constructs like for-loops or braces - I'm talking about like int M_FUNCTION_NAME_WITH_PREFIX_S() ... FUNCTION_NAME_WITH_PREFIX_END // i'm not even sure this is right or some shit with the m and the s denoting stuff like "static" "overridable" etc. Quote Link to comment Share on other sites More sharing options...
Iris Posted April 10, 2012 Share Posted April 10, 2012 INDENTATIONPLZ I know C++ basics if you need that, but there are plenty of other better programmers on this forum...! :P Including CamCam. Quote Link to comment Share on other sites More sharing options...
Aleph Posted April 10, 2012 Share Posted April 10, 2012 (edited) My answer depends on what you want to do...since my C++ knowledge is pretty basic. BASIC sucks. C's syntax is only weird if you're used to languages like python or ruby (hell, even java to some degree). I'm not talking about constructs like for-loops or braces - I'm talking about like int M_FUNCTION_NAME_WITH_PREFIX_S() ... FUNCTION_NAME_WITH_PREFIX_END // i'm not even sure this is right or some shit with the m and the s denoting stuff like "static" "overridable" etc. I...what I hope that's not a reference to the code I was showing you for GBA hacking. That shit was full of macros and completely non standard. Actual C/++ looks more like this #define Cam idiot /** * Copyright [nobody] 2101 * Code was beginning **/ #include "retardedlib.h" int main() { printf("C sucks use something less procedural\n"); } I should paste some of the code I've written at work it is god awful. It's also the easiest thing to manage in the world and works flawlessly but that's another story Just for fun here's that code I think Cam probably looked at too hard; this is for the hack Arch requested (disables the FE 7 minimap for a specific chapter): THUMB_FUNC(void, dmm_hook) //{ HACK_HEADER(dmm_hook, 0x080A3284); // r0 and r1 are free LOAD_SYM(r0, dmm_hook_targ); REG_BRANCH(r0); ALIGN_4; LABEL(dmm_hook_targ); LONG(HACK_ADDR(dmm_hack) + 1); HACK_FOOTER(dmm_hook); THUMB_FUNC_END //} #define DMM_ARRAY_TERMINATOR_VAL 0xFF #define DMM_ARRAY_TERMINATOR ((unsigned char)DMM_ARRAY_TERMINATOR_VAL) #define DMM_DRAW_MINIMAP 0x08004494 // Not used; long call required void (*DMM_DRAW_MINIMAP_CALL)(void*, int) = (void (*)(void*, int))DMM_DRAW_MINIMAP; THUMB_FUNC(void, dmm_hack) //{ #ifdef DEBUG_DMM HACK_HEADER(dmm_hack, 0x08D00000); #else HACK_HEADER(dmm_hack, 0x08DF00D0); #endif PUSH(r2-r3, lr); unsigned char currChap = *(unsigned char*)0x0202BC06; unsigned char* chapList; LOAD_VAR_SYM(chapList, dmm_hack_data_ref); unsigned char check = *chapList; while (check != DMM_ARRAY_TERMINATOR) { if (currChap == check) { POP(r2-r3, pc); } chapList++; check = *chapList; } LOAD_LIT(r0, 0x08CE3B6C); MOVI(r1, 3); LONG_CALL_THUMB(DMM_DRAW_MINIMAP, r4); POP(r2-r3, pc); ALIGN_4; LABEL(dmm_hack_data_ref); LONG(HACK_LABEL_ADDR(dmm_hack_data, dmm_data)); HACK_FOOTER(dmm_hack); NO_REG(r4); NO_REG(r5); NO_REG(r6); NO_REG(r7); NO_REG(r8); NO_REG(r9); NO_REG(r10); NO_REG(r11); NO_REG(r12); NO_REG(r13); NO_REG(r14); THUMB_FUNC_END //} THUMB_FUNC(void, dmm_hack_data) //{ HACK_HEADER(dmm_hack_data, HACK_END_ALIGN_4(dmm_hack)); LABEL(dmm_data); BYTE(0x0D); BYTE(DMM_ARRAY_TERMINATOR_VAL); HACK_FOOTER(dmm_hack_data); THUMB_FUNC_END //} That's not the whole thing; just the important parts. By god. It's beautiful But yeah, C/++'s syntax is completely similar to Java's. Java is basically just C/++'s fat ass nephew. Edited April 10, 2012 by Aleph Quote Link to comment Share on other sites More sharing options...
CT075 Posted April 10, 2012 Share Posted April 10, 2012 ...herp and this is why you shouldn't really offer advice on things you don't really use Quote Link to comment Share on other sites More sharing options...
Aleph Posted April 11, 2012 Share Posted April 11, 2012 (edited) Then I shouldn't offer advice on anything because I never get a chance to use it. Wow gouge your eyes out everyone. Quick, before you see it # 1 "program2.cpp" # 1 "<built-in>" # 1 "<command-line>" # 1 "program2.cpp" # 1 "C:\\curr\\IO\\Dropbox\\Public\\Hextator's Doc\\Development\\Documentation\\Programming\\devkitPro\\Register Control\\regcontrol.h" 1 # 4 "program2.cpp" 2 volatile __attribute__((noinline)) void ___thumb_header___() { __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__(".grab"); __asm__ __volatile__("@FILE_END"); } # 26 "program2.cpp" volatile __attribute__((noinline)) void dmm_hook ( ) { __asm__ __volatile__("@FILE_END"); volatile register int _yr0 __asm__("r0"); _yr0 = *(int*)_yr0; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr1 __asm__("r1"); _yr1 = *(int*)_yr1; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr2 __asm__("r2"); _yr2 = *(int*)_yr2; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr3 __asm__("r3"); _yr3 = *(int*)_yr3; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr4 __asm__("r4"); _yr4 = *(int*)_yr4; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr5 __asm__("r5"); _yr5 = *(int*)_yr5; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr6 __asm__("r6"); _yr6 = *(int*)_yr6; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr7 __asm__("r7"); _yr7 = *(int*)_yr7; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr8 __asm__("r8"); _yr8 = *(int*)_yr8; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr9 __asm__("r9"); _yr9 = *(int*)_yr9; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr10 __asm__("r10"); _yr10 = *(int*)_yr10; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr11 __asm__("r11"); _yr11 = *(int*)_yr11; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr12 __asm__("r12"); _yr12 = *(int*)_yr12; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr13 __asm__("r13"); _yr13 = *(int*)_yr13; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr14 __asm__("r14"); _yr14 = *(int*)_yr14; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__(".funcHeader"); __asm__ __volatile__(".ifndef\t" "dmm_hook" "Switch"); __asm__ __volatile__(".set\t" "dmm_hook" "Switch, 0"); __asm__ __volatile__(".endif"); __asm__ __volatile__(".if\t" "dmm_hook" "Switch != 0"); __asm__ __volatile__(".set\t" "dmm_hook" "Switch, 0"); __asm__ __volatile__(".endFuncHeader"); __asm__ __volatile__(".thumb"); __asm__ __volatile__(".set\t" "dmm_hook_ORIGIN" ", " "0x080A3284"); __asm__ __volatile__(".set\t" "dmm_hook_SIZE" ", " "dmm_hook" "_END - " "dmm_hook" "_START"); __asm__ __volatile__("@" "Origin"); __asm__ __volatile__(".long\t" "dmm_hook_ORIGIN"); __asm__ __volatile__("@" "Offset (bytes to ignore)"); __asm__ __volatile__(".long\t\v%0" :: "i" (0)); __asm__ __volatile__("@" "Size"); __asm__ __volatile__(".long\t" "dmm_hook_SIZE - 0"); __asm__ __volatile__("dmm_hook" "_START:"); __asm__ __volatile__("ldr\t" "r0" ", " "dmm_hook_targ"); __asm__ __volatile__("bx\t" "r0"); __asm__ __volatile__(".align\t2"); __asm__ __volatile__("dmm_hook_targ" ":"); __asm__ __volatile__(".long\t" "dmm_hack_ORIGIN + 1"); __asm__ __volatile__(".pool"); __asm__ __volatile__(".movedown" "dmm_hook" "_END:"); __asm__ __volatile__(".closeif"); __asm__ __volatile__("@FILE_END"); } # 67 "program2.cpp" void (*DMM_DRAW_MINIMAP_CALL)(void*, int) = (void (*)(void*, int))0x08004494; volatile __attribute__((noinline)) void dmm_hack ( ) { __asm__ __volatile__("@FILE_END"); volatile register int _yr0 __asm__("r0"); _yr0 = *(int*)_yr0; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr1 __asm__("r1"); _yr1 = *(int*)_yr1; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr2 __asm__("r2"); _yr2 = *(int*)_yr2; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr3 __asm__("r3"); _yr3 = *(int*)_yr3; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr4 __asm__("r4"); _yr4 = *(int*)_yr4; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr5 __asm__("r5"); _yr5 = *(int*)_yr5; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr6 __asm__("r6"); _yr6 = *(int*)_yr6; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr7 __asm__("r7"); _yr7 = *(int*)_yr7; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr8 __asm__("r8"); _yr8 = *(int*)_yr8; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr9 __asm__("r9"); _yr9 = *(int*)_yr9; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr10 __asm__("r10"); _yr10 = *(int*)_yr10; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr11 __asm__("r11"); _yr11 = *(int*)_yr11; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr12 __asm__("r12"); _yr12 = *(int*)_yr12; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr13 __asm__("r13"); _yr13 = *(int*)_yr13; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr14 __asm__("r14"); _yr14 = *(int*)_yr14; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__(".funcHeader"); __asm__ __volatile__(".ifndef\t" "dmm_hack" "Switch"); __asm__ __volatile__(".set\t" "dmm_hack" "Switch, 0"); __asm__ __volatile__(".endif"); __asm__ __volatile__(".if\t" "dmm_hack" "Switch != 0"); __asm__ __volatile__(".set\t" "dmm_hack" "Switch, 0"); __asm__ __volatile__(".endFuncHeader"); __asm__ __volatile__(".thumb"); __asm__ __volatile__(".set\t" "dmm_hack_ORIGIN" ", " "0x08DF00D0"); __asm__ __volatile__(".set\t" "dmm_hack_SIZE" ", " "dmm_hack" "_END - " "dmm_hack" "_START"); __asm__ __volatile__("@" "Origin"); __asm__ __volatile__(".long\t" "dmm_hack_ORIGIN"); __asm__ __volatile__("@" "Offset (bytes to ignore)"); __asm__ __volatile__(".long\t\v%0" :: "i" (0)); __asm__ __volatile__("@" "Size"); __asm__ __volatile__(".long\t" "dmm_hack_SIZE - 0"); __asm__ __volatile__("dmm_hack" "_START:"); __asm__ __volatile__("push\t{" "r2-r3, lr" "}"); unsigned char currChap = *(unsigned char*)0x0202BC06; unsigned char* chapList; __asm__ __volatile__("ldr\t%0, " "dmm_hack_data_ref" : "=r" (chapList)); unsigned char check = *chapList; while (check != ((unsigned char)0xFF)) { if (currChap == check) { __asm__ __volatile__("pop\t{" "r2-r3, pc" "}"); } chapList++; check = *chapList; } __asm__ __volatile__("ldr\t" "r0" ", =" "0x08CE3B6C"); __asm__ __volatile__("mov\t" "r1" ", %0" :: "i" (3)); __asm__ __volatile__("push\t{" "r0" "}"); __asm__ __volatile__("adr\tr0, literalCall" "program2.cpp" "97" "_return"); __asm__ __volatile__("add\tr0, #0x01"); __asm__ __volatile__("mov\t" "lr" ", " "r0"); __asm__ __volatile__("pop\t{" "r0" "}"); __asm__ __volatile__("ldr\t" "r4" ", =" "0x08004494 + 1"); __asm__ __volatile__("bx\t" "r4"); __asm__ __volatile__(".align\t2"); __asm__ __volatile__("literalCall" "program2.cpp" "97" "_return:"); __asm__ __volatile__("pop\t{" "r2-r3, pc" "}"); __asm__ __volatile__(".align\t2"); __asm__ __volatile__("dmm_hack_data_ref" ":"); __asm__ __volatile__(".long\t" "(dmm_hack_data_ORIGIN + dmm_data - dmm_hack_data_START)"); __asm__ __volatile__(".pool"); __asm__ __volatile__(".movedown" "dmm_hack" "_END:"); __asm__ __volatile__("@FILE_END"); volatile register int _nr4 __asm__("r4"); __asm__ __volatile__("str\t" "r4" ", [r0]" :: "r" (_nr4)); __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _nr5 __asm__("r5"); __asm__ __volatile__("str\t" "r5" ", [r0]" :: "r" (_nr5)); __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _nr6 __asm__("r6"); __asm__ __volatile__("str\t" "r6" ", [r0]" :: "r" (_nr6)); __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _nr7 __asm__("r7"); __asm__ __volatile__("str\t" "r7" ", [r0]" :: "r" (_nr7)); __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _nr8 __asm__("r8"); __asm__ __volatile__("str\t" "r8" ", [r0]" :: "r" (_nr8)); __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _nr9 __asm__("r9"); __asm__ __volatile__("str\t" "r9" ", [r0]" :: "r" (_nr9)); __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _nr10 __asm__("r10"); __asm__ __volatile__("str\t" "r10" ", [r0]" :: "r" (_nr10)); __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _nr11 __asm__("r11"); __asm__ __volatile__("str\t" "r11" ", [r0]" :: "r" (_nr11)); __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _nr12 __asm__("r12"); __asm__ __volatile__("str\t" "r12" ", [r0]" :: "r" (_nr12)); __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _nr13 __asm__("r13"); __asm__ __volatile__("str\t" "r13" ", [r0]" :: "r" (_nr13)); __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _nr14 __asm__("r14"); __asm__ __volatile__("str\t" "r14" ", [r0]" :: "r" (_nr14)); __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__(".closeif"); __asm__ __volatile__("@FILE_END"); } volatile __attribute__((noinline)) void dmm_hack_data ( ) { __asm__ __volatile__("@FILE_END"); volatile register int _yr0 __asm__("r0"); _yr0 = *(int*)_yr0; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr1 __asm__("r1"); _yr1 = *(int*)_yr1; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr2 __asm__("r2"); _yr2 = *(int*)_yr2; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr3 __asm__("r3"); _yr3 = *(int*)_yr3; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr4 __asm__("r4"); _yr4 = *(int*)_yr4; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr5 __asm__("r5"); _yr5 = *(int*)_yr5; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr6 __asm__("r6"); _yr6 = *(int*)_yr6; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr7 __asm__("r7"); _yr7 = *(int*)_yr7; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr8 __asm__("r8"); _yr8 = *(int*)_yr8; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr9 __asm__("r9"); _yr9 = *(int*)_yr9; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr10 __asm__("r10"); _yr10 = *(int*)_yr10; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr11 __asm__("r11"); _yr11 = *(int*)_yr11; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr12 __asm__("r12"); _yr12 = *(int*)_yr12; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr13 __asm__("r13"); _yr13 = *(int*)_yr13; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__("@FILE_END"); volatile register int _yr14 __asm__("r14"); _yr14 = *(int*)_yr14; __asm__ __volatile__("@FILE_BEGIN"); __asm__ __volatile__(".funcHeader"); __asm__ __volatile__(".ifndef\t" "dmm_hack_data" "Switch"); __asm__ __volatile__(".set\t" "dmm_hack_data" "Switch, 0"); __asm__ __volatile__(".endif"); __asm__ __volatile__(".if\t" "dmm_hack_data" "Switch != 0"); __asm__ __volatile__(".set\t" "dmm_hack_data" "Switch, 0"); __asm__ __volatile__(".endFuncHeader"); __asm__ __volatile__(".thumb"); __asm__ __volatile__(".set\t" "dmm_hack_data_ORIGIN" ", " "(((dmm_hack_ORIGIN + dmm_hack_SIZE) + 3) & (~3))"); __asm__ __volatile__(".set\t" "dmm_hack_data_SIZE" ", " "dmm_hack_data" "_END - " "dmm_hack_data" "_START"); __asm__ __volatile__("@" "Origin"); __asm__ __volatile__(".long\t" "dmm_hack_data_ORIGIN"); __asm__ __volatile__("@" "Offset (bytes to ignore)"); __asm__ __volatile__(".long\t\v%0" :: "i" (0)); __asm__ __volatile__("@" "Size"); __asm__ __volatile__(".long\t" "dmm_hack_data_SIZE - 0"); __asm__ __volatile__("dmm_hack_data" "_START:"); __asm__ __volatile__("dmm_data" ":"); __asm__ __volatile__(".byte\t" "0x0D"); __asm__ __volatile__(".byte\t" "0xFF"); __asm__ __volatile__(".pool"); __asm__ __volatile__(".movedown" "dmm_hack_data" "_END:"); __asm__ __volatile__(".closeif"); __asm__ __volatile__("@FILE_END"); } If you looked at that you've died. All the life you live from here on is just an illusion; you are dead and should accept it. Edited April 11, 2012 by Aleph Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.