forked from acco/chti23
39 lines
No EOL
669 B
ArmAsm
39 lines
No EOL
669 B
ArmAsm
PRESERVE8
|
|
THUMB
|
|
export CallbackSon
|
|
|
|
; ====================== zone de réservation de données, ======================================
|
|
;Section RAM (read only) :
|
|
area mesdata,data,readonly
|
|
|
|
|
|
;Section RAM (read write):
|
|
area maram,data,readwrite
|
|
|
|
|
|
SortieSon dcd 0x0000
|
|
Index dcd 0
|
|
; ===============================================================================================
|
|
|
|
|
|
|
|
|
|
;Section ROM code (read only) :
|
|
area moncode,code,readonly
|
|
; écrire le code ici
|
|
|
|
CallbackSon proc
|
|
;
|
|
ldrh r2, Son
|
|
ldrh r3, Index
|
|
ldrh r1, [r2,r3]
|
|
add r1, #32768
|
|
mov r0, #92
|
|
udiv r1, r0
|
|
strh r1, SortieSon
|
|
add r3, #16
|
|
strh r3, Index
|
|
bx lr
|
|
endp
|
|
|
|
END
|