Forum: Assembly Oct 19th, 2009 |
| Replies: 10 Views: 627 Almost.
That's your initial get the code working step.
Then, once it works, since the text is alpha sorted, and the records are fixed size, do a binary search.
Look a record COUNT/2, Is it,... |
Forum: Assembly Oct 19th, 2009 |
| Replies: 10 Views: 627 There's usually hundreds of commands in a scripting language so would mean more like...
iApple = 1
iPear = 2
iCorn =3
iDog = 4
iGrape= 5
xApple db 'Apple',0
xCorn db 'Corn',0 |
Forum: Assembly Oct 19th, 2009 |
| Replies: 2 Views: 308 I think you misunderstand the syscall function. It doesn't return a four byte integer. It returns a string!
You also aren't setting $a1 to maximum number of characters to read - 1. The function... |
Forum: Assembly Sep 15th, 2009 |
| Replies: 6 Views: 351 You have a problem with the MARS library.
li $v0,1 Print integer
mov $a0,$s0 a0 is integer
syscall <--- MISSING
li $v0,10
syscall #exit |
Forum: Assembly Sep 11th, 2009 |
| Replies: 1 Views: 289 Sorry, what you need is someone with a lot of free time to help you out.
First, code tags!
Second, COMMENTS! Your code is all crammed together with no comments. One has to understand fully what... |
Forum: Assembly Aug 25th, 2009 |
| Replies: 6 Views: 612 You aren't saying what's happening, and you aren't mentioning your toolset.
See if <buffer> is in its own segment or sitting at 0100h in the code instruction pointer path!
buffer db 10,?, 10... |
Forum: Assembly Aug 21st, 2009 |
| Replies: 6 Views: 507 I realize English isn't your primary language but you need to try better as your request is not clear!
You covered up your code so we can no longer see it!
DOS used a '$' terminator so if you're... |
Forum: Assembly Aug 15th, 2009 |
| Replies: 153 Views: 2,817 Yes, $v0 $v zero $vo is a mistake!
There are many languages out there. Some companies build applications using Java. Some C, Pascal, Visual Basic, Basic, Fortran, Cobol (though fewer and... |
Forum: Assembly Aug 15th, 2009 |
| Replies: 153 Views: 2,817 Since this is no longer a school project I went in and cleaned top to bottom. You need to finish at bottom where indicated.
Review each section of code and understand how it works!
.data #... |
Forum: Java Aug 13th, 2009 |
| Replies: 19 Views: 562 bool gFlag = true;
Event sets flag to false, and causes thread to fall out of loop!
Simple but effective!
// while (true){
while ( gFlag ){ |
Forum: C++ Aug 12th, 2009 |
| Replies: 50 Views: 1,882 good luck however if the server was written properly, the client is merely a playback. It can only request things of the server and its the servers job to validate a message, detect an invalid... |
Forum: C++ Aug 12th, 2009 |
| Replies: 50 Views: 1,882 I think you're all missing the point. Sockets doesn't send immediately.
Send Packet 5
Send Packet 8
Send Packet 7
It won't necessarily arrive as three packets 5 then 8 then 7 bytes in... |
Forum: C++ Aug 12th, 2009 |
| Replies: 8 Views: 428 Good for you. Stay on Honors Science and Math all the way through High School, get your Calculus and Physics wrapped up so you can slide right into a University Engineering program. You'll then need... |
Forum: Assembly Aug 9th, 2009 |
| Replies: 16 Views: 1,101 Do you carry a cell phone?
Do you own a microwave oven?
Do you have a game console?
Do you have a television set?
Do you own an automobile?
etcetera
There you go! |
Forum: C Aug 6th, 2009 |
| Replies: 12 Views: 564 While driving into work I realized I had a bug.
// strrev( q+j, i )
strrev( q+j, i-j ) |
Forum: C Aug 4th, 2009 |
| Replies: 13 Views: 818 It's on main().
0 means successful.
else error! |
Forum: C Aug 4th, 2009 |
| Replies: 2 Views: 357 these are only some of your problems!
You don't want 11 pointers, you want 11 tallies!
// int *arrayptr [11];
int arrayptr [11];
Shouldn't you pre-clear your tallies? |
Forum: VB.NET Aug 2nd, 2009 |
| Replies: 8 Views: 389 Looks like a 32 byte hash.
But sknake is more likely correct! |
Forum: C++ Jul 31st, 2009 |
| Replies: 7 Views: 337 This definitely sounds like a homework assignment!
Key here is you said lottery game.
So sounds like you need a card shuffle algorithm for a deck of 49 cards, but you're only going to draw the... |
Forum: C Jul 29th, 2009 |
| Replies: 8 Views: 219 Another way to think of this, look at the index of a book. A book about animals. So in the Index lookup bears. Bears is on page 32.
If you go to page 32 you see the topic Bears.
The index in... |
Forum: C++ Jul 25th, 2009 |
| Replies: 2 Views: 160 We don't need to give you only. Cruise the posts and pick out a few you like!
And then do them yourself! |
Forum: C Jul 24th, 2009 |
| Replies: 3 Views: 452 Shouldn't you buy the Code Composer Studio IDE from Texas Instruments for their MSP430 processor? (Or atleast download their evaluation version available on their website?)
Or look into the GCC... |
Forum: C Jul 21st, 2009 |
| Replies: 8 Views: 749 Your key delay is too short 50/1000 = 20/second
Should be around 200. Use a 5
You need edge triggering.
swLast = getbits
loop:
sw = getbits
swEdge = sw ^ swLast |
Forum: Assembly Jul 19th, 2009 |
| Replies: 16 Views: 1,101 Of course it doesn't work. You were suppose to analyze what I did, review your code, and single-step, etc. and make appropriate changes! One typically doesn't learn by being handed the answer. They... |
Forum: Python Jul 16th, 2009 |
| Replies: 5 Views: 267 If the multi-threaded script controls multiple threads simultaneously then the answer is yes.
For example if I want to write a program designed to crunch data and turn it from one form into... |
Forum: Java Jul 11th, 2009 |
| Replies: 17 Views: 612 You need to analyze one record of data for maximum bit requirements each field.
And need to know exactly what data ranges are stored in the floating-point. |
Forum: C++ Jul 8th, 2009 |
| Replies: 52 Views: 1,453 What Tux4Life said!
But would make sense to store the string size so future strlen() requests of your string in class only needs to return the value. Not look it up!
MyString::MyString(const... |
Forum: Game Development Jul 8th, 2009 |
| Replies: 14 Views: 807 Okay looked at your BMP loader and noticed a big problem. I went into one of my full blown BMP loaders and twiddled yours specific to 24-bit RGB bitmaps.
Problem #1 - you were treating header data... |
Forum: C++ Jul 7th, 2009 |
| Replies: 21 Views: 607 Looks good. But in actual development you would return a value. Needing to return 2nd to Nth values would involve passing pointers or dereferencing.
Something to keep in mind about... |
Forum: C Jul 6th, 2009 |
| Replies: 7 Views: 346 BOOM! That's a technical term!
Your pointer needs to be pointing at real data!
int *k, v;
k = &v; // k now points to the address of {v}.
*k=10; //... |
Forum: Computer Science Jul 1st, 2009 |
| Replies: 5 Views: 548 A long time ago in a far away land there was a castle the peasants called the crt. It was great but soon it was too small for the growing hordes of dots and so the king called to the lands for... |
Forum: C Jul 1st, 2009 |
| Replies: 4 Views: 315 char *extract(int *pos, char *array)
static char output[11] = {0};
int max = (*pos) + 10, count = 0;
// Need a terminator detection or will overrun the buffer
// on last 10... |
Forum: C Jun 25th, 2009 |
| Replies: 6 Views: 355 Also only doing divisor by 2 is not valid because a number may be divisable by 2 but not by another even number.
How about 198 % 2 okay, then 198 % 4 ? |
Forum: Python Jun 18th, 2009 |
| Replies: 12 Views: 429 Alternatively how about each name in your list has a dynamic array of file offsets! Parse the file once and collect the file positions and store them in each's offset list. When done parsing, use... |
Forum: C++ Jun 18th, 2009 |
| Replies: 2 Views: 428 #include <crtdbg.h>
// Add this to the termination code!
#ifndef NDEBUG
_CrtDumpMemoryLeaks( );
#endif |
Forum: C++ Jun 17th, 2009 |
| Replies: 45 Views: 1,613 You'r entering goals as strings but you aren't comparing the integer values of those strings. |
Forum: C Jun 16th, 2009 |
| Replies: 16 Views: 1,149 Oh, gotta run, but finally!
float foperand1 = 0.0725f;
float foperand2 = 0.075f;
float foperand3 = 0.0775f;
The constant float is a double unless a (f) is appended! Thus you have a compiler... |
Forum: C Jun 16th, 2009 |
| Replies: 16 Views: 1,149 As a rule of thumb keep code on separate lines. There is no executable savings and concatenating the lines hides problems such as in your case!
"%i" Hmm! I'll have to look that one up. May be... |