Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

change assembly code to C programming

Status
Not open for further replies.

summersnow

Newbie level 6
Joined
Dec 30, 2006
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,435
Hi,

Is there anyone who can help me to convert this two simple assembly code to a C language code?i'm still new in this and i really hope you all can help me in this..

first code:
PASS BRCLR PORTC,X $10 PASS
PRESS BRSET PORTC,X $10 PRESS
LDAA PORTC,X
ANDA #$0F

second code:
LDY #6
RING BRSET PORTA,X %00000001 RING3
RING3 BRSET PORTA,X %00000001 RING3
DEY
BNE RING
OFF BSET PORTA,X %0010000

The problem i faced in both of this code is i don't know how to use C to instruct the microcontroller to detect a port more than one times to do the following process.Please help me in this..Thanks in advance
 

pronab

Member level 1
Joined
Nov 3, 2006
Messages
34
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,424
within few days i will help u try urself
 

~E3016~

Member level 5
Joined
Nov 11, 2006
Messages
82
Helped
8
Reputation
16
Reaction score
2
Trophy points
1,288
Activity points
1,763
what architecture of microcontroller that you used?
 

maggots

Member level 4
Joined
Apr 4, 2007
Messages
75
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
1,740
i think that U can diassembly code C in unix like - d [name file] [name target file]
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top