(status bit)N: Negative when n = 1, n = 0 for integer or zeroControl bits:1) Interrupt Disable bit: when I or F = 1 o'clock, indicates interrupt binary2) Status control bit: When t = 0 indicates in arm state3) mode control bit:
MODE (Below is binary)
10000
User mode
Pc,cpsr,r0~r14
10001
FIQ
Pc,cpsr,spsr_fiq,r14_fiq~r8_fiq,r7~r0
10010
Irq
Pc,cpsr,spsr_irq,r14_irq~r13_irq,r12~r0
10011
Manageme
entering subroutines, the top of the stack holds the IP, followed by a, B 3; Result: (Dx:ax) = (A-B) ^3 4 difcube:push BP 5 mov bp, SP 6 mov ax, [bp+4]; the value of a in the stack is fed into AX 7 Sub Ax, [bp+6]; A-B 8 mov bp, ax 9 mul bp10 mul bp11 pop BP12 ret 4 ; Popup parameter (modify the top pointer to the value before the call) 13 14; The meaning of the directive ret N: 15; Pop ip16; The Add sp,n uses the stack for parameter passing, so the caller pres
= The address of the first byte after the address-call instruction at the "label";The range of 16-bit displacement is -32768~32767, which is indicated by complement;16-bit displacement is calculated by the compiler at compile timeCall is equivalent to:Push IPJMP near PTR labelCall far PTR designator:(1) (sp) = (sp) –2((ss) x16+ (sp)) = (CS)(sp) = (sp) –2((ss) x16+ (sp)) = (IP)(2) (CS) = segment address where the label is located(IP) = offset address where the label is locatedEquivalent to:Push
are all referred to as segment prefixes.A safe space:In a normal PC, DOS and other legitimate programs do not generally use the 0:200~0:2FF 256-byte space, so we call this space safe.Use of segment prefixes:650) this.width=650; "title=" 0.png "alt=" wkiom1j4pf6ysx67aab9yxilb7a167.png-wh_50 "src=" https://s5.51cto.com/ Wyfs02/m01/91/c4/wkiom1j4pf6ysx67aab9yxilb7a167.png-wh_500x0-wm_3-wmp_4-s_3553888335.png "/>Summary complete!This article is from the "where No Play" blog, please be sure to keep
1.TEST Logic comparison, the directive in a certain program and CMP instruction similar, two numeric values and operation, the results are not saved, but will change the corresponding flag (for example, SF,ZF,PF flag), the program can decide whether to jump to the corresponding branch. Here are a few examples: TEST eax,eax. Would you say that if eax compared with himself? With this command, you can determine whether EAX equals 0.JMP – Jump JE, JZ – The result is zero then jump JNE, JN Z – The r
1, 3.1.2"12:26" "Repne scas" command (ZC: Default is EAX, ECX)"18:42" "REP MOVS BYTE ptr es:[edi], DWORD ptr Ds:[esi]""REP MOVS byte ptr es:[edi], byte ptr Ds:[esi]""19:08" REP MOVS ==> performs a copy operation of a string"19:12" Repne SCAS ==> Search to the end of the string (0 where two exits the loop condition: The value of ECX is 0 or the location where the value is eax is found)"22:40" Repne SCAS Locate the value in the string Al that the EDI points to, count in ECX (not ECX take the inver
The MCR instruction arm data register is transmitted to the coprocessor register. Assume that the coprocessor cannot run the operation successfully. An undefined instruction abort is generated.Grammar teaching Format:Mcr{MCR2 P15, 0, Of For the CP15 coprocessor, The MRC instruction transfers the value of the coprocessor's registers to the registers of the ARM processor. Assuming that the coprocessor does not successfully run the operation, it will result in an abnormally broken instruction witho
StartThe right1AssumeCS:Code2 Code Segment3 Start: movAx,0ffffh;The compiler does not support the beginning of a letter4 movDs,ax5 movBx06 movDx07 movCx A8 9 S:movAL,[BX];assign value to lowTen movAh0 One AddDx,ax;add with 16 bits so that it does not overflow A IncBX - Loop S - the movax,4c00h - int + - code ends -End StartSegment PrefixThe "DS:", "CS:", "SS:", or "es:" that appear in the instruction that accesses the memory u
Cs:codeCode segmentMOV ax,2MOV cx,11S:add Ax,axLoop sCode endsEnd5.3 Tracking the Loop command with debugDebug 1.exe-R-T-T..-P (int 21H is performed with P)1. If you want to jump directly to the cs:xx position, execute with-G XX2. If you want to jump in the loop, that is, stop waiting for-t after the loop, use the-p command5.4 Debug and assembler compiler for different processing of instructionsSame instruction:MOV ax,[0] In debug means to put ds:0 and Ds:1 memory unit contents into AXIn the MA
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.