do you think you could tell me what i'm doing wrong? the code runs without errors but i think the values are getting lost somewhere. - # for i = 0 to R-1
-
# C[i] = 0
-
# end for
-
-
# for i = 0 to n-1
-
# C[A[i]] = 1
-
# end for
-
-
# i = 0
-
# for j = 0 to R-1
-
# if (C[j] == 1) then
-
# B[i] = j
-
# i = i + 1
-
# end if
-
# end for
-
-
bucket:
-
li $t0, 0 #set to 0
-
-
loop: ble $s0, 0, bail #for loop
-
sw $t0, ($a2) #store i in C[ ]
-
addu $a2, $a2, 4 #add 4 to C
-
subu $s0, $s0, 1 #sub 1 from R
-
j loop
-
bail:
-
jr $ra
-
ble $t0,0,bail
-
-
-
li $t0, 0 #set i to 0
-
li $t3, 1 #set to 1
-
loop1: ble $a3, 0, Break #for loop
-
sw $t0, ($a0) #store i in A[ ]
-
sw $a0, ($a2) #store A[i] in C[ ]
-
addu $a0, $a0,4 #add to A
-
subu $a3, $a3, 1 #sub l from N
-
j loop1
-
Break: jr $ra
-
ble $t3, 1,Break
-
-
loop2: li $t0, 0 #set i to 0
-
li $t1, 0 #set j to 0
-
li $t4, 1 #set to 1
-
sw $t1, ($a2) #store j in c[ ]
-
-
addi $t0, $t0, 1 #add 1 to i
-
sw $t0, ($a1) #store j in b[ ]
-
beq $a2, $t4,loop3 #if loop
-
loop3: sw $t0, ($a1) #store i in b[ ]
0 1396 Sign in to post your reply or Sign up for a free account.
Similar topics
by: wonder |
last post by:
Hi,
The CRM application said that need to add an option
"REGISTER_GLOBALS=On" to the php.ini file, so I did what it told.
But I still can't get rid off the following error:
The PHP variable...
|
by: Marc Robitaille |
last post by:
Hello all,
For a certain amount of time, I have a rather odd problem with my Visual
Studio 2003. I do not know where it is come from i.e. if it is my code or
the intellisense from the VB.NET...
|
by: Aing |
last post by:
Anyone knows what can be cause of this problem?
////////////////////////////////////////////////////////////
typedef struct _date_struct {
int date,month,year;
}date_struct;
Class Date {...
|
by: Wade Beasley |
last post by:
I am still struggling with this problem of getting my 2 list boxes to
show the initials items as being selected on the first time that I go to
the Tab with the boxes on them. I am reading from my...
|
by: CroDude |
last post by:
Hi all!
I've just realized that Panel class doesn't provide KeyDown/KeyUp events.
Does anyone know how to remedy this problem. I really need for the panel to
catch keyboard events.
Thanks in...
|
by: Eric |
last post by:
Visual C++ 2005 Express
MVP's and experience programmer's only please!...
I need to get the number of lines in a textbox so I can insert them into a
listview. The text comes from my database...
|
by: Hooyoo |
last post by:
Following are similar codes of my project:
At first I define two classes in two files:
//ClassA.h
#pragma once
#include "ClassB.h"
class ClassA
{
public:
ClassA(void){};
|
by: Piojolopez |
last post by:
Hello guys, I have a problem with this code, the program is the resolution of Sudoku grid, the grid in my program is a vector of STL,and i use a list of STL for the right solution for each cell, to...
|
by: Ryan Liu |
last post by:
Hi,
I have a 100 clients/ one server application, use ugly one thread pre client
approach. And both side user sync I/O.
I frequently see the error on server side(client side code is same, but...
|
by: muddy22 |
last post by:
I'm only having a problem with a small part, i'm fairly new to computer programming and the program i'm using is Dev-C++. The part that i'm having a problem with is this:
int WINAPI WinMain...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |