Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- zadanie 2
- .386
- .MODEL flat, STDCALL
- GetStdHandle PROTO :DWORD
- WriteConsoleA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD
- ReadConsoleA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD
- ExitProcess PROTO :DWORD
- .data
- sorce BYTE 10 dup(0)
- destination BYTE 10 dup(0)
- buffor BYTE 255 dup(0)
- odczyt DWORD 0
- wpis DWORD 0
- odczytane_znaki DWORD 0
- .code
- main proc
- push -11
- call GetStdHandle
- mov wpis,EAX
- push -10
- call GetStdHandle
- mov odczyt,EAX
- push 0
- push OFFSET odczytane_znaki
- push 10d
- push OFFSET sorce
- push odczyt
- call ReadConsoleA
- MOV ESI, OFFSET sorce
- MOV EDI, OFFSET destination
- MOV ECX,10d
- rep MOVSB
- push 0
- push OFFSET odczytane_znaki
- push 10d
- push OFFSET destination
- push wpis
- call WriteConsoleA
- push 0
- call ExitProcess
- main endp
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement