
assembler 104 alles
By: a guest on
Aug 21st, 2012 | syntax:
None | size: 1.99 KB | hits: 20 | expires: Never
%include "gt.asm"
covar
inarea: resb 70
outarea: resb 70
DB 0Dh, 0Ah
dag: resd 1
loon: resd 1
Bloon: resd 1
honderd: dd 100
veertig: dd 40
Ntotaal: resd 1
Btotaal: resd 1
inleiding
openin
openuit
cld
hoger: lees
cld
cmp eax,0
je eof
mov ecx,70
mov al, ''
mov edi, outarea
rep stosb
mov ecx,60
mov esi, inarea
mov edi, outarea
rep movsb
mov esi, inarea+20
mov ecx,5
tekstbin
mov[dag], eax
mov esi, inarea+30
mov ecx,5
tekstbin
mov[loon], eax
sub eax,eax
sub ebx,ebx
sub ecx,ecx
mov eax, [loon]
imul dword [dag]
sub edx,edx
mov edx,[Ntotaal]
add edx, eax
mov [Ntotaal],edx
sub edx,edx
mov ebx,10
std
mov edi,outarea+44
lus2 mov edx,0
idiv ebx
or dl,30h
xchg al,dl
stosb
xchg al,dl
cmp eax,0
jne lus2
mov eax, [loon]
imul dword [dag]
imul dword [veertig]
idiv dword [honderd]
mov [Bloon], eax
sub edx,edx
mov edx,[Btotaal]
add edx, eax
mov [Btotaal],edx
sub edx,edx
mov ebx,10
std
mov edi,outarea+54
lus mov edx,0
idiv ebx
or dl,30h
xchg al,dl
stosb
xchg al,dl
cmp eax,0
jne lus
schrijf
jmp hoger
eof: mov ecx,70
mov al, ''
mov edi, outarea
rep stosb
schrijf
mov eax, [Ntotaal]
mov ebx,10
std
mov edi,outarea+18
lus3 mov edx,0
idiv ebx
or dl,30h
xchg al,dl
stosb
xchg al,dl
cmp eax,0
jne lus3
mov eax, [Btotaal]
mov ebx,10
std
mov edi,outarea+25
lus4 mov edx,0
idiv ebx
or dl,30h
xchg al,dl
stosb
xchg al,dl
cmp eax,0
jne lus4
schrijf
slot