piclist 2001\06\01\193927a >
Thread: : Composed 16 bit return value in Hi-Tech C
www.piclist.com/techref/microchip/languages.htm?key=c
flavicon
face BY : Mike Mansheim email (remove spam text)



looks to me like your c compiler is doing great - only one more
instruction than you would do by hand.

>>
this code makes the following asm:

movf   0x1E,W
movwf  0x72
clrf   0x71
bsf    0x3,0x5
movf   0x1E,W
iorwf  0x71
bcf    0x3,0x5
return

this seems too much code to return two bytes. I would spect something like
this:

movf   0x1E,W
movwf  0x72
bsf    0x3,0x5
movf   0x1E,W
movwf  0x71
bcf    0x3,0x5
return
<<

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


<OFF1E8CAB7.38BBEE96-ON86256A5E.0080CD23@graco.com>

See also: www.piclist.com/techref/microchip/languages.htm?key=c
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) : Composed 16 bit return value in Hi-Tech C

month overview.

new search...