Search Results

Showing results 1 to 40 of 140
Search took 0.02 seconds.
Search: Posts Made By: Duoas ; Forum: Assembly and child forums
Forum: Assembly Jul 12th, 2008
Replies: 4
Views: 1,146
Posted By Duoas
I understood what you want. Perhaps you should spend some more time reading through the theory links I gave you.

Variables have to exist somewhere, and the place for local variables is on the...
Forum: Assembly Jul 12th, 2008
Replies: 4
Views: 1,146
Posted By Duoas
Some theory (http://en.wikipedia.org/wiki/Call_stack).
More theory with concrete examples (http://www.unixwiz.net/techtips/win32-callconv-asm.html).
Some actual assembly examples...
Forum: Assembly Jul 8th, 2008
Replies: 4
Views: 3,665
Posted By Duoas
> I wasn't asking you to do my homework...

Yes, actually, you did:
> I am looking for assembler language in lc3 to sort an array...

If you wanted help developing an algorithm, you would have...
Forum: Assembly Jun 26th, 2008
Replies: 2
Views: 884
Posted By Duoas
You can't use Int 21h or any other DOS interrupt service unless DOS (or WinXP or earlier) is running --hence the reason it works in the emulator and not in real-life.

The purpose of the OS is to...
Forum: Assembly Jun 26th, 2008
Replies: 1
Views: 1,149
Posted By Duoas
Use the FMUL opcode.

See 80x87 Instruction Set
HTML (http://www.deec.uc.pt/~jlobo/tc/opcode_f.html)
PDF (http://home.zcu.cz/~dudacek/SOJ/manualy/80x87set.pdf)

Hope this helps.
Forum: Assembly Jun 20th, 2008
Replies: 2
Views: 1,745
Posted By Duoas
Yes, use them in a loop. You should be looking at the mult and add opcodes.

Remember how a number is constructed: by powers of ten.

5 * 10^2 = 500
4 * 10^1 = 40
3 * 10^0 = 3

add them all...
Forum: Assembly Jun 17th, 2008
Replies: 4
Views: 3,665
Posted By Duoas
Probably not. LC3 only exists in textbooks and moreover, people who volunteer here don't want to do your homework for you.

Give it an honest effort and we will help as you go along.
Forum: Assembly Jun 10th, 2008
Replies: 2
Views: 723
Posted By Duoas
You'll want to play with MASM32 (http://www.masm32.com/). It has everything you need.

Good luck!
Forum: Assembly Jun 4th, 2008
Replies: 2
Views: 1,115
Posted By Duoas
x86: CMP, Jxx, JMP

MIPS: b, bne, etc.
Forum: Assembly Jun 3rd, 2008
Replies: 1
Views: 1,899
Posted By Duoas
http://www.masm32.com/

Enjoy!
Forum: Assembly Jun 2nd, 2008
Replies: 2
Views: 741
Posted By Duoas
You can push and pop it.

1. Call function first time. Answer is in EAX.
2. Push EAX.
3. Call function second time. Answer is in EAX.
4. Pop EBX (or register of your choice).

Answer to first...
Forum: Assembly May 31st, 2008
Replies: 2
Views: 2,710
Posted By Duoas
This page on Wikipedia (MIPS Architecture: Assembly Language (http://en.wikipedia.org/wiki/MIPS_architecture#MIPS_Assembly_Language)) is an excellent resource to begin with.

Another useful...
Forum: Assembly May 29th, 2008
Replies: 1
Views: 667
Posted By Duoas
There are numerous types of memory.

There is external memory (stuff stored elsewhere like on disk or over a network or the like). Everything else I'll say here relates to internal memory: memory...
Forum: Assembly Mar 1st, 2008
Replies: 2
Views: 1,564
Posted By Duoas
Break it down into its constituent parts:

int yi = y - i;
int val = row[ yi ];

if (val == x) goto return_false_part;
if (val == x - i) goto return_false_part;
if (val == x + i)...
Forum: Assembly Feb 28th, 2008
Replies: 1
Views: 2,373
Posted By Duoas
Hi angelie and welcome to the forums.

We won't give you code here, but we'll be glad to help you with your own code.

There are two things you need to think about for this assignment:

How to...
Forum: Assembly Feb 27th, 2008
Replies: 1
Views: 2,073
Posted By Duoas
Alas, you've got a couple of serious errors...

1) Get a string syscall
When you use the systrap to get a string, the returned string has that NL character there at the end... So if I enter "1 2...
Forum: Assembly Feb 26th, 2008
Replies: 1
Views: 663
Posted By Duoas
Forget Java. If you can do it in C you can do it in MIPS.

Remember, a power of two is a number that has only one bit set (all the rest are zeroes), and that bit cannot be bit 0 (the...
Forum: Assembly Feb 26th, 2008
Replies: 4
Views: 1,779
Posted By Duoas
Oh yeah, almost forgot. He's mixing SAL and MAL. You can mention that, but there is no need to "fix" it.

Your professor should have given you three sheets, listing SAL, MAL, and TAL instructions,...
Forum: Assembly Feb 26th, 2008
Replies: 4
Views: 1,779
Posted By Duoas
The first problem this person had is that he did not comment his code very well. The second problem is that his comments don't match his code. The third (and most important) problem is that he did...
Forum: Assembly Feb 26th, 2008
Replies: 1
Views: 3,707
Posted By Duoas
Shift "forgets" the bits shifted out.
Roll takes the bit shifted out and sticks it back in on the other end.

Examples:

01101010 start (one byte)
11010100 shifted left by one
10101000 shifted...
Forum: Assembly Feb 20th, 2008
Replies: 5
Views: 8,420
Posted By Duoas
Post what you've got and what part of it is giving you trouble.
Forum: Assembly Feb 20th, 2008
Replies: 1
Views: 692
Posted By Duoas
It just moves data around.

Check out the Wikipedia for a pretty good opcode reference (http://en.wikipedia.org/wiki/MIPS_architecture#MIPS_Assembly_Language).

Also, I didn't realize you could...
Forum: Assembly Feb 20th, 2008
Replies: 1
Views: 1,652
Posted By Duoas
You might want to remember to load (E)DS at the beginning of your program.

All the functions you are using (with 'call') have a register call type, meaning that arguments are passed in registers....
Forum: Assembly Feb 18th, 2008
Replies: 3
Views: 710
Posted By Duoas
Ah, yes, I forgot to address your question. Sorry. :$

unsigned int corresponds to EAX.
unsigned short corresponds to AX.
unsigned char corresponds to AL.

Hope this helps.
Forum: Assembly Feb 18th, 2008
Replies: 3
Views: 710
Posted By Duoas
You have to call ADC after each ADD. (The carry flag is only one bit deep.)

Hope this helps.
Forum: Assembly Feb 17th, 2008
Replies: 1
Views: 1,625
Posted By Duoas
No. INC affects O, S, Z, A, and P only.

Hope this helps.
Forum: Assembly Feb 15th, 2008
Replies: 3
Views: 1,836
Posted By Duoas
You might want to tell your compiler to produce MIPS assembly output for your code. If you are using GCC you can use the -S option. If you are compiling on a machine other than a MIPS processor, you...
Forum: Assembly Feb 15th, 2008
Replies: 3
Views: 1,836
Posted By Duoas
Sorry to say, no one here is going to give you code.

Frankly, if you plan to write a report on how to improve code, you need to have a pretty good idea of how the code is generally implemented to...
Forum: Assembly Feb 15th, 2008
Replies: 1
Views: 641
Posted By Duoas
I still have no idea why you are having the operand size conflicts. This is what Microsoft has to say about it (http://support.microsoft.com/kb/125799).

The AX is implied in MUL operands, so the...
Forum: Assembly Feb 14th, 2008
Replies: 2
Nor
Views: 651
Posted By Duoas
You should be using unsigned long, not double.

In either case, VC++ could have a problem correctly identifying the size of the operand inside the __asm block. I don't know enough about VC++ __asm...
Forum: Assembly Feb 14th, 2008
Replies: 3
Views: 832
Posted By Duoas
Yes. AH and AL are 8-bits. AX is 16-bits. EAX is 32 bits.
Forum: Assembly Feb 14th, 2008
Replies: 3
Views: 832
Posted By Duoas
Nand isn't a single operation. How is nand defined? That will give you your answer.

If you are using x86 assembly, look at the and and not instructions. If you are using MIPS, you'll have to think...
Forum: Assembly Feb 10th, 2008
Replies: 5
Views: 1,914
Posted By Duoas
Ah, you're beyond me there. It is a feature of the microchip. The x86 Protected Mode is used to protect programs from accessing things they shouldn't. Earlier chips didn't have this feature, and...
Forum: Assembly Feb 10th, 2008
Replies: 1
Views: 568
Posted By Duoas
It depends. In MAL and TAL: no, it is not legal (the second item must also be a register). In SAL, sure.
Forum: Assembly Feb 10th, 2008
Replies: 1
Views: 705
Posted By Duoas
You only need to traverse the list once. Set your "current max" to the first element in the list. For the remaining elements of the list, test each one against the "current max". If greater, set the...
Forum: Assembly Feb 10th, 2008
Replies: 5
Views: 1,914
Posted By Duoas
It has nothing to do with Intel. Every OS must allocate and initialize memory for programs, no matter what chipset you are using. When the OS places your program into memory, it places the various...
Forum: Assembly Feb 4th, 2008
Replies: 8
Views: 969
Posted By Duoas
In MAL, no. Just use
sw $s2, B

You really need to get yourself a good MIPS reference.
The one on Wikipedia is pretty good.
Forum: Assembly Feb 3rd, 2008
Replies: 8
Views: 969
Posted By Duoas
MIPS assembly language is confusingly structured into SAL, MAL, and TAL modes. I will assume MAL (based on your latest code). Your professor should have mentioned what you have been using so far.
...
Forum: Assembly Feb 2nd, 2008
Replies: 8
Views: 969
Posted By Duoas
That depends on whether or not you are using SAL.
Forum: Assembly Feb 2nd, 2008
Replies: 8
Views: 969
Posted By Duoas
Are you using SAL (or are you supposed to be using MAL or TAL)? I'll assume SAL.

Remember that the result is stored in the first item listed. For example:
add $t0, $a0, 12
adds the value of...
Showing results 1 to 40 of 140

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC