title: 'make this work' - assembly school project
body: <p>i have some problems with assembly. </p>
  
  <p>This is for my school project - my teacher said only 'make this work' (this code should swap letter places in pairs) and did not say how assembly even work.</p>
  
  <p>I don't want you to do everything for me, but hints would be perfect.</p>
  
  <pre><code>    .MODEL  TINY
  
  Cod SEGMENT
  
      ORG   100h
      ASSUME CS:Cod, DS:Cod, SS:Cod 
  
  Start:
  
      jmp Poczatek 
  
  Text   DB  'Some text$'
  
  Beginning:
  
      mov ax, OFFSET Text
      mov  ds, ax
      mov  bx, 0
  
  Loop:
  
      cmp ax, "$"
      mov al, [bx]
      je  Show
      inc bh
      mov [bx], ah
      cmp al, '$'
      mov [bx-1], ax
      je  Show
      mov [bx], bl
      dec bl
      jmp Loop
  
  Show:
  
      mov ah, 09h
      mov dx, OFFSET Text
      int 21h
  
      mov ax, 4C00h
      int 21h
  
  Cod  ENDS
  
  END  Start
  </code></pre>