addressing-mode

ARM assembly: auto-increment register on store

北慕城南 提交于 2020-08-21 06:46:10
问题 Is it possible to auto-increment the base address of a register on a STR with a [Rn]! ? I've peered through the documentation but haven't been able to find a definitive answer, mainly because the command syntax is presented for both LDR and STR - in theory it should work for both, but I couldn't find any examples of auto-incrementing on a store (the loading works ok). I've made a small program which stores two numbers in a vector. When it's done the contents of out should be {1, 2} but the

Assembly Segments in opcodes

强颜欢笑 提交于 2020-08-21 05:29:31
问题 I noticed that in Assembly segments are used in opcodes. Example: MOV DWORD PTR SS:[EBP-30],30 I think that "PTR SS:" is used to specify that EBP-30 comes from the stack? (SS: stack segment) Am I right or am I completely wrong? :) And, could you please tell me the difference between the example above and MOV DWORD PTR[EBP-30],30 And what about DS (data segment) used in opcodes? 回答1: MOV DWORD PTR SS:[EBP-30],30 There are two separate modifiers here, DWORD PTR and SS: . The first one tells us