Maskinorienterad programmering a) typedef void (*simplefunc)(void); /* obs Thumb-bit i adressbit 0 */ #define portinit ((simplefunc) 0x08000201 ) void xxx( void ) { ... portinit(); ... } b) ... LDR R0,=0x8000201 BLX R0 LDR LDR LDR LDR BL @ obs Thumb-bit i A0... R0,a R1,b R2,c R3,d sub int sub: adds bx long long sub: adds asr bx Assemblerprogrammering - fördjupning - tavlan r0,r0,#1 lr r0, r0, #1 r1, r0, #31 lr 1
© Copyright 2024