Ad
  • Custom User Avatar

    The answer was not to use brk, in solutions there are only malloc and calloc implementations as well as in mine own. No one's solution uses bkr. And i dont know should it be issue or not?

  • Custom User Avatar

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

  • Custom User Avatar

    ; <-- [qword RAX] parts_sums([qword RDI] len, ro [qword RSI] ls, qword RDX n) --> No if im now trying to save pointer that came in the beginning from RDI
    and at the end of my code restore this pointer in rdi then it works and can see len in [rdi] but there is another problem now.
    For first case the answer is [ 20, 20, 19, 16, 10, 0 ] and i have exactly this array in rax but if im just ret it im getting
    Test Crashed Caught unexpected signal: 6 6 here is len or [rdi].
    And the MOST important is that if before ret
    if i do sub rax, 8 it doesnt error but returns [ 0, 20, 20, 19, 16, 10 ] that is definetly not the right answer
    and if im in opposite do add rax, 8 then it returns [ 20, 19, 16, 10, 0, 0 ] that is also dont error but not the right answer.
    I just CANT return the right answer because of the error. Also I have function to print nums from registers(does not affect them) and if i print [rax] it prints the right 20 and not anything else.

  • Custom User Avatar

    How to sane len in NASM?
    Im having an error in NASM while saving len in [rdi].
    In C there is *len = <some number>; so in NASM its like mov [rdi], <some number>.
    But if im moving any value to [rdi] im getting:
    Test Crashed Caught unexpected signal: <some number>

  • Custom User Avatar

    Thanks, worked

  • Custom User Avatar

    I dont get where array pointer in NASM.
    ; <-- RAX sumofmin(ro [qword [dword RDI]] nums, RSI rows, RDX cols) -->
    So [rdi] should be first item in array?
    I even did some function to print values in STDERR and everything worked fine but for [rdi].
    Code i did and even checked on my machine works and would here too i believe if i could get this array.

  • Custom User Avatar

    in C all random tests passed yet all basic tests wrong. Why there is strange numbers when (int)(*str_in) instead of normal (on my PC the same code works)

  • Custom User Avatar

    expected [ [ [ 76, 97, -5, 29, -48, 31, 80, 57, +0 ], [ 76, 97, -5, 29, -48, 31, 80, 57 ] ], 317 ]
    to deeply equal [ [ [ 76, 97, -5, 29, -48, 31, 80, 57 ], [ 76, 97, -5, 29, -48, 31, 80, 57, +0 ] ], 317 ]

    genious