내가 공부할때 본 어셈책에서는 굳이 ptr로 명시하지 않아도
mov eax, dword [ebp-8] 로만 해도 됐었던 것 같은데
mov eax, dword ptr [ebp-8]
이런 식으로 ptr을 명시해야하는 이유가 뭐임? ptr의 정확한 의미가?
내가 공부할때 본 어셈책에서는 굳이 ptr로 명시하지 않아도
mov eax, dword [ebp-8] 로만 해도 됐었던 것 같은데
mov eax, dword ptr [ebp-8]
이런 식으로 ptr을 명시해야하는 이유가 뭐임? ptr의 정확한 의미가?
Size Directives
In general, the intended size of the of the data item at a given memory address can be inferred from the assembly code instruction in which it is referenced. For example, in all of the above instructions, the size of the memory regions could be inferred from the size of the register operand. When we were loading a 32-bit register, the assembler could infer that the region of memory we were referri
However, in some cases the size of a referred-to memory region is ambiguous. Consider the instruction mov [ebx], 2. Should this instruction move the value 2 into the single byte at address EBX? Perhaps it should move the 32-bit integer representation of 2 into the 4-bytes starting at address EBX. Since either is a valid possible interpretation, the assembler must be explicitly directed as to which
referring to was 4 bytes wide. When we were storing the value of a one byte register to memory, the assembler could infer that we wanted the address to refer to a single byte in memory.
codesafer // 마침 그거 읽고있었는데 거기서는 dword ptr 자체로 사이즈 크기를 명시한다고 하는것 같은데 제가 본 책에서는 ptr 무시하고 dword 만으로 써있어서.. 그 당시에 공부할때도 dword로만 명시해도 잘 돌아갔었던 기억도 나고 해서..
mov dword [_n], 5
이런식으로요
'니가 공부할 때 본 어셈 책'이 머냐
표준대로면 dword ptr로 명시하는게 맞는건가..
중딩2//
http://www.drpaulcarter.com/pcasm/
중딩2// 이것 말고도 하나 더 pdf 파일로 본게 있었는데 거기서도 dword로만 쓰길래.. dword ptr로 쓴다는게 생소했음
형 나도masm 으로 헬로 월드 찍을 줄 아는데 학교 공부 때려치고 어셈 개발자 할까???