Assembly Language for Beginners
3.20. PACKING 12-BIT VALUES INTO ARRAY 0 0000 even 1 0001 odd 2 0010 even 3 0011 odd 4 0100 even 5 0101 odd 6 0110 even 7 0111 o ...
3.20. PACKING 12-BIT VALUES INTO ARRAY ; EDX now is (idx>>1)*3 ; point EAX to the middle byte: lea eax, [rdx+1] ; sign-ext ...
3.20. PACKING 12-BIT VALUES INTO ARRAY ; sign-extend address in EAX to RDX: cdqe ; prepare left byte in ECX by shifting it: shr ...
3.20. PACKING 12-BIT VALUES INTO ARRAY ; R1 = R0>>1 = idx>>1 ; R1 is now number of triplet LSLS r2,r1,#1 ; R2 = R1&l ...
3.20. PACKING 12-BIT VALUES INTO ARRAY Setter The first half of setter code is very similar to getter, address of triplet is cal ...
3.20. PACKING 12-BIT VALUES INTO ARRAY POP {r4,r5,pc} ENDP 3.20.8 Optimizing Keil 5.05 (ARM mode) Getter Getter function for ARM ...
3.20. PACKING 12-BIT VALUES INTO ARRAY TST r0,#1 LDR r12,|array| ; R12 = address of array LSR r0,r0,#1 ; R0 = R0>>1 = idx& ...
3.20. PACKING 12-BIT VALUES INTO ARRAY 8: sub w1, w1, w2 ; W1 = W1-W2 = (idx&(~1))<<1 - idx>>1 = idx*1.5 ; now t ...
3.20. PACKING 12-BIT VALUES INTO ARRAY ; W3 = W2+1 = idx1.5+1, i.e., offset of middle byte 6c: add x0, x0, offset of array withi ...
3.20. PACKING 12-BIT VALUES INTO ARRAY lui $28,%hi(gnu_local_gp) sll $3,$2,1 ; $3 = $2<<1 = (idx>>1)<<1 = idx& ...
3.20. PACKING 12-BIT VALUES INTO ARRAY ; jump if $4=idx&1 is not zero (i.e., if idx is odd): bne $4,$0,$L11 addu $2,$3,$2 ; ...
3.21 More about pointers. +0 +1 +2 |..|3.|12|.. Here are FAT12-related functions in Linux Kernel: fat12_ent_get(),fat12_ent_put( ...
3.21. MORE ABOUT POINTERS 3.21.1 Working with addresses instead of pointers. Pointer is just an address in memory. But why we wr ...
3.21. MORE ABOUT POINTERS jmp puts .LC1: .string "Hello, world!" main: sub rsp, 8 mov edi, OFFSET FLAT:.LC1 call print_string ad ...
3.21. MORE ABOUT POINTERS char *s="Hello, world!"; print_string ((uint64_t)s); }; Both source codes resulting in the same assemb ...
3.21. MORE ABOUT POINTERS multiply1: mov rax, rdi imul rax, rsi ret multiply2: mov rax, rdi imul rax, rsi ret Aslongasyoudonotde ...
3.21. MORE ABOUT POINTERS ULONG IdPath[ 3 ]; PVOID p; IdPath[ 0 ] = 0; IdPath[ 1 ] = 0; try { if ((IdPath[ 0 ] = BaseDllMapResou ...
3.21. MORE ABOUT POINTERS lpIdis ANDed withLDR_RESOURCE_ID_NAME_MASK. Which we can find inpublic/sdk/inc/ntldr.h: ... define LDR ...
3.21. MORE ABOUT POINTERS .text:0000000078D42FE0 jz loc_78D2452A .... If value in input pointer is greater than 0x10000, jump to ...
3.21. MORE ABOUT POINTERS kernfs_put(kn); return ERR_PTR(error); } (https://github.com/torvalds/linux/blob/fceef393a538134f03b77 ...
«
27
28
29
30
31
32
33
34
35
36
»
Free download pdf