Advertisement
joker546645

37 pdf

Nov 26th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .686
  2. .model flat
  3. extern _ExitProcess@4 : PROC
  4. public _main
  5.  
  6. .data
  7. znak db 32h, 34h
  8. dst db 10 dup (?)
  9. .code
  10.  
  11. _main PROC  
  12.     lea esi, znak
  13.     lea edi, dst
  14.     mov ecx, 0
  15.     mov ebx, 0
  16.     mov edx, 0
  17.     mov eax, 0
  18.     mov dl, '0'
  19.     mov dh, '.'
  20.  
  21. ptl:
  22.     mov al, [esi + ecx]
  23.     inc ecx
  24.     cmp al, 0
  25.     jne ptl
  26.  
  27.     cmp ecx, 2
  28.     je jedna
  29.     cmp ecx, 3
  30.     je dwie
  31.  
  32.     sub ecx, 3
  33. wiecej:
  34.     mov al, [esi+ebx]
  35.     mov [edi+ebx], al
  36.     inc ebx
  37.     cmp ebx, ecx
  38.     jne wiecej
  39.  
  40.     mov al, '.'
  41.     mov [edi+ecx], al
  42.  
  43.     inc ebx
  44.     mov al, [esi+ecx]
  45.     mov [edi+ebx], al
  46.    
  47.     inc ecx
  48.     mov al, [esi+ecx]
  49.     inc ebx
  50.     mov [edi+ebx], al
  51.     jmp koniec
  52.  
  53. jedna:
  54.     mov [edi], dl
  55.     mov [edi + 1], dh
  56.     mov [edi + 2], dl
  57.     mov al, [esi]
  58.     mov [edi + 3], al
  59.     jmp koniec
  60.  
  61. dwie:
  62.     mov [edi], dl
  63.     mov [edi + 1], dh
  64.     mov al, [esi]
  65.     mov [edi + 2], al
  66.     mov al, [esi+1]
  67.     mov [edi + 3], al
  68.     jmp koniec
  69.  
  70. koniec:
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78. push 0
  79. call _ExitProcess@4
  80. _main ENDP
  81. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement