Bienvenido: Ingresar
location: attachment:compara_ex1.s de WebHome/TrabajosPracticos/PracticoASM4

Adjunto 'compara_ex1.s'

Descargar

   1 .text
   2 .arm
   3 .global _start
   4 _start:
   5         b reset
   6         b loop
   7         b loop
   8         b loop
   9         b loop
  10         nop
  11         b loop
  12         b loop
  13 
  14 /* ==============================
  15 *  TEST CODE
  16 *  ==============================
  17 */
  18 reset:
  19         mov r1,#10
  20         mov r2,#15
  21         mov r3,#20
  22 
  23         bl comp1
  24         
  25         bl comp2
  26 
  27         bl comp3
  28         
  29         bl comp4
  30 
  31 loop:   b loop
  32 @ -----------------------------------------------------
  33 @ r1<100 y r1>20
  34 
  35 comp1:  mov r0,#0 @NO
  36         cmp r1,#100
  37         bhs comp1_no
  38         cmp r1,#20
  39         ble comp1_no
  40         mov r0,#1 @SI
  41 comp1_no:
  42         mov pc,lr
  43 
  44 @ -----------------------------------------------------
  45 @ r1<100 o r2>20
  46 
  47 comp2:  mov r0,#1 @ SI
  48         cmp r1,#100
  49         blo comp2_si
  50         cmp r2,#20
  51         bhi comp2_si
  52         mov r0,#0 @ NO
  53 comp2_si:
  54         mov pc,lr
  55 
  56 @ -----------------------------------------------------
  57 @ r1=10 o r1=15 o r1=20
  58 
  59 comp3:  mov r0,#1 @ SI
  60 
  61         cmp r1,#10
  62         beq comp3_si
  63         cmp r1,#15
  64         beq comp3_si
  65         cmp r1,#20
  66         beq comp3_si
  67 
  68         mov r0,#0 @ NO
  69 comp3_si:
  70         mov pc,lr
  71 
  72 
  73 @ -----------------------------------------------------
  74 @ r1=10 y r2=15 y r3=20
  75 
  76 comp4:  mov r0,#0 @ NO
  77 
  78         cmp r1,#10
  79         bne comp4_no
  80         cmp r2,#15
  81         bne comp4_no
  82         cmp r3,#20
  83         bne comp4_no
  84         mov r0,#1 @ SI
  85 comp4_no:
  86         mov pc,lr
  87         .end

Archivos adjuntos

Para referirse a los adjuntos de una página, usa attachment:nombredelarchivo, como se muestra abajo en la lista de archivos. NO uses la URL del enlace [get], ya que puede cambiar fácilmente y dejar de funcionar.
  • [obtener | ver] (2019-09-02 11:56:14, 110.6 KB) [[attachment:ARM_Instruction_Set.pdf]]
  • [obtener | ver] (2019-09-02 11:56:14, 1.1 KB) [[attachment:Makefile]]
  • [obtener | ver] (2019-09-02 11:56:14, 0.4 KB) [[attachment:alarma_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 0.5 KB) [[attachment:alarma_s_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 2.3 KB) [[attachment:anumero1_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 2.9 KB) [[attachment:anumero2_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 0.6 KB) [[attachment:cadena_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 1.2 KB) [[attachment:cercano_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 0.8 KB) [[attachment:clave_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 1.4 KB) [[attachment:compara_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 2.2 KB) [[attachment:contarletrasrep_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 1.5 KB) [[attachment:contarrep_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 1.2 KB) [[attachment:criba_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 2.3 KB) [[attachment:extraenum_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 1.2 KB) [[attachment:igualarlargo_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 1.7 KB) [[attachment:inspalabra_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 0.9 KB) [[attachment:invertir_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 0.9 KB) [[attachment:may_min_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 0.6 KB) [[attachment:multip_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 0.6 KB) [[attachment:potencia_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 0.8 KB) [[attachment:potencia_ex1.s,v]]
  • [obtener | ver] (2019-09-02 11:56:14, 0.8 KB) [[attachment:prom_vector_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 0.6 KB) [[attachment:promedio_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 0.8 KB) [[attachment:promedio_ex1.s,v]]
  • [obtener | ver] (2019-09-02 11:56:14, 0.7 KB) [[attachment:punt_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 0.8 KB) [[attachment:punt_ex1.s,v]]
  • [obtener | ver] (2019-09-02 11:56:14, 1.9 KB) [[attachment:separa_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 472.2 KB) [[attachment:slides.pdf]]
  • [obtener | ver] (2019-09-02 11:56:14, 0.5 KB) [[attachment:suma100_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 0.6 KB) [[attachment:suma64_ex1.s]]
  • [obtener | ver] (2019-09-02 11:56:14, 0.8 KB) [[attachment:suma64_ex1.s,v]]
  • [obtener | ver] (2019-09-02 11:56:14, 160.3 KB) [[attachment:tp1.pdf]]
  • [obtener | ver] (2019-09-02 11:56:14, 167.3 KB) [[attachment:tp3.pdf]]
 All files | Selected Files: delete move to page copy to page

No tienes permisos para adjuntar un archivo a esta página.