Don't like ads? PRO users don't see any ads ;-)
Guest

assembler 104 alles

By: a guest on Aug 21st, 2012  |  syntax: None  |  size: 1.99 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. %include "gt.asm"
  2.          covar
  3.        
  4. inarea:  resb 70
  5. outarea: resb 70
  6.          DB 0Dh, 0Ah
  7. dag:     resd 1
  8. loon:    resd 1
  9. Bloon:   resd 1
  10. honderd: dd 100
  11. veertig: dd 40
  12. Ntotaal: resd 1
  13. Btotaal: resd 1
  14.  
  15.                  inleiding
  16.                  openin
  17.                  openuit
  18.                  cld
  19.                  
  20. hoger:           lees
  21.                  cld
  22.                  cmp eax,0
  23.                  je eof
  24.        
  25.                  mov ecx,70
  26.                  mov al, ''
  27.                  mov edi, outarea
  28.                  rep stosb
  29.                  
  30.                  mov ecx,60
  31.                  mov esi, inarea
  32.                  mov edi, outarea
  33.                  rep movsb
  34.                  
  35.                  mov esi, inarea+20
  36.                  mov ecx,5
  37.                  tekstbin
  38.                  mov[dag], eax
  39.                  
  40.                  mov esi, inarea+30
  41.                  mov ecx,5
  42.                  tekstbin
  43.                  mov[loon], eax
  44.          
  45.                  sub eax,eax
  46.                  sub ebx,ebx
  47.                  sub ecx,ecx
  48.                  
  49.                  mov eax, [loon]
  50.                  imul dword [dag]
  51.                  
  52.                  sub edx,edx
  53.                  mov edx,[Ntotaal]
  54.                  add edx, eax
  55.                  mov [Ntotaal],edx
  56.                  sub edx,edx
  57.                  
  58.                  mov ebx,10
  59.                  std
  60.                  mov edi,outarea+44
  61. lus2             mov edx,0
  62.                  idiv ebx
  63.                  or dl,30h
  64.                  xchg al,dl
  65.                  stosb
  66.                  xchg al,dl
  67.                  cmp eax,0
  68.                  jne lus2
  69.                  
  70.                  mov eax, [loon]
  71.                  imul dword [dag]
  72.                  
  73.                  imul dword [veertig]
  74.                  idiv dword [honderd]
  75.                  mov [Bloon], eax
  76.                  
  77.                  sub edx,edx
  78.                  mov edx,[Btotaal]
  79.                  add edx, eax
  80.                  mov [Btotaal],edx
  81.                  sub edx,edx
  82.                  
  83.                  mov ebx,10
  84.                  std
  85.                  mov edi,outarea+54
  86. lus              mov edx,0
  87.                  idiv ebx
  88.                  or dl,30h
  89.                  xchg al,dl
  90.                  stosb
  91.                  xchg al,dl
  92.                  cmp eax,0
  93.                  jne lus
  94.                  
  95.                  schrijf
  96.                  
  97.                  jmp hoger
  98.                  
  99. eof:             mov ecx,70
  100.                  mov al, ''
  101.                  mov edi, outarea
  102.                  rep stosb
  103.                  
  104.                  schrijf
  105.                  
  106.                  mov eax, [Ntotaal]
  107.                  mov ebx,10
  108.                  std
  109.                  mov edi,outarea+18
  110. lus3             mov edx,0
  111.                  idiv ebx
  112.                  or dl,30h
  113.                  xchg al,dl
  114.                  stosb
  115.                  xchg al,dl
  116.                  cmp eax,0
  117.                  jne lus3
  118.  
  119.                  mov eax, [Btotaal]
  120.                  mov ebx,10
  121.                  std
  122.                  mov edi,outarea+25
  123. lus4             mov edx,0
  124.                  idiv ebx
  125.                  or dl,30h
  126.                  xchg al,dl
  127.                  stosb
  128.                  xchg al,dl
  129.                  cmp eax,0
  130.                  jne lus4
  131.                  
  132.                  schrijf
  133.  
  134.  
  135.                  slot