Hi All,

From previous postings is looks like Windows CE for ARM processors
does not support in-line assemby and that the __asm command is not
available.

Is there another way to use assembly language in my code for ARM?

Any comments or sample source code would be greatly appreciated.

Thanks,
Richard

Re: How to use assembly language for ARM? by Paul

Paul
Thu Aug 24 18:25:13 CDT 2006

Put it in a .S file and add it to your project. Since you're asking in the
Platform Builder newsgroup, you should be able to search the source folders
for .S files to find examples. There are many in the ARM-based BSPs from
Microsoft.

Paul T.

"morehouse" <richard@avaak.com> wrote in message
news:1156461499.762560.179010@74g2000cwt.googlegroups.com...
> Hi All,
>
> From previous postings is looks like Windows CE for ARM processors
> does not support in-line assemby and that the __asm command is not
> available.
>
> Is there another way to use assembly language in my code for ARM?
>
> Any comments or sample source code would be greatly appreciated.
>
> Thanks,
> Richard
>



Re: How to use assembly language for ARM? by dk

dk
Sat Sep 02 02:41:01 CDT 2006

yep there is one good sample in the folder of Intel BSP of Display code
I could locate in mine folder at
D:\WINCE500\PUBLIC\COMMON\OAK\CSP\ARM\INTEL\PXA25X\DISPLAY\PXA255_LCD
This is the function called from file pxa255_lcd.cpp and
EmulatedBltSrcCopy1616ASM(pwScanLineSrc, pwScanLineDst, cCols, cRows,
iScanStrideSrc, iScanStrideDst);
becomes in the file
ebcccc_opt.s
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; void EmulatedBltSrcCopy1616ASM(WORD* pSrc, WORD *pDst, int len, int
cRows, ;
; UINT32 iScanStrideSrc, ;
; UINT32 iScanStrideDst) ;
; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

STACKDEPTH EQU (4*4)

ISCANSTRIDESRC EQU (STACKDEPTH+0)
ISCANSTRIDEDST EQU (STACKDEPTH+4)
LEAF_ENTRY EmulatedBltSrcCopy1616ASM
cmp r2, #0
cmpgt r3, #0

IF Thumbing :LOR: Interworking
bxle lr
ELSE
movle pc, lr ; return
ENDIF


str r4, [sp, #-4]!
str r5, [sp, #-4]!
str r6, [sp, #-4]!
str r7, [sp, #-4]!
cmp r2, #16

ldr r4, [sp, #ISCANSTRIDESRC]
ldr r5, [sp, #ISCANSTRIDEDST]
mov r7, r2 ; keep len in one line

bgt SrcCopy1616_ASM_GT16

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SrcCopy1616_ASM_LE16
SrcCopy1616_ASM_LE16_LOOP
cmp r0, r1
ble SrcCopy1616_ASM_LE16_DEC

SrcCopy1616_ASM_LE16_INC
SrcCopy1616_ASM_LE16_INC_LABEL MEMCOPYMBTS_LT16 r0, r1, r2, #2, #2, r6, r12,
ldrh, strh, ldrneh, strneh
subs r3, r3, #1
add r0, r0, r4, lsl #1
add r1, r1, r5, lsl #1
mov r2, r7
sub r0, r0, r2, lsl #1
sub r1, r1, r2, lsl #1

bgt SrcCopy1616_ASM_LE16_LOOP
; return from the function
ldr r7, [sp], #4
ldr r6, [sp], #4
ldr r5, [sp], #4
ldr r4, [sp], #4
IF Thumbing :LOR: Interworking
bx lr
ELSE
mov pc, lr ; return
ENDIF

ENTRY_END EmulatedBltSrcCopy1616ASM

"Paul G. Tobey [eMVP]" wrote:

> Put it in a .S file and add it to your project. Since you're asking in the
> Platform Builder newsgroup, you should be able to search the source folders
> for .S files to find examples. There are many in the ARM-based BSPs from
> Microsoft.
>
> Paul T.
>
> "morehouse" <richard@avaak.com> wrote in message
> news:1156461499.762560.179010@74g2000cwt.googlegroups.com...
> > Hi All,
> >
> > From previous postings is looks like Windows CE for ARM processors
> > does not support in-line assemby and that the __asm command is not
> > available.
> >
> > Is there another way to use assembly language in my code for ARM?
> >
> > Any comments or sample source code would be greatly appreciated.
> >
> > Thanks,
> > Richard
> >
>
>
>