Цитата(firew0rker @ Jul 10 2013, 05:57)

Невозможно, если только у процессора нет инструкции, записывающей константу в старший полубайт старшего байта. Я таких процессоров не знаю.
У Cortex-M3 есть инструкция
Цитата
BFI.W Rd, Rn, #<lsb>, #<width> Insert bit field to a register
Правда, в Rn должен быть подготовлен шаблон.
Цитата
Bit Field Insert (BFI) copies 1–31 bits (#width) from one register to any location (#lsb) in another
register. The syntax is as follows:
BFI.W <Rd>, <Rn>, <#lsb>, <#width>
For example,
LDR R0,=0x12345678
LDR R1,=0x3355AACC
BFI.W R1, R0, #8, #16 ; Insert R0[15:0] to R1[23:8]
This will give R1 = 0x335678CC.