看板 Grad-ProbAsk 關於我們 聯絡資訊
※ 引述《li918272002 (水藍微風)》之銘言: : 各位板大可以請教一題題目嗎??~ : 感謝~~ : Q: : R8 = 0x11223344 : R9 = 0xFADEABAD : R10 = 0x55667788 : What is final value of R2 in hexadecimal, using all eight : digits (that is write 0x00000000 and not 0x0), after the : execution of each sequence of instructions, for both : little- and big-endian machines? If any access in the : sequence is misaligned, write'misaligned' instead of an answer. 不懂 "misaligned" 是什麼意思 ? 假設 memmory 位置low => high 對應 左=>右 有錯請鞭~ - Little-Endian - Big-Endian --------------------------------------------------------------- - - STW R9, 0(R8) - - LDW R2, 0(R8) - 0xFADEABAD - 0xFADEABAD - - ---------------------------------------------------------------- - - STB R9, 3(R8) - - LDB R2, 3(R8) - 0xFFFFFFAD - 0xFA000000 - - ------------------------------------------------------------------ - - STB R9, 3(R8) - - LDBU R2, 3(R8) - 0x000000AD - 0xFA000000 - - ------------------------------------------------------------------ - - STH R9,1(R8) - - LDB R2,1(R8) - 0xFFFFFFAD - 0xFA000000 - - ------------------------------------------------------------------- STW R10,0(R8) - - LDB R2,1(R8) - 0x00000077 - 0x66000000 - - ------------------------------------------------------------------- STW R10,0(R8) - - LDH R2,2(R8) - 0x00005566 - 0x77880000 - - ------------------------------------------------------------------- - - STH R10,2(R8) - 0x00000077 - 0x66000000 LDB R2,3(R8) - - -- -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 60.198.131.51