Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Dubz Checker

Name: Anonymous 2012-01-29 15:38

Just made this for you, /prog/

It's on my Github as well!


#include <stdio.h>
#include <stdlib.h>
#define FOREVER for(;;)
#define MAXBASE 16
   
typedef struct house {
    struct house *prev;
    struct house *next;
    unsigned long int value;
    } house;

int BASE = 2;

void check(unsigned long int num) {

    house *first;
 
    first = (house*)malloc(sizeof(house));
    first->prev = NULL;
    first->next = NULL;
    first->value = num;
 
    house *current = first;

    house *aux = first;
 
    FOREVER {
    if(current->value < BASE) {
        goto U_MAD;
        }
    else {
        house *nexthouse;
        nexthouse = (house*)malloc(sizeof(house));
        nexthouse->prev = current;
        nexthouse->next = NULL;
        nexthouse->value = 0;
        current->next = nexthouse;

        while(current->value >= BASE) {
            current->value -= BASE;
            nexthouse->value += 1;
            }

        current = nexthouse;

        }
    }

    U_MAD:

    if(first->value == first->next->value) {

        while(aux->next != NULL) {
            aux = aux->next;
            }

        printf("Base %d : %X",BASE,aux->value);

        while(aux->prev != NULL) {
            aux = aux->prev;
            printf("%X",aux->value);
            }

        printf("\n");

        }

    while(aux->next != NULL) {
        aux = aux->next;
        }

    while(aux != first) {
        aux->prev->next = NULL;
        current = aux->prev;
        free(aux);
        aux = current;
        }
    free(first);
    }

int main(int argc,char **argv) {
    do {
        check(atoi(argv[1]));
        ++BASE;
        }while(BASE <= MAXBASE);
    return EXIT_SUCCESS;
    }

Name: Anonymous 2012-01-29 21:36

>>25
if a MIPS uses PMON or an ARM uses OpenFirmware, you need the specs
Yeah, as if they were doing it properly and it's not just a poor shitty half-compatible hack.

Alright, let's have it, faggot. Suppose I write a shit toy OS in x86 assembly. It works fine, and it works across most x86 computers minus some glitches or bugs. Now suppose I write its equivalent (same amount of logic) for MIPS or for ARM. Now tell me, how much extra fucking work will it take just to deal with the fact that every single MIPS and ARM vendor decides to customize their bullshit so that I can't just boot my original image directly? Maybe my question isn't clear enough or perhaps it is too complex or high-level for your mental midgetry so I'll illustrate.

Suppose I write an ARM OS that works perfectly fine on one of those cheap ARM evaluation boards; it's automatically a bad decision, because if I want to move to a different board, I will have to fuck around with the boot image (perhaps the boot process is different because the manufacturer decided so), I will have to rewrite the entire hardware handling stuff (most glaringly the graphics code). And then it might not work. And if it doesn't work, too fucking bad, because there aren't any working examples of miniature toy ARM OSes on the web nor is the documentation as extensive as it is for x86. If you look up info about setting up x86 paging and long mode, it's all there with examples and comments, explained in a hundred different ways. But for your unpopular architectures? Nothing.

Fuck you, x86 is king.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List