|
-
Oct 10th, 2001, 04:56 AM
#1
Thread Starter
Addicted Member
Java to Assembly
Hi
Does anyone know how to convert this command into Assembly Language (namely the Motorola 68K)?
public static int MOVEL(int A, int B) throws IOException {
int SRC = A;
int DST = B;
DST = SRC;
return DST;
}
-
Oct 10th, 2001, 05:38 AM
#2
Retired VBF Adm1nistrator
Try posting in the assembly forum too....
But anyway, I dont think swapping 2 ints would cause an exception.... and your code is bull**** anyway ...
But regarding the assembly, well I think that you could put in a label, and then it just swaps the D0 and D1 registers or something. Then just do BRA into another label.
Or the user could have to put the next instruction address into A0.
Then you could do :
BRA A0
... or something...
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Oct 10th, 2001, 09:33 AM
#3
Dazed Member
Yes i would post this in the Assembly formn. Maybe DarkKnight
or someone else will be able to answer your question.
Im still trying to find out if i can run ASM from a java application. Assembly cant be run inline with java but using the JNI (Java native interface) maybe i can work my way around it.
Hey why are you programing for a Motorola processor? Im just curious. Is the instruction set better?
Thanks
-
Oct 10th, 2001, 09:37 AM
#4
Addicted Member
I didn't think it was possible to stick ASM into Java, at least not without loosing portablility. An instruction set is just for that processor, you write some assembly on a IBM PC and try and run it on a Mac, naturally it wont work!
So wouldn't using ASM in java completely destroy the point of using Java?
please tell me if i'm wrong!
-
Oct 10th, 2001, 09:42 AM
#5
Retired VBF Adm1nistrator
What bob's trying to do is write an application to convert java source code into M68K ASM.
And yeah the M68K Instruction set is so much sexier than the x86 instruction set. Its really easy to use 
8 Data registers D0 to D7, 7 Address Registers A0 to A6... ahh x86 ASM just doesnt compare
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Oct 10th, 2001, 09:46 AM
#6
Dazed Member
mmmmmmm interesting. thanks for the information! Ive been looking a assembly code and ive see lots of examples for diffrent processors. x86, Sparc, Motorola ect........
-
Oct 11th, 2001, 02:09 AM
#7
Retired VBF Adm1nistrator
Course I can solve the problem
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Oct 11th, 2001, 03:29 AM
#8
Thread Starter
Addicted Member
-
Oct 11th, 2001, 03:32 AM
#9
Retired VBF Adm1nistrator
Right then I'll ****ing do it tonight!
Not that the above code actually does anything of any use...
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Oct 11th, 2001, 03:56 AM
#10
Thread Starter
Addicted Member
You're too kind. No, really.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|