Search:

Type: Posts; User: zafy

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    19
    Views
    16,097

    I would stick with the example just because that...

    I would stick with the example just because that was provided to me
    I implemented some of your example code but I didn't understand why would you call floor within the function floor? Could you...
  2. Replies
    19
    Views
    16,097

    I am still getting the same error though

    I am still getting the same error though
  3. Replies
    19
    Views
    16,097

    I also made another change where I changed in _e ...

    I also made another change where I changed in _e
    from

    subi r5,r5,0
    to

    srli r5,r5, #1
    so the log is being computed by dividing the number by 2
  4. Replies
    19
    Views
    16,097

    Okay so I implemented what you said except this...

    Okay so I implemented what you said except this part because I don't know what you mean [QUOTE]Main needs to make a call to floor, passing the parameter in...
  5. Replies
    19
    Views
    16,097

    How do I make main make a call to floor? Also I...

    How do I make main make a call to floor?
    Also I thought I made floor a separate function.
    I'm using R29 inside floor and that is the stack pointer so what do you mean that I am using a frame ptr?
  6. Replies
    19
    Views
    16,097

    So after working for a while this is the code I...

    So after working for a while this is the code I came up with, following the example given

    .global _exit .global _open
    .global _close
    .global _read
    .global...
  7. Replies
    19
    Views
    16,097

    Here is a link to website describing the MIPS...

    Here is a link to website describing the MIPS instructions
    It helps MIPS Instruction Reference
    This describes the different registers in MIPS MIPS Quick Tutorial

    But for a visual we were given...
  8. Replies
    19
    Views
    16,097

    The changes I made are in black comments Please...

    The changes I made are in black comments
    Please tell me if this makes sense to your guys

    I've been on this forum since yesterday just exaplining my question!
    Help out :)
  9. Replies
    19
    Views
    16,097

    I haven't really completed the code that I could...

    I haven't really completed the code that I could run it on
    I'm still working on this portion
    But once I get this, we have been given another code that I could modify and add this in.
    Basically how...
  10. Replies
    19
    Views
    16,097

    Hey guys this is the C code I've been given ...

    Hey guys this is the C code I've been given


    unsigned int k = 47;
    main(){
    printf("The floor of log2 of %d is %d", k, floor-log-2(k));
    }
    int floor-log-2(int n)
    {
    if (n == 1)
  11. Replies
    19
    Views
    16,097

    So I've been working on this but no progress. ...

    So I've been working on this but no progress.
    The code that I was attempting in the first post was me trying to work with this link that is closely related to what I am trying to accomplish....
  12. Replies
    19
    Views
    16,097

    Well I did compile my code and changed the...

    Well I did compile my code and changed the function name to floor
    But now I'm evem more confused. I still can't seem to figure out which Register belongs where

    .file "log.c" .section ...
  13. Replies
    19
    Views
    16,097

    C to MIPS conversion

    Hey guys I have been given a simple recursive function in C code and I have to convert it to MIPS Assembly language. We have to implement stack pointers in our assembly code.


    unsigned int k =...
  14. Replies
    1
    Views
    710

    Back to Basics: Direct Memory Access

    Hey guys,
    As programmers one time or another you must have studied the computer and its hardware and software aspects. I have a question about direct memory access and was hoping you guys could...
  15. Thread: error checking

    by zafy
    Replies
    11
    Views
    1,355

    Come on you guys are you really going to ignore...

    Come on you guys are you really going to ignore me?
    I've done everything you've asked. This is honestly a one minute question. I am sorry for annoying you so much in the last thread.
    I've learned...
  16. Thread: error checking

    by zafy
    Replies
    11
    Views
    1,355

    Okay code that compiles with good indentation: ...

    Okay code that compiles with good indentation:


    #include<stdio.h>
    #include <stdlib.h>


    void matrix_display(int **A, int row_size1, int col_size1);
    int **matrix_alloc(int row_size1, int...
  17. Thread: error checking

    by zafy
    Replies
    11
    Views
    1,355

    function with better indentation ...

    function with better indentation


    voidmatrix_display(int**A, introw_size1, intcol_size1)
    {
    inti, j;
    printf("The required matrix is\n");
    for(i = 0; i < row_size1; i++) {
    for(j = 0; j <...
  18. Thread: error checking

    by zafy
    Replies
    11
    Views
    1,355

    Any more suggestions guys?

    Any more suggestions guys?
  19. Thread: error checking

    by zafy
    Replies
    11
    Views
    1,355

    You mean u want me to move it to the display...

    You mean u want me to move it to the display function instead like this?
    Now it always prints the error even if the dimensions are right


    void matrix_display(int **A, int row_size1, int...
  20. Thread: error checking

    by zafy
    Replies
    11
    Views
    1,355

    error checking

    After finally completing my code. I am trying to add some standard errors. One of the errors I want to do is if the number of entries in matrix that user inputs exceeds the actual number their should...
  21. Thread: thinking process

    by zafy
    Replies
    68
    Views
    5,520

    After many strenous hours THANK GOD I got it!...

    After many strenous hours THANK GOD I got it!
    still alot of glitches here and there but... it's working
    thanks all



    #include<stdio.h>
    #include <stdlib.h>
  22. Thread: thinking process

    by zafy
    Replies
    68
    Views
    5,520

    Why isn't my multiplication function working its...

    Why isn't my multiplication function working its giving me a segmentation fault?



    void matrix_multiply( int **A, int **B, int row_size1, int col_size1)
    {
    int mult[10][10];
    int i,j,k;
    ...
  23. Thread: thinking process

    by zafy
    Replies
    68
    Views
    5,520

    I should free it after the second one is assigned...

    I should free it after the second one is assigned but I dont know how I can tell if there is already a matrix. What can I do?
  24. Thread: thinking process

    by zafy
    Replies
    68
    Views
    5,520

    well at the end of the if statement of 'A' it is...

    well at the end of the if statement of 'A' it is freed so I am guessing nothing is stored. But that free is also necessary because if a person simultaneuosly writes A 2 2 1 2 3 4 and then A 2 2 1 2 3...
  25. Thread: thinking process

    by zafy
    Replies
    68
    Views
    5,520

    okay okay so the first 2 for loops are kind of...

    okay okay so the first 2 for loops are kind of standard they define mult[i][j] like what is inside this matrix. the second for loop kindof makes sure that the row of the second matrix B is equal to...
Results 1 to 25 of 107
Page 1 of 5 1 2 3 4