d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > C To Y86 A$$embly
Add Reply New Topic New Poll
Member
Posts: 24,101
Joined: Nov 8 2007
Gold: 5,561.70
Nov 8 2012 08:10am
I posted links to the C code and my A$$embly version, I'm trying to convert the C code to Y86 a$$sembly

I'm not sure my compare part is correct. What I'm trying to do is move from the top and bottom of the stack, compare the characters, then increment to the next spot in the stack.

Anyone have any idea? I don't believe my code increments the stack pointer when comparing

http://pastebin.com/fmD1i3YE%20- original C code

http://pastebin.com/tub2V6yS - A$$embly

Also getting this error, no idea why.



This post was edited by lopelurag on Nov 8 2012 08:17am
Member
Posts: 3,172
Joined: Nov 29 2011
Gold: 0.00
Nov 8 2012 08:12am
Theres a flag im not quite sure, when you compile with gcc it stops at the linkage. It will give you the assembly code. Not sure if Y86 tho.

Google flag gcc y86
Member
Posts: 24,101
Joined: Nov 8 2007
Gold: 5,561.70
Nov 8 2012 08:18am
Quote (Portgas @ Nov 8 2012 10:12am)
Theres a flag im not quite sure, when you compile with gcc it stops at the linkage. It will give you the assembly code. Not sure if Y86 tho.

Google flag gcc y86


Yeah it gives you x86 I believe or some other assembly code

I think Y86 is a completely educational assembly code

This post was edited by lopelurag on Nov 8 2012 08:19am
Member
Posts: 3,172
Joined: Nov 29 2011
Gold: 0.00
Nov 8 2012 08:23am
Quote (lopelurag @ Nov 8 2012 11:18am)
Yeah it gives you x86 I believe or some other assembly code

I think Y86 is a completely educational assembly code


Yeah true.

But the instructions are very similar, it might help you!!
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll