Forum: Assembly 7 Days Ago |
| Replies: 6 Views: 228 Ah. It helps if you say what you want when you post a question.
Almost... the return statement is missing, and we can optimize away the multiplication by 1:
int fact(int n)
{
int i =... |
Forum: Assembly 7 Days Ago |
| Replies: 6 Views: 228 That is recursive. You've defined fact--a function that calls itself.
Did you mean "what would be the non-recursive implementation"?
Also, this should probably be moved to the C forum... |
Forum: Assembly 14 Days Ago |
| Replies: 5 Views: 387 You'll probably need to copy the value of SI to a variable first, but it all depends on what libraries you have (or don't) for printing numbers in the system for which you are developing.
Could... |
Forum: Assembly 14 Days Ago |
| Replies: 3 Views: 402 Nah, these things happen to all of us. |
Forum: Assembly 16 Days Ago |
| Replies: 3 Views: 402 Looks like your problem is that the for loop is incrementing n, but you're also incrementing it at the end of the loop:
for (n = 0; n < 49; n++) {
putchar(bstr[n]);
++n;
}
That'll print... |
Forum: Assembly 30 Days Ago |
| Replies: 1 Views: 539 As a general recommendation, you should read some technical documentation on the x86 instructions... this page (http://home.comcast.net/~fbui/intel.html) is a good start, but the Intel processor... |
Forum: Assembly 30 Days Ago |
| Replies: 4 Views: 570 Check out Wikipedia's article on the PIC (http://en.wikipedia.org/wiki/PIC_microcontroller#Development_Tools); in particular, gputils (http://gputils.sourceforge.net/) might be a good place to start. |
Forum: Assembly Nov 3rd, 2009 |
| Replies: 4 Views: 570 Looks like code for a PIC (http://en.wikipedia.org/wiki/PIC_microcontroller) microcontroller (http://www.hobbyprojects.com/pic_tutorials/tutorial1.html). |
Forum: Assembly Oct 30th, 2009 |
| Replies: 3 Views: 453 Right. store will always refer to the same memory location, so every time you write to it, whatever value was there is overwritten by the new value.
As long as store only points at a single... |