Advertisement
Dekowta

Collision ASM

Jul 28th, 2012
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.     .text              
  3.     .align 2          
  4.     .thumb_func        
  5.     .code 16
  6.     .global BP_CIntersectBox        @ I believe this is the return value for the function or to diclare it has one
  7.  
  8. BP_CIntersectBox:
  9.     push    {r4, lr}
  10.  
  11.     @aMinX <= bMaxX
  12.     ldrh    r2, [r1]        @bminX
  13.     ldrh    r3, [r1, #4]    @bwidth
  14.     add     r2, r3          @r2 = bminX + bwidth
  15.     ldrh    r3, [r0]        @aminX
  16.     cmp     r3, r2          @
  17.     bgt     .LendF          @aminX > bmaxX  (aminX <= bmaxX if ture)
  18.  
  19.     @aMaxX >= bMinX
  20.     ldrh    r2, [r0]        @aminX
  21.     ldrh    r3, [r0, #4]    @awidth
  22.     add     r2, r3          @r2 = aminX + awidth
  23.     ldrh    r3, [r1]        @bminX
  24.     cmp     r2, r3          @
  25.     blt     .LendF
  26.  
  27.     @aMinY <= bMaxY
  28.     mov     r4, #2
  29.     ldrh    r2, [r1, r4]    @bminY
  30.     mov     r4, #6
  31.     ldrh    r3, [r1, r4]    @bheight
  32.     add     r2, r3          @r2 = bminY + bheight
  33.     mov     r4, #2
  34.     ldrh    r3, [r0, r4]    @aminY
  35.     cmp     r3, r2          @
  36.     bgt     .LendF          @aminY > bmaxY  (aminY <= bmaxY if ture)
  37.  
  38.     @aMaxY >= bMinY
  39.     mov     r4, #2
  40.     ldrh    r2, [r0, r4]    @aminY
  41.     mov     r4, #6
  42.     ldrh    r3, [r0, r4]    @aheight
  43.     add     r2, r3          @r2 = aminY + aheight
  44.     mov     r4, #2
  45.     ldrh    r3, [r1, r4]    @bminY
  46.     cmp     r2, r3          @
  47.     blt     .LendF
  48.    
  49.     @True
  50.     pop     {r4}
  51.     pop     {r1}
  52.     mov     r0, #1
  53.     bx      r1
  54.  
  55.     @False
  56. .LendF:
  57.     pop     {r4}
  58.     pop     {r1}
  59.     mov     r0, #0
  60.     bx      r1
  61.  
  62. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  63.  
  64.  
  65.     .text              
  66.     .align 2            
  67.     .thumb_func        
  68.     .code 16
  69.     .global BP_CIntersectCircle
  70.  
  71. BP_CIntersectCircle:
  72.     push    {r4-r7, lr}
  73.  
  74.     @dx = x2 - x1
  75.     mov     r7, #0
  76.     ldrsh   r2, [r0, r7]        @loads x from circle a
  77.     ldrsh   r3, [r1, r7]        @loads x from circle b
  78.     sub     r4, r3, r2
  79.  
  80.     @dy = y2 - y1
  81.     mov     r7, #2
  82.     ldrsh   r2, [r0, r7]    @loads y from circle a
  83.     ldrsh   r3, [r1, r7]    @loads y from circle b
  84.     sub     r5, r3, r2
  85.  
  86.     @dr = rd2 + rd1
  87.     mov     r7, #4
  88.     ldrsh   r2, [r0, r7]    @loads radius from circle a
  89.     ldrsh   r3, [r1, r7]    @loads radius from circle b
  90.     add     r6, r3, r2
  91.  
  92.     @dx * dx + dy * dy = rs
  93.     mov     r7, r4
  94.     mul     r4, r4, r7      @dx * dx = rs1
  95.     mov     r7, r5
  96.     mul     r5, r5, r7      @dy * dy = rs2
  97.     add     r2, r4, r5          @rs1 + rs2
  98.  
  99.     @rs < (dr * dr)
  100.     mov     r7, r6
  101.     mul     r6, r6, r7
  102.     cmp     r2, r6
  103.     bgt     .Lend
  104.  
  105.     pop     {r4-r7}
  106.     pop     {r1}
  107.     mov     r0, #1
  108.     bx      r1
  109.  
  110. .Lend:
  111.     pop     {r4-r7}
  112.     pop     {r1}
  113.     mov     r0, #0
  114.     bx      r1
  115.  
  116. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  117.  
  118.  
  119.     @The first step is to work out how many tiles we need to check and the offset
  120.     @this also needs to work with any collision box size!
  121.  
  122.     @the way this works is to check the width and height and the x and y
  123.     @if the (width + x) or (height + y) is divisable by 8 then the amount needed to be
  124.     @checked is reduced by 1
  125.     @
  126.     @so an example if the collision box is on 37, 9 and is 15, 17 then the first step is
  127.     @to divide the x and y by 8
  128.     @
  129.     @37/8 = 4 r 5 = x
  130.     @ 9/8 = 1 r 1 = y
  131.     @
  132.     @the next step is add the x and y to the width and height
  133.     @
  134.     @
  135.     @37 + 15 = 52
  136.     @9  + 17 = 26
  137.     @
  138.     @now divide these by 8
  139.     @
  140.     @52/8 = 6 r 4
  141.     @26/8 = 3 r 2
  142.     @
  143.     @NOTE: SAVE THE REMAINDER HERE
  144.     @
  145.     @6 - 4 = 2
  146.     @3 - 1 = 2
  147.     @
  148.     @so according to this we are only going to check 2
  149.     @tiles and also 2 from the x and y
  150.     @this is incorrect and it should be 3, 3
  151.     @but we knew this was incorrect as the 52/8 and 26/8 produced a remainder
  152.     @so we +1 to both the width and height values
  153.  
  154.     @another example 32,8 and 15, 17
  155.     @
  156.     @32/8 = 4 = x
  157.     @ 8/8 = 1 = y
  158.     @
  159.     @32 + 15 = 47
  160.     @8  + 17 = 25
  161.     @
  162.     @47/8 =  5 r 7
  163.     @25/8 =  3 r 1
  164.     @
  165.     @5 - 4 = 1
  166.     @3 - 1 = 2
  167.     @
  168.     @since we had remainders its
  169.     @
  170.     @2 and 3 this time which is correct
  171.  
  172.     @Another example however this time the width and height
  173.     @x y will land on a value that does not produce a remainder
  174.     @
  175.     @32, 8 | 16, 16
  176.     @
  177.     @32/8 = 4 = x
  178.     @ 8/8 = 1 = y
  179.     @
  180.     @32 + 16 = 48
  181.     @ 8 + 16 = 24
  182.     @
  183.     @48/8 = 6
  184.     @24/8 = 3
  185.     @
  186.     @6 - 4 = 2
  187.     @3 - 1 = 2
  188.     @
  189.     @no remainder no need to add values
  190.  
  191.  
  192.     @with the map data its a little broken since the y and x are switched
  193.     @the correct method to get a position is [(x * height) + y]
  194.     @
  195.     @this is due to the way the array is laid out in memory. there are width amount
  196.     @of rows and each row contains height amount of columns
  197.  
  198.  
  199.  
  200.     .text               @ Put the following stuff in the "text" (== code) section
  201.     .align 2            @ align to 1<<2 bytes
  202.     .thumb_func         @ Call as thumb function
  203.     .code 16
  204.     .global BP_CMapBox
  205.     .global CollisionPos
  206.  
  207. BP_CMapBox:
  208.     push    {r4-r7, lr}
  209.     push    {r0}
  210.  
  211.     @r0 = free
  212.     @r1 = collison box
  213.     @r2 = collision x
  214.     @r3 = collision width
  215.     @r4 = free
  216.     @r5 = remainder from width calcualtion
  217.     @r6 = final width check
  218.     @r7 = Free
  219.  
  220.  
  221.     ldrh    r2, [r1]            @obtain collision x
  222.     mov     r4, #4
  223.     ldrh    r3, [r1, r4]        @obtain the collision width
  224.     add     r7, r2, r3          @x plus width
  225.     lsr     r4, r7, #3          @(x + width)/8
  226.     lsl     r0, r4, #3          @r0 = r4 * 8
  227.     sub     r5, r7, r0          @r5 = r7 - r0
  228.     lsr     r7, r2, #3          @x/8
  229.     sub     r6, r4, r7          @(x + width)/8 - x/8
  230.     cmp     r5, #0              @is there a remainder for the width
  231.     beq     .Lj1
  232.     add     r6, #1              @add 1 is there was
  233.  
  234.  
  235.     @r0 = free
  236.     @r1 = collison box
  237.     @r2 = collision y
  238.     @r3 = collision height
  239.     @r4 = free
  240.     @r5 = final width check
  241.     @r6 = final height check
  242.     @r7 = Free
  243.  
  244. .Lj1:
  245.    
  246.     push    {r6}                @save the width check value
  247.  
  248.     mov     r4, #2
  249.     ldrh    r2, [r1, r4]        @obtain collision y
  250.     mov     r4, #6
  251.     ldrh    r3, [r1, r4]        @obtain the collision height
  252.     add     r7, r2, r3          @y plus height
  253.     lsr     r4, r7, #3          @(y + height)/8
  254.     lsl     r0, r4, #3          @r0 = r4 * 8
  255.     sub     r5, r7, r0          @r5 = r7 - r0
  256.     lsr     r7, r2, #3          @y/8
  257.     sub     r6, r4, r7          @(y + height)/8 - x/8
  258.     cmp     r5, #0              @is there a remainder for the width
  259.     beq     .Lj2
  260.     add     r6, #1              @add 1 is there was
  261.  
  262. .Lj2:
  263.  
  264.     pop     {r5}
  265.     pop     {r0}
  266.  
  267.  
  268.     @r0 = mapatt    (free once pushed)
  269.     @r1 = collison box (map height once pushed)
  270.     @r2 = x
  271.     @r3 = y
  272.     @r4 = free
  273.     @r5 = final width check
  274.     @r6 = final height check
  275.     @r7 = MapData address
  276.    
  277.     @load x and y
  278.     ldrh    r2, [r1]        @x collision
  279.     mov     r4, #2
  280.     ldrh    r3, [r1, r4]    @y collision
  281.     push    {r1}            @collision box stored
  282.        
  283.     @load map width and address
  284.     mov     r4, #8
  285.     ldr     r7, [r0, r4]    @map data
  286.     mov     r4, #14
  287.     ldrh    r1, [r0, r4]    @map height
  288.  
  289.     @move the map address to the correct location
  290.     lsr     r2, #3          @x/8
  291.     lsr     r3, #3          @y/8
  292.     push    {r2-r3}         @temp save the x and y
  293.     sub     r3, #1          @y - 1
  294.     mul     r1, r1, r2      @x * height
  295.     lsl     r1, #1          @to add to the address its a step of 2 rather than 1 so everything has to be                   
  296.     lsl     r3, #1          @multiplied by 2
  297.     add     r7, r7, r1      @add + (x*height)
  298.     add     r7, r7, r3      @add + ((x*height) + (y-1))
  299.  
  300.     @recover  the map quickly to get the height
  301.     mov     r4, #14
  302.     ldrh    r1, [r0, r4]    @map height
  303.     lsl     r1, #1          @map height * 2
  304.  
  305.     @r0 = mapatt
  306.     @r1 = (1 * height) * 2
  307.     @r2 = free
  308.     @r3 = free
  309.     @r4 = counter
  310.     @r5 = final width check
  311.     @r6 = final height check
  312.     @r7 = MapData address
  313.  
  314.     @now to loop through the array to get the data
  315.     mov     r4, #0
  316. .LloopTop:
  317.     ldrh    r2, [r7]        @load the src tile data
  318.     mov     r3, #3          @r3 = 3
  319.     lsl     r3, #14         @(r3 << 14)
  320.     and     r3, r2          @r3 & data
  321.     lsr     r3, #14         @r3 >> 14
  322.     cmp     r3, #1          @r3 == 1 (1 is a collision object)
  323.     beq     .LTop1
  324.     add     r7, r1
  325.     add     r4, #1 
  326.     cmp     r4, r5
  327.     bne     .LloopTop  
  328.  
  329.  
  330.     @r0 = mapatt
  331.     @r1 = height * 2
  332.     @r2 = free
  333.     @r3 = y offset
  334.     @r4 = free
  335.     @r5 = final width check
  336.     @r6 = final height check
  337.     @r7 = MapData address
  338.  
  339. .Lj3:
  340.     @now need to check the bottom for collision
  341.     pop     {r2, r3}        @get x and y back
  342.     push    {r2, r3}        @save them again
  343.     add     r3, r6          @y + tiles to check height
  344.     lsr     r1, #1          @map height /2 (was already * 2 any way    
  345.     mul     r2, r2, r1      @(x*height)
  346.     lsl     r1, #1          @(1*height) * 2
  347.     lsl     r2, #1          @(x*height) * 2
  348.     lsl     r3, #1          @(y + collisionheight) * 2
  349.     mov     r4, #8
  350.     ldr     r7, [r0, r4]    @map data
  351.     add     r7, r7, r2      @add + (x*height)
  352.     add     r7, r7, r3      @add + ((x*height) + (y-1))
  353.  
  354.     @r0 = mapatt
  355.     @r1 = (1 * height) * 2
  356.     @r2 = free
  357.     @r3 = free
  358.     @r4 = counter
  359.     @r5 = final width check
  360.     @r6 = final height check
  361.     @r7 = MapData address
  362.  
  363.     @now to loop through the array to get the data
  364.     mov     r4, #0
  365. .LloopBottom:
  366.     ldrh    r2, [r7]        @load the src tile data
  367.     mov     r3, #3          @r3 = 3
  368.     lsl     r3, #14         @(r3 << 14)
  369.     and     r3, r2          @r3 & data
  370.     lsr     r3, #14         @r3 >> 14
  371.     cmp     r3, #1          @r3 == 1 (1 is a collision object)
  372.     beq     .LBottom1
  373.     add     r7, r1
  374.     add     r4, #1 
  375.     cmp     r4, r5
  376.     bne     .LloopBottom   
  377.  
  378.  
  379.     @r0 = mapatt
  380.     @r1 = height * 2
  381.     @r2 = free
  382.     @r3 = free
  383.     @r4 = free
  384.     @r5 = final width check
  385.     @r6 = final height check
  386.     @r7 = MapData address
  387.  
  388. .Lj4:
  389.     @Time to check the left
  390.     pop     {r2, r3}        @get x and y back
  391.     push    {r2, r3}        @save them again
  392.     sub     r2, #1          @x - 1
  393.     lsr     r1, #1          @map height /2 (was already * 2 any way    
  394.     mul     r2, r2, r1      @(x*height)
  395.     lsl     r1, #1          @(1*height) * 2
  396.     lsl     r2, #1          @(x*height) * 2
  397.     lsl     r3, #1          @y * 2
  398.     mov     r4, #8
  399.     ldr     r7, [r0, r4]    @map data
  400.     add     r7, r7, r2      @add + (x*height)
  401.     add     r7, r7, r3      @add + ((x*height) + (y-1))
  402.  
  403.     @r0 = mapatt
  404.     @r1 = height * 2
  405.     @r2 = free
  406.     @r3 = free
  407.     @r4 = counter
  408.     @r5 = final width check
  409.     @r6 = final height check
  410.     @r7 = MapData address
  411.  
  412.     mov     r4, #0
  413. .LloopLeft:
  414.     lsl     r3, r4, #1      @y + i (since each jump is a 16 bit value it needs to be * 2
  415.     ldrh    r2, [r7, r3]    @load the data
  416.     mov     r3, #3          @r3 = 3
  417.     lsl     r3, #14         @(r3 << 14)
  418.     and     r3, r2          @r3 & data
  419.     lsr     r3, #14         @r3 >> 14
  420.     cmp     r3, #1          @r3 == 1 (1 is a collision object)
  421.     beq     .LLeft
  422.     add     r4, #1 
  423.     cmp     r4, r6
  424.     bne     .LloopLeft 
  425.  
  426.     @r0 = mapatt
  427.     @r1 = height * 2
  428.     @r2 = free
  429.     @r3 = free
  430.     @r4 = free
  431.     @r5 = final width check
  432.     @r6 = final height check
  433.     @r7 = MapData address
  434.  
  435. .Lj5:
  436.     @Time to check the right
  437.     pop     {r2, r3}        @get x and y back
  438.     push    {r2, r3}        @save them again
  439.     add     r2, r5          @x + final width
  440.     lsr     r1, #1          @map height /2 (was already * 2 any way    
  441.     mul     r2, r2, r1      @(x*height)
  442.     lsl     r1, #1          @(1*height) * 2
  443.     lsl     r2, #1          @(x*height) * 2
  444.     lsl     r3, #1          @y * 2
  445.     mov     r4, #8
  446.     ldr     r7, [r0, r4]    @map data
  447.     add     r7, r7, r2      @add + (x*height)
  448.     add     r7, r7, r3      @add + ((x*height) + (y-1))
  449.  
  450.     @r0 = mapatt
  451.     @r1 = height * 2
  452.     @r2 = free
  453.     @r3 = free
  454.     @r4 = free
  455.     @r5 = final width check
  456.     @r6 = final height check
  457.     @r7 = MapData address
  458.  
  459.     mov     r4, #0
  460. .LloopRight:
  461.     lsl     r3, r4, #1      @y + i (since each jump is a 16 bit value it needs to be * 2
  462.     ldrh    r2, [r7, r3]    @load the data
  463.     mov     r3, #3          @r3 = 3
  464.     lsl     r3, #14         @(r3 << 14)
  465.     and     r3, r2          @r3 & data
  466.     lsr     r3, #14         @r3 >> 14
  467.     cmp     r3, #1          @r3 == 1 (1 is a collision object)
  468.     beq     .LRight
  469.     add     r4, #1 
  470.     cmp     r4, r6
  471.     bne     .LloopRight
  472.    
  473.     b       .Lj6
  474.  
  475.  
  476.  
  477. .LLeft:
  478.     pop     {r2, r3}        @recover x and y
  479.     push    {r2, r3}        @save x and y
  480.  
  481.     sub     r2, r2, #1      @x - 1
  482.     ldr     r3,=CollisionPos@get the collisionPos struct address
  483.     mov     r4, #8
  484.     strh    r2, [r3, r4]    @save the x pos
  485.     mov     r4, #10         @
  486.     mov     r2, #1
  487.     strh    r2, [r3, r4]    @set the left as triggered
  488.     b       .Lj5
  489.  
  490. .LRight:
  491.     pop     {r2, r3}        @recover x and y
  492.     push    {r2, r3}        @save x and y
  493.  
  494.     add     r2, r5          @x + width to check
  495.     ldr     r3,=CollisionPos@get the collisionPos struct address
  496.     mov     r4, #12
  497.     strh    r2, [r3, r4]    @save the x pos
  498.     mov     r4, #14         @
  499.     mov     r2, #1
  500.     strh    r2, [r3, r4]    @set the left as triggered
  501.     b       .Lj6
  502.  
  503. .LTop1:
  504.     pop     {r2, r3}        @recover x and y
  505.     push    {r2, r3}        @save x and y
  506.  
  507.     sub     r3, r3, #1      @y - 1
  508.     ldr     r2,=CollisionPos@get the collisionPos struct address
  509.     mov     r4, #4          @
  510.     strh    r3, [r2, r4]    @save the y pos
  511.     mov     r4, #6          @
  512.     mov     r3, #1
  513.     strh    r3, [r2, r4]    @set the top as triggered
  514.     b       .Lj3
  515.  
  516. .LBottom1:
  517.     pop     {r2, r3}        @recover x and y
  518.     push    {r2, r3}        @save x and y
  519.  
  520.     add     r3, r6          @y + height to check
  521.     ldr     r2,=CollisionPos@get the collisionPos struct address
  522.     strh    r3, [r2]        @save the y pos
  523.     mov     r4, #2          @
  524.     mov     r3, #1
  525.     strh    r3, [r2, r4]    @set the bottom as triggered
  526.     b       .Lj4
  527.  
  528.  
  529.  
  530.  
  531.  
  532. .Lj6:
  533.     @If all the above works then you have found the collision objects
  534.     @but hold up we are an 8th smaller atm so need to scale everything up
  535.     @and check to see if we did actually collide
  536.     pop     {r2, r3}
  537.     pop     {r1}
  538.  
  539.     @r0 = mapatt
  540.     @r1 = CollisionBox
  541.     @r2 = x/8   (unneeded now any way)
  542.     @r3 = y/8   (unneeded now)
  543.     @r4 = free
  544.     @r5 = free
  545.     @r6 = free
  546.     @r7 = free
  547.  
  548.     ldr     r7,=CollisionPos
  549.  
  550.     mov     r4, #2
  551.     ldrh    r5, [r1, r4]    @obtain y  Fixed
  552.     mov     r4, #2
  553.     ldrh    r0, [r7, r4]    @load the bool for the bottom
  554.     cmp     r0, #1          @check to see if it was triggered
  555.     bne     .Lj7
  556.     ldrh    r0, [r7]        @load where the collision was triggered
  557.     lsl     r0, #3          @position * 8 (to upscale it)
  558.     mov     r4, #6
  559.     ldrh    r6, [r1, r4]    @load the height of the collision object
  560.     sub     r0, r0, r6      @position * 8 - height
  561.     cmp     r5, r0
  562.     bge     .Lj7
  563.     mov     r6, #0
  564.     mov     r4, #2
  565.     strh    r6, [r7, r4]    @set bottom trigger to false
  566.  
  567.  
  568. .Lj7:
  569.     mov     r4, #2
  570.     ldrh    r5, [r1, r4]    @obtain y
  571.     mov     r4, #6
  572.     ldrh    r0, [r7, r4]    @load the bool for the bottom
  573.     cmp     r0, #1          @check to see if it was triggered
  574.     bne     .Lj8
  575.     mov     r4, #4
  576.     ldrh    r0, [r7, r4]        @load where the collision was triggered
  577.     lsl     r0, #3          @position * 8 (to upscale it)
  578.     add     r0, #8          @(position * 8) + 8
  579.     cmp     r5, r0
  580.     ble     .Lj8
  581.     mov     r6, #0
  582.     mov     r4, #6
  583.     strh    r6, [r7, r4]    @set bottom trigger to false
  584.    
  585. .Lj8:
  586.     ldrh    r5, [r1]        @obtain x
  587.     mov     r4, #10
  588.     ldrh    r0, [r7, r4]    @load the bool for the left
  589.     cmp     r0, #1          @check to see if it was triggered
  590.     bne     .Lj9
  591.     mov     r4, #8
  592.     ldrh    r0, [r7, r4]    @load where the collision was triggered
  593.     lsl     r0, #3          @position * 8 (to upscale it)
  594.     add     r0, #8          @position * 8 - height
  595.     cmp     r5, r0
  596.     ble     .Lj9
  597.     mov     r6, #0
  598.     mov     r4, #10
  599.     strh    r6, [r7, r4]    @set bottom trigger to false
  600.  
  601. .Lj9:
  602.     ldrh    r5, [r1]        @obtain x
  603.     mov     r4, #14
  604.     ldrh    r0, [r7, r4]    @load the bool for the right
  605.     cmp     r0, #1          @check to see if it was triggered
  606.     bne     .Lj10
  607.     mov     r4, #12
  608.     ldrh    r0, [r7, r4]    @load where the collision was triggered
  609.     lsl     r0, #3          @position * 8 (to upscale it)
  610.     mov     r4, #4
  611.     ldrh    r6, [r1, r4]    @load the width of the collision object
  612.     sub     r0, r0, r6      @position * 8 - width
  613.     cmp     r5, r0
  614.     bge     .Lj10
  615.     mov     r6, #0
  616.     mov     r4, #14
  617.     strh    r6, [r7, r4]    @set bottom trigger to false
  618.  
  619. .Lj10:
  620.     @bottom
  621.     mov     r4, #2
  622.     ldrh    r1, [r7, r4]
  623.     cmp     r1, #1
  624.     beq     .LEndT
  625.  
  626.     @top
  627.     mov     r4, #6
  628.     ldrh    r1, [r7, r4]
  629.     cmp     r1, #1
  630.     beq     .LEndT
  631.  
  632.     @left
  633.     mov     r4, #10
  634.     ldrh    r1, [r7, r4]
  635.     cmp     r1, #1
  636.     beq     .LEndT
  637.  
  638.     @right
  639.     mov     r4, #14
  640.     ldrh    r1, [r7, r4]
  641.     cmp     r1, #1
  642.     beq     .LEndT
  643.     b       .LEnd
  644.  
  645.  
  646. .LEnd:
  647.     pop     {r4-r7}
  648.     pop     {r1}
  649.     mov     r0, #0
  650.     bx      r1
  651.  
  652. .LEndT:
  653.     pop     {r4-r7}
  654.     pop     {r1}
  655.     mov     r0, #1
  656.     bx      r1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement