Ad
  • Custom User Avatar

    rsp offset is correct, but not all arguemnts are pushed on the stack, look system v abi for amd64 manual, - first 6 integers are put into registers, only then stack is used.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    I think your code put "" to array. I had same problem.

  • Default User Avatar

    In my other comment here, I described a test crashing when the solution simply cannot. Even the initially provided empty function char* assembler_interpreter (const char* program) {} "crashes" on the program_fail sample test, even though it does nothing, because of the way expected output and actual output are handled. It probably doesn't help much since you already passed all the simple tests, but it may be something to think about.

  • Custom User Avatar

    I can't see your code until it passes the tests, but you can post it here with this format:

    ```C

    // Your code

    ```

    and please check the box "Mark as having spoiler content".

  • Custom User Avatar

    Anyone able to check out my code? I keep getting stuck on on advanced test 3440 of 4200. The timing quits after ~5 seconds. This is in C.

  • Custom User Avatar

    I just want to make sure I'm understanding what is getting read, what is getting written, and to/from where.

    1. I have the binary version of the input in little endian (by bit).
    2. I have a "tape" that acts like working memory. The pointer that the commands "<" and ">" reference this working memory pointer.
    3. I have the output stream.
    4. "," takes the next bit from the binary version of the input and places it wherever the tape pointer is located.
    5. ";" takes the bit pointed by the tape pointer and places it in the output stream/buffer.
    6. Everything else is moving/manipulating the bits on the tape

    Am I understanding this correctly? Thank you!

  • Custom User Avatar

    Language C:

    Looking for some hints for the actual test cases. I'm able to pass all example cases and one of the random ones. However, I keep getting stuck with a SEGFAULT Invalid Memory Access. Obviously I cannot print out the test case during a SEGFAULT, but I'm trying to think of edge cases where my program could SEFAULT. I can't think of weird inputs that would cause an invalid memory access. Are there any "gotcha's" in the submission cases that I'm missing?

  • Custom User Avatar

    Well my solution was quite.... verbose lol. smacks forehard

  • Custom User Avatar

    Figured it out. For others who may run into this issue in Java, I was throwing the noSuchElement exception which was interrupting before the expected "return false". Don't throw the exception like it says in the description, just have the hasNext() method return false.

  • Custom User Avatar

    Java question: I'm a little confused on what to do with an empty string or null... I'm throwing a NoSuchElementException() in the case that it isn't a valid string but it is saying that I'm still failing the test.

  • Custom User Avatar

    How would hell return java over ruby? Both required 4 changes. 1 replacement for each letter in hell. From ruby: huby, heby, hely, hell. From java: hava, heva, hela, hell.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Ah that makes sense and fixes the issue. Completed.

    I was reading it as the constant being a different way to reference the same area of memory instead of calling it 'a' register.

  • Custom User Avatar

    jnz 5 10 does nothing because register number 5 is zero so it continues to the next command.

    This part is wrong. Please read description of jnz again. There is no "register number 5" in this example, and the 5 does not denote a register.

  • Loading more items...